@sanity/client 3.0.2 → 3.0.6-new-polyfill-update

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,55 +1,55 @@
1
1
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SanityClient = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
2
  "use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}var assign=require("object-assign"),_require=require("../util/observable"),map=_require.map,filter=_require.filter,queryString=require("../http/queryString"),validators=require("../validators");function AssetsClient(e){this.client=e}function optionsFromFile(e,t){return"undefined"!=typeof window&&t instanceof window.File?assign({filename:!1===e.preserveFilename?void 0:t.name,contentType:t.type},e):e}assign(AssetsClient.prototype,{upload:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};validators.validateAssetType(e);var n=r.extract||void 0;n&&!n.length&&(n=["none"]);var i=validators.hasDataset(this.client.clientConfig),a="image"===e?"images":"files",o=optionsFromFile(r,t),s=o.tag,l=o.label,c=o.title,u=o.description,d=o.creditLine,y=o.filename,f=o.source,p={label:l,title:c,description:u,filename:y,meta:n,creditLine:d};f&&(p.sourceId=f.id,p.sourceName=f.name,p.sourceUrl=f.url);var m=this.client._requestObservable({tag:s,method:"POST",timeout:o.timeout||0,uri:"/assets/".concat(a,"/").concat(i),headers:o.contentType?{"Content-Type":o.contentType}:{},query:p,body:t});return this.client.isPromiseAPI()?m.pipe(filter(function(e){return"response"===e.type}),map(function(e){return e.body.document})).toPromise():m},delete:function(e,t){console.warn("client.assets.delete() is deprecated, please use client.delete(<document-id>)");var r=t||"";return/^(image|file)-/.test(r)?e._id&&(r=e._id):r="".concat(e,"-").concat(r),validators.hasDataset(this.client.clientConfig),this.client.delete(r)},getImageUrl:function(e,t){var r=e._ref||e;if("string"!=typeof r)throw new Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9_]+-\d+x\d+-[a-z]{1,5}$/.test(r))throw new Error('Unsupported asset ID "'.concat(r,'". URL generation only works for auto-generated IDs.'));var n=_slicedToArray(r.split("-"),4),i=n[1],a=n[2],o=n[3];validators.hasDataset(this.client.clientConfig);var s=this.client.clientConfig,l=s.projectId,c=s.dataset,u=t?queryString(t):"";return"https://cdn.sanity.io/images/".concat(l,"/").concat(c,"/").concat(i,"-").concat(a,".").concat(o).concat(u)}}),module.exports=AssetsClient;
3
3
 
4
- },{"../http/queryString":12,"../util/observable":20,"../validators":23,"object-assign":46}],2:[function(require,module,exports){
4
+ },{"../http/queryString":12,"../util/observable":20,"../validators":23,"object-assign":68}],2:[function(require,module,exports){
5
5
  "use strict";var assign=require("object-assign");function AuthClient(t){this.client=t}assign(AuthClient.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}}),module.exports=AuthClient;
6
6
 
7
- },{"object-assign":46}],3:[function(require,module,exports){
7
+ },{"object-assign":68}],3:[function(require,module,exports){
8
8
  "use strict";var generateHelpUrl=require("@sanity/generate-help-url"),assign=require("object-assign"),validate=require("./validators"),warnings=require("./warnings"),defaultCdnHost="apicdn.sanity.io",defaultConfig={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,isPromiseAPI:!0},LOCALHOSTS=["localhost","127.0.0.1","0.0.0.0"],isLocal=function(e){return-1!==LOCALHOSTS.indexOf(e)};exports.defaultConfig=defaultConfig,exports.initConfig=function(e,i){var n=assign({},i,e);n.apiVersion||warnings.printNoApiVersionSpecifiedWarning();var t=assign({},defaultConfig,n),a=t.useProjectHostname;if("undefined"==typeof Promise){var o=generateHelpUrl("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(o))}if(a&&!t.projectId)throw new Error("Configuration must contain `projectId`");var r="undefined"!=typeof window&&window.location&&window.location.hostname,s=r&&isLocal(window.location.hostname);r&&s&&t.token&&!0!==t.ignoreBrowserTokenWarning?warnings.printBrowserTokenWarning():void 0===t.useCdn&&warnings.printCdnWarning(),a&&validate.projectId(t.projectId),t.dataset&&validate.dataset(t.dataset),"requestTagPrefix"in t&&(t.requestTagPrefix=t.requestTagPrefix?validate.requestTag(t.requestTagPrefix).replace(/\.+$/,""):void 0),t.apiVersion="".concat(t.apiVersion).replace(/^v/,""),t.isDefaultApi=t.apiHost===defaultConfig.apiHost,t.useCdn=Boolean(t.useCdn)&&!t.withCredentials,exports.validateApiVersion(t.apiVersion);var c=t.apiHost.split("://",2),d=c[0],l=c[1],p=t.isDefaultApi?defaultCdnHost:l;return t.useProjectHostname?(t.url="".concat(d,"://").concat(t.projectId,".").concat(l,"/v").concat(t.apiVersion),t.cdnUrl="".concat(d,"://").concat(t.projectId,".").concat(p,"/v").concat(t.apiVersion)):(t.url="".concat(t.apiHost,"/v").concat(t.apiVersion),t.cdnUrl=t.url),t},exports.validateApiVersion=function(e){if("1"!==e&&"X"!==e){var i=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&i instanceof Date&&i.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}};
9
9
 
10
- },{"./validators":23,"./warnings":24,"@sanity/generate-help-url":27,"object-assign":46}],4:[function(require,module,exports){
11
- "use strict";function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var assign=require("object-assign"),_require=require("../util/observable"),map=_require.map,filter=_require.filter,validators=require("../validators"),getSelection=require("../util/getSelection"),encodeQueryString=require("./encodeQueryString"),Transaction=require("./transaction"),Patch=require("./patch"),listen=require("./listen"),excludeFalsey=function(e,t){return!1===e?void 0:void 0===e?t:e},getMutationQuery=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{returnIds:!0,returnDocuments:excludeFalsey(e.returnDocuments,!0),visibility:e.visibility||"sync"}},isResponse=function(e){return"response"===e.type},getBody=function(e){return e.body},indexBy=function(e,t){return e.reduce(function(e,r){return e[t(r)]=r,e},Object.create(null))},toPromise=function(e){return e.toPromise()},getQuerySizeLimit=11264;module.exports={listen:listen,getDataUrl:function(e,t){var r=this.clientConfig,n=validators.hasDataset(r),i="/".concat(e,"/").concat(n),u=t?"".concat(i,"/").concat(t):i;return"/data".concat(u).replace(/\/($|\?)/,"$1")},fetch:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=!1===r.filterResponse?function(e){return e}:function(e){return e.result},i=this._dataRequest("query",{query:e,params:t},r).pipe(map(n));return this.isPromiseAPI()?toPromise(i):i},getDocument:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",e),json:!0,tag:t.tag},n=this._requestObservable(r).pipe(filter(isResponse),map(function(e){return e.body.documents&&e.body.documents[0]}));return this.isPromiseAPI()?toPromise(n):n},getDocuments:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",e.join(",")),json:!0,tag:t.tag},n=this._requestObservable(r).pipe(filter(isResponse),map(function(t){var r=indexBy(t.body.documents||[],function(e){return e._id});return e.map(function(e){return r[e]||null})}));return this.isPromiseAPI()?toPromise(n):n},create:function(e,t){return this._create(e,"create",t)},createIfNotExists:function(e,t){return validators.requireDocumentId("createIfNotExists",e),this._create(e,"createIfNotExists",t)},createOrReplace:function(e,t){return validators.requireDocumentId("createOrReplace",e),this._create(e,"createOrReplace",t)},patch:function(e,t){return new Patch(e,t,this)},delete:function(e,t){return this.dataRequest("mutate",{mutations:[{delete:getSelection(e)}]},t)},mutate:function(e,t){var r=e instanceof Patch||e instanceof Transaction?e.serialize():e,n=Array.isArray(r)?r:[r],i=t&&t.transactionId;return this.dataRequest("mutate",{mutations:n,transactionId:i},t)},transaction:function(e){return new Transaction(e,this)},dataRequest:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._dataRequest(e,t,r);return this.isPromiseAPI()?toPromise(n):n},_dataRequest:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="mutate"===e,i="query"===e,u=!n&&encodeQueryString(t),a=!n&&u.length<getQuerySizeLimit,o=a?u:"",s=r.returnFirst,c=r.timeout,d=r.token,l=r.tag,f={method:a?"GET":"POST",uri:this.getDataUrl(e,o),json:!0,body:a?void 0:t,query:n&&getMutationQuery(r),timeout:c,token:d,tag:l,canUseCdn:i};return this._requestObservable(f).pipe(filter(isResponse),map(getBody),map(function(e){if(!n)return e;var t=e.results||[];if(r.returnDocuments)return s?t[0]&&t[0].document:t.map(function(e){return e.document});var i=s?"documentId":"documentIds",u=s?t[0]&&t[0].id:t.map(function(e){return e.id});return _defineProperty({transactionId:e.transactionId,results:t},i,u)}))},_create:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=_defineProperty({},t,e),i=assign({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[n]},i)}};
10
+ },{"./validators":23,"./warnings":24,"@sanity/generate-help-url":25,"object-assign":68}],4:[function(require,module,exports){
11
+ "use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var assign=require("object-assign"),_require=require("../util/observable"),map=_require.map,filter=_require.filter,validators=require("../validators"),getSelection=require("../util/getSelection"),encodeQueryString=require("./encodeQueryString"),Transaction=require("./transaction"),Patch=require("./patch"),listen=require("./listen"),excludeFalsey=function(e,t){return!1===e?void 0:void 0===e?t:e},getMutationQuery=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _objectSpread({returnIds:!0,returnDocuments:excludeFalsey(e.returnDocuments,!0),visibility:e.visibility||"sync"},e.skipCrossDatasetReferenceValidation&&{skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation})},isResponse=function(e){return"response"===e.type},getBody=function(e){return e.body},indexBy=function(e,t){return e.reduce(function(e,r){return e[t(r)]=r,e},Object.create(null))},toPromise=function(e){return e.toPromise()},getQuerySizeLimit=11264;module.exports={listen:listen,getDataUrl:function(e,t){var r=this.clientConfig,n=validators.hasDataset(r),i="/".concat(e,"/").concat(n),o=t?"".concat(i,"/").concat(t):i;return"/data".concat(o).replace(/\/($|\?)/,"$1")},fetch:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=!1===r.filterResponse?function(e){return e}:function(e){return e.result},i=this._dataRequest("query",{query:e,params:t},r).pipe(map(n));return this.isPromiseAPI()?toPromise(i):i},getDocument:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",e),json:!0,tag:t.tag},n=this._requestObservable(r).pipe(filter(isResponse),map(function(e){return e.body.documents&&e.body.documents[0]}));return this.isPromiseAPI()?toPromise(n):n},getDocuments:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",e.join(",")),json:!0,tag:t.tag},n=this._requestObservable(r).pipe(filter(isResponse),map(function(t){var r=indexBy(t.body.documents||[],function(e){return e._id});return e.map(function(e){return r[e]||null})}));return this.isPromiseAPI()?toPromise(n):n},create:function(e,t){return this._create(e,"create",t)},createIfNotExists:function(e,t){return validators.requireDocumentId("createIfNotExists",e),this._create(e,"createIfNotExists",t)},createOrReplace:function(e,t){return validators.requireDocumentId("createOrReplace",e),this._create(e,"createOrReplace",t)},patch:function(e,t){return new Patch(e,t,this)},delete:function(e,t){return this.dataRequest("mutate",{mutations:[{delete:getSelection(e)}]},t)},mutate:function(e,t){var r=e instanceof Patch||e instanceof Transaction?e.serialize():e,n=Array.isArray(r)?r:[r],i=t&&t.transactionId;return this.dataRequest("mutate",{mutations:n,transactionId:i},t)},transaction:function(e){return new Transaction(e,this)},dataRequest:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._dataRequest(e,t,r);return this.isPromiseAPI()?toPromise(n):n},_dataRequest:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="mutate"===e,i="query"===e,o=!n&&encodeQueryString(t),a=!n&&o.length<getQuerySizeLimit,u=a?o:"",s=r.returnFirst,c=r.timeout,d=r.token,l=r.tag,f={method:a?"GET":"POST",uri:this.getDataUrl(e,u),json:!0,body:a?void 0:t,query:n&&getMutationQuery(r),timeout:c,token:d,tag:l,canUseCdn:i};return this._requestObservable(f).pipe(filter(isResponse),map(getBody),map(function(e){if(!n)return e;var t=e.results||[];if(r.returnDocuments)return s?t[0]&&t[0].document:t.map(function(e){return e.document});var i=s?"documentId":"documentIds",o=s?t[0]&&t[0].id:t.map(function(e){return e.id});return _defineProperty({transactionId:e.transactionId,results:t},i,o)}))},_create:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=_defineProperty({},t,e),i=assign({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[n]},i)}};
12
12
 
13
- },{"../util/getSelection":19,"../util/observable":20,"../validators":23,"./encodeQueryString":5,"./listen":6,"./patch":7,"./transaction":8,"object-assign":46}],5:[function(require,module,exports){
13
+ },{"../util/getSelection":19,"../util/observable":20,"../validators":23,"./encodeQueryString":5,"./listen":6,"./patch":7,"./transaction":8,"object-assign":68}],5:[function(require,module,exports){
14
14
  "use strict";var _excluded=["tag"];function _objectWithoutProperties(e,t){if(null==e)return{};var c,o,n=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)c=r[o],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(n[c]=e[c])}return n}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var c,o,n={},r=Object.keys(e);for(o=0;o<r.length;o++)c=r[o],t.indexOf(c)>=0||(n[c]=e[c]);return n}var enc=encodeURIComponent;module.exports=function(e){var t=e.query,c=e.params,o=void 0===c?{}:c,n=e.options,r=void 0===n?{}:n,u=r.tag,a=_objectWithoutProperties(r,_excluded),i="query=".concat(enc(t)),s=u?"?tag=".concat(enc(u),"&").concat(i):"?".concat(i),l=Object.keys(o).reduce(function(e,t){return"".concat(e,"&").concat(enc("$".concat(t)),"=").concat(enc(JSON.stringify(o[t])))},s);return Object.keys(a).reduce(function(e,t){return r[t]?"".concat(e,"&").concat(enc(t),"=").concat(enc(r[t])):e},l)};
15
15
 
16
16
  },{}],6:[function(require,module,exports){
17
- "use strict";function ownKeys(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,t)}return n}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(n),!0).forEach(function(r){_defineProperty(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _defineProperty(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var assign=require("object-assign"),_require=require("../util/observable"),Observable=_require.Observable,polyfilledEventSource=require("@sanity/eventsource"),generateHelpUrl=require("@sanity/generate-help-url"),pick=require("../util/pick"),once=require("../util/once"),defaults=require("../util/defaults"),encodeQueryString=require("./encodeQueryString"),MAX_URL_LENGTH=14800,tokenWarning=["Using token with listeners is not supported in browsers. ","For more info, see ".concat(generateHelpUrl("js-client-listener-tokens-browser"),".")],printTokenWarning=once(function(){return console.warn(tokenWarning.join(" "))}),isWindowEventSource=Boolean("undefined"!=typeof window&&window.EventSource),EventSource=isWindowEventSource?window.EventSource:polyfilledEventSource,possibleOptions=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],defaultOptions={includeResult:!0};function parseEvent(e){try{var r=e.data&&JSON.parse(e.data)||{};return assign({type:e.type},r)}catch(e){return e}}function cooerceError(e){if(e instanceof Error)return e;var r=parseEvent(e);return r instanceof Error?r:new Error(extractErrorMessage(r))}function extractErrorMessage(e){return e.error?e.error.description?e.error.description:"string"==typeof e.error?e.error:JSON.stringify(e.error,null,2):e.message||"Unknown listener error"}module.exports=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=this.clientConfig,o=t.url,i=t.token,c=t.withCredentials,s=t.requestTagPrefix,u=n.tag&&s?[s,n.tag].join("."):n.tag,a=_objectSpread(_objectSpread({},defaults(n,defaultOptions)),{},{tag:u}),l=pick(a,possibleOptions),f=encodeQueryString({query:e,params:r,options:l,tag:u}),p="".concat(o).concat(this.getDataUrl("listen",f));if(p.length>MAX_URL_LENGTH)return new Observable(function(e){return e.error(new Error("Query too large for listener"))});var d=a.events?a.events:["mutation"],v=-1!==d.indexOf("reconnect");i&&isWindowEventSource&&printTokenWarning();var g={};return(i||c)&&(g.withCredentials=!0),i&&(g.headers={Authorization:"Bearer ".concat(i)}),new Observable(function(e){var r,n=a(),t=!1;function o(){t||(v&&e.next({type:"reconnect"}),t||n.readyState===EventSource.CLOSED&&(u(),clearTimeout(r),r=setTimeout(l,100)))}function i(r){e.error(cooerceError(r))}function c(r){var n=parseEvent(r);return n instanceof Error?e.error(n):e.next(n)}function s(r){t=!0,u(),e.complete()}function u(){n.removeEventListener("error",o,!1),n.removeEventListener("channelError",i,!1),n.removeEventListener("disconnect",s,!1),d.forEach(function(e){return n.removeEventListener(e,c,!1)}),n.close()}function a(){var e=new EventSource(p,g);return e.addEventListener("error",o,!1),e.addEventListener("channelError",i,!1),e.addEventListener("disconnect",s,!1),d.forEach(function(r){return e.addEventListener(r,c,!1)}),e}function l(){n=a()}return function(){t=!0,u()}})};
17
+ "use strict";function ownKeys(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,t)}return n}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(n),!0).forEach(function(r){_defineProperty(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _defineProperty(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var assign=require("object-assign"),_require=require("../util/observable"),Observable=_require.Observable,generateHelpUrl=require("@sanity/generate-help-url"),pick=require("../util/pick"),once=require("../util/once"),defaults=require("../util/defaults"),encodeQueryString=require("./encodeQueryString"),eventsource=require("eventsource"),MAX_URL_LENGTH=14800,tokenWarning=["Using token with listeners is not supported in browsers. ","For more info, see ".concat(generateHelpUrl("js-client-listener-tokens-browser"),".")],printTokenWarning=once(function(){return console.warn(tokenWarning.join(" "))}),isWindowEventSource=Boolean("undefined"!=typeof window&&window.EventSource),EventSource=eventsource,possibleOptions=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],defaultOptions={includeResult:!0};function parseEvent(e){try{var r=e.data&&JSON.parse(e.data)||{};return assign({type:e.type},r)}catch(e){return e}}function cooerceError(e){if(e instanceof Error)return e;var r=parseEvent(e);return r instanceof Error?r:new Error(extractErrorMessage(r))}function extractErrorMessage(e){return e.error?e.error.description?e.error.description:"string"==typeof e.error?e.error:JSON.stringify(e.error,null,2):e.message||"Unknown listener error"}module.exports=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=this.clientConfig,o=t.url,i=t.token,c=t.withCredentials,s=t.requestTagPrefix,a=n.tag&&s?[s,n.tag].join("."):n.tag,u=_objectSpread(_objectSpread({},defaults(n,defaultOptions)),{},{tag:a}),l=pick(u,possibleOptions),f=encodeQueryString({query:e,params:r,options:l,tag:a}),p="".concat(o).concat(this.getDataUrl("listen",f));if(p.length>MAX_URL_LENGTH)return new Observable(function(e){return e.error(new Error("Query too large for listener"))});var v=u.events?u.events:["mutation"],d=-1!==v.indexOf("reconnect");i&&isWindowEventSource&&printTokenWarning();var g={};return(i||c)&&(g.withCredentials=!0),i&&(g.headers={Authorization:"Bearer ".concat(i)}),new Observable(function(e){var r,n=u(),t=!1;function o(){t||(d&&e.next({type:"reconnect"}),t||n.readyState===EventSource.CLOSED&&(a(),clearTimeout(r),r=setTimeout(l,100)))}function i(r){e.error(cooerceError(r))}function c(r){var n=parseEvent(r);return n instanceof Error?e.error(n):e.next(n)}function s(r){t=!0,a(),e.complete()}function a(){n.removeEventListener("error",o,!1),n.removeEventListener("channelError",i,!1),n.removeEventListener("disconnect",s,!1),v.forEach(function(e){return n.removeEventListener(e,c,!1)}),n.close()}function u(){var e=new EventSource(p,g);return e.addEventListener("error",o,!1),e.addEventListener("channelError",i,!1),e.addEventListener("disconnect",s,!1),v.forEach(function(r){return e.addEventListener(r,c,!1)}),e}function l(){n=u()}return function(){t=!0,a()}})};
18
18
 
19
- },{"../util/defaults":18,"../util/observable":20,"../util/once":21,"../util/pick":22,"./encodeQueryString":5,"@sanity/eventsource":26,"@sanity/generate-help-url":27,"object-assign":46}],7:[function(require,module,exports){
19
+ },{"../util/defaults":18,"../util/observable":20,"../util/once":21,"../util/pick":22,"./encodeQueryString":5,"@sanity/generate-help-url":25,"eventsource":35,"object-assign":68}],7:[function(require,module,exports){
20
20
  "use strict";function _defineProperty(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var assign=require("object-assign"),getSelection=require("../util/getSelection"),validate=require("../validators"),validateObject=validate.validateObject,validateInsert=validate.validateInsert;function Patch(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.selection=t,this.operations=assign({},e),this.client=i}assign(Patch.prototype,{clone:function(){return new Patch(this.selection,assign({},this.operations),this.client)},set:function(t){return this._assign("set",t)},diffMatchPatch:function(t){return validateObject("diffMatchPatch",t),this._assign("diffMatchPatch",t)},unset:function(t){if(!Array.isArray(t))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=assign({},this.operations,{unset:t}),this},setIfMissing:function(t){return this._assign("setIfMissing",t)},replace:function(t){return validateObject("replace",t),this._set("set",{$:t})},inc:function(t){return this._assign("inc",t)},dec:function(t){return this._assign("dec",t)},insert:function(t,e,i){var n;return validateInsert(t,e,i),this._assign("insert",(_defineProperty(n={},t,e),_defineProperty(n,"items",i),n))},append:function(t,e){return this.insert("after","".concat(t,"[-1]"),e)},prepend:function(t,e){return this.insert("before","".concat(t,"[0]"),e)},splice:function(t,e,i,n){var s=e<0?e-1:e,r=void 0===i||-1===i?-1:Math.max(0,e+i),a=s<0&&r>=0?"":r,o="".concat(t,"[").concat(s,":").concat(a,"]");return this.insert("replace",o,n||[])},ifRevisionId:function(t){return this.operations.ifRevisionID=t,this},serialize:function(){return assign(getSelection(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.client)throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var e="string"==typeof this.selection,i=assign({returnFirst:e,returnDocuments:!0},t);return this.client.mutate({patch:this.serialize()},i)},reset:function(){return this.operations={},this},_set:function(t,e){return this._assign(t,e,!1)},_assign:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return validateObject(t,e),this.operations=assign({},this.operations,_defineProperty({},t,assign({},i&&this.operations[t]||{},e))),this}}),module.exports=Patch;
21
21
 
22
- },{"../util/getSelection":19,"../validators":23,"object-assign":46}],8:[function(require,module,exports){
22
+ },{"../util/getSelection":19,"../validators":23,"object-assign":68}],8:[function(require,module,exports){
23
23
  "use strict";function _defineProperty(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var assign=require("object-assign"),validators=require("../validators"),Patch=require("./patch"),defaultMutateOptions={returnDocuments:!1};function Transaction(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;this.trxId=i,this.operations=t,this.client=e}assign(Transaction.prototype,{clone:function(){return new Transaction(this.operations.slice(0),this.client,this.trxId)},create:function(t){return validators.validateObject("create",t),this._add({create:t})},createIfNotExists:function(t){var e="createIfNotExists";return validators.validateObject(e,t),validators.requireDocumentId(e,t),this._add(_defineProperty({},e,t))},createOrReplace:function(t){var e="createOrReplace";return validators.validateObject(e,t),validators.requireDocumentId(e,t),this._add(_defineProperty({},e,t))},delete:function(t){return validators.validateDocumentId("delete",t),this._add({delete:{id:t}})},patch:function(t,e){var i="function"==typeof e;if(t instanceof Patch)return this._add({patch:t.serialize()});if(i){var r=e(new Patch(t,{},this.client));if(!(r instanceof Patch))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:assign({id:t},e)})},transactionId:function(t){return t?(this.trxId=t,this):this.trxId},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(t){if(!this.client)throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),assign({transactionId:this.trxId},defaultMutateOptions,t||{}))},reset:function(){return this.operations=[],this},_add:function(t){return this.operations.push(t),this}}),module.exports=Transaction;
24
24
 
25
- },{"../validators":23,"./patch":7,"object-assign":46}],9:[function(require,module,exports){
25
+ },{"../validators":23,"./patch":7,"object-assign":68}],9:[function(require,module,exports){
26
26
  "use strict";var assign=require("object-assign"),validate=require("../validators");function DatasetsClient(t){this.request=t.request.bind(t)}assign(DatasetsClient.prototype,{create:function(t,e){return this._modify("PUT",t,e)},edit:function(t,e){return this._modify("PATCH",t,e)},delete:function(t){return this._modify("DELETE",t)},list:function(){return this.request({uri:"/datasets"})},_modify:function(t,e,i){return validate.dataset(e),this.request({method:t,uri:"/datasets/".concat(e),body:i})}}),module.exports=DatasetsClient;
27
27
 
28
- },{"../validators":23,"object-assign":46}],10:[function(require,module,exports){
28
+ },{"../validators":23,"object-assign":68}],10:[function(require,module,exports){
29
29
  "use strict";module.exports=[];
30
30
 
31
31
  },{}],11:[function(require,module,exports){
32
32
  "use strict";var makeError=require("make-error"),assign=require("object-assign");function ClientError(r){var e=extractErrorProps(r);ClientError.super.call(this,e.message),assign(this,e)}function ServerError(r){var e=extractErrorProps(r);ServerError.super.call(this,e.message),assign(this,e)}function extractErrorProps(r){var e=r.body,s={response:r,statusCode:r.statusCode,responseBody:stringifyBody(e,r)};return e.error&&e.message?(s.message="".concat(e.error," - ").concat(e.message),s):e.error&&e.error.description?(s.message=e.error.description,s.details=e.error,s):(s.message=e.error||e.message||httpErrorMessage(r),s)}function httpErrorMessage(r){var e=r.statusMessage?" ".concat(r.statusMessage):"";return"".concat(r.method,"-request to ").concat(r.url," resulted in HTTP ").concat(r.statusCode).concat(e)}function stringifyBody(r,e){return-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r}makeError(ClientError),makeError(ServerError),exports.ClientError=ClientError,exports.ServerError=ServerError;
33
33
 
34
- },{"make-error":44,"object-assign":46}],12:[function(require,module,exports){
34
+ },{"make-error":66,"object-assign":68}],12:[function(require,module,exports){
35
35
  "use strict";module.exports=function(n){var o=[];for(var e in n)n.hasOwnProperty(e)&&o.push("".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(n[e])));return o.length>0?"?".concat(o.join("&")):""};
36
36
 
37
37
  },{}],13:[function(require,module,exports){
38
38
  "use strict";var getIt=require("get-it"),assign=require("object-assign"),observable=require("get-it/lib/middleware/observable"),jsonRequest=require("get-it/lib/middleware/jsonRequest"),jsonResponse=require("get-it/lib/middleware/jsonResponse"),progress=require("get-it/lib/middleware/progress"),_require=require("../util/observable"),Observable=_require.Observable,_require2=require("./errors"),ClientError=_require2.ClientError,ServerError=_require2.ServerError,httpError={onResponse:function(e){if(e.statusCode>=500)throw new ServerError(e);if(e.statusCode>=400)throw new ClientError(e);return e}},printWarnings={onResponse:function(e){var r=e.headers["x-sanity-warning"];return(Array.isArray(r)?r:[r]).filter(Boolean).forEach(function(e){return console.warn(e)}),e}},envSpecific=require("./nodeMiddleware"),middleware=envSpecific.concat([printWarnings,jsonRequest(),jsonResponse(),progress(),httpError,observable({implementation:Observable})]),request=getIt(middleware);function httpRequest(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:request)(assign({maxRedirects:0},e))}httpRequest.defaultRequester=request,httpRequest.ClientError=ClientError,httpRequest.ServerError=ServerError,module.exports=httpRequest;
39
39
 
40
- },{"../util/observable":20,"./errors":11,"./nodeMiddleware":10,"get-it":28,"get-it/lib/middleware/jsonRequest":32,"get-it/lib/middleware/jsonResponse":33,"get-it/lib/middleware/observable":34,"get-it/lib/middleware/progress":36,"object-assign":46}],14:[function(require,module,exports){
40
+ },{"../util/observable":20,"./errors":11,"./nodeMiddleware":10,"get-it":40,"get-it/lib/middleware/jsonRequest":44,"get-it/lib/middleware/jsonResponse":45,"get-it/lib/middleware/observable":46,"get-it/lib/middleware/progress":48,"object-assign":68}],14:[function(require,module,exports){
41
41
  "use strict";var assign=require("object-assign"),projectHeader="X-Sanity-Project-ID";module.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={},r=t.token||e.token;r&&(o.Authorization="Bearer ".concat(r)),t.useGlobalApi||e.useProjectHostname||!e.projectId||(o[projectHeader]=e.projectId);var i=Boolean(void 0===t.withCredentials?e.token||e.withCredentials:t.withCredentials),a=void 0===t.timeout?e.timeout:t.timeout;return assign({},t,{headers:assign({},o,t.headers||{}),timeout:void 0===a?3e5:a,proxy:t.proxy||e.proxy,json:!0,withCredentials:i})};
42
42
 
43
- },{"object-assign":46}],15:[function(require,module,exports){
43
+ },{"object-assign":68}],15:[function(require,module,exports){
44
44
  "use strict";var assign=require("object-assign");function ProjectsClient(t){this.client=t}assign(ProjectsClient.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(t){return this.client.request({uri:"/projects/".concat(t)})}}),module.exports=ProjectsClient;
45
45
 
46
- },{"object-assign":46}],16:[function(require,module,exports){
46
+ },{"object-assign":68}],16:[function(require,module,exports){
47
47
  "use strict";function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach(function(t){_defineProperty(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var assign=require("object-assign"),_require=require("./util/observable"),Observable=_require.Observable,map=_require.map,filter=_require.filter,Patch=require("./data/patch"),Transaction=require("./data/transaction"),dataMethods=require("./data/dataMethods"),DatasetsClient=require("./datasets/datasetsClient"),ProjectsClient=require("./projects/projectsClient"),AssetsClient=require("./assets/assetsClient"),UsersClient=require("./users/usersClient"),AuthClient=require("./auth/authClient"),httpRequest=require("./http/request"),getRequestOptions=require("./http/requestOptions"),_require2=require("./config"),defaultConfig=_require2.defaultConfig,initConfig=_require2.initConfig,validate=require("./validators"),toPromise=function(e){return e.toPromise()};function SanityClient(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:defaultConfig;if(!(this instanceof SanityClient))return new SanityClient(e);if(this.config(e),this.assets=new AssetsClient(this),this.datasets=new DatasetsClient(this),this.projects=new ProjectsClient(this),this.users=new UsersClient(this),this.auth=new AuthClient(this),this.clientConfig.isPromiseAPI){var t=assign({},this.clientConfig,{isPromiseAPI:!1});this.observable=new SanityClient(t)}}assign(SanityClient.prototype,dataMethods),assign(SanityClient.prototype,{clone:function(){return new SanityClient(this.config())},config:function(e){if(void 0===e)return assign({},this.clientConfig);if(this.observable){var t=assign({},e,{isPromiseAPI:!1});this.observable.config(t)}return this.clientConfig=initConfig(e,this.clientConfig||{}),this},withConfig:function(e){return this.clone().config(e)},getUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(t,"/").concat(e.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(e){var t=this,i=e.url||e.uri,r=void 0===e.canUseCdn?["GET","HEAD"].indexOf(e.method||"GET")>=0&&0===i.indexOf("/data/"):e.canUseCdn,n=this.clientConfig.useCdn&&r,s=e.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,e.tag].join("."):e.tag||this.clientConfig.requestTagPrefix;s&&(e.query=_objectSpread({tag:validate.requestTag(s)},e.query));var o=getRequestOptions(this.clientConfig,assign({},e,{url:this.getUrl(i,n)}));return new Observable(function(e){return httpRequest(o,t.clientConfig.requester).subscribe(e)})},request:function(e){var t=this._requestObservable(e).pipe(filter(function(e){return"response"===e.type}),map(function(e){return e.body}));return this.isPromiseAPI()?toPromise(t):t}}),SanityClient.Patch=Patch,SanityClient.Transaction=Transaction,SanityClient.ClientError=httpRequest.ClientError,SanityClient.ServerError=httpRequest.ServerError,SanityClient.requester=httpRequest.defaultRequester,module.exports=SanityClient;
48
48
 
49
- },{"./assets/assetsClient":1,"./auth/authClient":2,"./config":3,"./data/dataMethods":4,"./data/patch":7,"./data/transaction":8,"./datasets/datasetsClient":9,"./http/request":13,"./http/requestOptions":14,"./projects/projectsClient":15,"./users/usersClient":17,"./util/observable":20,"./validators":23,"object-assign":46}],17:[function(require,module,exports){
49
+ },{"./assets/assetsClient":1,"./auth/authClient":2,"./config":3,"./data/dataMethods":4,"./data/patch":7,"./data/transaction":8,"./datasets/datasetsClient":9,"./http/request":13,"./http/requestOptions":14,"./projects/projectsClient":15,"./users/usersClient":17,"./util/observable":20,"./validators":23,"object-assign":68}],17:[function(require,module,exports){
50
50
  "use strict";var assign=require("object-assign");function UsersClient(e){this.client=e}assign(UsersClient.prototype,{getById:function(e){return this.client.request({uri:"/users/".concat(e)})}}),module.exports=UsersClient;
51
51
 
52
- },{"object-assign":46}],18:[function(require,module,exports){
52
+ },{"object-assign":68}],18:[function(require,module,exports){
53
53
  "use strict";module.exports=function(e,t){return Object.keys(t).concat(Object.keys(e)).reduce(function(c,n){return c[n]=void 0===e[n]?t[n]:e[n],c},{})};
54
54
 
55
55
  },{}],19:[function(require,module,exports){
@@ -58,7 +58,7 @@
58
58
  },{}],20:[function(require,module,exports){
59
59
  "use strict";var _require=require("rxjs/internal/Observable"),Observable=_require.Observable,_require2=require("rxjs/internal/operators/filter"),filter=_require2.filter,_require3=require("rxjs/internal/operators/map"),map=_require3.map;module.exports={Observable:Observable,filter:filter,map:map};
60
60
 
61
- },{"rxjs/internal/Observable":50,"rxjs/internal/operators/filter":55,"rxjs/internal/operators/map":56}],21:[function(require,module,exports){
61
+ },{"rxjs/internal/Observable":78,"rxjs/internal/operators/filter":83,"rxjs/internal/operators/map":84}],21:[function(require,module,exports){
62
62
  "use strict";module.exports=function(r){var t,n=!1;return function(){return n?t:(t=r.apply(void 0,arguments),n=!0,t)}};
63
63
 
64
64
  },{}],22:[function(require,module,exports){
@@ -70,149 +70,351 @@
70
70
  },{}],24:[function(require,module,exports){
71
71
  "use strict";var generateHelpUrl=require("@sanity/generate-help-url"),once=require("./util/once"),createWarningPrinter=function(e){return once(function(){for(var n,r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];return(n=console).warn.apply(n,[e.join(" ")].concat(t))})};exports.printCdnWarning=createWarningPrinter(["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and","cheaper. Think about it! For more info, see ".concat(generateHelpUrl("js-client-cdn-configuration"),"."),"To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."]),exports.printBrowserTokenWarning=createWarningPrinter(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.","See ".concat(generateHelpUrl("js-client-browser-token")," for more information and how to hide this warning.")]),exports.printNoApiVersionSpecifiedWarning=createWarningPrinter(["Using the Sanity client without specifying an API version is deprecated.","See ".concat(generateHelpUrl("js-client-api-version"))]);
72
72
 
73
- },{"./util/once":21,"@sanity/generate-help-url":27}],25:[function(require,module,exports){
74
- (function (global){(function (){
75
- !function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{if(global.EventSource&&!global._eventSourceImportPrefix)return;t[(t._eventSourceImportPrefix||"")+"EventSource"]=e()}}("undefined"==typeof self?this:self,function(){var t=function(t,e){if(!t||"string"!=typeof t)throw new SyntaxError("Not enough arguments");this.URL=t,this.setOptions(e);var i=this;setTimeout(function(){i.poll()},0)};if(t.prototype={CONNECTING:0,OPEN:1,CLOSED:2,defaultOptions:{loggingEnabled:!1,loggingPrefix:"eventsource",interval:500,bufferSizeLimit:262144,silentTimeout:3e5,getArgs:{evs_buffer_size_limit:262144},xhrHeaders:{Accept:"text/event-stream","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}},setOptions:function(t){var e,i=this.defaultOptions;for(e in i)i.hasOwnProperty(e)&&(this[e]=i[e]);for(e in t)e in i&&t.hasOwnProperty(e)&&(this[e]=t[e]);this.getArgs&&this.bufferSizeLimit&&(this.getArgs.evs_buffer_size_limit=this.bufferSizeLimit),"undefined"!=typeof console&&void 0!==console.log||(this.loggingEnabled=!1)},log:function(t){this.loggingEnabled&&console.log("["+this.loggingPrefix+"]:"+t)},poll:function(){try{if(this.readyState==this.CLOSED)return;this.cleanup(),this.readyState=this.CONNECTING,this.cursor=0,this.cache="",this._xhr=new this.XHR(this),this.resetNoActivityTimer()}catch(t){this.log("There were errors inside the pool try-catch"),this.dispatchEvent("error",{type:"error",data:t.message})}},pollAgain:function(t){var e=this;e.readyState=e.CONNECTING,e.dispatchEvent("error",{type:"error",data:"Reconnecting "}),this._pollTimer=setTimeout(function(){e.poll()},t||0)},cleanup:function(){this.log("evs cleaning up"),this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null),this._noActivityTimer&&(clearInterval(this._noActivityTimer),this._noActivityTimer=null),this._xhr&&(this._xhr.abort(),this._xhr=null)},resetNoActivityTimer:function(){if(this.silentTimeout){this._noActivityTimer&&clearInterval(this._noActivityTimer);var t=this;this._noActivityTimer=setTimeout(function(){t.log("Timeout! silentTImeout:"+t.silentTimeout),t.pollAgain()},this.silentTimeout)}},close:function(){this.readyState=this.CLOSED,this.log("Closing connection. readyState: "+this.readyState),this.cleanup()},_onxhrdata:function(){var t=this._xhr;if(t.isReady()&&!t.hasError()){this.resetNoActivityTimer(),this.readyState==this.CONNECTING&&(this.readyState=this.OPEN,this.dispatchEvent("open",{type:"open"}));var e=t.getBuffer();e.length>this.bufferSizeLimit&&(this.log("buffer.length > this.bufferSizeLimit"),this.pollAgain()),0==this.cursor&&e.length>0&&"\ufeff"==e.substring(0,1)&&(this.cursor=1);var i=this.lastMessageIndex(e);if(i[0]>=this.cursor){var r=i[1],n=e.substring(this.cursor,r);this.parseStream(n),this.cursor=r}t.isDone()&&(this.log("request.isDone(). reopening the connection"),this.pollAgain(this.interval))}else this.readyState!==this.CLOSED&&(this.log("this.readyState !== this.CLOSED"),this.pollAgain(this.interval))},parseStream:function(t){var e,r,n,s,o,a,l=(t=this.cache+this.normalizeToLF(t)).split("\n\n");for(e=0;e<l.length-1;e++){n="message",s=[];var h=l[e].split("\n");for(r=0;r<h.length;r++)0==(o=this.trimWhiteSpace(h[r])).indexOf("event")?n=o.replace(/event:?\s*/,""):0==o.indexOf("retry")?(a=parseInt(o.replace(/retry:?\s*/,""),10),isNaN(a)||(this.interval=a)):0==o.indexOf("data")?s.push(o.replace(/data:?\s*/,"")):0==o.indexOf("id:")?this.lastEventId=o.replace(/id:?\s*/,""):0==o.indexOf("id")&&(this.lastEventId=null);if(s.length&&this.readyState!=this.CLOSED){var u=new i(n,s.join("\n"),"undefined"!=typeof window&&void 0!==window.location?window.location.origin:null,this.lastEventId);this.dispatchEvent(n,u)}}this.cache=l[l.length-1]},dispatchEvent:function(t,e){var i=this["_"+t+"Handlers"];if(i)for(var r=0;r<i.length;r++)i[r].call(this,e);this["on"+t]&&this["on"+t].call(this,e)},addEventListener:function(t,e){this["_"+t+"Handlers"]||(this["_"+t+"Handlers"]=[]),this["_"+t+"Handlers"].push(e)},removeEventListener:function(t,e){var i=this["_"+t+"Handlers"];if(i)for(var r=i.length-1;r>=0;--r)if(i[r]===e){i.splice(r,1);break}},_pollTimer:null,_noactivityTimer:null,_xhr:null,lastEventId:null,cache:"",cursor:0,onerror:null,onmessage:null,onopen:null,readyState:0,urlWithParams:function(t,e){var i=[];if(e){var r,n,s=encodeURIComponent;for(r in e)e.hasOwnProperty(r)&&(n=s(r)+"="+s(e[r]),i.push(n))}return i.length>0?-1==t.indexOf("?")?t+"?"+i.join("&"):t+"&"+i.join("&"):t},lastMessageIndex:function(t){var e=t.lastIndexOf("\n\n"),i=t.lastIndexOf("\r\r"),r=t.lastIndexOf("\r\n\r\n");return r>Math.max(e,i)?[r,r+4]:[Math.max(e,i),Math.max(e,i)+2]},trimWhiteSpace:function(t){return t.replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,"")},normalizeToLF:function(t){return t.replace(/\r\n|\r/g,"\n")}},Boolean("undefined"!=typeof window&&window.XDomainRequest&&window.XMLHttpRequest&&void 0===(new XMLHttpRequest).responseType)){t.isPolyfill="IE_8-9";var e=t.prototype.defaultOptions;e.xhrHeaders=null,e.getArgs.evs_preamble=2056,t.prototype.XHR=function(t){var e=new XDomainRequest;this._request=e,e.onprogress=function(){e._ready=!0,t._onxhrdata()},e.onload=function(){this._loaded=!0,t._onxhrdata()},e.onerror=function(){this._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"XDomainRequest error"})},e.ontimeout=function(){this._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"XDomainRequest timed out"})};var i={};if(t.getArgs){var r=t.getArgs;for(var n in r)r.hasOwnProperty(n)&&(i[n]=r[n]);t.lastEventId&&(i.evs_last_event_id=t.lastEventId)}e.open("GET",t.urlWithParams(t.URL,i)),e.send()},t.prototype.XHR.prototype={useXDomainRequest:!0,_request:null,_ready:!1,_loaded:!1,_failed:!1,isReady:function(){return this._request._ready},isDone:function(){return this._request._loaded},hasError:function(){return this._request._failed},getBuffer:function(){var t="";try{t=this._request.responseText||""}catch(t){}return t},abort:function(){this._request&&this._request.abort()}}}else t.isPolyfill="XHR",t.prototype.XHR=function(t){var e=new XMLHttpRequest;this._request=e,t._xhr=this,e.onreadystatechange=function(){e.readyState>1&&t.readyState!=t.CLOSED&&(200==e.status||e.status>=300&&e.status<400?t._onxhrdata():(e._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"The server responded with "+e.status}),t.close()))},e.onprogress=function(){},e.open("GET",t.urlWithParams(t.URL,t.getArgs),!0);var i=t.xhrHeaders;for(var r in i)i.hasOwnProperty(r)&&e.setRequestHeader(r,i[r]);t.lastEventId&&e.setRequestHeader("Last-Event-Id",t.lastEventId),e.send()},t.prototype.XHR.prototype={useXDomainRequest:!1,_request:null,_failed:!1,isReady:function(){return this._request.readyState>=2},isDone:function(){return 4==this._request.readyState},hasError:function(){return this._failed||this._request.status>=400},getBuffer:function(){var t="";try{t=this._request.responseText||""}catch(t){}return t},abort:function(){this._request&&this._request.abort()}};function i(t,e,i,r){this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.data=e||null,this.origin=i||"",this.lastEventId=r||"",this.type=t||"message"}return t});
73
+ },{"./util/once":21,"@sanity/generate-help-url":25}],25:[function(require,module,exports){
74
+ var baseUrl="https://docs.sanity.io/help/";module.exports=function(e){return baseUrl+e};
76
75
 
77
- }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
78
76
  },{}],26:[function(require,module,exports){
79
- var evs=require("@rexxars/eventsource-polyfill");module.exports="undefined"!=typeof window&&window.EventSource?window.EventSource:evs.EventSource;
77
+ (function (global){(function (){
78
+ "use strict";var possibleNames=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g="undefined"==typeof globalThis?global:globalThis;module.exports=function(){for(var r=[],a=0;a<possibleNames.length;a++)"function"==typeof g[possibleNames[a]]&&(r[r.length]=possibleNames[a]);return r};
80
79
 
81
- },{"@rexxars/eventsource-polyfill":25}],27:[function(require,module,exports){
82
- var baseUrl="https://docs.sanity.io/help/";module.exports=function(e){return baseUrl+e};
80
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
81
+ },{}],27:[function(require,module,exports){
82
+ "use strict";exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=o.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function byteLength(o){var r=getLens(o),e=r[0],t=r[1];return 3*(e+t)/4-t}function _byteLength(o,r,e){return 3*(r+e)/4-e}function toByteArray(o){var r,e,t=getLens(o),n=t[0],u=t[1],p=new Arr(_byteLength(o,n,u)),a=0,h=u>0?n-4:n;for(e=0;e<h;e+=4)r=revLookup[o.charCodeAt(e)]<<18|revLookup[o.charCodeAt(e+1)]<<12|revLookup[o.charCodeAt(e+2)]<<6|revLookup[o.charCodeAt(e+3)],p[a++]=r>>16&255,p[a++]=r>>8&255,p[a++]=255&r;return 2===u&&(r=revLookup[o.charCodeAt(e)]<<2|revLookup[o.charCodeAt(e+1)]>>4,p[a++]=255&r),1===u&&(r=revLookup[o.charCodeAt(e)]<<10|revLookup[o.charCodeAt(e+1)]<<4|revLookup[o.charCodeAt(e+2)]>>2,p[a++]=r>>8&255,p[a++]=255&r),p}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,n=[],u=r;u<e;u+=3)t=(o[u]<<16&16711680)+(o[u+1]<<8&65280)+(255&o[u+2]),n.push(tripletToBase64(t));return n.join("")}function fromByteArray(o){for(var r,e=o.length,t=e%3,n=[],u=0,p=e-t;u<p;u+=16383)n.push(encodeChunk(o,u,u+16383>p?p:u+16383));return 1===t?(r=o[e-1],n.push(lookup[r>>2]+lookup[r<<4&63]+"==")):2===t&&(r=(o[e-2]<<8)+o[e-1],n.push(lookup[r>>10]+lookup[r>>4&63]+lookup[r<<2&63]+"=")),n.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;
83
83
 
84
84
  },{}],28:[function(require,module,exports){
85
+
86
+ },{}],29:[function(require,module,exports){
87
+ (function (Buffer){(function (){
88
+ "use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;function typedArraySupport(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}function createBuffer(e){if(e>K_MAX_LENGTH)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return fromString(e,t);if(ArrayBuffer.isView(e))return fromArrayLike(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);var f=fromObject(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),f=n.write(e,t);return f!==r&&(n=n.slice(0,f)),n}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function fromArrayBuffer(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r)).__proto__=Buffer.prototype,n}function fromObject(e){if(Buffer.isBuffer(e)){var t=0|checked(e.length),r=createBuffer(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}return void 0!==e.length?"number"!=typeof e.length||numberIsNaN(e.length)?createBuffer(0):fromArrayLike(e):"Buffer"===e.type&&Array.isArray(e.data)?fromArrayLike(e.data):void 0}function checked(e){if(e>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function SlowBuffer(e){return+e!=e&&(e=0),Buffer.alloc(+e)}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var f=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(f)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),f=!0}}function slowToString(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))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,f){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=f?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(f)return-1;r=e.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,f);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,f){var i,o=1,u=e.length,s=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;o=2,u/=2,s/=2,r/=2}function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(f){var h=-1;for(i=r;i<u;i++)if(a(e,i)===a(t,-1===h?0:i-h)){if(-1===h&&(h=i),i-h+1===s)return h*o}else-1!==h&&(i-=i-h),h=-1}else for(r+s>u&&(r=u-s),i=r;i>=0;i--){for(var c=!0,l=0;l<s;l++)if(a(e,i+l)!==a(t,l)){c=!1;break}if(c)return i}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;var f=e.length-r;n?(n=Number(n))>f&&(n=f):n=f;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o<n;++o){var u=parseInt(t.substr(2*o,2),16);if(numberIsNaN(u))return o;e[r+o]=u}return o}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(asciiToBytes(t),e,r,n)}function latin1Write(e,t,r,n){return asciiWrite(e,t,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(utf16leToBytes(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?base64.fromByteArray(e):base64.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],f=t;f<r;){var i,o,u,s,a=e[f],h=null,c=a>239?4:a>223?3:a>191?2:1;if(f+c<=r)switch(c){case 1:a<128&&(h=a);break;case 2:128==(192&(i=e[f+1]))&&(s=(31&a)<<6|63&i)>127&&(h=s);break;case 3:i=e[f+1],o=e[f+2],128==(192&i)&&128==(192&o)&&(s=(15&a)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(h=s);break;case 4:i=e[f+1],o=e[f+2],u=e[f+3],128==(192&i)&&128==(192&o)&&128==(192&u)&&(s=(15&a)<<18|(63&i)<<12|(63&o)<<6|63&u)>65535&&s<1114112&&(h=s)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),f+=c}return decodeCodePointsArray(n)}exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(e,t,r){return alloc(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,f=0,i=Math.min(r,n);f<i;++f)if(e[f]!==t[f]){r=e[f],n=t[f];break}return r<n?-1:n<r?1:0},Buffer.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}},Buffer.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Buffer.allocUnsafe(t),f=0;for(r=0;r<e.length;++r){var i=e[r];if(isInstance(i,Uint8Array)&&(i=Buffer.from(i)),!Buffer.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,f),f+=i.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.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)swap(this,t,t+1);return this},Buffer.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)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.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)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function(){var e="",t=exports.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Buffer.prototype.compare=function(e,t,r,n,f){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),t<0||r>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&t>=r)return 0;if(n>=f)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(f>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),u=Math.min(i,o),s=this.slice(n,f),a=e.slice(t,r),h=0;h<u;++h)if(s[h]!==a[h]){i=s[h],o=a[h];break}return i<o?-1:o<i?1:0},Buffer.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.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 f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var f=t;f<r;++f)n+=String.fromCharCode(127&e[f]);return n}function latin1Slice(e,t,r){var n="";r=Math.min(e.length,r);for(var f=t;f<r;++f)n+=String.fromCharCode(e[f]);return n}function hexSlice(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var f="",i=t;i<r;++i)f+=toHex(e[i]);return f}function utf16leSlice(e,t,r){for(var n=e.slice(t,r),f="",i=0;i<n.length;i+=2)f+=String.fromCharCode(n[i]+256*n[i+1]);return f}function checkOffset(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 checkInt(e,t,r,n,f,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,f,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=Buffer.prototype,n},Buffer.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i<t&&(f*=256);)n+=this[e+i]*f;return n},Buffer.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],f=1;t>0&&(f*=256);)n+=this[e+--t]*f;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i<t&&(f*=256);)n+=this[e+i]*f;return n>=(f*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,f=1,i=this[e+--n];n>0&&(f*=256);)i+=this[e+--n]*f;return i>=(f*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=1,i=0;for(this[t]=255&e;++i<r&&(f*=256);)this[t+i]=e/f&255;return t+r},Buffer.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=r-1,i=1;for(this[t+f]=255&e;--f>=0&&(i*=256);)this[t+f]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=0,o=1,u=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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 f=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=f-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return f},Buffer.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var f=e.charCodeAt(0);("utf8"===n&&f<128||"latin1"===n)&&(e=f)}}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;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=Buffer.isBuffer(e)?e:Buffer.from(e,n),u=o.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%u]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function base64clean(e){if((e=(e=e.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){var r;t=t||1/0;for(var n=e.length,f=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!f){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(t-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function utf16leToBytes(e,t){for(var r,n,f,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(e){return base64.toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var f=0;f<n&&!(f+r>=t.length||f>=e.length);++f)t[f+r]=e[f];return f}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e}
89
+
90
+ }).call(this)}).call(this,require("buffer").Buffer)
91
+ },{"base64-js":27,"buffer":29,"ieee754":59}],30:[function(require,module,exports){
92
+ module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};
93
+
94
+ },{}],31:[function(require,module,exports){
95
+ "use strict";var GetIntrinsic=require("get-intrinsic"),callBind=require("./"),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function(i,n){var t=GetIntrinsic(i,!!n);return"function"==typeof t&&$indexOf(i,".prototype.")>-1?callBind(t):t};
96
+
97
+ },{"./":32,"get-intrinsic":39}],32:[function(require,module,exports){
98
+ "use strict";var bind=require("function-bind"),GetIntrinsic=require("get-intrinsic"),$apply=GetIntrinsic("%Function.prototype.apply%"),$call=GetIntrinsic("%Function.prototype.call%"),$reflectApply=GetIntrinsic("%Reflect.apply%",!0)||bind.call($call,$apply),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0),$max=GetIntrinsic("%Math.max%");if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=null}module.exports=function(e){var t=$reflectApply(bind,$call,arguments);$gOPD&&$defineProperty&&($gOPD(t,"length").configurable&&$defineProperty(t,"length",{value:1+$max(0,e.length-(arguments.length-1))}));return t};var applyBind=function(){return $reflectApply(bind,$apply,arguments)};$defineProperty?$defineProperty(module.exports,"apply",{value:applyBind}):module.exports.apply=applyBind;
99
+
100
+ },{"function-bind":38,"get-intrinsic":39}],33:[function(require,module,exports){
101
+ "use strict";var GetIntrinsic=require("get-intrinsic"),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0);if($gOPD)try{$gOPD([],"length")}catch(t){$gOPD=null}module.exports=$gOPD;
102
+
103
+ },{"get-intrinsic":39}],34:[function(require,module,exports){
104
+ "use strict";var ReflectOwnKeys,R="object"==typeof Reflect?Reflect:null,ReflectApply=R&&"function"==typeof R.apply?R.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}ReflectOwnKeys=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var NumberIsNaN=Number.isNaN||function(e){return e!=e};function EventEmitter(){EventEmitter.init.call(this)}module.exports=EventEmitter,module.exports.once=once,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function _getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}function _addListener(e,t,n,r){var i,o,s;if(checkListener(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=_getMaxListeners(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,ProcessEmitWarning(u)}return e}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=onceWrapper.bind(r);return i.listener=n,r.wrapFn=i,i}function _listeners(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?unwrapListeners(i):arrayClone(i,i.length)}function listenerCount(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function arrayClone(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function spliceOne(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function unwrapListeners(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function once(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}eventTargetAgnosticAddListener(e,t,o,{once:!0}),"error"!==t&&addErrorHandlerIfEventEmitter(e,i,{once:!0})})}function addErrorHandlerIfEventEmitter(e,t,n){"function"==typeof e.on&&eventTargetAgnosticAddListener(e,"error",t,n)}function eventTargetAgnosticAddListener(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)})}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(e){if("number"!=typeof e||e<0||NumberIsNaN(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");defaultMaxListeners=e}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||NumberIsNaN(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},EventEmitter.prototype.getMaxListeners=function(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)ReflectApply(u,this,t);else{var f=u.length,v=arrayClone(u,f);for(n=0;n<f;++n)ReflectApply(v[n],this,t)}return!0},EventEmitter.prototype.addListener=function(e,t){return _addListener(this,e,t,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function(e,t){return _addListener(this,e,t,!0)},EventEmitter.prototype.once=function(e,t){return checkListener(t),this.on(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.prependOnceListener=function(e,t){return checkListener(t),this.prependListener(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.removeListener=function(e,t){var n,r,i,o,s;if(checkListener(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():spliceOne(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},EventEmitter.prototype.listeners=function(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};
105
+
106
+ },{}],35:[function(require,module,exports){
107
+ (function (process,Buffer){(function (){
108
+ var original=require("original"),parse=require("url").parse,events=require("events"),https=require("https"),http=require("http"),util=require("util"),httpsOptions=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],bom=[239,187,191],colon=58,space=32,lineFeed=10,carriageReturn=13;function hasBom(e){return bom.every(function(t,r){return e[r]===t})}function EventSource(e,t){var r=EventSource.CONNECTING;Object.defineProperty(this,"readyState",{get:function(){return r}}),Object.defineProperty(this,"url",{get:function(){return e}});var n,o=this;function s(t){r!==EventSource.CLOSED&&(r=EventSource.CONNECTING,p("error",new Event("error",{message:t})),v&&(e=v,v=null),setTimeout(function(){r!==EventSource.CONNECTING||o.connectionInProgress||(o.connectionInProgress=!0,l())},o.reconnectInterval))}o.reconnectInterval=1e3,o.connectionInProgress=!1;var i="";t&&t.headers&&t.headers["Last-Event-ID"]&&(i=t.headers["Last-Event-ID"],delete t.headers["Last-Event-ID"]);var a=!1,c="",u="",v=null;function l(){var c=parse(e),u="https:"===c.protocol;if(c.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},i&&(c.headers["Last-Event-ID"]=i),t&&t.headers)for(var d in t.headers){var f=t.headers[d];f&&(c.headers[d]=f)}if(c.rejectUnauthorized=!(t&&!t.rejectUnauthorized),t&&void 0!==t.createConnection&&(c.createConnection=t.createConnection),t&&t.proxy){var E=parse(t.proxy);u="https:"===E.protocol,c.protocol=u?"https:":"http:",c.path=e,c.headers.Host=c.host,c.hostname=E.hostname,c.host=E.host,c.port=E.port}if(t&&t.https)for(var y in t.https)if(-1!==httpsOptions.indexOf(y)){var m=t.https[y];void 0!==m&&(c[y]=m)}t&&void 0!==t.withCredentials&&(c.withCredentials=t.withCredentials),(n=(u?https:http).request(c,function(t){if(o.connectionInProgress=!1,500===t.statusCode||502===t.statusCode||503===t.statusCode||504===t.statusCode)return p("error",new Event("error",{status:t.statusCode,message:t.statusMessage})),void s();if(301===t.statusCode||302===t.statusCode||307===t.statusCode)return t.headers.location?(307===t.statusCode&&(v=e),e=t.headers.location,void process.nextTick(l)):void p("error",new Event("error",{status:t.statusCode,message:t.statusMessage}));if(200!==t.statusCode)return p("error",new Event("error",{status:t.statusCode,message:t.statusMessage})),o.close();r=EventSource.OPEN,t.on("close",function(){t.removeAllListeners("close"),t.removeAllListeners("end"),s()}),t.on("end",function(){t.removeAllListeners("close"),t.removeAllListeners("end"),s()}),p("open",new Event("open"));var n,i=!0,c=0,u=-1;t.on("data",function(e){n=n?Buffer.concat([n,e]):e,i&&hasBom(n)&&(n=n.slice(bom.length)),i=!1;for(var t=0,r=n.length;t<r;){a&&(n[t]===lineFeed&&++t,a=!1);for(var o,s=-1,v=u,l=c;s<0&&l<r;++l)(o=n[l])===colon?v<0&&(v=l-t):o===carriageReturn?(a=!0,s=l-t):o===lineFeed&&(s=l-t);if(s<0){c=r-t,u=v;break}c=0,u=-1,h(n,t,v,s),t+=s+1}t===r?n=void 0:t>0&&(n=n.slice(t))})})).on("error",function(e){o.connectionInProgress=!1,s(e.message)}),n.setNoDelay&&n.setNoDelay(!0),n.end()}function p(){o.listeners(arguments[0]).length>0&&o.emit.apply(o,arguments)}function h(t,r,n,s){if(0===s){if(c.length>0){var a=u||"message";p(a,new MessageEvent(a,{data:c.slice(0,-1),lastEventId:i,origin:original(e)})),c=""}u=void 0}else if(n>0){var v=n<0,l=0,h=t.slice(r,r+(v?s:n)).toString();r+=l=v?s:t[r+n+1]!==space?n+1:n+2;var d=s-l,f=t.slice(r,r+d).toString();if("data"===h)c+=f+"\n";else if("event"===h)u=f;else if("id"===h)i=f;else if("retry"===h){var E=parseInt(f,10);Number.isNaN(E)||(o.reconnectInterval=E)}}}l(),this._close=function(){r!==EventSource.CLOSED&&(r=EventSource.CLOSED,n.abort&&n.abort(),n.xhr&&n.xhr.abort&&n.xhr.abort())}}function Event(e,t){if(Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)for(var r in t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}function MessageEvent(e,t){for(var r in Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}module.exports=EventSource,util.inherits(EventSource,events.EventEmitter),EventSource.prototype.constructor=EventSource,["open","error","message"].forEach(function(e){Object.defineProperty(EventSource.prototype,"on"+e,{get:function(){var t=this.listeners(e)[0];return t?t._listener?t._listener:t:void 0},set:function(t){this.removeAllListeners(e),this.addEventListener(e,t)}})}),Object.defineProperty(EventSource,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(EventSource,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(EventSource,"CLOSED",{enumerable:!0,value:2}),EventSource.prototype.CONNECTING=0,EventSource.prototype.OPEN=1,EventSource.prototype.CLOSED=2,EventSource.prototype.close=function(){this._close()},EventSource.prototype.addEventListener=function(e,t){"function"==typeof t&&(t._listener=t,this.on(e,t))},EventSource.prototype.dispatchEvent=function(e){if(!e.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(e.type,e.detail)},EventSource.prototype.removeEventListener=function(e,t){"function"==typeof t&&(t._listener=void 0,this.removeListener(e,t))};
109
+
110
+ }).call(this)}).call(this,require('_process'),require("buffer").Buffer)
111
+ },{"_process":71,"buffer":29,"events":34,"http":99,"https":58,"original":69,"url":120,"util":125}],36:[function(require,module,exports){
112
+ var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function(t,r,o){if("[object Function]"!==toString.call(r))throw new TypeError("iterator must be a function");var e=t.length;if(e===+e)for(var n=0;n<e;n++)r.call(o,t[n],n,t);else for(var a in t)hasOwn.call(t,a)&&r.call(o,t[a],a,t)};
113
+
114
+ },{}],37:[function(require,module,exports){
115
+ "use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr=Object.prototype.toString,funcType="[object Function]";module.exports=function(t){var n=this;if("function"!=typeof n||toStr.call(n)!==funcType)throw new TypeError(ERROR_MESSAGE+n);for(var o,e=slice.call(arguments,1),r=Math.max(0,n.length-e.length),c=[],i=0;i<r;i++)c.push("$"+i);if(o=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof o){var r=n.apply(this,e.concat(slice.call(arguments)));return Object(r)===r?r:this}return n.apply(t,e.concat(slice.call(arguments)))}),n.prototype){var p=function(){};p.prototype=n.prototype,o.prototype=new p,p.prototype=null}return o};
116
+
117
+ },{}],38:[function(require,module,exports){
118
+ "use strict";var implementation=require("./implementation");module.exports=Function.prototype.bind||implementation;
119
+
120
+ },{"./implementation":37}],39:[function(require,module,exports){
121
+ "use strict";var undefined,$SyntaxError=SyntaxError,$Function=Function,$TypeError=TypeError,getEvalledConstructor=function(r){try{return $Function('"use strict"; return ('+r+").constructor;")()}catch(r){}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch(r){$gOPD=null}var throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch(r){try{return $gOPD(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError,hasSymbols=require("has-symbols")(),getProto=Object.getPrototypeOf||function(r){return r.__proto__},needsEval={},TypedArray="undefined"==typeof Uint8Array?undefined:getProto(Uint8Array),INTRINSICS={"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet},doEval=function r(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var o=r("%AsyncGeneratorFunction%");o&&(t=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=r("%AsyncGenerator%");n&&(t=getProto(n.prototype))}return INTRINSICS[e]=t,t},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require("function-bind"),hasOwn=require("has"),$concat=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(r){var e=$strSlice(r,0,1),t=$strSlice(r,-1);if("%"===e&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace(r,rePropName,function(r,e,t,n){o[o.length]=t?$replace(n,reEscapeChar,"$1"):e||r}),o},getBaseIntrinsic=function(r,e){var t,o=r;if(hasOwn(LEGACY_ALIASES,o)&&(o="%"+(t=LEGACY_ALIASES[o])[0]+"%"),hasOwn(INTRINSICS,o)){var n=INTRINSICS[o];if(n===needsEval&&(n=doEval(o)),void 0===n&&!e)throw new $TypeError("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new $SyntaxError("intrinsic "+r+" does not exist!")};module.exports=function(r,e){if("string"!=typeof r||0===r.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,y=n.value,i=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var d=1,f=!0;d<t.length;d+=1){var s=t[d],u=$strSlice(s,0,1),c=$strSlice(s,-1);if(('"'===u||"'"===u||"`"===u||'"'===c||"'"===c||"`"===c)&&u!==c)throw new $SyntaxError("property names with quotes must have matching quotes");if("constructor"!==s&&f||(i=!0),hasOwn(INTRINSICS,a="%"+(o+="."+s)+"%"))y=INTRINSICS[a];else if(null!=y){if(!(s in y)){if(!e)throw new $TypeError("base intrinsic for "+r+" exists, but the property is not available.");return}if($gOPD&&d+1>=t.length){var l=$gOPD(y,s);y=(f=!!l)&&"get"in l&&!("originalValue"in l.get)?l.get:y[s]}else f=hasOwn(y,s),y=y[s];f&&!i&&(INTRINSICS[a]=y)}}return y};
122
+
123
+ },{"function-bind":38,"has":57,"has-symbols":54}],40:[function(require,module,exports){
85
124
  module.exports=require("./lib-node");
86
125
 
87
- },{"./lib-node":29}],29:[function(require,module,exports){
126
+ },{"./lib-node":41}],41:[function(require,module,exports){
88
127
  "use strict";var pubsub=require("nano-pubsub"),middlewareReducer=require("./util/middlewareReducer"),processOptions=require("./middleware/defaultOptionsProcessor"),validateOptions=require("./middleware/defaultOptionsValidator"),httpRequester=require("./request"),channelNames=["request","response","progress","error","abort"],middlehooks=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];module.exports=function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:httpRequester,n=[],o=middlehooks.reduce(function(e,r){return e[r]=e[r]||[],e},{processOptions:[processOptions],validateOptions:[validateOptions]});function s(e){var r=channelNames.reduce(function(e,r){return e[r]=pubsub(),e},{}),n=middlewareReducer(o),s=n("processOptions",e);n("validateOptions",s);var i={options:s,channels:r,applyMiddleware:n},u=null,a=r.request.subscribe(function(e){u=t(e,function(t,o){return function(e,t,o){var s=e,i=t;if(!s)try{i=n("onResponse",t,o)}catch(e){i=null,s=e}(s=s&&n("onError",s,o))?r.error.publish(s):i&&r.response.publish(i)}(t,o,e)})});r.abort.subscribe(function(){a(),u&&u.abort()});var d=n("onReturn",r,i);return d===r&&r.request.publish(i),d}return s.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&o.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return middlehooks.forEach(function(r){e[r]&&o[r].push(e[r])}),n.push(e),s},s.clone=function(){return e(n)},r.forEach(s.use),s};
89
128
 
90
- },{"./middleware/defaultOptionsProcessor":30,"./middleware/defaultOptionsValidator":31,"./request":39,"./util/middlewareReducer":41,"nano-pubsub":45}],30:[function(require,module,exports){
129
+ },{"./middleware/defaultOptionsProcessor":42,"./middleware/defaultOptionsValidator":43,"./request":51,"./util/middlewareReducer":53,"nano-pubsub":67}],42:[function(require,module,exports){
91
130
  "use strict";var objectAssign=require("object-assign"),urlParse=require("url-parse"),isReactNative="undefined"!=typeof navigator&&"ReactNative"===navigator.product,has=Object.prototype.hasOwnProperty,defaultOptions={timeout:isReactNative?6e4:12e4};function stringifyQueryString(e){var t=[];for(var r in e)has.call(e,r)&&n(r,e[r]);return t.length?t.join("&"):"";function n(e,r){Array.isArray(r)?r.forEach(function(t){return n(e,t)}):t.push([e,r].map(encodeURIComponent).join("="))}}function normalizeTimeout(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?normalizeTimeout(defaultOptions.timeout):{connect:t,socket:t}}function removeUndefined(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}module.exports=function(e){var t="string"==typeof e?objectAssign({url:e},defaultOptions):objectAssign({},defaultOptions,e),r=urlParse(t.url,{},!0);return t.timeout=normalizeTimeout(t.timeout),t.query&&(r.query=objectAssign({},r.query,removeUndefined(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(stringifyQueryString),t};
92
131
 
93
- },{"object-assign":46,"url-parse":70}],31:[function(require,module,exports){
94
- "use strict";var validUrl=/^https?:\/\//i;module.exports=function(r){if(!validUrl.test(r.url))throw new Error('"'+r.url+'" is not a valid URL')};
132
+ },{"object-assign":68,"url-parse":119}],43:[function(require,module,exports){
133
+ "use strict";var validUrl=/^https?:\/\//i;module.exports=function(r){if(!validUrl.test(r.url))throw new Error('"'.concat(r.url,'" is not a valid URL'))};
95
134
 
96
- },{}],32:[function(require,module,exports){
97
- "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},objectAssign=require("object-assign"),isPlainObject=require("is-plain-object"),serializeTypes=["boolean","string","number"],isBuffer=function(o){return!!o.constructor&&"function"==typeof o.constructor.isBuffer&&o.constructor.isBuffer(o)};module.exports=function(){return{processOptions:function(o){var e=o.body;return e&&!("function"==typeof e.pipe)&&!isBuffer(e)&&(-1!==serializeTypes.indexOf(void 0===e?"undefined":_typeof(e))||Array.isArray(e)||isPlainObject(e))?objectAssign({},o,{body:JSON.stringify(o.body),headers:objectAssign({},o.headers,{"Content-Type":"application/json"})}):o}}};
135
+ },{}],44:[function(require,module,exports){
136
+ "use strict";function _typeof(o){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}var objectAssign=require("object-assign"),isPlainObject=require("is-plain-object"),serializeTypes=["boolean","string","number"],isBuffer=function(o){return!!o.constructor&&"function"==typeof o.constructor.isBuffer&&o.constructor.isBuffer(o)};module.exports=function(){return{processOptions:function(o){var t=o.body;return t&&!("function"==typeof t.pipe)&&!isBuffer(t)&&(-1!==serializeTypes.indexOf(_typeof(t))||Array.isArray(t)||isPlainObject(t))?objectAssign({},o,{body:JSON.stringify(o.body),headers:objectAssign({},o.headers,{"Content-Type":"application/json"})}):o}}};
98
137
 
99
- },{"is-plain-object":42,"object-assign":46}],33:[function(require,module,exports){
100
- "use strict";var objectAssign=require("object-assign");function tryParse(e){try{return JSON.parse(e)}catch(e){throw e.message="Failed to parsed response body as JSON: "+e.message,e}}module.exports=function(e){return{onResponse:function(s){var t=s.headers["content-type"]||"",n=e&&e.force||-1!==t.indexOf("application/json");return s.body&&t&&n?objectAssign({},s,{body:tryParse(s.body)}):s},processOptions:function(e){return objectAssign({},e,{headers:objectAssign({Accept:"application/json"},e.headers)})}}};
138
+ },{"is-plain-object":63,"object-assign":68}],45:[function(require,module,exports){
139
+ "use strict";var objectAssign=require("object-assign");function tryParse(e){try{return JSON.parse(e)}catch(e){throw e.message="Failed to parsed response body as JSON: ".concat(e.message),e}}module.exports=function(e){return{onResponse:function(s){var t=s.headers["content-type"]||"",n=e&&e.force||-1!==t.indexOf("application/json");return s.body&&t&&n?objectAssign({},s,{body:tryParse(s.body)}):s},processOptions:function(e){return objectAssign({},e,{headers:objectAssign({Accept:"application/json"},e.headers)})}}};
101
140
 
102
- },{"object-assign":46}],34:[function(require,module,exports){
141
+ },{"object-assign":68}],46:[function(require,module,exports){
103
142
  "use strict";var global=require("../util/global"),objectAssign=require("object-assign");module.exports=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).implementation||global.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(r,n){return new e(function(e){return r.error.subscribe(function(r){return e.error(r)}),r.progress.subscribe(function(r){return e.next(objectAssign({type:"progress"},r))}),r.response.subscribe(function(r){e.next(objectAssign({type:"response"},r)),e.complete()}),r.request.publish(n),function(){return r.abort.publish()}})}}};
104
143
 
105
- },{"../util/global":40,"object-assign":46}],35:[function(require,module,exports){
144
+ },{"../util/global":52,"object-assign":68}],47:[function(require,module,exports){
106
145
  "use strict";module.exports=function(){return{onRequest:function(o){if("xhr"===o.adapter){var e=o.request,t=o.context;"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}function n(o){return function(e){var n=e.lengthComputable?e.loaded/e.total*100:-1;t.channels.progress.publish({stage:o,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}}}};
107
146
 
108
- },{}],36:[function(require,module,exports){
147
+ },{}],48:[function(require,module,exports){
109
148
  "use strict";module.exports=require("./node-progress");
110
149
 
111
- },{"./node-progress":35}],37:[function(require,module,exports){
112
- "use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),FetchXhr=require("./browser/fetchXhr"),noop=function(){},win="undefined"==typeof window?void 0:window,adapter=win?"xhr":"fetch",XmlHttpRequest="function"==typeof XMLHttpRequest?XMLHttpRequest:noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDR="undefined"==typeof XDomainRequest?void 0:XDomainRequest,CrossDomainRequest=hasXhr2?XmlHttpRequest:XDR;win||(XmlHttpRequest=FetchXhr,CrossDomainRequest=FetchXhr),module.exports=function(e,t){var r=e.options,n=e.applyMiddleware("finalizeOptions",r),o={},s=win&&win.location&&!sameOrigin(win.location.href,n.url),i=e.applyMiddleware("interceptRequest",void 0,{adapter:adapter,context:e});if(i){var a=setTimeout(t,0,null,i);return{abort:function(){return clearTimeout(a)}}}var u=s?new CrossDomainRequest:new XmlHttpRequest,c=win&&win.XDomainRequest&&u instanceof win.XDomainRequest,d=n.headers,l=n.timeout,p=!1,f=!1,w=!1;if(u.onerror=R,u.ontimeout=R,u.onabort=function(){p=!0},u.onprogress=function(){},u[c?"onload":"onreadystatechange"]=function(){!function(){if(!l)return;q(),o.socket=setTimeout(function(){return m("ESOCKETTIMEDOUT")},l.socket)}(),p||4!==u.readyState&&!c||0!==u.status&&function(){if(p||f||w)return;if(0===u.status)return void R(new Error("Unknown XHR error"));q(),f=!0,t(null,function(){var e=u.status,t=u.statusText;if(c&&void 0===e)e=200;else{if(e>12e3&&e<12156)return R();e=1223===u.status?204:u.status,t=1223===u.status?"No Content":t}return{body:u.response||u.responseText,url:n.url,method:n.method,headers:c?{}:parseHeaders(u.getAllResponseHeaders()),statusCode:e,statusMessage:t}}())}()},u.open(n.method,n.url,!0),u.withCredentials=!!n.withCredentials,d&&u.setRequestHeader)for(var h in d)d.hasOwnProperty(h)&&u.setRequestHeader(h,d[h]);else if(d&&c)throw new Error("Headers cannot be set on an XDomainRequest object");return n.rawBody&&(u.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:adapter,request:u,context:e}),u.send(n.body||null),l&&(o.connect=setTimeout(function(){return m("ETIMEDOUT")},l.connect)),{abort:function(){p=!0,u&&u.abort()}};function m(t){w=!0,u.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+n.url:"Connection timed out on request to "+n.url);r.code=t,e.channels.error.publish(r)}function q(){(p||u.readyState>=2&&o.connect)&&clearTimeout(o.connect),o.socket&&clearTimeout(o.socket)}function R(e){if(!f){q(),f=!0,u=null;var r=e||new Error("Network error while attempting to reach "+n.url);r.isNetworkError=!0,r.request=n,t(r)}}};
150
+ },{"./node-progress":47}],49:[function(require,module,exports){
151
+ "use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),FetchXhr=require("./browser/fetchXhr"),noop=function(){},win="undefined"==typeof window?void 0:window,adapter=win?"xhr":"fetch",XmlHttpRequest="function"==typeof XMLHttpRequest?XMLHttpRequest:noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDR="undefined"==typeof XDomainRequest?void 0:XDomainRequest,CrossDomainRequest=hasXhr2?XmlHttpRequest:XDR;win||(XmlHttpRequest=FetchXhr,CrossDomainRequest=FetchXhr),module.exports=function(e,t){var r=e.options,n=e.applyMiddleware("finalizeOptions",r),o={},s=win&&win.location&&!sameOrigin(win.location.href,n.url),i=e.applyMiddleware("interceptRequest",void 0,{adapter:adapter,context:e});if(i){var a=setTimeout(t,0,null,i);return{abort:function(){return clearTimeout(a)}}}var u=s?new CrossDomainRequest:new XmlHttpRequest,c=win&&win.XDomainRequest&&u instanceof win.XDomainRequest,d=n.headers,l=n.timeout,p=!1,f=!1,w=!1;if(u.onerror=R,u.ontimeout=R,u.onabort=function(){q(!0),p=!0},u.onprogress=function(){},u[c?"onload":"onreadystatechange"]=function(){!function(){if(!l)return;q(),o.socket=setTimeout(function(){return m("ESOCKETTIMEDOUT")},l.socket)}(),p||4!==u.readyState&&!c||0!==u.status&&function(){if(p||f||w)return;if(0===u.status)return void R(new Error("Unknown XHR error"));q(),f=!0,t(null,function(){var e=u.status,t=u.statusText;if(c&&void 0===e)e=200;else{if(e>12e3&&e<12156)return R();e=1223===u.status?204:u.status,t=1223===u.status?"No Content":t}return{body:u.response||u.responseText,url:n.url,method:n.method,headers:c?{}:parseHeaders(u.getAllResponseHeaders()),statusCode:e,statusMessage:t}}())}()},u.open(n.method,n.url,!0),u.withCredentials=!!n.withCredentials,d&&u.setRequestHeader)for(var h in d)d.hasOwnProperty(h)&&u.setRequestHeader(h,d[h]);else if(d&&c)throw new Error("Headers cannot be set on an XDomainRequest object");return n.rawBody&&(u.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:adapter,request:u,context:e}),u.send(n.body||null),l&&(o.connect=setTimeout(function(){return m("ETIMEDOUT")},l.connect)),{abort:function(){p=!0,u&&u.abort()}};function m(t){w=!0,u.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to ".concat(n.url):"Connection timed out on request to ".concat(n.url));r.code=t,e.channels.error.publish(r)}function q(e){(e||p||u.readyState>=2&&o.connect)&&clearTimeout(o.connect),o.socket&&clearTimeout(o.socket)}function R(e){if(!f){q(!0),f=!0,u=null;var r=e||new Error("Network error while attempting to reach ".concat(n.url));r.isNetworkError=!0,r.request=n,t(r)}}};
113
152
 
114
- },{"./browser/fetchXhr":38,"parse-headers":47,"same-origin":68}],38:[function(require,module,exports){
115
- "use strict";function FetchXhr(){this.readyState=0}FetchXhr.prototype.open=function(t,e){this._method=t,this._url=e,this._resHeaders="",this.readyState=1,this.onreadystatechange()},FetchXhr.prototype.abort=function(){this._controller&&this._controller.abort()},FetchXhr.prototype.getAllResponseHeaders=function(){return this._resHeaders},FetchXhr.prototype.setRequestHeader=function(t,e){this._headers=this._headers||{},this._headers[t]=e},FetchXhr.prototype.send=function(t){var e=this,r=this._controller="function"==typeof AbortController&&new AbortController,s="arraybuffer"!==this.responseType,o={method:this._method,headers:this._headers,signal:r&&r.signal,body:t};"undefined"!=typeof window&&(o.credentials=this.withCredentials?"include":"omit"),fetch(this._url,o).then(function(t){return t.headers.forEach(function(t,r){e._resHeaders+=r+": "+t+"\r\n"}),e.status=t.status,e.statusText=t.statusText,e.readyState=3,s?t.text():t.arrayBuffer()}).then(function(t){s?e.responseText=t:e.response=t,e.readyState=4,e.onreadystatechange()}).catch(function(t){"AbortError"!==t.name?e.onerror(t):e.onabort()})},module.exports=FetchXhr;
153
+ },{"./browser/fetchXhr":50,"parse-headers":70,"same-origin":97}],50:[function(require,module,exports){
154
+ "use strict";function FetchXhr(){this.readyState=0}FetchXhr.prototype.open=function(t,e){this._method=t,this._url=e,this._resHeaders="",this.readyState=1,this.onreadystatechange()},FetchXhr.prototype.abort=function(){this._controller&&this._controller.abort()},FetchXhr.prototype.getAllResponseHeaders=function(){return this._resHeaders},FetchXhr.prototype.setRequestHeader=function(t,e){this._headers=this._headers||{},this._headers[t]=e},FetchXhr.prototype.send=function(t){var e=this,r=this._controller="function"==typeof AbortController&&new AbortController,o="arraybuffer"!==this.responseType,s={method:this._method,headers:this._headers,signal:r&&r.signal,body:t};"undefined"!=typeof window&&(s.credentials=this.withCredentials?"include":"omit"),fetch(this._url,s).then(function(t){return t.headers.forEach(function(t,r){e._resHeaders+="".concat(r,": ").concat(t,"\r\n")}),e.status=t.status,e.statusText=t.statusText,e.readyState=3,o?t.text():t.arrayBuffer()}).then(function(t){o?e.responseText=t:e.response=t,e.readyState=4,e.onreadystatechange()}).catch(function(t){"AbortError"!==t.name?e.onerror(t):e.onabort()})},module.exports=FetchXhr;
116
155
 
117
- },{}],39:[function(require,module,exports){
156
+ },{}],51:[function(require,module,exports){
118
157
  "use strict";module.exports=require("./node-request");
119
158
 
120
- },{"./node-request":37}],40:[function(require,module,exports){
159
+ },{"./node-request":49}],52:[function(require,module,exports){
121
160
  (function (global){(function (){
122
161
  "use strict";"undefined"!=typeof window?module.exports=window:"undefined"!=typeof global?module.exports=global:"undefined"!=typeof self?module.exports=self:module.exports={};
123
162
 
124
163
  }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
125
- },{}],41:[function(require,module,exports){
126
- "use strict";module.exports=function(r){return function(n,o){for(var t=arguments.length,e=Array(t>2?t-2:0),u=2;u<t;u++)e[u-2]=arguments[u];for(var a="onError"===n,c=o,f=0;f<r[n].length&&(c=r[n][f].apply(void 0,[c].concat(e)),!a||c);f++);return c}};
164
+ },{}],53:[function(require,module,exports){
165
+ "use strict";module.exports=function(r){return function(n,o){for(var t="onError"===n,e=o,u=arguments.length,a=new Array(u>2?u-2:0),c=2;c<u;c++)a[c-2]=arguments[c];for(var f=0;f<r[n].length&&(e=r[n][f].apply(void 0,[e].concat(a)),!t||e);f++);return e}};
166
+
167
+ },{}],54:[function(require,module,exports){
168
+ "use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=require("./shams");module.exports=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))};
127
169
 
128
- },{}],42:[function(require,module,exports){
170
+ },{"./shams":55}],55:[function(require,module,exports){
171
+ "use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0};
172
+
173
+ },{}],56:[function(require,module,exports){
174
+ "use strict";var hasSymbols=require("has-symbols/shams");module.exports=function(){return hasSymbols()&&!!Symbol.toStringTag};
175
+
176
+ },{"has-symbols/shams":55}],57:[function(require,module,exports){
177
+ "use strict";var bind=require("function-bind");module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty);
178
+
179
+ },{"function-bind":38}],58:[function(require,module,exports){
180
+ var http=require("http"),url=require("url"),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);function validateParams(t){if("string"==typeof t&&(t=url.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}https.request=function(t,r){return t=validateParams(t),http.request.call(this,t,r)},https.get=function(t,r){return t=validateParams(t),http.get.call(this,t,r)};
181
+
182
+ },{"http":99,"url":120}],59:[function(require,module,exports){
183
+ exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
184
+
185
+ },{}],60:[function(require,module,exports){
186
+ "function"==typeof Object.create?module.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:module.exports=function(t,e){if(e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t}};
187
+
188
+ },{}],61:[function(require,module,exports){
189
+ "use strict";var hasToStringTag=require("has-tostringtag/shams")(),callBound=require("call-bind/callBound"),$toString=callBound("Object.prototype.toString"),isStandardArguments=function(t){return!(hasToStringTag&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===$toString(t)},isLegacyArguments=function(t){return!!isStandardArguments(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==$toString(t)&&"[object Function]"===$toString(t.callee)},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments,module.exports=supportsStandardArguments?isStandardArguments:isLegacyArguments;
190
+
191
+ },{"call-bind/callBound":31,"has-tostringtag/shams":56}],62:[function(require,module,exports){
192
+ "use strict";var GeneratorFunction,toStr=Object.prototype.toString,fnToStr=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag=require("has-tostringtag/shams")(),getProto=Object.getPrototypeOf,getGeneratorFunc=function(){if(!hasToStringTag)return!1;try{return Function("return function*() {}")()}catch(t){}};module.exports=function(t){if("function"!=typeof t)return!1;if(isFnRegex.test(fnToStr.call(t)))return!0;if(!hasToStringTag)return"[object GeneratorFunction]"===toStr.call(t);if(!getProto)return!1;if(void 0===GeneratorFunction){var r=getGeneratorFunc();GeneratorFunction=!!r&&getProto(r)}return getProto(t)===GeneratorFunction};
193
+
194
+ },{"has-tostringtag/shams":56}],63:[function(require,module,exports){
129
195
  "use strict";var isObject=require("isobject");function isObjectObject(t){return!0===isObject(t)&&"[object Object]"===Object.prototype.toString.call(t)}module.exports=function(t){var e,c;return!1!==isObjectObject(t)&&("function"==typeof(e=t.constructor)&&(!1!==isObjectObject(c=e.prototype)&&!1!==c.hasOwnProperty("isPrototypeOf")))};
130
196
 
131
- },{"isobject":43}],43:[function(require,module,exports){
197
+ },{"isobject":65}],64:[function(require,module,exports){
198
+ (function (global){(function (){
199
+ "use strict";var forEach=require("foreach"),availableTypedArrays=require("available-typed-arrays"),callBound=require("call-bind/callBound"),$toString=callBound("Object.prototype.toString"),hasToStringTag=require("has-tostringtag/shams")(),g="undefined"==typeof globalThis?global:globalThis,typedArrays=availableTypedArrays(),$indexOf=callBound("Array.prototype.indexOf",!0)||function(r,t){for(var e=0;e<r.length;e+=1)if(r[e]===t)return e;return-1},$slice=callBound("String.prototype.slice"),toStrTags={},gOPD=require("es-abstract/helpers/getOwnPropertyDescriptor"),getPrototypeOf=Object.getPrototypeOf;hasToStringTag&&gOPD&&getPrototypeOf&&forEach(typedArrays,function(r){var t=new g[r];if(Symbol.toStringTag in t){var e=getPrototypeOf(t),a=gOPD(e,Symbol.toStringTag);if(!a){var o=getPrototypeOf(e);a=gOPD(o,Symbol.toStringTag)}toStrTags[r]=a.get}});var tryTypedArrays=function(r){var t=!1;return forEach(toStrTags,function(e,a){if(!t)try{t=e.call(r)===a}catch(r){}}),t};module.exports=function(r){if(!r||"object"!=typeof r)return!1;if(!(hasToStringTag&&Symbol.toStringTag in r)){var t=$slice($toString(r),8,-1);return $indexOf(typedArrays,t)>-1}return!!gOPD&&tryTypedArrays(r)};
200
+
201
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
202
+ },{"available-typed-arrays":26,"call-bind/callBound":31,"es-abstract/helpers/getOwnPropertyDescriptor":33,"foreach":36,"has-tostringtag/shams":56}],65:[function(require,module,exports){
132
203
  "use strict";module.exports=function(r){return null!=r&&"object"==typeof r&&!1===Array.isArray(r)};
133
204
 
134
- },{}],44:[function(require,module,exports){
205
+ },{}],66:[function(require,module,exports){
135
206
  "use strict";var construct="undefined"!=typeof Reflect?Reflect.construct:void 0,defineProperty=Object.defineProperty,captureStackTrace=Error.captureStackTrace;function BaseError(r){void 0!==r&&defineProperty(this,"message",{configurable:!0,value:r,writable:!0});var e=this.constructor.name;void 0!==e&&e!==this.name&&defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),captureStackTrace(this,this.constructor)}void 0===captureStackTrace&&(captureStackTrace=function(r){var e=new Error;defineProperty(r,"stack",{configurable:!0,get:function(){var r=e.stack;return defineProperty(this,"stack",{configurable:!0,value:r,writable:!0}),r},set:function(e){defineProperty(r,"stack",{configurable:!0,value:e,writable:!0})}})}),BaseError.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:BaseError,writable:!0}});var setFunctionName=function(){function r(r,e){return defineProperty(r,"name",{configurable:!0,value:e})}try{var e=function(){};if(r(e,"foo"),"foo"===e.name)return r}catch(r){}}();function makeError(r,e){if(null==e||e===Error)e=BaseError;else if("function"!=typeof e)throw new TypeError("super_ should be a function");var t;if("string"==typeof r)t=r,r=void 0!==construct?function(){return construct(e,arguments,this.constructor)}:function(){e.apply(this,arguments)},void 0!==setFunctionName&&(setFunctionName(r,t),t=void 0);else if("function"!=typeof r)throw new TypeError("constructor should be either a string or a function");r.super_=r.super=e;var o={constructor:{configurable:!0,value:r,writable:!0}};return void 0!==t&&(o.name={configurable:!0,value:t,writable:!0}),r.prototype=Object.create(e.prototype,o),r}exports=module.exports=makeError,exports.BaseError=BaseError;
136
207
 
137
- },{}],45:[function(require,module,exports){
208
+ },{}],67:[function(require,module,exports){
138
209
  module.exports=function(){var n=[];return{subscribe:function(u){return n.push(u),function(){var r=n.indexOf(u);r>-1&&n.splice(r,1)}},publish:function(){for(var u=0;u<n.length;u++)n[u].apply(null,arguments)}}};
139
210
 
140
- },{}],46:[function(require,module,exports){
211
+ },{}],68:[function(require,module,exports){
141
212
  "use strict";var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}module.exports=shouldUseNative()?Object.assign:function(e,r){for(var t,n,o=toObject(e),a=1;a<arguments.length;a++){for(var s in t=Object(arguments[a]))hasOwnProperty.call(t,s)&&(o[s]=t[s]);if(getOwnPropertySymbols){n=getOwnPropertySymbols(t);for(var c=0;c<n.length;c++)propIsEnumerable.call(t,n[c])&&(o[n[c]]=t[n[c]])}}return o};
142
213
 
143
- },{}],47:[function(require,module,exports){
214
+ },{}],69:[function(require,module,exports){
215
+ "use strict";var parse=require("url-parse");function origin(r){return"string"==typeof r&&(r=parse(r)),r.protocol&&r.hostname?(r.protocol+"//"+r.host).toLowerCase():"null"}origin.same=function(r,o){return origin(r)===origin(o)},module.exports=origin;
216
+
217
+ },{"url-parse":119}],70:[function(require,module,exports){
144
218
  var trim=function(r){return r.replace(/^\s+|\s+$/g,"")},isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)};module.exports=function(r){if(!r)return{};for(var t={},e=trim(r).split("\n"),i=0;i<e.length;i++){var n=e[i],o=n.indexOf(":"),s=trim(n.slice(0,o)).toLowerCase(),a=trim(n.slice(o+1));void 0===t[s]?t[s]=a:isArray(t[s])?t[s].push(a):t[s]=[t[s],a]}return t};
145
219
 
146
- },{}],48:[function(require,module,exports){
220
+ },{}],71:[function(require,module,exports){
221
+ var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}process.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];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};
222
+
223
+ },{}],72:[function(require,module,exports){
224
+ (function (global){(function (){
225
+ !function(e){var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,n="object"==typeof module&&module&&!module.nodeType&&module,t="object"==typeof global&&global;t.global!==t&&t.window!==t&&t.self!==t||(e=t);var r,u,i=2147483647,f=36,c=1,l=26,s=38,d=700,p=72,a=128,h="-",v=/^xn--/,g=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=f-c,y=Math.floor,C=String.fromCharCode;function m(e){throw new RangeError(x[e])}function j(e,o){for(var n=e.length,t=[];n--;)t[n]=o(e[n]);return t}function A(e,o){var n=e.split("@"),t="";return n.length>1&&(t=n[0]+"@",e=n[1]),t+j((e=e.replace(w,".")).split("."),o).join(".")}function I(e){for(var o,n,t=[],r=0,u=e.length;r<u;)(o=e.charCodeAt(r++))>=55296&&o<=56319&&r<u?56320==(64512&(n=e.charCodeAt(r++)))?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--):t.push(o);return t}function E(e){return j(e,function(e){var o="";return e>65535&&(o+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=C(e)}).join("")}function F(e,o){return e+22+75*(e<26)-((0!=o)<<5)}function O(e,o,n){var t=0;for(e=n?y(e/d):e>>1,e+=y(e/o);e>b*l>>1;t+=f)e=y(e/b);return y(t+(b+1)*e/(e+s))}function S(e){var o,n,t,r,u,s,d,v,g,w,x,b=[],C=e.length,j=0,A=a,I=p;for((n=e.lastIndexOf(h))<0&&(n=0),t=0;t<n;++t)e.charCodeAt(t)>=128&&m("not-basic"),b.push(e.charCodeAt(t));for(r=n>0?n+1:0;r<C;){for(u=j,s=1,d=f;r>=C&&m("invalid-input"),((v=(x=e.charCodeAt(r++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:f)>=f||v>y((i-j)/s))&&m("overflow"),j+=v*s,!(v<(g=d<=I?c:d>=I+l?l:d-I));d+=f)s>y(i/(w=f-g))&&m("overflow"),s*=w;I=O(j-u,o=b.length+1,0==u),y(j/o)>i-A&&m("overflow"),A+=y(j/o),j%=o,b.splice(j++,0,A)}return E(b)}function T(e){var o,n,t,r,u,s,d,v,g,w,x,b,j,A,E,S=[];for(b=(e=I(e)).length,o=a,n=0,u=p,s=0;s<b;++s)(x=e[s])<128&&S.push(C(x));for(t=r=S.length,r&&S.push(h);t<b;){for(d=i,s=0;s<b;++s)(x=e[s])>=o&&x<d&&(d=x);for(d-o>y((i-n)/(j=t+1))&&m("overflow"),n+=(d-o)*j,o=d,s=0;s<b;++s)if((x=e[s])<o&&++n>i&&m("overflow"),x==o){for(v=n,g=f;!(v<(w=g<=u?c:g>=u+l?l:g-u));g+=f)E=v-w,A=f-w,S.push(C(F(w+E%A,0))),v=y(E/A);S.push(C(F(v,0))),u=O(n,j,t==r),n=0,++t}++n,++o}return S.join("")}if(r={version:"1.4.1",ucs2:{decode:I,encode:E},decode:S,encode:T,toASCII:function(e){return A(e,function(e){return g.test(e)?"xn--"+T(e):e})},toUnicode:function(e){return A(e,function(e){return v.test(e)?S(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return r});else if(o&&n)if(module.exports==o)n.exports=r;else for(u in r)r.hasOwnProperty(u)&&(o[u]=r[u]);else e.punycode=r}(this);
226
+
227
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
228
+ },{}],73:[function(require,module,exports){
229
+ "use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;y<p;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
230
+
231
+ },{}],74:[function(require,module,exports){
232
+ "use strict";var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
233
+
234
+ },{}],75:[function(require,module,exports){
235
+ "use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
236
+
237
+ },{"./decode":73,"./encode":74}],76:[function(require,module,exports){
147
238
  "use strict";var undef,has=Object.prototype.hasOwnProperty;function decode(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function encode(e){try{return encodeURIComponent(e)}catch(e){return null}}function querystring(e){for(var n,r=/([^=?#&]+)=?([^&]*)/g,t={};n=r.exec(e);){var o=decode(n[1]),u=decode(n[2]);null===o||null===u||o in t||(t[o]=u)}return t}function querystringify(e,n){n=n||"";var r,t,o=[];for(t in"string"!=typeof n&&(n="?"),e)if(has.call(e,t)){if((r=e[t])||null!==r&&r!==undef&&!isNaN(r)||(r=""),t=encode(t),r=encode(r),null===t||null===r)continue;o.push(t+"="+r)}return o.length?n+o.join("&"):""}exports.stringify=querystringify,exports.parse=querystring;
148
239
 
149
- },{}],49:[function(require,module,exports){
240
+ },{}],77:[function(require,module,exports){
150
241
  "use strict";module.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};
151
242
 
152
- },{}],50:[function(require,module,exports){
243
+ },{}],78:[function(require,module,exports){
153
244
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var canReportError_1=require("./util/canReportError"),toSubscriber_1=require("./util/toSubscriber"),observable_1=require("./symbol/observable"),pipe_1=require("./util/pipe"),config_1=require("./config"),Observable=function(){function r(r){this._isScalar=!1,r&&(this._subscribe=r)}return r.prototype.lift=function(e){var o=new r;return o.source=this,o.operator=e,o},r.prototype.subscribe=function(r,e,o){var t=this.operator,n=toSubscriber_1.toSubscriber(r,e,o);if(t?n.add(t.call(n,this.source)):n.add(this.source||config_1.config.useDeprecatedSynchronousErrorHandling&&!n.syncErrorThrowable?this._subscribe(n):this._trySubscribe(n)),config_1.config.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable&&(n.syncErrorThrowable=!1,n.syncErrorThrown))throw n.syncErrorValue;return n},r.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(e){config_1.config.useDeprecatedSynchronousErrorHandling&&(r.syncErrorThrown=!0,r.syncErrorValue=e),canReportError_1.canReportError(r)?r.error(e):console.warn(e)}},r.prototype.forEach=function(r,e){var o=this;return new(e=getPromiseCtor(e))(function(e,t){var n;n=o.subscribe(function(e){try{r(e)}catch(r){t(r),n&&n.unsubscribe()}},t,e)})},r.prototype._subscribe=function(r){var e=this.source;return e&&e.subscribe(r)},r.prototype[observable_1.observable]=function(){return this},r.prototype.pipe=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return 0===r.length?this:pipe_1.pipeFromArray(r)(this)},r.prototype.toPromise=function(r){var e=this;return new(r=getPromiseCtor(r))(function(r,o){var t;e.subscribe(function(r){return t=r},function(r){return o(r)},function(){return r(t)})})},r.create=function(e){return new r(e)},r}();function getPromiseCtor(r){if(r||(r=config_1.config.Promise||Promise),!r)throw new Error("no Promise impl found");return r}exports.Observable=Observable;
154
245
 
155
- },{"./config":54,"./symbol/observable":57,"./util/canReportError":60,"./util/pipe":66,"./util/toSubscriber":67}],51:[function(require,module,exports){
246
+ },{"./config":82,"./symbol/observable":85,"./util/canReportError":88,"./util/pipe":94,"./util/toSubscriber":95}],79:[function(require,module,exports){
156
247
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var config_1=require("./config"),hostReportError_1=require("./util/hostReportError");exports.empty={closed:!0,next:function(r){},error:function(r){if(config_1.config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError_1.hostReportError(r)},complete:function(){}};
157
248
 
158
- },{"./config":54,"./util/hostReportError":61}],52:[function(require,module,exports){
249
+ },{"./config":82,"./util/hostReportError":89}],80:[function(require,module,exports){
159
250
  "use strict";var __extends=this&&this.__extends||function(){var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var e in t)t.hasOwnProperty(e)&&(r[e]=t[e])})(t,e)};return function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var isFunction_1=require("./util/isFunction"),Observer_1=require("./Observer"),Subscription_1=require("./Subscription"),rxSubscriber_1=require("../internal/symbol/rxSubscriber"),config_1=require("./config"),hostReportError_1=require("./util/hostReportError"),Subscriber=function(r){function t(e,o,n){var s=r.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=Observer_1.empty;break;case 1:if(!e){s.destination=Observer_1.empty;break}if("object"==typeof e){e instanceof t?(s.syncErrorThrowable=e.syncErrorThrowable,s.destination=e,e.add(s)):(s.syncErrorThrowable=!0,s.destination=new SafeSubscriber(s,e));break}default:s.syncErrorThrowable=!0,s.destination=new SafeSubscriber(s,e,o,n)}return s}return __extends(t,r),t.prototype[rxSubscriber_1.rxSubscriber]=function(){return this},t.create=function(r,e,o){var n=new t(r,e,o);return n.syncErrorThrowable=!1,n},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},t}(Subscription_1.Subscription);exports.Subscriber=Subscriber;var SafeSubscriber=function(r){function t(t,e,o,n){var s,i=r.call(this)||this;i._parentSubscriber=t;var c=i;return isFunction_1.isFunction(e)?s=e:e&&(s=e.next,o=e.error,n=e.complete,e!==Observer_1.empty&&(c=Object.create(e),isFunction_1.isFunction(c.unsubscribe)&&i.add(c.unsubscribe.bind(c)),c.unsubscribe=i.unsubscribe.bind(i))),i._context=c,i._next=s,i._error=o,i._complete=n,i}return __extends(t,r),t.prototype.next=function(r){if(!this.isStopped&&this._next){var t=this._parentSubscriber;config_1.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},t.prototype.error=function(r){if(!this.isStopped){var t=this._parentSubscriber,e=config_1.config.useDeprecatedSynchronousErrorHandling;if(this._error)e&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else if(t.syncErrorThrowable)e?(t.syncErrorValue=r,t.syncErrorThrown=!0):hostReportError_1.hostReportError(r),this.unsubscribe();else{if(this.unsubscribe(),e)throw r;hostReportError_1.hostReportError(r)}}},t.prototype.complete=function(){var r=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var e=function(){return r._complete.call(r._context)};config_1.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(r,t){try{r.call(this._context,t)}catch(r){if(this.unsubscribe(),config_1.config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError_1.hostReportError(r)}},t.prototype.__tryOrSetError=function(r,t,e){if(!config_1.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,e)}catch(t){return config_1.config.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=t,r.syncErrorThrown=!0,!0):(hostReportError_1.hostReportError(t),!0)}return!1},t.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},t}(Subscriber);exports.SafeSubscriber=SafeSubscriber;
160
251
 
161
- },{"../internal/symbol/rxSubscriber":58,"./Observer":51,"./Subscription":53,"./config":54,"./util/hostReportError":61,"./util/isFunction":64}],53:[function(require,module,exports){
252
+ },{"../internal/symbol/rxSubscriber":86,"./Observer":79,"./Subscription":81,"./config":82,"./util/hostReportError":89,"./util/isFunction":92}],81:[function(require,module,exports){
162
253
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var isArray_1=require("./util/isArray"),isObject_1=require("./util/isObject"),isFunction_1=require("./util/isFunction"),UnsubscriptionError_1=require("./util/UnsubscriptionError"),Subscription=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._ctorUnsubscribe=!0,this._unsubscribe=r)}var i;return r.prototype.unsubscribe=function(){var i;if(!this.closed){var s=this._parentOrParents,t=this._ctorUnsubscribe,n=this._unsubscribe,e=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof r)s.remove(this);else if(null!==s)for(var o=0;o<s.length;++o){s[o].remove(this)}if(isFunction_1.isFunction(n)){t&&(this._unsubscribe=void 0);try{n.call(this)}catch(r){i=r instanceof UnsubscriptionError_1.UnsubscriptionError?flattenUnsubscriptionErrors(r.errors):[r]}}if(isArray_1.isArray(e)){o=-1;for(var u=e.length;++o<u;){var c=e[o];if(isObject_1.isObject(c))try{c.unsubscribe()}catch(r){i=i||[],r instanceof UnsubscriptionError_1.UnsubscriptionError?i=i.concat(flattenUnsubscriptionErrors(r.errors)):i.push(r)}}}if(i)throw new UnsubscriptionError_1.UnsubscriptionError(i)}},r.prototype.add=function(i){var s=i;if(!i)return r.EMPTY;switch(typeof i){case"function":s=new r(i);case"object":if(s===this||s.closed||"function"!=typeof s.unsubscribe)return s;if(this.closed)return s.unsubscribe(),s;if(!(s instanceof r)){var t=s;(s=new r)._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+i+" added to Subscription.")}var n=s._parentOrParents;if(null===n)s._parentOrParents=this;else if(n instanceof r){if(n===this)return s;s._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return s;n.push(this)}var e=this._subscriptions;return null===e?this._subscriptions=[s]:e.push(s),s},r.prototype.remove=function(r){var i=this._subscriptions;if(i){var s=i.indexOf(r);-1!==s&&i.splice(s,1)}},r.EMPTY=((i=new r).closed=!0,i),r}();function flattenUnsubscriptionErrors(r){return r.reduce(function(r,i){return r.concat(i instanceof UnsubscriptionError_1.UnsubscriptionError?i.errors:i)},[])}exports.Subscription=Subscription;
163
254
 
164
- },{"./util/UnsubscriptionError":59,"./util/isArray":63,"./util/isFunction":64,"./util/isObject":65}],54:[function(require,module,exports){
255
+ },{"./util/UnsubscriptionError":87,"./util/isArray":91,"./util/isFunction":92,"./util/isObject":93}],82:[function(require,module,exports){
165
256
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _enable_super_gross_mode_that_will_cause_bad_things=!1;exports.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var r=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+r.stack)}else _enable_super_gross_mode_that_will_cause_bad_things&&console.log("RxJS: Back to a better error behavior. Thank you. <3");_enable_super_gross_mode_that_will_cause_bad_things=e},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};
166
257
 
167
- },{}],55:[function(require,module,exports){
258
+ },{}],83:[function(require,module,exports){
168
259
  "use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function i(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var Subscriber_1=require("../Subscriber");function filter(t,r){return function(e){return e.lift(new FilterOperator(t,r))}}exports.filter=filter;var FilterOperator=function(){function t(t,r){this.predicate=t,this.thisArg=r}return t.prototype.call=function(t,r){return r.subscribe(new FilterSubscriber(t,this.predicate,this.thisArg))},t}(),FilterSubscriber=function(t){function r(r,e,i){var n=t.call(this,r)||this;return n.predicate=e,n.thisArg=i,n.count=0,n}return __extends(r,t),r.prototype._next=function(t){var r;try{r=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}r&&this.destination.next(t)},r}(Subscriber_1.Subscriber);
169
260
 
170
- },{"../Subscriber":52}],56:[function(require,module,exports){
261
+ },{"../Subscriber":80}],84:[function(require,module,exports){
171
262
  "use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var Subscriber_1=require("../Subscriber");function map(t,r){return function(e){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return e.lift(new MapOperator(t,r))}}exports.map=map;var MapOperator=function(){function t(t,r){this.project=t,this.thisArg=r}return t.prototype.call=function(t,r){return r.subscribe(new MapSubscriber(t,this.project,this.thisArg))},t}();exports.MapOperator=MapOperator;var MapSubscriber=function(t){function r(r,e,n){var o=t.call(this,r)||this;return o.project=e,o.count=0,o.thisArg=n||o,o}return __extends(r,t),r.prototype._next=function(t){var r;try{r=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(r)},r}(Subscriber_1.Subscriber);
172
263
 
173
- },{"../Subscriber":52}],57:[function(require,module,exports){
264
+ },{"../Subscriber":80}],85:[function(require,module,exports){
174
265
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.observable="function"==typeof Symbol&&Symbol.observable||"@@observable";
175
266
 
176
- },{}],58:[function(require,module,exports){
267
+ },{}],86:[function(require,module,exports){
177
268
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),exports.$$rxSubscriber=exports.rxSubscriber;
178
269
 
179
- },{}],59:[function(require,module,exports){
270
+ },{}],87:[function(require,module,exports){
180
271
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var UnsubscriptionErrorImpl=function(){function r(r){return Error.call(this),this.message=r?r.length+" errors occurred during unsubscription:\n"+r.map(function(r,t){return t+1+") "+r.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}();exports.UnsubscriptionError=UnsubscriptionErrorImpl;
181
272
 
182
- },{}],60:[function(require,module,exports){
273
+ },{}],88:[function(require,module,exports){
183
274
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Subscriber_1=require("../Subscriber");function canReportError(r){for(;r;){var e=r,o=e.closed,t=e.destination,i=e.isStopped;if(o||i)return!1;r=t&&t instanceof Subscriber_1.Subscriber?t:null}return!0}exports.canReportError=canReportError;
184
275
 
185
- },{"../Subscriber":52}],61:[function(require,module,exports){
276
+ },{"../Subscriber":80}],89:[function(require,module,exports){
186
277
  "use strict";function hostReportError(r){setTimeout(function(){throw r},0)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hostReportError=hostReportError;
187
278
 
188
- },{}],62:[function(require,module,exports){
279
+ },{}],90:[function(require,module,exports){
189
280
  "use strict";function identity(e){return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.identity=identity;
190
281
 
191
- },{}],63:[function(require,module,exports){
282
+ },{}],91:[function(require,module,exports){
192
283
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length};
193
284
 
194
- },{}],64:[function(require,module,exports){
285
+ },{}],92:[function(require,module,exports){
195
286
  "use strict";function isFunction(t){return"function"==typeof t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isFunction=isFunction;
196
287
 
197
- },{}],65:[function(require,module,exports){
288
+ },{}],93:[function(require,module,exports){
198
289
  "use strict";function isObject(e){return null!==e&&"object"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isObject=isObject;
199
290
 
200
- },{}],66:[function(require,module,exports){
291
+ },{}],94:[function(require,module,exports){
201
292
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var identity_1=require("./identity");function pipe(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return pipeFromArray(e)}function pipeFromArray(e){return 0===e.length?identity_1.identity:1===e.length?e[0]:function(r){return e.reduce(function(e,r){return r(e)},r)}}exports.pipe=pipe,exports.pipeFromArray=pipeFromArray;
202
293
 
203
- },{"./identity":62}],67:[function(require,module,exports){
294
+ },{"./identity":90}],95:[function(require,module,exports){
204
295
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Subscriber_1=require("../Subscriber"),rxSubscriber_1=require("../symbol/rxSubscriber"),Observer_1=require("../Observer");function toSubscriber(r,e,b){if(r){if(r instanceof Subscriber_1.Subscriber)return r;if(r[rxSubscriber_1.rxSubscriber])return r[rxSubscriber_1.rxSubscriber]()}return r||e||b?new Subscriber_1.Subscriber(r,e,b):new Subscriber_1.Subscriber(Observer_1.empty)}exports.toSubscriber=toSubscriber;
205
296
 
206
- },{"../Observer":51,"../Subscriber":52,"../symbol/rxSubscriber":58}],68:[function(require,module,exports){
297
+ },{"../Observer":79,"../Subscriber":80,"../symbol/rxSubscriber":86}],96:[function(require,module,exports){
298
+ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,e){for(var r in f)e[r]=f[r]}function SafeBuffer(f,e,r){return Buffer(f,e,r)}Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(Buffer.prototype),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(f,e,r){if("number"==typeof f)throw new TypeError("Argument must not be a number");return Buffer(f,e,r)},SafeBuffer.alloc=function(f,e,r){if("number"!=typeof f)throw new TypeError("Argument must be a number");var u=Buffer(f);return void 0!==e?"string"==typeof r?u.fill(e,r):u.fill(e):u.fill(0),u},SafeBuffer.allocUnsafe=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return Buffer(f)},SafeBuffer.allocUnsafeSlow=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(f)};
299
+
300
+ },{"buffer":29}],97:[function(require,module,exports){
207
301
  "use strict";var url=require("url");module.exports=function(o,r,t){if(o===r)return!0;var p=url.parse(o,!1,!0),e=url.parse(r,!1,!0),s=0|p.port||("https"===p.protocol?443:80),u=0|e.port||("https"===e.protocol?443:80),l={proto:p.protocol===e.protocol,hostname:p.hostname===e.hostname,port:s===u};return l.proto&&l.hostname&&(l.port||t)};
208
302
 
209
- },{"url":69}],69:[function(require,module,exports){
303
+ },{"url":98}],98:[function(require,module,exports){
210
304
  "use strict";var regex=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;module.exports={regex:regex,parse:function(e){var o=regex.exec(e);return o?{protocol:(o[1]||"").toLowerCase()||void 0,hostname:(o[5]||"").toLowerCase()||void 0,port:o[6]||void 0}:{}}};
211
305
 
212
- },{}],70:[function(require,module,exports){
306
+ },{}],99:[function(require,module,exports){
307
+ (function (global){(function (){
308
+ var ClientRequest=require("./lib/request"),response=require("./lib/response"),extend=require("xtend"),statusCodes=require("builtin-status-codes"),url=require("url"),http=exports;http.request=function(e,t){e="string"==typeof e?url.parse(e):extend(e);var r=-1===global.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||r,n=e.hostname||e.host,o=e.port,p=e.path||"/";n&&-1!==n.indexOf(":")&&(n="["+n+"]"),e.url=(n?s+"//"+n:"")+(o?":"+o:"")+p,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new ClientRequest(e);return t&&u.on("response",t),u},http.get=function(e,t){var r=http.request(e,t);return r.end(),r},http.ClientRequest=ClientRequest,http.IncomingMessage=response.IncomingMessage,http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.globalAgent=new http.Agent,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"];
309
+
310
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
311
+ },{"./lib/request":101,"./lib/response":102,"builtin-status-codes":30,"url":120,"xtend":127}],100:[function(require,module,exports){
312
+ (function (global){(function (){
313
+ var xhr;function getXHR(){if(void 0!==xhr)return xhr;if(global.XMLHttpRequest){xhr=new global.XMLHttpRequest;try{xhr.open("GET",global.XDomainRequest?"/":"https://example.com")}catch(e){xhr=null}}else xhr=null;return xhr}function checkTypeSupport(e){var r=getXHR();if(!r)return!1;try{return r.responseType=e,r.responseType===e}catch(e){}return!1}function isFunction(e){return"function"==typeof e}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream),exports.writableStream=isFunction(global.WritableStream),exports.abortController=isFunction(global.AbortController),exports.arraybuffer=exports.fetch||checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=exports.fetch||!!getXHR()&&isFunction(getXHR().overrideMimeType),xhr=null;
314
+
315
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
316
+ },{}],101:[function(require,module,exports){
317
+ (function (process,global,Buffer){(function (){
318
+ var capability=require("./capability"),inherits=require("inherits"),response=require("./response"),stream=require("readable-stream"),IncomingMessage=response.IncomingMessage,rStates=response.readyStates;function decideMode(e,t){return capability.fetch&&t?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&e?"arraybuffer":"text"}var ClientRequest=module.exports=function(e){var t,r=this;stream.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])});var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!capability.abortController)o=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!capability.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=decideMode(t,o),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",function(){r._onFinish()})};function statusValid(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===unsafeHeaders.indexOf(r)&&(this._headers[r]={name:e,value:t})},ClientRequest.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},ClientRequest.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},ClientRequest.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var r=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach(function(e){var t=r[e].name,o=r[e].value;Array.isArray(o)?o.forEach(function(e){s.push([t,e])}):s.push([t,o])}),"fetch"===e._mode){var i=null;if(capability.abortController){var n=new AbortController;i=n.signal,e._fetchAbortController=n,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=global.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}global.fetch(e._opts.url,{method:e._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:i}).then(function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()},function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)})}else{var a=e._xhr=new global.XMLHttpRequest;try{a.open(e._opts.method,e._opts.url,!0)}catch(t){return void process.nextTick(function(){e.emit("error",t)})}"responseType"in a&&(a.responseType=e._mode),"withCredentials"in a&&(a.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(a.timeout=t.requestTimeout,a.ontimeout=function(){e.emit("requestTimeout")}),s.forEach(function(e){a.setRequestHeader(e[0],e[1])}),e._response=null,a.onreadystatechange=function(){switch(a.readyState){case rStates.LOADING:case rStates.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(a.onprogress=function(){e._onXHRProgress()}),a.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{a.send(o)}catch(t){return void process.nextTick(function(){e.emit("error",t)})}}}},ClientRequest.prototype._onXHRProgress=function(){this._resetTimers(!1),statusValid(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress(this._resetTimers.bind(this)))},ClientRequest.prototype._connect=function(){var e=this;e._destroyed||(e._response=new IncomingMessage(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},ClientRequest.prototype._write=function(e,t,r){this._body.push(e),r()},ClientRequest.prototype._resetTimers=function(e){var t=this;global.clearTimeout(t._socketTimer),t._socketTimer=null,e?(global.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=global.setTimeout(function(){t.emit("timeout")},t._socketTimeout))},ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(e){this._destroyed=!0,this._resetTimers(!0),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort(),e&&this.emit("error",e)},ClientRequest.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),stream.Writable.prototype.end.call(this,e,t,r)},ClientRequest.prototype.setTimeout=function(e,t){t&&this.once("timeout",t),this._socketTimeout=e,this._resetTimers(!1)},ClientRequest.prototype.flushHeaders=function(){},ClientRequest.prototype.setNoDelay=function(){},ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];
319
+
320
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
321
+ },{"./capability":100,"./response":102,"_process":71,"buffer":29,"inherits":60,"readable-stream":117}],102:[function(require,module,exports){
322
+ (function (process,global,Buffer){(function (){
323
+ var capability=require("./capability"),inherits=require("inherits"),stream=require("readable-stream"),rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},IncomingMessage=exports.IncomingMessage=function(e,r,s,t){var a=this;if(stream.Readable.call(a),a._mode=s,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){process.nextTick(function(){a.emit("close")})}),"fetch"===s){if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(e,r){a.headers[r.toLowerCase()]=e,a.rawHeaders.push(r,e)}),capability.writableStream){var o=new WritableStream({write:function(e){return t(!1),new Promise(function(r,s){a._destroyed?s():a.push(Buffer.from(e))?r():a._resumeFetch=r})},close:function(){t(!0),a._destroyed||a.push(null)},abort:function(e){t(!0),a._destroyed||a.emit("error",e)}});try{return void r.body.pipeTo(o).catch(function(e){t(!0),a._destroyed||a.emit("error",e)})}catch(e){}}var n=r.body.getReader();!function e(){n.read().then(function(r){a._destroyed||(t(r.done),r.done?a.push(null):(a.push(Buffer.from(r.value)),e()))}).catch(function(e){t(!0),a._destroyed||a.emit("error",e)})}()}else{if(a._xhr=e,a._pos=0,a.url=e.responseURL,a.statusCode=e.status,a.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var r=e.match(/^([^:]+):\s*(.*)/);if(r){var s=r[1].toLowerCase();"set-cookie"===s?(void 0===a.headers[s]&&(a.headers[s]=[]),a.headers[s].push(r[2])):void 0!==a.headers[s]?a.headers[s]+=", "+r[2]:a.headers[s]=r[2],a.rawHeaders.push(r[1],r[2])}}),a._charset="x-user-defined",!capability.overrideMimeType){var i=a.rawHeaders["mime-type"];if(i){var u=i.match(/;\s*charset=([^;])(;|$)/);u&&(a._charset=u[1].toLowerCase())}a._charset||(a._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},IncomingMessage.prototype._onXHRProgress=function(e){var r=this,s=r._xhr,t=null;switch(r._mode){case"text":if((t=s.responseText).length>r._pos){var a=t.substr(r._pos);if("x-user-defined"===r._charset){for(var o=Buffer.alloc(a.length),n=0;n<a.length;n++)o[n]=255&a.charCodeAt(n);r.push(o)}else r.push(a,r._charset);r._pos=t.length}break;case"arraybuffer":if(s.readyState!==rStates.DONE||!s.response)break;t=s.response,r.push(Buffer.from(new Uint8Array(t)));break;case"moz-chunked-arraybuffer":if(t=s.response,s.readyState!==rStates.LOADING||!t)break;r.push(Buffer.from(new Uint8Array(t)));break;case"ms-stream":if(t=s.response,s.readyState!==rStates.LOADING)break;var i=new global.MSStreamReader;i.onprogress=function(){i.result.byteLength>r._pos&&(r.push(Buffer.from(new Uint8Array(i.result.slice(r._pos)))),r._pos=i.result.byteLength)},i.onload=function(){e(!0),r.push(null)},i.readAsArrayBuffer(t)}r._xhr.readyState===rStates.DONE&&"ms-stream"!==r._mode&&(e(!0),r.push(null))};
324
+
325
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
326
+ },{"./capability":100,"_process":71,"buffer":29,"inherits":60,"readable-stream":117}],103:[function(require,module,exports){
327
+ "use strict";function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}var codes={};function createErrorType(e,r,t){t||(t=Error);var n=function(e){function t(t,n,o){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,o))||this}return _inheritsLoose(t,e),t}(t);n.prototype.name=t.name,n.prototype.code=e,codes[e]=n}function oneOf(e,r){if(Array.isArray(e)){var t=e.length;return e=e.map(function(e){return String(e)}),t>2?"one of ".concat(r," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(r," ").concat(e[0]," or ").concat(e[1]):"of ".concat(r," ").concat(e[0])}return"of ".concat(r," ").concat(String(e))}function startsWith(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function endsWith(e,r,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function includes(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}createErrorType("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(e,r,t){var n,o;if("string"==typeof r&&startsWith(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be",endsWith(e," argument"))o="The ".concat(e," ").concat(n," ").concat(oneOf(r,"type"));else{var c=includes(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(oneOf(r,"type"))}return o+=". Received type ".concat(typeof t)},TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module.exports.codes=codes;
328
+
329
+ },{}],104:[function(require,module,exports){
330
+ (function (process){(function (){
331
+ "use strict";var objectKeys=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};module.exports=Duplex;var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");require("inherits")(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);Readable.call(this,e),Writable.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",onend)))}function onend(){this._writableState.ended||process.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}});
332
+
333
+ }).call(this)}).call(this,require('_process'))
334
+ },{"./_stream_readable":106,"./_stream_writable":108,"_process":71,"inherits":60}],105:[function(require,module,exports){
335
+ "use strict";module.exports=PassThrough;var Transform=require("./_stream_transform");function PassThrough(r){if(!(this instanceof PassThrough))return new PassThrough(r);Transform.call(this,r)}require("inherits")(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,o){o(null,r)};
336
+
337
+ },{"./_stream_transform":107,"inherits":60}],106:[function(require,module,exports){
338
+ (function (process,global){(function (){
339
+ "use strict";var Duplex;module.exports=Readable,Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter,EElistenerCount=function(e,t){return e.listeners(t).length},Stream=require("./internal/streams/stream"),Buffer=require("buffer").Buffer,OurUint8Array=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}var debug,debugUtil=require("util");debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,createReadableStreamAsyncIterator,from,BufferList=require("./internal/streams/buffer_list"),destroyImpl=require("./internal/streams/destroy"),_require=require("./internal/streams/state"),getHighWaterMark=_require.getHighWaterMark,_require$codes=require("../errors").codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_STREAM_PUSH_AFTER_EOF=_require$codes.ERR_STREAM_PUSH_AFTER_EOF,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_STREAM_UNSHIFT_AFTER_END_EVENT=_require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;require("inherits")(Readable,Stream);var errorOrDestroy=destroyImpl.errorOrDestroy,kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function ReadableState(e,t,r){Duplex=Duplex||require("./_stream_duplex"),e=e||{},"boolean"!=typeof r&&(r=t instanceof Duplex),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=getHighWaterMark(this,e,"readableHighWaterMark",r),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){if(Duplex=Duplex||require("./_stream_duplex"),!(this instanceof Readable))return new Readable(e);var t=this instanceof Duplex;this._readableState=new ReadableState(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),Stream.call(this)}function readableAddChunk(e,t,r,a,n){debug("readableAddChunk",t);var i,d=e._readableState;if(null===t)d.reading=!1,onEofChunk(e,d);else if(n||(i=chunkInvalid(d,t)),i)errorOrDestroy(e,i);else if(d.objectMode||t&&t.length>0)if("string"==typeof t||d.objectMode||Object.getPrototypeOf(t)===Buffer.prototype||(t=_uint8ArrayToBuffer(t)),a)d.endEmitted?errorOrDestroy(e,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(e,d,t,!0);else if(d.ended)errorOrDestroy(e,new ERR_STREAM_PUSH_AFTER_EOF);else{if(d.destroyed)return!1;d.reading=!1,d.decoder&&!r?(t=d.decoder.write(t),d.objectMode||0!==t.length?addChunk(e,d,t,!1):maybeReadMore(e,d)):addChunk(e,d,t,!1)}else a||(d.reading=!1,maybeReadMore(e,d));return!d.ended&&(d.length<d.highWaterMark||0===d.length)}function addChunk(e,t,r,a){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e)),maybeReadMore(e,t)}function chunkInvalid(e,t){var r;return _isUint8Array(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(e,t){t(e)},Readable.prototype.push=function(e,t){var r,a=this._readableState;return a.objectMode?r=!0:"string"==typeof e&&((t=t||a.defaultEncoding)!==a.encoding&&(e=Buffer.from(e,t),t=""),r=!0),readableAddChunk(this,e,t,!1,r)},Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(e){StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder);var t=new StringDecoder(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,a="";null!==r;)a+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==a&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var MAX_HWM=1073741824;function computeNewHighWaterMark(e){return e>=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function onEofChunk(e,t){if(debug("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?emitReadable(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,emitReadable_(e)))}}function emitReadable(e){var t=e._readableState;debug("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(emitReadable_,e))}function emitReadable_(e){var t=e._readableState;debug("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(debug("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function pipeOnDrain(e){return function(){var t=e._readableState;debug("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&EElistenerCount(e,"data")&&(t.flowing=!0,flow(e))}}function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function nReadingNextTick(e){debug("readable nexttick read 0"),e.read(0)}function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(resume_,e,t))}function resume_(e,t){debug("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;for(debug("flow",t.flowing);t.flowing&&null!==e.read(););}function fromList(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function endReadable(e){var t=e._readableState;debug("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(endReadableNT,t,e))}function endReadableNT(e,t){if(debug("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function indexOf(e,t){for(var r=0,a=e.length;r<a;r++)if(e[r]===t)return r;return-1}Readable.prototype.read=function(e){debug("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(0===(e=howMuchToRead(e,t))&&t.ended)return 0===t.length&&endReadable(this),null;var a,n=t.needReadable;return debug("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&debug("length less than watermark",n=!0),t.ended||t.reading?debug("reading or ended",n=!1):n&&(debug("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(r,t))),null===(a=e>0?fromList(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==a&&this.emit("data",a),a},Readable.prototype._read=function(e){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,debug("pipe count=%d opts=%j",a.pipesCount,t);var n=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?d:f;function i(t,n){debug("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,debug("cleanup"),e.removeListener("close",b),e.removeListener("finish",p),e.removeListener("drain",o),e.removeListener("error",u),e.removeListener("unpipe",i),r.removeListener("end",d),r.removeListener("end",f),r.removeListener("data",l),s=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||o())}function d(){debug("onend"),e.end()}a.endEmitted?process.nextTick(n):r.once("end",n),e.on("unpipe",i);var o=pipeOnDrain(r);e.on("drain",o);var s=!1;function l(t){debug("ondata");var n=e.write(t);debug("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==indexOf(a.pipes,e))&&!s&&(debug("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function u(t){debug("onerror",t),f(),e.removeListener("error",u),0===EElistenerCount(e,"error")&&errorOrDestroy(e,t)}function b(){e.removeListener("finish",p),f()}function p(){debug("onfinish"),e.removeListener("close",b),f()}function f(){debug("unpipe"),r.unpipe(e)}return r.on("data",l),prependListener(e,"error",u),e.once("close",b),e.once("finish",p),e.emit("pipe",r),a.flowing||(debug("pipe resume"),r.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var a=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)a[i].emit("unpipe",this,{hasUnpiped:!1});return this}var d=indexOf(t.pipes,e);return-1===d?this:(t.pipes.splice(d,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},Readable.prototype.on=function(e,t){var r=Stream.prototype.on.call(this,e,t),a=this._readableState;return"data"===e?(a.readableListening=this.listenerCount("readable")>0,!1!==a.flowing&&this.resume()):"readable"===e&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,debug("on readable",a.length,a.reading),a.length?emitReadable(this):a.reading||process.nextTick(nReadingNextTick,this))),r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(e,t){var r=Stream.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(updateReadableListening,this),r},Readable.prototype.removeAllListeners=function(e){var t=Stream.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(updateReadableListening,this),t},Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!e.readableListening,resume(this,e)),e.paused=!1,this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(e){var t=this,r=this._readableState,a=!1;for(var n in e.on("end",function(){if(debug("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(n){(debug("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(a=!0,e.pause()))}),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var i=0;i<kProxyEvents.length;i++)e.on(kProxyEvents[i],this.emit.bind(this,kProxyEvents[i]));return this._read=function(t){debug("wrapped _read",t),a&&(a=!1,e.resume())},this},"function"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===createReadableStreamAsyncIterator&&(createReadableStreamAsyncIterator=require("./internal/streams/async_iterator")),createReadableStreamAsyncIterator(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(Readable.from=function(e,t){return void 0===from&&(from=require("./internal/streams/from")),from(Readable,e,t)});
340
+
341
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
342
+ },{"../errors":103,"./_stream_duplex":104,"./internal/streams/async_iterator":109,"./internal/streams/buffer_list":110,"./internal/streams/destroy":111,"./internal/streams/from":113,"./internal/streams/state":115,"./internal/streams/stream":116,"_process":71,"buffer":29,"events":34,"inherits":60,"string_decoder/":118,"util":28}],107:[function(require,module,exports){
343
+ "use strict";module.exports=Transform;var _require$codes=require("../errors").codes,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_TRANSFORM_ALREADY_TRANSFORMING=_require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,ERR_TRANSFORM_WITH_LENGTH_0=_require$codes.ERR_TRANSFORM_WITH_LENGTH_0,Duplex=require("./_stream_duplex");function afterTransform(r,e){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(null===n)return this.emit("error",new ERR_MULTIPLE_CALLBACK);t.writechunk=null,t.writecb=null,null!=e&&this.push(e),n(r);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Transform(r){if(!(this instanceof Transform))return new Transform(r);Duplex.call(this,r),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,r&&("function"==typeof r.transform&&(this._transform=r.transform),"function"==typeof r.flush&&(this._flush=r.flush)),this.on("prefinish",prefinish)}function prefinish(){var r=this;"function"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush(function(e,t){done(r,e,t)})}function done(r,e,t){if(e)return r.emit("error",e);if(null!=t&&r.push(t),r._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0;if(r._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING;return r.push(null)}require("inherits")(Transform,Duplex),Transform.prototype.push=function(r,e){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,r,e)},Transform.prototype._transform=function(r,e,t){t(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"))},Transform.prototype._write=function(r,e,t){var n=this._transformState;if(n.writecb=t,n.writechunk=r,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Transform.prototype._read=function(r){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},Transform.prototype._destroy=function(r,e){Duplex.prototype._destroy.call(this,r,function(r){e(r)})};
344
+
345
+ },{"../errors":103,"./_stream_duplex":104,"inherits":60}],108:[function(require,module,exports){
346
+ (function (process,global){(function (){
347
+ "use strict";function WriteReq(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(t,e)}}var Duplex;module.exports=Writable,Writable.WritableState=WritableState;var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("buffer").Buffer,OurUint8Array=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}var realHasInstance,destroyImpl=require("./internal/streams/destroy"),_require=require("./internal/streams/state"),getHighWaterMark=_require.getHighWaterMark,_require$codes=require("../errors").codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_STREAM_CANNOT_PIPE=_require$codes.ERR_STREAM_CANNOT_PIPE,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,ERR_STREAM_NULL_VALUES=_require$codes.ERR_STREAM_NULL_VALUES,ERR_STREAM_WRITE_AFTER_END=_require$codes.ERR_STREAM_WRITE_AFTER_END,ERR_UNKNOWN_ENCODING=_require$codes.ERR_UNKNOWN_ENCODING,errorOrDestroy=destroyImpl.errorOrDestroy;function nop(){}function WritableState(e,t,r){Duplex=Duplex||require("./_stream_duplex"),e=e||{},"boolean"!=typeof r&&(r=t instanceof Duplex),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=getHighWaterMark(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){onwrite(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(e){var t=this instanceof(Duplex=Duplex||require("./_stream_duplex"));if(!t&&!realHasInstance.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),Stream.call(this)}function writeAfterEnd(e,t){var r=new ERR_STREAM_WRITE_AFTER_END;errorOrDestroy(e,r),process.nextTick(t,r)}function validChunk(e,t,r,i){var n;return null===r?n=new ERR_STREAM_NULL_VALUES:"string"==typeof r||t.objectMode||(n=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer"],r)),!n||(errorOrDestroy(e,n),process.nextTick(i,n),!1)}function decodeChunk(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Buffer.from(t,r)),t}function writeOrBuffer(e,t,r,i,n,o){if(!r){var s=decodeChunk(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,a,i,n,o);return u}function doWrite(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new ERR_STREAM_DESTROYED("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function onwriteError(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(finishMaybe,e,t),e._writableState.errorEmitted=!0,errorOrDestroy(e,i)):(n(i),e._writableState.errorEmitted=!0,errorOrDestroy(e,i),finishMaybe(e,t))}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new ERR_MULTIPLE_CALLBACK;if(onwriteStateUpdate(r),t)onwriteError(e,r,i,t,n);else{var o=needFinish(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),i?process.nextTick(afterWrite,e,r,o,n):afterWrite(e,r,o,n)}}function afterWrite(e,t,r,i){r||onwriteDrain(e,t),t.pendingcb--,i(),finishMaybe(e,t)}function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)n[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;n.allBuffers=a,doWrite(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new CorkedRequest(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(doWrite(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(r){t.pendingcb--,r&&errorOrDestroy(e,r),t.prefinished=!0,e.emit("prefinish"),finishMaybe(e,t)})}function prefinish(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(callFinal,e,t)))}function finishMaybe(e,t){var r=needFinish(t);if(r&&(prefinish(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function onCorkedFinish(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}require("inherits")(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){return!!realHasInstance.call(this,e)||this===Writable&&(e&&e._writableState instanceof WritableState)}})):realHasInstance=function(e){return e instanceof this},Writable.prototype.pipe=function(){errorOrDestroy(this,new ERR_STREAM_CANNOT_PIPE)},Writable.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&_isUint8Array(e);return o&&!Buffer.isBuffer(e)&&(e=_uint8ArrayToBuffer(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=nop),i.ending?writeAfterEnd(this,r):(o||validChunk(this,i,e,r))&&(i.pendingcb++,n=writeOrBuffer(this,i,o,e,t,r)),n},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new ERR_UNKNOWN_ENCODING(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(e,t,r){r(new ERR_METHOD_NOT_IMPLEMENTED("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||endWritable(this,i,r),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(e,t){t(e)};
348
+
349
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
350
+ },{"../errors":103,"./_stream_duplex":104,"./internal/streams/destroy":111,"./internal/streams/state":115,"./internal/streams/stream":116,"_process":71,"buffer":29,"inherits":60,"util-deprecate":122}],109:[function(require,module,exports){
351
+ (function (process){(function (){
352
+ "use strict";var _Object$setPrototypeO;function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var finished=require("./end-of-stream"),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[kLastResolve];if(null!==t){var r=e[kStream].read();null!==r&&(e[kLastPromise]=null,e[kLastResolve]=null,e[kLastReject]=null,t(createIterResult(r,!1)))}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,t){return function(r,o){e.then(function(){t[kEnded]?r(createIterResult(void 0,!0)):t[kHandlePromise](r,o)},o)}}var AsyncIteratorPrototype=Object.getPrototypeOf(function(){}),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_defineProperty(_Object$setPrototypeO={get stream(){return this[kStream]},next:function(){var e=this,t=this[kError];if(null!==t)return Promise.reject(t);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise(function(t,r){process.nextTick(function(){e[kError]?r(e[kError]):t(createIterResult(void 0,!0))})});var r,o=this[kLastPromise];if(o)r=new Promise(wrapForNext(o,this));else{var n=this[kStream].read();if(null!==n)return Promise.resolve(createIterResult(n,!1));r=new Promise(this[kHandlePromise])}return this[kLastPromise]=r,r}},Symbol.asyncIterator,function(){return this}),_defineProperty(_Object$setPrototypeO,"return",function(){var e=this;return new Promise(function(t,r){e[kStream].destroy(null,function(e){e?r(e):t(createIterResult(void 0,!0))})})}),_Object$setPrototypeO),AsyncIteratorPrototype),createReadableStreamAsyncIterator=function(e){var t,r=Object.create(ReadableStreamAsyncIteratorPrototype,(_defineProperty(t={},kStream,{value:e,writable:!0}),_defineProperty(t,kLastResolve,{value:null,writable:!0}),_defineProperty(t,kLastReject,{value:null,writable:!0}),_defineProperty(t,kError,{value:null,writable:!0}),_defineProperty(t,kEnded,{value:e._readableState.endEmitted,writable:!0}),_defineProperty(t,kHandlePromise,{value:function(e,t){var o=r[kStream].read();o?(r[kLastPromise]=null,r[kLastResolve]=null,r[kLastReject]=null,e(createIterResult(o,!1))):(r[kLastResolve]=e,r[kLastReject]=t)},writable:!0}),t));return r[kLastPromise]=null,finished(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[kLastReject];return null!==t&&(r[kLastPromise]=null,r[kLastResolve]=null,r[kLastReject]=null,t(e)),void(r[kError]=e)}var o=r[kLastResolve];null!==o&&(r[kLastPromise]=null,r[kLastResolve]=null,r[kLastReject]=null,o(createIterResult(void 0,!0))),r[kEnded]=!0}),e.on("readable",onReadable.bind(null,r)),r};module.exports=createReadableStreamAsyncIterator;
353
+
354
+ }).call(this)}).call(this,require('_process'))
355
+ },{"./end-of-stream":112,"_process":71}],110:[function(require,module,exports){
356
+ "use strict";function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var _require=require("buffer"),Buffer=_require.Buffer,_require2=require("util"),inspect=_require2.inspect,custom=inspect&&inspect.custom||"inspect";function copyBuffer(e,t,n){Buffer.prototype.copy.call(e,t,n)}module.exports=function(){function e(){_classCallCheck(this,e),this.head=null,this.tail=null,this.length=0}return _createClass(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return Buffer.alloc(0);for(var t=Buffer.allocUnsafe(e>>>0),n=this.head,r=0;n;)copyBuffer(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var a=t.data,i=e>a.length?a.length:e;if(i===a.length?r+=a:r+=a.slice(0,e),0===(e-=i)){i===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=Buffer.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,i=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,i),0===(e-=i)){i===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(i));break}++r}return this.length-=r,t}},{key:custom,value:function(e,t){return inspect(this,_objectSpread({},t,{depth:0,customInspect:!1}))}}]),e}();
357
+
358
+ },{"buffer":29,"util":28}],111:[function(require,module,exports){
359
+ (function (process){(function (){
360
+ "use strict";function destroy(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(emitErrorNT,this,t)):process.nextTick(emitErrorNT,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted?process.nextTick(emitCloseNT,r):(r._writableState.errorEmitted=!0,process.nextTick(emitErrorAndCloseNT,r,t)):process.nextTick(emitErrorAndCloseNT,r,t):e?(process.nextTick(emitCloseNT,r),e(t)):process.nextTick(emitCloseNT,r)}),this)}function emitErrorAndCloseNT(t,e){emitErrorNT(t,e),emitCloseNT(t)}function emitCloseNT(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(t,e){t.emit("error",e)}function errorOrDestroy(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy};
361
+
362
+ }).call(this)}).call(this,require('_process'))
363
+ },{"_process":71}],112:[function(require,module,exports){
364
+ "use strict";var ERR_STREAM_PREMATURE_CLOSE=require("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function once(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];e.apply(this,n)}}}function noop(){}function isRequest(e){return e.setHeader&&"function"==typeof e.abort}function eos(e,r,t){if("function"==typeof r)return eos(e,null,r);r||(r={}),t=once(t||noop);var n=r.readable||!1!==r.readable&&e.readable,o=r.writable||!1!==r.writable&&e.writable,i=function(){e.writable||l()},a=e._writableState&&e._writableState.finished,l=function(){o=!1,a=!0,n||t.call(e)},s=e._readableState&&e._readableState.endEmitted,c=function(){n=!1,s=!0,o||t.call(e)},u=function(r){t.call(e,r)},f=function(){var r;return n&&!s?(e._readableState&&e._readableState.ended||(r=new ERR_STREAM_PREMATURE_CLOSE),t.call(e,r)):o&&!a?(e._writableState&&e._writableState.ended||(r=new ERR_STREAM_PREMATURE_CLOSE),t.call(e,r)):void 0},d=function(){e.req.on("finish",l)};return isRequest(e)?(e.on("complete",l),e.on("abort",f),e.req?d():e.on("request",d)):o&&!e._writableState&&(e.on("end",i),e.on("close",i)),e.on("end",c),e.on("finish",l),!1!==r.error&&e.on("error",u),e.on("close",f),function(){e.removeListener("complete",l),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",l),e.removeListener("end",i),e.removeListener("close",i),e.removeListener("finish",l),e.removeListener("end",c),e.removeListener("error",u),e.removeListener("close",f)}}module.exports=eos;
365
+
366
+ },{"../../../errors":103}],113:[function(require,module,exports){
367
+ module.exports=function(){throw new Error("Readable.from is not available in the browser")};
368
+
369
+ },{}],114:[function(require,module,exports){
370
+ "use strict";var eos;function once(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var _require$codes=require("../../../errors").codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&"function"==typeof e.abort}function destroyer(e,r,n,o){o=once(o);var t=!1;e.on("close",function(){t=!0}),void 0===eos&&(eos=require("./end-of-stream")),eos(e,{readable:r,writable:n},function(e){if(e)return o(e);t=!0,o()});var i=!1;return function(r){if(!t&&!i)return i=!0,isRequest(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(r||new ERR_STREAM_DESTROYED("pipe"))}}function call(e){e()}function pipe(e,r){return e.pipe(r)}function popCallback(e){return e.length?"function"!=typeof e[e.length-1]?noop:e.pop():noop}function pipeline(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o,t=popCallback(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new ERR_MISSING_ARGS("streams");var i=r.map(function(e,n){var u=n<r.length-1;return destroyer(e,u,n>0,function(e){o||(o=e),e&&i.forEach(call),u||(i.forEach(call),t(o))})});return r.reduce(pipe)}module.exports=pipeline;
371
+
372
+ },{"../../../errors":103,"./end-of-stream":112}],115:[function(require,module,exports){
373
+ "use strict";var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(r,e,t){return null!=r.highWaterMark?r.highWaterMark:e?r[t]:null}function getHighWaterMark(r,e,t,a){var i=highWaterMarkFrom(e,a,t);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new ERR_INVALID_OPT_VALUE(a?t:"highWaterMark",i);return Math.floor(i)}return r.objectMode?16:16384}module.exports={getHighWaterMark:getHighWaterMark};
374
+
375
+ },{"../../../errors":103}],116:[function(require,module,exports){
376
+ module.exports=require("events").EventEmitter;
377
+
378
+ },{"events":34}],117:[function(require,module,exports){
379
+ exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js"),exports.finished=require("./lib/internal/streams/end-of-stream.js"),exports.pipeline=require("./lib/internal/streams/pipeline.js");
380
+
381
+ },{"./lib/_stream_duplex.js":104,"./lib/_stream_passthrough.js":105,"./lib/_stream_readable.js":106,"./lib/_stream_transform.js":107,"./lib/_stream_writable.js":108,"./lib/internal/streams/end-of-stream.js":112,"./lib/internal/streams/pipeline.js":114}],118:[function(require,module,exports){
382
+ "use strict";var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function normalizeEncoding(t){var e=_normalizeEncoding(t);if("string"!=typeof e&&(Buffer.isEncoding===isEncoding||!isEncoding(t)))throw new Error("Unknown encoding: "+t);return e||t}function StringDecoder(t){var e;switch(this.encoding=normalizeEncoding(t),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,e=4;break;case"utf8":this.fillLast=utf8FillLast,e=4;break;case"base64":this.text=base64Text,this.end=base64End,e=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(e)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function utf8CheckIncomplete(t,e,s){var i=e.length-1;if(i<s)return 0;var n=utf8CheckByte(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<s||-2===n?0:(n=utf8CheckByte(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<s||-2===n?0:(n=utf8CheckByte(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}function utf8CheckExtraBytes(t,e,s){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}function utf8FillLast(t){var e=this.lastTotal-this.lastNeed,s=utf8CheckExtraBytes(this,t,e);return void 0!==s?s:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function utf8Text(t,e){var s=utf8CheckIncomplete(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=s;var i=t.length-(s-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function utf8End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function utf16Text(t,e){if((t.length-e)%2==0){var s=t.toString("utf16le",e);if(s){var i=s.charCodeAt(s.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function utf16End(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,s)}return e}function base64Text(t,e){var s=(t.length-e)%3;return 0===s?t.toString("base64",e):(this.lastNeed=3-s,this.lastTotal=3,1===s?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-s))}function base64End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(t){if(0===t.length)return"";var e,s;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<t.length?e?e+this.text(t,s):this.text(t,s):e||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};
383
+
384
+ },{"safe-buffer":96}],119:[function(require,module,exports){
213
385
  (function (global){(function (){
214
386
  "use strict";var required=require("requires-port"),qs=require("querystringify"),slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/,whitespace="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",left=new RegExp("^"+whitespace+"+");function trimLeft(e){return(e||"").toString().replace(left,"")}var rules=[["#","hash"],["?","query"],function(e,t){return isSpecial(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(e){var t,o=("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).location||{},r={},s=typeof(e=e||o);if("blob:"===e.protocol)r=new Url(unescape(e.pathname),{});else if("string"===s)for(t in r=new Url(e,{}),ignore)delete r[t];else if("object"===s){for(t in e)t in ignore||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=slashes.test(e.href))}return r}function isSpecial(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function extractProtocol(e,t){e=trimLeft(e),t=t||{};var o,r=protocolre.exec(e),s=r[1]?r[1].toLowerCase():"",a=!!r[2],l=!!r[3],n=0;return a?l?(o=r[2]+r[3]+r[4],n=r[2].length+r[3].length):(o=r[2]+r[4],n=r[2].length):l?(o=r[3]+r[4],n=r[3].length):o=r[4],"file:"===s?n>=2&&(o=o.slice(2)):isSpecial(s)?o=r[4]:s?a&&(o=o.slice(2)):n>=2&&isSpecial(t.protocol)&&(o=r[4]),{protocol:s,slashes:a||isSpecial(s),slashesCount:n,rest:o}}function resolve(e,t){if(""===e)return t;for(var o=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=o.length,s=o[r-1],a=!1,l=0;r--;)"."===o[r]?o.splice(r,1):".."===o[r]?(o.splice(r,1),l++):l&&(0===r&&(a=!0),o.splice(r,1),l--);return a&&o.unshift(""),"."!==s&&".."!==s||o.push(""),o.join("/")}function Url(e,t,o){if(e=trimLeft(e),!(this instanceof Url))return new Url(e,t,o);var r,s,a,l,n,i,p=rules.slice(),c=typeof t,h=this,u=0;for("object"!==c&&"string"!==c&&(o=t,t=null),o&&"function"!=typeof o&&(o=qs.parse),r=!(s=extractProtocol(e||"",t=lolcation(t))).protocol&&!s.slashes,h.slashes=s.slashes||r&&t.slashes,h.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||windowsDriveLetter.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!isSpecial(h.protocol)))&&(p[3]=[/(.*)/,"pathname"]);u<p.length;u++)"function"!=typeof(l=p[u])?(a=l[0],i=l[1],a!=a?h[i]=e:"string"==typeof a?~(n=e.indexOf(a))&&("number"==typeof l[2]?(h[i]=e.slice(0,n),e=e.slice(n+l[2])):(h[i]=e.slice(n),e=e.slice(0,n))):(n=a.exec(e))&&(h[i]=n[1],e=e.slice(0,n.index)),h[i]=h[i]||r&&l[3]&&t[i]||"",l[4]&&(h[i]=h[i].toLowerCase())):e=l(e,h);o&&(h.query=o(h.query)),r&&t.slashes&&"/"!==h.pathname.charAt(0)&&(""!==h.pathname||""!==t.pathname)&&(h.pathname=resolve(h.pathname,t.pathname)),"/"!==h.pathname.charAt(0)&&isSpecial(h.protocol)&&(h.pathname="/"+h.pathname),required(h.port,h.protocol)||(h.host=h.hostname,h.port=""),h.username=h.password="",h.auth&&(l=h.auth.split(":"),h.username=l[0],h.password=l[1]||""),h.origin="file:"!==h.protocol&&isSpecial(h.protocol)&&h.host?h.protocol+"//"+h.host:"null",h.href=h.toString()}function set(e,t,o){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(o||qs.parse)(t)),r[e]=t;break;case"port":r[e]=t,required(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,/:\d+$/.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!o;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";r[e]=t.charAt(0)!==s?s+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var a=t.split(":");r.username=a[0],r.password=2===a.length?a[1]:""}for(var l=0;l<rules.length;l++){var n=rules[l];n[4]&&(r[n[1]]=r[n[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&isSpecial(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function toString(e){e&&"function"==typeof e||(e=qs.stringify);var t,o=this,r=o.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var s=r+(o.protocol&&o.slashes||isSpecial(o.protocol)?"//":"");return o.username?(s+=o.username,o.password&&(s+=":"+o.password),s+="@"):o.password&&(s+=":"+o.password,s+="@"),s+=o.host+o.pathname,(t="object"==typeof o.query?e(o.query):o.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),o.hash&&(s+=o.hash),s}Url.prototype={set:set,toString:toString},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=qs,module.exports=Url;
215
387
 
216
388
  }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
217
- },{"querystringify":48,"requires-port":49}]},{},[16])(16)
389
+ },{"querystringify":76,"requires-port":77}],120:[function(require,module,exports){
390
+ "use strict";var punycode=require("punycode"),util=require("./util");function Url(){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}exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");function urlParse(t,s,e){if(t&&util.isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return util.isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}Url.prototype.parse=function(t,s,e){if(!util.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t.indexOf("?"),r=-1!==h&&h<t.indexOf("#")?"?":"#",a=t.split(r);a[0]=a[0].replace(/\\/g,"/");var o=t=a.join(r);if(o=o.trim(),!e&&1===t.split("#").length){var n=simplePathPattern.exec(o);if(n)return this.path=o,this.href=o,this.pathname=n[1],n[2]?(this.search=n[2],this.query=s?querystring.parse(this.search.substr(1)):this.search.substr(1)):s&&(this.search="",this.query={}),this}var i=protocolPattern.exec(o);if(i){var l=(i=i[0]).toLowerCase();this.protocol=l,o=o.substr(i.length)}if(e||i||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var u="//"===o.substr(0,2);!u||i&&hostlessProtocol[i]||(o=o.substr(2),this.slashes=!0)}if(!hostlessProtocol[i]&&(u||i&&!slashedProtocol[i])){for(var p,c,f=-1,m=0;m<hostEndingChars.length;m++){-1!==(v=o.indexOf(hostEndingChars[m]))&&(-1===f||v<f)&&(f=v)}-1!==(c=-1===f?o.lastIndexOf("@"):o.lastIndexOf("@",f))&&(p=o.slice(0,c),o=o.slice(c+1),this.auth=decodeURIComponent(p)),f=-1;for(m=0;m<nonHostChars.length;m++){var v;-1!==(v=o.indexOf(nonHostChars[m]))&&(-1===f||v<f)&&(f=v)}-1===f&&(f=o.length),this.host=o.slice(0,f),o=o.slice(f),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var y=this.hostname.split(/\./),P=(m=0,y.length);m<P;m++){var d=y[m];if(d&&!d.match(hostnamePartPattern)){for(var b="",q=0,O=d.length;q<O;q++)d.charCodeAt(q)>127?b+="x":b+=d[q];if(!b.match(hostnamePartPattern)){var j=y.slice(0,m),x=y.slice(m+1),U=d.match(hostnamePartStart);U&&(j.push(U[1]),x.unshift(U[2])),x.length&&(o="/"+x.join(".")+o),this.hostname=j.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=punycode.toASCII(this.hostname));var C=this.port?":"+this.port:"",A=this.hostname||"";this.host=A+C,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!unsafeProtocol[l])for(m=0,P=autoEscape.length;m<P;m++){var w=autoEscape[m];if(-1!==o.indexOf(w)){var E=encodeURIComponent(w);E===w&&(E=escape(w)),o=o.split(w).join(E)}}var I=o.indexOf("#");-1!==I&&(this.hash=o.substr(I),o=o.slice(0,I));var R=o.indexOf("?");if(-1!==R?(this.search=o.substr(R),this.query=o.substr(R+1),s&&(this.query=querystring.parse(this.query)),o=o.slice(0,R)):s&&(this.search="",this.query={}),o&&(this.pathname=o),slashedProtocol[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var S=this.search||"";this.path=C+S}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,a="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&util.isObject(this.query)&&Object.keys(this.query).length&&(a=querystring.stringify(this.query));var o=this.search||a&&"?"+a||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&!1!==r?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),o&&"?"!==o.charAt(0)&&(o="?"+o),s+r+(e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(o=o.replace("#","%23"))+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(util.isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}for(var e=new Url,h=Object.keys(this),r=0;r<h.length;r++){var a=h[r];e[a]=this[a]}if(e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),n=0;n<o.length;n++){var i=o[n];"protocol"!==i&&(e[i]=t[i])}return slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol]){for(var l=Object.keys(t),u=0;u<l.length;u++){var p=l[u];e[p]=t[p]}return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var c=(t.pathname||"").split("/");c.length&&!(t.host=c.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),e.pathname=c.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var f=e.pathname||"",m=e.search||"";e.path=f+m}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var v=e.pathname&&"/"===e.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),y=g||v||e.host&&t.pathname,P=y,d=e.pathname&&e.pathname.split("/")||[],b=(c=t.pathname&&t.pathname.split("/")||[],e.protocol&&!slashedProtocol[e.protocol]);if(b&&(e.hostname="",e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===c[0]?c[0]=t.host:c.unshift(t.host)),t.host=null),y=y&&(""===c[0]||""===d[0])),g)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,d=c;else if(c.length)d||(d=[]),d.pop(),d=d.concat(c),e.search=t.search,e.query=t.query;else if(!util.isNullOrUndefined(t.search)){if(b)e.hostname=e.host=d.shift(),(U=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=U.shift(),e.host=e.hostname=U.shift());return e.search=t.search,e.query=t.query,util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var q=d.slice(-1)[0],O=(e.host||t.host||d.length>1)&&("."===q||".."===q)||""===q,j=0,x=d.length;x>=0;x--)"."===(q=d[x])?d.splice(x,1):".."===q?(d.splice(x,1),j++):j&&(d.splice(x,1),j--);if(!y&&!P)for(;j--;j)d.unshift("..");!y||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),O&&"/"!==d.join("/").substr(-1)&&d.push("");var U,C=""===d[0]||d[0]&&"/"===d[0].charAt(0);b&&(e.hostname=e.host=C?"":d.length?d.shift():"",(U=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=U.shift(),e.host=e.hostname=U.shift()));return(y=y||e.host&&d.length)&&!C&&d.unshift(""),d.length?e.pathname=d.join("/"):(e.pathname=null,e.path=null),util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
391
+
392
+ },{"./util":121,"punycode":72,"querystring":75}],121:[function(require,module,exports){
393
+ "use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}};
394
+
395
+ },{}],122:[function(require,module,exports){
396
+ (function (global){(function (){
397
+ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return function(){if(!o){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),o=!0}return r.apply(this,arguments)}}function config(r){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[r];return null!=e&&"true"===String(e).toLowerCase()}module.exports=deprecate;
398
+
399
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
400
+ },{}],123:[function(require,module,exports){
401
+ module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8};
402
+
403
+ },{}],124:[function(require,module,exports){
404
+ "use strict";var isArgumentsObject=require("is-arguments"),isGeneratorFunction=require("is-generator-function"),whichTypedArray=require("which-typed-array"),isTypedArray=require("is-typed-array");function uncurryThis(r){return r.call.bind(r)}var BigIntSupported="undefined"!=typeof BigInt,SymbolSupported="undefined"!=typeof Symbol,ObjectToString=uncurryThis(Object.prototype.toString),numberValue=uncurryThis(Number.prototype.valueOf),stringValue=uncurryThis(String.prototype.valueOf),booleanValue=uncurryThis(Boolean.prototype.valueOf);if(BigIntSupported)var bigIntValue=uncurryThis(BigInt.prototype.valueOf);if(SymbolSupported)var symbolValue=uncurryThis(Symbol.prototype.valueOf);function checkBoxedPrimitive(r,e){if("object"!=typeof r)return!1;try{return e(r),!0}catch(r){return!1}}function isPromise(r){return"undefined"!=typeof Promise&&r instanceof Promise||null!==r&&"object"==typeof r&&"function"==typeof r.then&&"function"==typeof r.catch}function isArrayBufferView(r){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(r):isTypedArray(r)||isDataView(r)}function isUint8Array(r){return"Uint8Array"===whichTypedArray(r)}function isUint8ClampedArray(r){return"Uint8ClampedArray"===whichTypedArray(r)}function isUint16Array(r){return"Uint16Array"===whichTypedArray(r)}function isUint32Array(r){return"Uint32Array"===whichTypedArray(r)}function isInt8Array(r){return"Int8Array"===whichTypedArray(r)}function isInt16Array(r){return"Int16Array"===whichTypedArray(r)}function isInt32Array(r){return"Int32Array"===whichTypedArray(r)}function isFloat32Array(r){return"Float32Array"===whichTypedArray(r)}function isFloat64Array(r){return"Float64Array"===whichTypedArray(r)}function isBigInt64Array(r){return"BigInt64Array"===whichTypedArray(r)}function isBigUint64Array(r){return"BigUint64Array"===whichTypedArray(r)}function isMapToString(r){return"[object Map]"===ObjectToString(r)}function isMap(r){return"undefined"!=typeof Map&&(isMapToString.working?isMapToString(r):r instanceof Map)}function isSetToString(r){return"[object Set]"===ObjectToString(r)}function isSet(r){return"undefined"!=typeof Set&&(isSetToString.working?isSetToString(r):r instanceof Set)}function isWeakMapToString(r){return"[object WeakMap]"===ObjectToString(r)}function isWeakMap(r){return"undefined"!=typeof WeakMap&&(isWeakMapToString.working?isWeakMapToString(r):r instanceof WeakMap)}function isWeakSetToString(r){return"[object WeakSet]"===ObjectToString(r)}function isWeakSet(r){return isWeakSetToString(r)}function isArrayBufferToString(r){return"[object ArrayBuffer]"===ObjectToString(r)}function isArrayBuffer(r){return"undefined"!=typeof ArrayBuffer&&(isArrayBufferToString.working?isArrayBufferToString(r):r instanceof ArrayBuffer)}function isDataViewToString(r){return"[object DataView]"===ObjectToString(r)}function isDataView(r){return"undefined"!=typeof DataView&&(isDataViewToString.working?isDataViewToString(r):r instanceof DataView)}exports.isArgumentsObject=isArgumentsObject,exports.isGeneratorFunction=isGeneratorFunction,exports.isTypedArray=isTypedArray,exports.isPromise=isPromise,exports.isArrayBufferView=isArrayBufferView,exports.isUint8Array=isUint8Array,exports.isUint8ClampedArray=isUint8ClampedArray,exports.isUint16Array=isUint16Array,exports.isUint32Array=isUint32Array,exports.isInt8Array=isInt8Array,exports.isInt16Array=isInt16Array,exports.isInt32Array=isInt32Array,exports.isFloat32Array=isFloat32Array,exports.isFloat64Array=isFloat64Array,exports.isBigInt64Array=isBigInt64Array,exports.isBigUint64Array=isBigUint64Array,isMapToString.working="undefined"!=typeof Map&&isMapToString(new Map),exports.isMap=isMap,isSetToString.working="undefined"!=typeof Set&&isSetToString(new Set),exports.isSet=isSet,isWeakMapToString.working="undefined"!=typeof WeakMap&&isWeakMapToString(new WeakMap),exports.isWeakMap=isWeakMap,isWeakSetToString.working="undefined"!=typeof WeakSet&&isWeakSetToString(new WeakSet),exports.isWeakSet=isWeakSet,isArrayBufferToString.working="undefined"!=typeof ArrayBuffer&&isArrayBufferToString(new ArrayBuffer),exports.isArrayBuffer=isArrayBuffer,isDataViewToString.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1)),exports.isDataView=isDataView;var SharedArrayBufferCopy="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function isSharedArrayBufferToString(r){return"[object SharedArrayBuffer]"===ObjectToString(r)}function isSharedArrayBuffer(r){return void 0!==SharedArrayBufferCopy&&(void 0===isSharedArrayBufferToString.working&&(isSharedArrayBufferToString.working=isSharedArrayBufferToString(new SharedArrayBufferCopy)),isSharedArrayBufferToString.working?isSharedArrayBufferToString(r):r instanceof SharedArrayBufferCopy)}function isAsyncFunction(r){return"[object AsyncFunction]"===ObjectToString(r)}function isMapIterator(r){return"[object Map Iterator]"===ObjectToString(r)}function isSetIterator(r){return"[object Set Iterator]"===ObjectToString(r)}function isGeneratorObject(r){return"[object Generator]"===ObjectToString(r)}function isWebAssemblyCompiledModule(r){return"[object WebAssembly.Module]"===ObjectToString(r)}function isNumberObject(r){return checkBoxedPrimitive(r,numberValue)}function isStringObject(r){return checkBoxedPrimitive(r,stringValue)}function isBooleanObject(r){return checkBoxedPrimitive(r,booleanValue)}function isBigIntObject(r){return BigIntSupported&&checkBoxedPrimitive(r,bigIntValue)}function isSymbolObject(r){return SymbolSupported&&checkBoxedPrimitive(r,symbolValue)}function isBoxedPrimitive(r){return isNumberObject(r)||isStringObject(r)||isBooleanObject(r)||isBigIntObject(r)||isSymbolObject(r)}function isAnyArrayBuffer(r){return"undefined"!=typeof Uint8Array&&(isArrayBuffer(r)||isSharedArrayBuffer(r))}exports.isSharedArrayBuffer=isSharedArrayBuffer,exports.isAsyncFunction=isAsyncFunction,exports.isMapIterator=isMapIterator,exports.isSetIterator=isSetIterator,exports.isGeneratorObject=isGeneratorObject,exports.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule,exports.isNumberObject=isNumberObject,exports.isStringObject=isStringObject,exports.isBooleanObject=isBooleanObject,exports.isBigIntObject=isBigIntObject,exports.isSymbolObject=isSymbolObject,exports.isBoxedPrimitive=isBoxedPrimitive,exports.isAnyArrayBuffer=isAnyArrayBuffer,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(r){Object.defineProperty(exports,r,{enumerable:!1,value:function(){throw new Error(r+" is not supported in userland")}})});
405
+
406
+ },{"is-arguments":61,"is-generator-function":62,"is-typed-array":64,"which-typed-array":126}],125:[function(require,module,exports){
407
+ (function (process){(function (){
408
+ var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),t={},n=0;n<r.length;n++)t[r[n]]=Object.getOwnPropertyDescriptor(e,r[n]);return t},formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(inspect(arguments[t]));return r.join(" ")}t=1;for(var n=arguments,i=n.length,o=String(e).replace(formatRegExp,function(e){if("%%"===e)return"%";if(t>=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t<i;s=n[++t])isNull(s)||!isObject(s)?o+=" "+s:o+=" "+inspect(s);return o},exports.deprecate=function(e,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return exports.deprecate(e,r).apply(this,arguments)};var t=!1;return function(){if(!t){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}};var debugs={},debugEnvRegex=/^$/;if(process.env.NODE_DEBUG){var debugEnv=process.env.NODE_DEBUG;debugEnv=debugEnv.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),debugEnvRegex=new RegExp("^"+debugEnv+"$","i")}function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var p,c="",a=!1,l=["{","}"];(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0!==o.length||a&&0!=r.length?t<0?isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),p=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(p,c,l)):l[0]+c+l[1]}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s<u;++s)hasOwnProperty(r,String(s))?o.push(formatProperty(e,r,t,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(formatProperty(e,r,t,n,i,!0))}),o}function formatProperty(e,r,t,n,i,o){var s,u,p;if((p=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]}).get?u=p.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):p.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,i)||(s="["+i+"]"),u||(e.seen.indexOf(p.value)<0?(u=isNull(t)?formatValue(e,p.value,null):formatValue(e,p.value,t-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).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+": "+u}function reduceToSingleString(e,r,t){return e.reduce(function(e,r){return 0,r.indexOf("\n")>=0&&0,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}exports.debuglog=function(e){if(e=e.toUpperCase(),!debugs[e])if(debugEnvRegex.test(e)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.types=require("./support/types"),exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.types.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.types.isDate=isDate,exports.isError=isError,exports.types.isNativeError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};var kCustomPromisifiedSymbol="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(e,r){if(!e){var t=new Error("Promise was rejected with a falsy value");t.reason=e,e=t}return r(e)}function callbackify(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);var n=r.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};e.apply(this,r).then(function(e){process.nextTick(o.bind(null,null,e))},function(e){process.nextTick(callbackifyOnRejected.bind(null,e,o))})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,getOwnPropertyDescriptors(e)),r}exports.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&e[kCustomPromisifiedSymbol]){var r;if("function"!=typeof(r=e[kCustomPromisifiedSymbol]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,kCustomPromisifiedSymbol,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var r,t,n=new Promise(function(e,n){r=e,t=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(e,n){e?t(e):r(n)});try{e.apply(this,i)}catch(e){t(e)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),kCustomPromisifiedSymbol&&Object.defineProperty(r,kCustomPromisifiedSymbol,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,getOwnPropertyDescriptors(e))},exports.promisify.custom=kCustomPromisifiedSymbol,exports.callbackify=callbackify;
409
+
410
+ }).call(this)}).call(this,require('_process'))
411
+ },{"./support/isBuffer":123,"./support/types":124,"_process":71,"inherits":60}],126:[function(require,module,exports){
412
+ (function (global){(function (){
413
+ "use strict";var forEach=require("foreach"),availableTypedArrays=require("available-typed-arrays"),callBound=require("call-bind/callBound"),$toString=callBound("Object.prototype.toString"),hasToStringTag=require("has-tostringtag/shams")(),g="undefined"==typeof globalThis?global:globalThis,typedArrays=availableTypedArrays(),$slice=callBound("String.prototype.slice"),toStrTags={},gOPD=require("es-abstract/helpers/getOwnPropertyDescriptor"),getPrototypeOf=Object.getPrototypeOf;hasToStringTag&&gOPD&&getPrototypeOf&&forEach(typedArrays,function(r){if("function"==typeof g[r]){var t=new g[r];if(Symbol.toStringTag in t){var a=getPrototypeOf(t),e=gOPD(a,Symbol.toStringTag);if(!e){var o=getPrototypeOf(a);e=gOPD(o,Symbol.toStringTag)}toStrTags[r]=e.get}}});var tryTypedArrays=function(r){var t=!1;return forEach(toStrTags,function(a,e){if(!t)try{var o=a.call(r);o===e&&(t=o)}catch(r){}}),t},isTypedArray=require("is-typed-array");module.exports=function(r){return!!isTypedArray(r)&&(hasToStringTag&&Symbol.toStringTag in r?tryTypedArrays(r):$slice($toString(r),8,-1))};
414
+
415
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
416
+ },{"available-typed-arrays":26,"call-bind/callBound":31,"es-abstract/helpers/getOwnPropertyDescriptor":33,"foreach":36,"has-tostringtag/shams":56,"is-typed-array":64}],127:[function(require,module,exports){
417
+ module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var n in t)hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}
418
+
419
+ },{}]},{},[16])(16)
218
420
  });