particle-api-js 9.4.1 → 10.1.0

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.
Files changed (51) hide show
  1. package/.circleci/config.yml +7 -5
  2. package/CHANGELOG.md +11 -0
  3. package/{test/EventStream-e2e-browser.html → EventStream-e2e-browser.html} +0 -1
  4. package/{test/EventStream-e2e-node.js → EventStream-e2e-node.js} +2 -3
  5. package/README.md +2 -2
  6. package/RELEASE.md +1 -1
  7. package/dist/particle.min.js +1 -399
  8. package/dist/particle.min.js.map +1 -1
  9. package/docs/api.md +5223 -115
  10. package/fs.js +2 -0
  11. package/karma.conf.js +18 -6
  12. package/package.json +23 -26
  13. package/src/Agent.js +407 -0
  14. package/src/Client.js +170 -0
  15. package/src/Defaults.js +7 -0
  16. package/src/EventStream.js +263 -0
  17. package/src/Library.js +33 -0
  18. package/src/Particle.js +2644 -0
  19. package/test/Agent.integration.js +5 -4
  20. package/test/Agent.spec.js +174 -291
  21. package/test/Client.spec.js +7 -7
  22. package/test/Defaults.spec.js +2 -2
  23. package/test/EventStream.spec.js +6 -4
  24. package/test/FakeAgent.js +2 -2
  25. package/test/Library.spec.js +2 -2
  26. package/test/Particle.integration.js +7 -7
  27. package/test/Particle.spec.js +332 -18
  28. package/test/fixtures/index.js +4 -18
  29. package/test/support/FixtureHttpServer.js +5 -3
  30. package/test/test-setup.js +5 -5
  31. package/tsconfig.json +14 -0
  32. package/webpack.config.js +45 -0
  33. package/.babelrc +0 -4
  34. package/lib/Agent.js +0 -516
  35. package/lib/Agent.js.map +0 -1
  36. package/lib/Client.js +0 -312
  37. package/lib/Client.js.map +0 -1
  38. package/lib/Defaults.js +0 -14
  39. package/lib/Defaults.js.map +0 -1
  40. package/lib/EventStream.js +0 -335
  41. package/lib/EventStream.js.map +0 -1
  42. package/lib/Library.js +0 -67
  43. package/lib/Library.js.map +0 -1
  44. package/lib/Particle.js +0 -3248
  45. package/lib/Particle.js.map +0 -1
  46. package/lib/superagent-binary-parser.js +0 -20
  47. package/lib/superagent-binary-parser.js.map +0 -1
  48. package/test/Client.integration.js +0 -69
  49. package/test/fixtures/tarball.tar.gz +0 -0
  50. package/test/fixtures/test-library-publish-0.0.1.tar.gz +0 -0
  51. package/test/fixtures/test-library-publish-0.0.2.tar.gz +0 -0
@@ -1,400 +1,2 @@
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.Particle = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _keys=require("babel-runtime/core-js/object/keys"),_keys2=_interopRequireDefault(_keys),_slicedToArray2=require("babel-runtime/helpers/slicedToArray"),_slicedToArray3=_interopRequireDefault(_slicedToArray2),_entries=require("babel-runtime/core-js/object/entries"),_entries2=_interopRequireDefault(_entries),_getIterator2=require("babel-runtime/core-js/get-iterator"),_getIterator3=_interopRequireDefault(_getIterator2),_assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_promise=require("babel-runtime/core-js/promise"),_promise2=_interopRequireDefault(_promise),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_superagent=require("superagent"),_superagent2=_interopRequireDefault(_superagent),_superagentPrefix=require("superagent-prefix"),_superagentPrefix2=_interopRequireDefault(_superagentPrefix),Agent=function(){function e(t){(0,_classCallCheck3.default)(this,e),this.setBaseUrl(t)}return(0,_createClass3.default)(e,[{key:"setBaseUrl",value:function(e){this.prefix=(0,_superagentPrefix2.default)(e)}},{key:"get",value:function(e){var t=e.uri,r=e.auth,a=e.headers,i=e.query,u=e.context;return this.request({uri:t,method:"get",auth:r,headers:a,query:i,context:u})}},{key:"head",value:function(e){var t=e.uri,r=e.auth,a=e.headers,i=e.query,u=e.context;return this.request({uri:t,method:"head",auth:r,headers:a,query:i,context:u})}},{key:"post",value:function(e){var t=e.uri,r=e.headers,a=e.data,i=e.auth,u=e.context;return this.request({uri:t,method:"post",auth:i,headers:r,data:a,context:u})}},{key:"put",value:function(e){var t=e.uri,r=e.auth,a=e.headers,i=e.data,u=e.context;return this.request({uri:t,method:"put",auth:r,headers:a,data:i,context:u})}},{key:"delete",value:function(e){var t=e.uri,r=e.auth,a=e.headers,i=e.data,u=e.context;return this.request({uri:t,method:"delete",auth:r,headers:a,data:i,context:u})}},{key:"request",value:function(e){var t=e.uri,r=e.method,a=e.headers,i=void 0===a?void 0:a,u=e.data,o=void 0===u?void 0:u,n=e.auth,s=e.query,l=void 0===s?void 0:s,d=e.form,f=void 0===d?void 0:d,c=e.files,h=void 0===c?void 0:c,_=e.context,v=void 0===_?void 0:_,p=e.raw,y=void 0!==p&&p,m=this._sanitizeFiles(h);return this._request({uri:t,method:r,headers:i,data:o,auth:n,query:l,form:f,context:v,files:m,raw:y})}},{key:"_request",value:function(e){var t=e.uri,r=e.method,a=e.headers,i=e.data,u=e.auth,o=e.query,n=e.form,s=e.files,l=e.context,d=e.raw,f=this._buildRequest({uri:t,method:r,headers:a,data:i,auth:u,query:o,form:n,context:l,files:s});return d?f:this._promiseResponse(f)}},{key:"_promiseResponse",value:function(e){var t=this;return new _promise2.default(function(r,a){return t._sendRequest(e,r,a)})}},{key:"_sendRequest",value:function(e,t,r){e.end(function(a,i){var u=i&&i.body;if(a){var o=e.url,n=a.status,s=(n?"HTTP error "+n:"Network error")+" from "+o,l=void 0;u&&u.error_description&&(s+=" - "+u.error_description,l=u.error_description);var d=new Error(s);(0,_assign2.default)(d,{statusCode:n,errorDescription:s,shortErrorDescription:l,error:a,body:u}),r(d)}else t({body:u,statusCode:i.statusCode})})}},{key:"_buildRequest",value:function(e){var t=e.uri,r=e.method,a=e.headers,i=e.data,u=e.auth,o=e.query,n=e.form,s=e.files,l=e.context,d=e.makerequest,f=void 0===d?_superagent2.default:d,c=f(r,t);if(this.prefix&&c.use(this.prefix),this._authorizationHeader(c,u),l&&this._applyContext(c,l),o&&c.query(o),a&&c.set(a),s){var h=!0,_=!1,v=void 0;try{for(var p,y=(0,_getIterator3.default)((0,_entries2.default)(s));!(h=(p=y.next()).done);h=!0){var m=(0,_slicedToArray3.default)(p.value,2),q=m[0],x=m[1],k={filepath:x.path};this.isForBrowser(f)&&(k=x.path),c.attach(q,x.data,k)}}catch(e){_=!0,v=e}finally{try{!h&&y.return&&y.return()}finally{if(_)throw v}}if(n){var g=!0,b=!1,C=void 0;try{for(var R,j=(0,_getIterator3.default)((0,_entries2.default)(n));!(g=(R=j.next()).done);g=!0){var P=(0,_slicedToArray3.default)(R.value,2),q=P[0],w=P[1];c.field(q,w)}}catch(e){b=!0,C=e}finally{try{!g&&j.return&&j.return()}finally{if(b)throw C}}}}else n?(c.type("form"),c.send(n)):i&&c.send(i);return c}},{key:"isForBrowser",value:function(){return!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:_superagent2.default).getXHR}},{key:"_applyContext",value:function(e,t){t.tool&&this._addToolContext(e,t.tool),t.project&&this._addProjectContext(e,t.project)}},{key:"_addToolContext",value:function(e,t){var r="";if(t.name&&(r+=this._toolIdent(t),t.components)){var a=!0,i=!1,u=void 0;try{for(var o,n=(0,_getIterator3.default)(t.components);!(a=(o=n.next()).done);a=!0){var s=o.value;r+=", "+this._toolIdent(s)}}catch(e){i=!0,u=e}finally{try{!a&&n.return&&n.return()}finally{if(i)throw u}}}r&&e.set("X-Particle-Tool",r)}},{key:"_toolIdent",value:function(e){return this._nameAtVersion(e.name,e.version)}},{key:"_nameAtVersion",value:function(e,t){var r="";return e&&(r+=e,t&&(r+="@"+t)),r}},{key:"_addProjectContext",value:function(e,t){var r=this._buildSemicolonSeparatedProperties(t,"name");r&&e.set("X-Particle-Project",r)}},{key:"_buildSemicolonSeparatedProperties",value:function(e,t){var r="";if(e[t]){r+=e[t];for(var a in e)a!==t&&e.hasOwnProperty(a)&&(r+="; "+a+"="+e[a])}return r}},{key:"_authorizationHeader",value:function(e,t){return t&&(void 0!==t.username?e.auth(t.username,t.password):e.set({Authorization:"Bearer "+t})),e}},{key:"_sanitizeFiles",value:function(e){var t=void 0;return e&&(t={},(0,_keys2.default)(e).forEach(function(r,a){t[a?"file"+(a+1):"file"]={data:e[r],path:r}})),t}}]),e}();exports.default=Agent,module.exports=exports.default;
3
- },{"babel-runtime/core-js/get-iterator":8,"babel-runtime/core-js/object/assign":10,"babel-runtime/core-js/object/entries":13,"babel-runtime/core-js/object/keys":15,"babel-runtime/core-js/promise":17,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21,"babel-runtime/helpers/slicedToArray":24,"superagent":170,"superagent-prefix":168}],2:[function(require,module,exports){
4
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _getIterator2=require("babel-runtime/core-js/get-iterator"),_getIterator3=_interopRequireDefault(_getIterator2),_assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_Particle=require("./Particle"),_Particle2=_interopRequireDefault(_Particle),_Library=require("./Library"),_Library2=_interopRequireDefault(_Library),Client=function(){function e(t){var r=t.auth,a=t.api,i=void 0===a?new _Particle2.default:a;(0,_classCallCheck3.default)(this,e),(0,_assign2.default)(this,{auth:r,api:i})}return(0,_createClass3.default)(e,[{key:"ready",value:function(){return Boolean(this.auth)}},{key:"libraries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.api.listLibraries((0,_assign2.default)({},t,{auth:this.auth})).then(function(t){return(t.body.data||[]).map(function(t){return new _Library2.default(e,t)})})}},{key:"library",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.api.getLibrary((0,_assign2.default)({},r,{name:e,auth:this.auth})).then(function(e){var r=e.body.data||{};return new _Library2.default(t,r)})}},{key:"libraryVersions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.api.getLibraryVersions((0,_assign2.default)({},r,{name:e,auth:this.auth})).then(function(e){return(e.body.data||[]).map(function(e){return new _Library2.default(t,e)})})}},{key:"contributeLibrary",value:function(e){var t=this;return this.api.contributeLibrary({archive:e,auth:this.auth}).then(function(e){var r=e.body.data||{};return new _Library2.default(t,r)},function(e){t._throwError(e)})}},{key:"publishLibrary",value:function(e){var t=this;return this.api.publishLibrary({name:e,auth:this.auth}).then(function(e){var r=e.body.data||{};return new _Library2.default(t,r)},function(e){t._throwError(e)})}},{key:"deleteLibrary",value:function(e){var t=this,r=e.name,a=e.force;return this.api.deleteLibrary({name:r,force:a,auth:this.auth}).then(function(){return!0},function(e){return t._throwError(e)})}},{key:"_throwError",value:function(e){if(e.body&&e.body.errors){var t=e.body.errors.map(function(e){return e.message}).join("\n");throw new Error(t)}throw e}},{key:"downloadFile",value:function(e){return this.api.downloadFile({uri:e})}},{key:"compileCode",value:function(e,t,r){return this.api.compileCode({files:e,platformId:t,targetVersion:r,auth:this.auth})}},{key:"signalDevice",value:function(e){var t=e.signal,r=e.deviceId;return this.api.signalDevice({signal:t,deviceId:r,auth:this.auth})}},{key:"listDevices",value:function(){return this.api.listDevices({auth:this.auth})}},{key:"listBuildTargets",value:function(){return this.api.listBuildTargets({onlyFeatured:!0,auth:this.auth}).then(function(e){var t=[],r=!0,a=!1,i=void 0;try{for(var n,u=(0,_getIterator3.default)(e.body.targets);!(r=(n=u.next()).done);r=!0){var l=n.value,o=!0,s=!1,h=void 0;try{for(var c,f=(0,_getIterator3.default)(l.platforms);!(o=(c=f.next()).done);o=!0){var d=c.value;t.push({version:l.version,platform:d,prerelease:l.prereleases.indexOf(d)>-1,firmware_vendor:l.firmware_vendor})}}catch(e){s=!0,h=e}finally{try{!o&&f.return&&f.return()}finally{if(s)throw h}}}}catch(e){a=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(a)throw i}}return t},function(){})}},{key:"trackingIdentity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.full,r=void 0!==t&&t,a=e.context;return this.api.trackingIdentity({full:r,context:a,auth:this.auth}).then(function(e){return e.body})}}]),e}();exports.default=Client,module.exports=exports.default;
5
- },{"./Library":5,"./Particle":6,"babel-runtime/core-js/get-iterator":8,"babel-runtime/core-js/object/assign":10,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21}],3:[function(require,module,exports){
6
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={baseUrl:"https://api.particle.io",clientSecret:"particle-api",clientId:"particle-api",tokenDuration:7776e3,auth:void 0},module.exports=exports.default;
7
- },{}],4:[function(require,module,exports){
8
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _promise=require("babel-runtime/core-js/promise"),_promise2=_interopRequireDefault(_promise),_getPrototypeOf=require("babel-runtime/core-js/object/get-prototype-of"),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn"),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=require("babel-runtime/helpers/inherits"),_inherits3=_interopRequireDefault(_inherits2),_http=require("http"),_http2=_interopRequireDefault(_http),_https=require("https"),_https2=_interopRequireDefault(_https),_url=require("url"),_url2=_interopRequireDefault(_url),_events=require("events"),EventStream=function(e){function t(e,r){(0,_classCallCheck3.default)(this,t);var i=(0,_possibleConstructorReturn3.default)(this,(t.__proto__||(0,_getPrototypeOf2.default)(t)).call(this));return i.uri=e,i.token=r,i.reconnectInterval=2e3,i.timeout=13e3,i.data="",i.buf="",i.parse=i.parse.bind(i),i.end=i.end.bind(i),i.idleTimeoutExpired=i.idleTimeoutExpired.bind(i),i}return(0,_inherits3.default)(t,e),(0,_createClass3.default)(t,[{key:"connect",value:function(){var e=this;return new _promise2.default(function(t,r){var i=_url2.default.parse(e.uri),n=i.hostname,o=i.protocol,s=i.port,u=i.path;e.origin=o+"//"+n+(s?":"+s:"");var a="https:"===o,l=a?_https2.default:_http2.default,c=l.request({hostname:n,protocol:o,path:u+"?access_token="+e.token,method:"get",port:parseInt(s,10)||(a?443:80),mode:"prefer-streaming"});e.req=c;var f=!1,h=setTimeout(function(){e.req&&e.req.abort(),r({error:new Error("Timeout"),errorDescription:"Timeout connecting to "+e.uri})},e.timeout);c.on("error",function(t){clearTimeout(h),f?e.end():r({error:t,errorDescription:"Network error from "+e.uri})}),c.on("response",function(i){clearTimeout(h);var n=i.statusCode;if(200!==n){var o="";return i.on("data",function(e){return o+=e}),void i.on("end",function(){try{o=JSON.parse(o)}catch(e){}finally{var t="HTTP error "+n+" from "+e.uri;o&&o.error_description&&(t+=" - "+o.error_description),r({statusCode:n,errorDescription:t,body:o}),e.req=void 0}})}e.data="",e.buf="",f=!0,i.on("data",e.parse),i.once("end",e.end),e.startIdleTimeout(),t(e)}),c.end()})}},{key:"abort",value:function(){this.req&&(this.req.abort(),this.req=void 0),this.removeAllListeners()}},{key:"emitSafe",value:function(e,t){try{this.emit(e,t)}catch(t){"error"!==e&&this.emitSafe("error",t)}}},{key:"end",value:function(){this.stopIdleTimeout(),this.req&&(this.req=void 0,this.emitSafe("disconnect"),this.reconnect())}},{key:"reconnect",value:function(){var e=this;setTimeout(function(){if(e.isOffline())return void e.reconnect();e.emitSafe("reconnect"),e.connect().then(function(){e.emitSafe("reconnect-success")}).catch(function(t){e.emitSafe("reconnect-error",t),e.reconnect()})},this.reconnectInterval)}},{key:"isOffline",value:function(){return"undefined"!=typeof navigator&&!navigator.hasOwnProperty("onLine")&&!navigator.onLine}},{key:"startIdleTimeout",value:function(){this.stopIdleTimeout(),this.idleTimeout=setTimeout(this.idleTimeoutExpired,this.timeout)}},{key:"stopIdleTimeout",value:function(){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null)}},{key:"idleTimeoutExpired",value:function(){this.req&&(this.req.abort(),this.end())}},{key:"parse",value:function(e){this.startIdleTimeout(),this.buf+=e;for(var t=0,r=this.buf.length,i=!1;t<r;){i&&("\n"===this.buf[t]&&++t,i=!1);for(var n=-1,o=-1,s=t;n<0&&s<r;++s){var u=this.buf[s];":"===u?o<0&&(o=s-t):"\r"===u?(i=!0,n=s-t):"\n"===u&&(n=s-t)}if(n<0)break;this.parseEventStreamLine(t,o,n),t+=n+1}t===r?this.buf="":t>0&&(this.buf=this.buf.slice(t))}},{key:"parseEventStreamLine",value:function(e,t,r){if(0===r)try{if(this.data.length>0&&this.event){var i=JSON.parse(this.data);i.name=this.eventName||"",this.emitSafe("event",i)}}catch(e){}finally{this.data="",this.eventName=void 0,this.event=!1}else if(t>0){var n=this.buf.slice(e,e+t),o=0;o=" "!==this.buf[e+t+1]?t+1:t+2,e+=o;var s=r-o,u=this.buf.slice(e,e+s);"data"===n?this.data+=u+"\n":"event"===n&&(this.eventName=u,this.event=!0)}}}]),t}(_events.EventEmitter);exports.default=EventStream,module.exports=exports.default;
9
- },{"babel-runtime/core-js/object/get-prototype-of":14,"babel-runtime/core-js/promise":17,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/possibleConstructorReturn":23,"events":136,"http":145,"https":145,"url":176}],5:[function(require,module,exports){
10
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _promise=require("babel-runtime/core-js/promise"),_promise2=_interopRequireDefault(_promise),_assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),Library=function(){function e(r,t){(0,_classCallCheck3.default)(this,e),Object.defineProperty(this,"client",{value:r}),this._assignAttributes(t),this.downloadUrl=t.links&&t.links.download}return(0,_createClass3.default)(e,[{key:"_assignAttributes",value:function(e){(0,_assign2.default)(this,e.attributes)}},{key:"download",value:function(){return this.downloadUrl?this.client.downloadFile(this.downloadUrl):_promise2.default.reject(new Error("No download URL for this library"))}}]),e}();exports.default=Library,module.exports=exports.default;
11
- },{"babel-runtime/core-js/object/assign":10,"babel-runtime/core-js/promise":17,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21}],6:[function(require,module,exports){
12
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_superagentBinaryParser=require("./superagent-binary-parser"),_superagentBinaryParser2=_interopRequireDefault(_superagentBinaryParser),_Defaults=require("./Defaults"),_Defaults2=_interopRequireDefault(_Defaults),_EventStream=require("./EventStream"),_EventStream2=_interopRequireDefault(_EventStream),_Agent=require("./Agent"),_Agent2=_interopRequireDefault(_Agent),_Client=require("./Client"),_Client2=_interopRequireDefault(_Client),Particle=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,_classCallCheck3.default)(this,e),t.auth&&this.setDefaultAuth(t.auth),(0,_assign2.default)(this,_Defaults2.default,t),this.context={},this.agent=new _Agent2.default(this.baseUrl)}return(0,_createClass3.default)(e,[{key:"_isValidContext",value:function(e,t){return("tool"===e||"project"===e)&&void 0!==t}},{key:"setContext",value:function(e,t){if(void 0!==t){if(!this._isValidContext(e,t))throw Error("unknown context name or undefined context: "+e);this.context[e]=t}}},{key:"_buildContext",value:function(e){return(0,_assign2.default)(this.context,e)}},{key:"login",value:function(e){var t=e.username,r=e.password,a=e.tokenDuration,u=void 0===a?this.tokenDuration:a,n=e.headers,i=e.context;return this.request({uri:"/oauth/token",method:"post",headers:n,form:{username:t,password:r,grant_type:"password",client_id:this.clientId,client_secret:this.clientSecret,expires_in:u},context:i})}},{key:"sendOtp",value:function(e){var t=e.mfaToken,r=e.otp,a=e.headers,u=e.context;return this.request({uri:"/oauth/token",method:"post",headers:a,form:{grant_type:"urn:custom:mfa-otp",mfa_token:t,otp:r,client_id:this.clientId,client_secret:this.clientSecret},context:u})}},{key:"enableMfa",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/user/mfa-enable",auth:t,headers:r,context:a})}},{key:"confirmMfa",value:function(e){var t=e.mfaToken,r=e.otp,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,s=e.context,o={mfa_token:t,otp:r};return u&&(o.invalidate_tokens=!0),this.post({uri:"/v1/user/mfa-enable",auth:n,headers:i,data:o,context:s})}},{key:"disableMfa",value:function(e){var t=e.currentPassword,r=e.auth,a=e.headers,u=e.context;return this.put({uri:"/v1/user/mfa-disable",auth:r,headers:a,data:{current_password:t},context:u})}},{key:"createCustomer",value:function(e){var t=e.email,r=e.password,a=e.product,u=e.headers,n=e.context;return this.request({uri:"/v1/products/"+a+"/customers",method:"post",headers:u,form:{email:t,password:r,grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:n})}},{key:"loginAsClientOwner",value:function(e){var t=e.headers,r=e.context;return this.request({uri:"/oauth/token",method:"post",headers:t,form:{grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:r})}},{key:"createUser",value:function(e){var t=e.username,r=e.password,a=e.accountInfo,u=e.headers,n=e.context;return this.post({uri:"/v1/users",headers:u,data:{username:t,password:r,account_info:a},context:n})}},{key:"verifyUser",value:function(e){var t=e.token,r=e.headers,a=e.context;return this.post({uri:"/v1/user/verify",headers:r,data:{token:t},context:a})}},{key:"resetPassword",value:function(e){var t=e.username,r=e.headers,a=e.context;return this.post({uri:"/v1/user/password-reset",headers:r,data:{username:t},context:a})}},{key:"deleteAccessToken",value:function(e){var t=e.username,r=e.password,a=e.token,u=e.headers,n=e.context;return this.delete({uri:"/v1/access_tokens/"+a,auth:{username:t,password:r},headers:u,data:{access_token:a},context:n})}},{key:"deleteCurrentAccessToken",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.delete({uri:"/v1/access_tokens/current",auth:t,headers:r,context:a})}},{key:"deleteActiveAccessTokens",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.delete({uri:"/v1/access_tokens",auth:t,headers:r,context:a})}},{key:"deleteUser",value:function(e){var t=e.auth,r=e.password,a=e.headers,u=e.context;return this.delete({uri:"/v1/user",data:{password:r},auth:t,headers:a,context:u})}},{key:"listAccessTokens",value:function(e){var t=e.username,r=e.password,a=e.otp,u=e.headers,n=e.context;return this.get({uri:"/v1/access_tokens",auth:{username:t,password:r},query:a?{otp:a}:void 0,headers:u,context:n})}},{key:"trackingIdentity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.full,r=void 0!==t&&t,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/user/identify",auth:a,headers:u,query:r?void 0:{tracking:1},context:n})}},{key:"listDevices",value:function(e){var t=e.deviceId,r=e.deviceName,a=e.groups,u=e.sortAttr,n=e.sortDir,i=e.page,s=e.perPage,o=e.product,c=e.auth,d=e.headers,h=e.context,v=void 0,l=void 0;return o?(v="/v1/products/"+o+"/devices",a=Array.isArray(a)?a.join(","):void 0,l={deviceId:t,deviceName:r,groups:a,sortAttr:u,sortDir:n,page:i,per_page:s}):v="/v1/devices",this.get({uri:v,auth:c,headers:d,query:l,context:h})}},{key:"getDevice",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=this.deviceUri({deviceId:t,product:r});return this.get({uri:i,auth:a,headers:u,context:n})}},{key:"claimDevice",value:function(e){var t=e.deviceId,r=e.requestTransfer,a=e.auth,u=e.headers,n=e.context;return this.post({uri:"/v1/devices",auth:a,headers:u,data:{id:t,request_transfer:!!r},context:n})}},{key:"addDeviceToProduct",value:function(e){var t=e.deviceId,r=e.product,a=e.file,u=e.auth,n=e.headers,i=e.context,s=void 0,o=void 0;return a?s={file:a}:t&&(o={id:t}),this.request({uri:"/v1/products/"+r+"/devices",method:"post",headers:n,data:o,files:s,auth:u,context:i})}},{key:"removeDevice",value:function(e){var t=e.deviceId,r=e.deny,a=e.product,u=e.auth,n=e.headers,i=e.context,s=this.deviceUri({deviceId:t,product:a}),o=a?{deny:r}:void 0;return this.delete({uri:s,data:o,auth:u,headers:n,context:i})}},{key:"removeDeviceOwner",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context,i="/v1/products/"+r+"/devices/"+t+"/owner";return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"renameDevice",value:function(e){var t=e.deviceId,r=e.name,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,name:r,product:a,auth:u,headers:n,context:i})}},{key:"signalDevice",value:function(e){var t=e.deviceId,r=e.signal,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,signal:r,product:a,auth:u,headers:n,context:i})}},{key:"setDeviceNotes",value:function(e){var t=e.deviceId,r=e.notes,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,notes:r,product:a,auth:u,headers:n,context:i})}},{key:"markAsDevelopmentDevice",value:function(e){var t=e.deviceId,r=e.development,a=void 0===r||r,u=e.product,n=e.auth,i=e.headers,s=e.context;return this.updateDevice({deviceId:t,development:a,product:u,auth:n,headers:i,context:s})}},{key:"lockDeviceProductFirmware",value:function(e){var t=e.deviceId,r=e.desiredFirmwareVersion,a=e.flash,u=e.product,n=e.auth,i=e.context;return this.updateDevice({deviceId:t,desiredFirmwareVersion:r,flash:a,product:u,auth:n,context:i})}},{key:"unlockDeviceProductFirmware",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.updateDevice({deviceId:t,desiredFirmwareVersion:null,product:r,auth:a,headers:u,context:n})}},{key:"updateDevice",value:function(e){var t=e.deviceId,r=e.name,a=e.signal,u=e.notes,n=e.development,i=e.desiredFirmwareVersion,s=e.flash,o=e.product,c=e.auth,d=e.headers,h=e.context;void 0!==a&&(a=a?"1":"0");var v=this.deviceUri({deviceId:t,product:o}),l=o?{name:r,signal:a,notes:u,development:n,desired_firmware_version:i,flash:s}:{name:r,signal:a,notes:u};return this.put({uri:v,auth:c,headers:d,data:l,context:h})}},{key:"provisionDevice",value:function(e){var t=e.productId,r=e.auth,a=e.headers,u=e.context;return this.post({uri:"/v1/devices",auth:r,headers:a,data:{product_id:t},context:u})}},{key:"getClaimCode",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/device_claims":"/v1/device_claims";return this.post({uri:i,auth:a,headers:u,data:{iccid:t},context:n})}},{key:"validatePromoCode",value:function(e){var t=e.promoCode,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/promo_code/"+t,auth:r,headers:a,context:u})}},{key:"changeProduct",value:function(e){var t=e.deviceId,r=e.productId,a=e.auth,u=e.headers,n=e.context;return this.put({uri:"/v1/devices/"+t,auth:a,headers:u,data:{product_id:r},context:n})}},{key:"getVariable",value:function(e){var t=e.deviceId,r=e.name,a=e.product,u=e.auth,n=e.headers,i=e.context,s=a?"/v1/products/"+a+"/devices/"+t+"/"+r:"/v1/devices/"+t+"/"+r;return this.get({uri:s,auth:u,headers:n,context:i})}},{key:"flashDevice",value:function(e){var t=e.deviceId,r=e.product,a=e.files,u=e.targetVersion,n=e.auth,i=e.headers,s=e.context,o=this.deviceUri({deviceId:t,product:r}),c={};return u?c.build_target_version=u:c.latest="true",this.request({uri:o,method:"put",auth:n,headers:i,files:a,form:c,context:s})}},{key:"flashTinker",value:function(e){var t=e.deviceId,r=e.auth,a=e.headers,u=e.context;return console&&console.warning&&console.warning("Particle.flashTinker is deprecated"),this.put({uri:"/v1/devices/"+t,headers:a,data:{app:"tinker"},auth:r,context:u})}},{key:"compileCode",value:function(e){var t=e.files,r=e.platformId,a=e.targetVersion,u=e.auth,n=e.headers,i=e.context,s={platform_id:r};return a?s.build_target_version=a:s.latest="true",this.request({uri:"/v1/binaries",method:"post",auth:u,headers:n,files:t,form:s,context:i})}},{key:"downloadFirmwareBinary",value:function(e){var t=e.binaryId,r=e.auth,a=e.headers,u=e.context,n=this.request({uri:"/v1/binaries/"+t,method:"get",auth:r,headers:a,context:u,raw:!0});return this._provideFileData(n)}},{key:"sendPublicKey",value:function(e){var t=e.deviceId,r=e.key,a=e.algorithm,u=e.auth,n=e.headers,i=e.context;return this.post({uri:"/v1/provisioning/"+t,auth:u,headers:n,data:{deviceID:t,publicKey:"string"==typeof r?r:r.toString(),filename:"particle-api",order:"manual_"+Date.now(),algorithm:a||"rsa"},context:i})}},{key:"callFunction",value:function(e){var t=e.deviceId,r=e.name,a=e.argument,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/devices/"+t+"/"+r:"/v1/devices/"+t+"/"+r;return this.post({uri:o,auth:n,headers:i,data:{args:a},context:s})}},{key:"getEventStream",value:function(e){var t=e.deviceId,r=e.name,a=e.org,u=e.product,n=e.auth,i="/v1/";return a&&(i+="orgs/"+a+"/"),u&&(i+="products/"+u+"/"),t&&(i+="devices/","mine"!==t.toLowerCase()&&(i+=t+"/")),i+="events",r&&(i+="/"+encodeURIComponent(r)),n=this._getActiveAuthToken(n),new _EventStream2.default(""+this.baseUrl+i,n).connect()}},{key:"publishEvent",value:function(e){var t=e.name,r=e.data,a=e.isPrivate,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/events":"/v1/devices/events",c={name:t,data:r,private:a};return this.post({uri:o,auth:n,headers:i,data:c,context:s})}},{key:"createWebhook",value:function(e){var t=e.event,r=e.url,a=e.device,u=e.rejectUnauthorized,n=e.noDefaults,i=e.hook,s=e.product,o=e.auth,c=e.headers,d=e.context,h=s?"/v1/products/"+s+"/webhooks":"/v1/webhooks",v={event:t,url:r,deviceId:a,rejectUnauthorized:u,noDefaults:n};return i&&(v.requestType=i.method,v.auth=i.auth,v.headers=i.headers,v.query=i.query,v.json=i.json,v.form=i.form,v.body=i.body,v.responseTemplate=i.responseTemplate,v.responseTopic=i.responseEvent,v.errorResponseTopic=i.errorResponseEvent),v.requestType||(v.requestType="POST"),this.post({uri:h,auth:o,headers:c,data:v,context:d})}},{key:"deleteWebhook",value:function(e){var t=e.hookId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/webhooks/"+t:"/v1/webhooks/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listWebhooks",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/webhooks":"/v1/webhooks";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"createIntegration",value:function(e){var t=e.event,r=e.settings,a=e.deviceId,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/integrations":"/v1/integrations",c=(0,_assign2.default)({event:t,deviceid:a},r);return this.post({uri:o,data:c,auth:n,headers:i,context:s})}},{key:"editIntegration",value:function(e){var t=e.integrationId,r=e.event,a=e.settings,u=e.deviceId,n=e.product,i=e.auth,s=e.headers,o=e.context,c=n?"/v1/products/"+n+"/integrations/"+t:"/v1/integrations/"+t,d=(0,_assign2.default)({event:r,deviceid:u},a);return this.put({uri:c,auth:i,headers:s,data:d,context:o})}},{key:"deleteIntegration",value:function(e){var t=e.integrationId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/integrations/"+t:"/v1/integrations/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listIntegrations",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/integrations":"/v1/integrations";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"getUserInfo",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/user",auth:t,headers:r,context:a})}},{key:"setUserInfo",value:function(e){var t=e.accountInfo,r=e.auth,a=e.headers,u=e.context,n={account_info:t};return this.put({uri:"/v1/user",auth:r,headers:a,data:n,context:u})}},{key:"changeUsername",value:function(e){var t=e.currentPassword,r=e.username,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,s=e.context,o={username:r,current_password:t};return u&&(o.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:i,data:o,context:s})}},{key:"changeUserPassword",value:function(e){var t=e.currentPassword,r=e.password,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,s=e.context,o={password:r,current_password:t};return u&&(o.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:i,data:o,context:s})}},{key:"listSIMs",value:function(e){var t=e.iccid,r=e.deviceId,a=e.deviceName,u=e.page,n=e.perPage,i=e.product,s=e.auth,o=e.headers,c=e.context,d=i?"/v1/products/"+i+"/sims":"/v1/sims",h=i?{iccid:t,deviceId:r,deviceName:a,page:u,per_page:n}:void 0;return this.get({uri:d,auth:s,headers:o,query:h,context:c})}},{key:"getSIMDataUsage",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t+"/data_usage":"/v1/sims/"+t+"/data_usage";return this.get({uri:i,auth:a,headers:u,context:n})}},{key:"getFleetDataUsage",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/sims/data_usage",auth:r,headers:a,context:u})}},{key:"checkSIM",value:function(e){var t=e.iccid,r=e.auth,a=e.headers,u=e.context;return this.head({uri:"/v1/sims/"+t,auth:r,headers:a,context:u})}},{key:"activateSIM",value:function(e){var t=e.iccid,r=e.iccids,a=e.country,u=e.promoCode,n=e.product,i=e.auth,s=e.headers,o=e.context;r=r||[t];var c=n?"/v1/products/"+n+"/sims":"/v1/sims/"+t,d=n?{sims:r,country:a}:{country:a,promoCode:u,action:"activate"},h=n?"post":"put";return this.request({uri:c,method:h,headers:s,data:d,auth:i,context:o})}},{key:"deactivateSIM",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t:"/v1/sims/"+t,s={action:"deactivate"};return this.put({uri:i,auth:a,headers:u,data:s,context:n})}},{key:"reactivateSIM",value:function(e){var t=e.iccid,r=e.mbLimit,a=e.product,u=e.auth,n=e.headers,i=e.context,s=a?"/v1/products/"+a+"/sims/"+t:"/v1/sims/"+t,o={mb_limit:r,action:"reactivate"};return this.put({uri:s,auth:u,headers:n,data:o,context:i})}},{key:"updateSIM",value:function(e){var t=e.iccid,r=e.mbLimit,a=e.product,u=e.auth,n=e.headers,i=e.context,s=a?"/v1/products/"+a+"/sims/"+t:"/v1/sims/"+t,o={mb_limit:r};return this.put({uri:s,auth:u,headers:n,data:o,context:i})}},{key:"removeSIM",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t:"/v1/sims/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listBuildTargets",value:function(e){var t=e.onlyFeatured,r=e.auth,a=e.headers,u=e.context,n=t?{featured:!!t}:void 0;return this.get({uri:"/v1/build_targets",auth:r,headers:a,query:n,context:u})}},{key:"listLibraries",value:function(e){var t=e.page,r=e.limit,a=e.filter,u=e.sort,n=e.architectures,i=e.category,s=e.scope,o=e.excludeScopes,c=e.auth,d=e.headers,h=e.context;return this.get({uri:"/v1/libraries",auth:c,headers:d,query:{page:t,filter:a,limit:r,sort:u,architectures:this._asList(n),category:i,scope:s,excludeScopes:this._asList(o)},context:h})}},{key:"_asList",value:function(e){return Array.isArray(e)?e.join(","):e}},{key:"getLibrary",value:function(e){var t=e.name,r=e.version,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/libraries/"+t,auth:a,headers:u,query:{version:r},context:n})}},{key:"getLibraryVersions",value:function(e){var t=e.name,r=e.page,a=e.limit,u=e.auth,n=e.headers,i=e.context;return this.get({uri:"/v1/libraries/"+t+"/versions",auth:u,headers:n,query:{page:r,limit:a},context:i})}},{key:"contributeLibrary",value:function(e){var t=e.archive,r=e.auth,a=e.headers,u=e.context,n={"archive.tar.gz":t};return this.request({uri:"/v1/libraries",method:"post",auth:r,headers:a,files:n,context:u})}},{key:"publishLibrary",value:function(e){var t=e.name,r=e.auth,a=e.headers,u=e.context;return this.request({uri:"/v1/libraries/"+t,method:"patch",auth:r,headers:a,data:{visibility:"public"},context:u})}},{key:"deleteLibrary",value:function(e){var t=e.name,r=e.force,a=e.auth,u=e.headers,n=e.context;return this.delete({uri:"/v1/libraries/"+t,auth:a,headers:u,data:{force:r},context:n})}},{key:"downloadFile",value:function(e){var t=e.uri,r=e.headers,a=e.context,u=this.request({uri:t,method:"get",headers:r,context:a,raw:!0});return this._provideFileData(u)}},{key:"listOAuthClients",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/clients":"/v1/clients";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"createOAuthClient",value:function(e){var t=e.name,r=e.type,a=e.redirect_uri,u=e.scope,n=e.product,i=e.auth,s=e.headers,o=e.context,c=n?"/v1/products/"+n+"/clients":"/v1/clients",d={name:t,type:r,redirect_uri:a,scope:u};return this.post({uri:c,auth:i,headers:s,data:d,context:o})}},{key:"updateOAuthClient",value:function(e){var t=e.clientId,r=e.name,a=e.scope,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/clients/"+t:"/v1/clients/"+t,c={name:r,scope:a};return this.put({uri:o,data:c,auth:n,headers:i,context:s})}},{key:"deleteOAuthClient",value:function(e){var t=e.clientId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/clients/"+t:"/v1/clients/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listProducts",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/products",auth:t,headers:r,context:a})}},{key:"getProduct",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t,auth:r,headers:a,context:u})}},{key:"listProductFirmware",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/firmware",auth:r,headers:a,context:u})}},{key:"uploadProductFirmware",value:function(e){var t=e.file,r=e.version,a=e.title,u=e.description,n=e.product,i=e.auth,s=e.headers,o=e.context;return this.request({uri:"/v1/products/"+n+"/firmware",method:"post",auth:i,headers:s,form:{version:r,title:a,description:u},files:{"firmware.bin":t},context:o})}},{key:"getProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/products/"+r+"/firmware/"+t,auth:a,headers:u,context:n})}},{key:"updateProductFirmware",value:function(e){var t=e.version,r=e.title,a=e.description,u=e.product,n=e.auth,i=e.headers,s=e.context,o="/v1/products/"+u+"/firmware/"+t;return this.put({uri:o,auth:n,headers:i,data:{title:r,description:a},context:s})}},{key:"downloadProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context,i=this.request({uri:"/v1/products/"+r+"/firmware/"+t+"/binary",method:"get",auth:a,headers:u,context:n,raw:!0});return this._provideFileData(i)}},{key:"_provideFileData",value:function(e){return e=this.agent.isForBrowser()?e.responseType("arraybuffer").then(function(e){return e.body=e.xhr.response,e}):e.buffer(!0).parse(_superagentBinaryParser2.default),e.then(function(e){return e.body})}},{key:"releaseProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context,i="/v1/products/"+r+"/firmware/release";return this.put({uri:i,auth:a,headers:u,data:{version:t},context:n})}},{key:"listTeamMembers",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/team",auth:r,headers:a,context:u})}},{key:"inviteTeamMember",value:function(e){var t=e.username,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.post({uri:"/v1/products/"+r+"/team",auth:a,headers:u,data:{username:t},context:n})}},{key:"removeTeamMember",value:function(e){var t=e.username,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.delete({uri:"/v1/products/"+r+"/team/"+t,auth:a,headers:u,context:n})}},{key:"lookupSerialNumber",value:function(e){var t=e.serialNumber,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/serial_numbers/"+t,auth:r,headers:a,context:u})}},{key:"createMeshNetwork",value:function(e){var t=e.name,r=e.deviceId,a=e.iccid,u=e.auth,n=e.headers,i=e.context;return this.post({uri:"/v1/networks",auth:u,headers:n,data:{name:t,device_id:r,iccid:a},context:i})}},{key:"removeMeshNetwork",value:function(e){var t=e.networkId,r=e.auth,a=e.headers,u=e.context;return this.delete({uri:"/v1/networks/"+t,auth:r,headers:a,context:u})}},{key:"listMeshNetworks",value:function(e){var t=e.page,r=e.perPage,a=e.auth,u=e.headers,n=e.context,i=t?{page:t,per_page:r}:void 0;return this.get({uri:"/v1/networks",auth:a,headers:u,query:i,context:n})}},{key:"getMeshNetwork",value:function(e){var t=e.networkId,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/networks/"+t,auth:r,headers:a,context:u})}},{key:"updateMeshNetwork",value:function(e){var t=e.networkId,r=e.action,a=e.deviceId,u=e.auth,n=e.headers,i=e.context;return this.put({uri:"/v1/networks/"+t,auth:u,headers:n,data:{action:r,device_id:a},context:i})}},{key:"addMeshNetworkDevice",value:function(e){var t=e.networkId,r=e.deviceId,a=e.auth,u=e.headers,n=e.context;return this.updateMeshNetwork({action:"add-device",networkId:t,deviceId:r,auth:a,headers:u,context:n})}},{key:"removeMeshNetworkDevice",value:function(e){var t=e.networkId,r=e.deviceId,a=e.auth,u=e.headers,n=e.context;return t?this.updateMeshNetwork({action:"remove-device",networkId:t,deviceId:r,auth:a,headers:u,context:n}):this.delete({uri:"/v1/devices/"+r+"/network",auth:a,headers:u,context:n})}},{key:"listMeshNetworkDevices",value:function(e){var t=e.networkId,r=e.role,a=e.page,u=e.perPage,n=e.auth,i=e.headers,s=e.context,o=r||a?{role:r,page:a,per_page:u}:void 0;return this.get({uri:"/v1/networks/"+t+"/devices",auth:n,headers:i,query:o,context:s})}},{key:"getProductConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+r+"/config",auth:t,headers:a,context:u})}},{key:"getProductConfigurationSchema",value:function(e){var t=e.auth,r=e.product,a=e.headers,u=void 0===a?{}:a,n=e.context;return u.accept="application/schema+json",this.get({uri:"/v1/products/"+r+"/config",auth:t,headers:u,context:n})}},{key:"getProductDeviceConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.headers,n=e.context;return this.get({uri:"/v1/products/"+r+"/config/"+a,auth:t,headers:u,context:n})}},{key:"getProductDeviceConfigurationSchema",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.headers,n=e.context;return u.accept="application/schema+json",this.get({uri:"/v1/products/"+r+"/config/"+a,auth:t,headers:u,context:n})}},{key:"setProductConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.config,u=e.headers,n=e.context;return this.put({uri:"/v1/products/"+r+"/config",auth:t,data:a,headers:u,context:n})}},{key:"setProductDeviceConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.config,n=e.headers,i=e.context;return this.put({uri:"/v1/products/"+r+"/config/"+a,data:u,auth:t,headers:n,context:i})}},{key:"getProductLocations",value:function(e){var t=e.auth,r=e.product,a=e.dateRange,u=e.rectBl,n=e.rectTr,i=e.deviceId,s=e.deviceName,o=e.groups,c=e.page,d=e.perPage,h=e.headers,v=e.context;return this.get({uri:"/v1/products/"+r+"/locations",query:{date_range:a,rect_bl:u,rect_tr:n,device_id:i,device_name:s,groups:o,page:c,per_page:d},auth:t,headers:h,context:v})}},{key:"getProductDeviceLocations",value:function(e){var t=e.auth,r=e.product,a=e.dateRange,u=e.rectBl,n=e.rectTr,i=e.deviceId,s=e.headers,o=e.context;return this.get({uri:"/v1/products/"+r+"/locations/"+i,query:{date_range:a,rect_bl:u,rect_tr:n},auth:t,headers:s,context:o})}},{key:"setDefaultAuth",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Must pass a non-empty string");this._defaultAuth=e}},{key:"_getActiveAuthToken",value:function(e){return e||this._defaultAuth}},{key:"deviceUri",value:function(e){var t=e.deviceId,r=e.product;return r?"/v1/products/"+r+"/devices/"+t:"/v1/devices/"+t}},{key:"get",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.query,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.get({uri:t,auth:r,headers:a,query:u,context:n})}},{key:"head",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.query,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.head({uri:t,auth:r,headers:a,query:u,context:n})}},{key:"post",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.post({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"put",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.put({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"delete",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.delete({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"request",value:function(e){return e.context=this._buildContext(e.context),e.auth=this._getActiveAuthToken(e.auth),this.agent.request(e)}},{key:"client",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _Client2.default((0,_assign2.default)({api:this},e))}},{key:"setBaseUrl",value:function(e){this.baseUrl=e,this.agent.setBaseUrl(e)}}]),e}();Particle.prototype.removeAccessToken=Particle.prototype.deleteAccessToken,exports.default=Particle,module.exports=exports.default;
13
- },{"./Agent":1,"./Client":2,"./Defaults":3,"./EventStream":4,"./superagent-binary-parser":7,"babel-runtime/core-js/object/assign":10,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21}],7:[function(require,module,exports){
14
- (function (Buffer){
15
- "use strict";function binaryParser(e,r){var t=[];e.on("data",function(e){return t.push(e)}),e.on("end",function(){return r(null,Buffer.concat(t))})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=binaryParser,module.exports=exports.default;
16
- }).call(this,require("buffer").Buffer)
17
-
18
- },{"buffer":28}],8:[function(require,module,exports){
19
- module.exports={default:require("core-js/library/fn/get-iterator"),__esModule:!0};
20
- },{"core-js/library/fn/get-iterator":30}],9:[function(require,module,exports){
21
- module.exports={default:require("core-js/library/fn/is-iterable"),__esModule:!0};
22
- },{"core-js/library/fn/is-iterable":31}],10:[function(require,module,exports){
23
- module.exports={default:require("core-js/library/fn/object/assign"),__esModule:!0};
24
- },{"core-js/library/fn/object/assign":32}],11:[function(require,module,exports){
25
- module.exports={default:require("core-js/library/fn/object/create"),__esModule:!0};
26
- },{"core-js/library/fn/object/create":33}],12:[function(require,module,exports){
27
- module.exports={default:require("core-js/library/fn/object/define-property"),__esModule:!0};
28
- },{"core-js/library/fn/object/define-property":34}],13:[function(require,module,exports){
29
- module.exports={default:require("core-js/library/fn/object/entries"),__esModule:!0};
30
- },{"core-js/library/fn/object/entries":35}],14:[function(require,module,exports){
31
- module.exports={default:require("core-js/library/fn/object/get-prototype-of"),__esModule:!0};
32
- },{"core-js/library/fn/object/get-prototype-of":36}],15:[function(require,module,exports){
33
- module.exports={default:require("core-js/library/fn/object/keys"),__esModule:!0};
34
- },{"core-js/library/fn/object/keys":37}],16:[function(require,module,exports){
35
- module.exports={default:require("core-js/library/fn/object/set-prototype-of"),__esModule:!0};
36
- },{"core-js/library/fn/object/set-prototype-of":38}],17:[function(require,module,exports){
37
- module.exports={default:require("core-js/library/fn/promise"),__esModule:!0};
38
- },{"core-js/library/fn/promise":39}],18:[function(require,module,exports){
39
- module.exports={default:require("core-js/library/fn/symbol"),__esModule:!0};
40
- },{"core-js/library/fn/symbol":40}],19:[function(require,module,exports){
41
- module.exports={default:require("core-js/library/fn/symbol/iterator"),__esModule:!0};
42
- },{"core-js/library/fn/symbol/iterator":41}],20:[function(require,module,exports){
43
- "use strict";exports.__esModule=!0,exports.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};
44
- },{}],21:[function(require,module,exports){
45
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}exports.__esModule=!0;var _defineProperty=require("../core-js/object/define-property"),_defineProperty2=_interopRequireDefault(_defineProperty);exports.default=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,_defineProperty2.default)(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();
46
- },{"../core-js/object/define-property":12}],22:[function(require,module,exports){
47
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}exports.__esModule=!0;var _setPrototypeOf=require("../core-js/object/set-prototype-of"),_setPrototypeOf2=_interopRequireDefault(_setPrototypeOf),_create=require("../core-js/object/create"),_create2=_interopRequireDefault(_create),_typeof2=require("../helpers/typeof"),_typeof3=_interopRequireDefault(_typeof2);exports.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,_typeof3.default)(t)));e.prototype=(0,_create2.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(_setPrototypeOf2.default?(0,_setPrototypeOf2.default)(e,t):e.__proto__=t)};
48
- },{"../core-js/object/create":11,"../core-js/object/set-prototype-of":16,"../helpers/typeof":25}],23:[function(require,module,exports){
49
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}exports.__esModule=!0;var _typeof2=require("../helpers/typeof"),_typeof3=_interopRequireDefault(_typeof2);exports.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,_typeof3.default)(t))&&"function"!=typeof t?e:t};
50
- },{"../helpers/typeof":25}],24:[function(require,module,exports){
51
- "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}exports.__esModule=!0;var _isIterable2=require("../core-js/is-iterable"),_isIterable3=_interopRequireDefault(_isIterable2),_getIterator2=require("../core-js/get-iterator"),_getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(){function e(e,r){var t=[],a=!0,i=!1,u=void 0;try{for(var n,o=(0,_getIterator3.default)(e);!(a=(n=o.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){i=!0,u=e}finally{try{!a&&o.return&&o.return()}finally{if(i)throw u}}return t}return function(r,t){if(Array.isArray(r))return r;if((0,_isIterable3.default)(Object(r)))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();
52
- },{"../core-js/get-iterator":8,"../core-js/is-iterable":9}],25:[function(require,module,exports){
53
- "use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}exports.__esModule=!0;var _iterator=require("../core-js/symbol/iterator"),_iterator2=_interopRequireDefault(_iterator),_symbol=require("../core-js/symbol"),_symbol2=_interopRequireDefault(_symbol),_typeof="function"==typeof _symbol2.default&&"symbol"==typeof _iterator2.default?function(t){return typeof t}:function(t){return t&&"function"==typeof _symbol2.default&&t.constructor===_symbol2.default&&t!==_symbol2.default.prototype?"symbol":typeof t};exports.default="function"==typeof _symbol2.default&&"symbol"===_typeof(_iterator2.default)?function(t){return void 0===t?"undefined":_typeof(t)}:function(t){return t&&"function"==typeof _symbol2.default&&t.constructor===_symbol2.default&&t!==_symbol2.default.prototype?"symbol":void 0===t?"undefined":_typeof(t)};
54
- },{"../core-js/symbol":18,"../core-js/symbol/iterator":19}],26:[function(require,module,exports){
55
- "use strict";function placeHoldersCount(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===o[r-2]?2:"="===o[r-1]?1:0}function byteLength(o){return 3*o.length/4-placeHoldersCount(o)}function toByteArray(o){var r,e,t,u,n,p=o.length;u=placeHoldersCount(o),n=new Arr(3*p/4-u),e=u>0?p-4:p;var a=0;for(r=0;r<e;r+=4)t=revLookup[o.charCodeAt(r)]<<18|revLookup[o.charCodeAt(r+1)]<<12|revLookup[o.charCodeAt(r+2)]<<6|revLookup[o.charCodeAt(r+3)],n[a++]=t>>16&255,n[a++]=t>>8&255,n[a++]=255&t;return 2===u?(t=revLookup[o.charCodeAt(r)]<<2|revLookup[o.charCodeAt(r+1)]>>4,n[a++]=255&t):1===u&&(t=revLookup[o.charCodeAt(r)]<<10|revLookup[o.charCodeAt(r+1)]<<4|revLookup[o.charCodeAt(r+2)]>>2,n[a++]=t>>8&255,n[a++]=255&t),n}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,u=[],n=r;n<e;n+=3)t=(o[n]<<16)+(o[n+1]<<8)+o[n+2],u.push(tripletToBase64(t));return u.join("")}function fromByteArray(o){for(var r,e=o.length,t=e%3,u="",n=[],p=0,a=e-t;p<a;p+=16383)n.push(encodeChunk(o,p,p+16383>a?a:p+16383));return 1===t?(r=o[e-1],u+=lookup[r>>2],u+=lookup[r<<4&63],u+="=="):2===t&&(r=(o[e-2]<<8)+o[e-1],u+=lookup[r>>10],u+=lookup[r>>4&63],u+=lookup[r<<2&63],u+="="),n.push(u),n.join("")}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;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;
56
- },{}],27:[function(require,module,exports){
57
-
58
- },{}],28:[function(require,module,exports){
59
- (function (global){
60
- "use strict";function typedArraySupport(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(t,e){if(kMaxLength()<e)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=Buffer.prototype):(null===t&&(t=new Buffer(e)),t.length=e),t}function Buffer(t,e,r){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,t)}return from(this,t,e,r)}function from(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?fromArrayBuffer(t,e,r,n):"string"==typeof e?fromString(t,e,r):fromObject(t,e)}function assertSize(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function alloc(t,e,r,n){return assertSize(e),e<=0?createBuffer(t,e):void 0!==r?"string"==typeof n?createBuffer(t,e).fill(r,n):createBuffer(t,e).fill(r):createBuffer(t,e)}function allocUnsafe(t,e){if(assertSize(e),t=createBuffer(t,e<0?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function fromString(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(e,r);t=createBuffer(t,n);var f=t.write(e,r);return f!==n&&(t=t.slice(0,f)),t}function fromArrayLike(t,e){var r=e.length<0?0:0|checked(e.length);t=createBuffer(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function fromArrayBuffer(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),Buffer.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=Buffer.prototype):t=fromArrayLike(t,e),t}function fromObject(t,e){if(Buffer.isBuffer(e)){var r=0|checked(e.length);return t=createBuffer(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||isnan(e.length)?createBuffer(t,0):fromArrayLike(t,e);if("Buffer"===e.type&&isArray(e.data))return fromArrayLike(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function SlowBuffer(t){return+t!=t&&(t=0),Buffer.alloc(+t)}function byteLength(t,e){if(Buffer.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"latin1":case"binary":return latin1Slice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function swap(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bidirectionalIndexOf(t,e,r,n,f){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=f?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(f)return-1;r=t.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof e&&(e=Buffer.from(e,n)),Buffer.isBuffer(e))return 0===e.length?-1:arrayIndexOf(t,e,r,n,f);if("number"==typeof e)return e&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):arrayIndexOf(t,[e],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(t,e,r,n,f){function i(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,u/=2,s/=2,r/=2}var a;if(f){var h=-1;for(a=r;a<u;a++)if(i(t,a)===i(e,-1===h?0:a-h)){if(-1===h&&(h=a),a-h+1===s)return h*o}else-1!==h&&(a-=a-h),h=-1}else for(r+s>u&&(r=u-s),a=r;a>=0;a--){for(var c=!0,l=0;l<s;l++)if(i(t,a+l)!==i(e,l)){c=!1;break}if(c)return a}return-1}function hexWrite(t,e,r,n){r=Number(r)||0;var f=t.length-r;n?(n=Number(n))>f&&(n=f):n=f;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(isNaN(u))return o;t[r+o]=u}return o}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(asciiToBytes(e),t,r,n)}function latin1Write(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(utf16leToBytes(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?base64.fromByteArray(t):base64.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],f=e;f<r;){var i=t[f],o=null,u=i>239?4:i>223?3:i>191?2:1;if(f+u<=r){var s,a,h,c;switch(u){case 1:i<128&&(o=i);break;case 2:s=t[f+1],128==(192&s)&&(c=(31&i)<<6|63&s)>127&&(o=c);break;case 3:s=t[f+1],a=t[f+2],128==(192&s)&&128==(192&a)&&(c=(15&i)<<12|(63&s)<<6|63&a)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:s=t[f+1],a=t[f+2],h=t[f+3],128==(192&s)&&128==(192&a)&&128==(192&h)&&(c=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&h)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),f+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(t){var e=t.length;if(e<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var f=e;f<r;++f)n+=String.fromCharCode(127&t[f]);return n}function latin1Slice(t,e,r){var n="";r=Math.min(t.length,r);for(var f=e;f<r;++f)n+=String.fromCharCode(t[f]);return n}function hexSlice(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var f="",i=e;i<r;++i)f+=toHex(t[i]);return f}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),f="",i=0;i<n.length;i+=2)f+=String.fromCharCode(n[i]+256*n[i+1]);return f}function checkOffset(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,f,i){if(!Buffer.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>f||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function objectWriteUInt16(t,e,r,n){e<0&&(e=65535+e+1);for(var f=0,i=Math.min(t.length-r,2);f<i;++f)t[r+f]=(e&255<<8*(n?f:1-f))>>>8*(n?f:1-f)}function objectWriteUInt32(t,e,r,n){e<0&&(e=4294967295+e+1);for(var f=0,i=Math.min(t.length-r,4);f<i;++f)t[r+f]=e>>>8*(n?f:3-f)&255}function checkIEEE754(t,e,r,n,f,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(t,e,r,n,f){return f||checkIEEE754(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,f){return f||checkIEEE754(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(t,e,r,n,52,8),r+8}function base64clean(t){if(t=stringtrim(t).replace(INVALID_BASE64_RE,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function toHex(t){return t<16?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){e=e||1/0;for(var r,n=t.length,f=null,i=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!f){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(e-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function utf16leToBytes(t,e){for(var r,n,f,i=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(t){return base64.toByteArray(base64clean(t))}function blitBuffer(t,e,r,n){for(var f=0;f<n&&!(f+r>=e.length||f>=t.length);++f)e[f+r]=t[f];return f}function isnan(t){return t!==t}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(t){return t.__proto__=Buffer.prototype,t},Buffer.from=function(t,e,r){return from(null,t,e,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(t,e,r){return alloc(null,t,e,r)},Buffer.allocUnsafe=function(t){return allocUnsafe(null,t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(null,t)},Buffer.isBuffer=function(t){return!(null==t||!t._isBuffer)},Buffer.compare=function(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,f=0,i=Math.min(r,n);f<i;++f)if(t[f]!==e[f]){r=t[f],n=e[f];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function(t){switch(String(t).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(t,e){if(!isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Buffer.allocUnsafe(e),f=0;for(r=0;r<t.length;++r){var i=t[r];if(!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 t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)swap(this,e,e+1);return this},Buffer.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)swap(this,e,e+3),swap(this,e+1,e+2);return this},Buffer.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)swap(this,e,e+7),swap(this,e+1,e+6),swap(this,e+2,e+5),swap(this,e+3,e+4);return this},Buffer.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function(){var t="",e=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function(t,e,r,n,f){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),e<0||r>t.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&e>=r)return 0;if(n>=f)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,f>>>=0,this===t)return 0;for(var i=f-n,o=r-e,u=Math.min(i,o),s=this.slice(n,f),a=t.slice(e,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(t,e,r){return-1!==this.indexOf(t,e,r)},Buffer.prototype.indexOf=function(t,e,r){return bidirectionalIndexOf(this,t,e,r,!0)},Buffer.prototype.lastIndexOf=function(t,e,r){return bidirectionalIndexOf(this,t,e,r,!1)},Buffer.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-e;if((void 0===r||r>f)&&(r=f),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"latin1":case"binary":return latin1Write(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(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;Buffer.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n;if(Buffer.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=Buffer.prototype;else{var f=e-t;n=new Buffer(f,void 0);for(var i=0;i<f;++i)n[i]=this[i+t]}return n},Buffer.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],f=1,i=0;++i<e&&(f*=256);)n+=this[t+i]*f;return n},Buffer.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t+--e],f=1;e>0&&(f*=256);)n+=this[t+--e]*f;return n},Buffer.prototype.readUInt8=function(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],f=1,i=0;++i<e&&(f*=256);)n+=this[t+i]*f;return f*=128,n>=f&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=e,f=1,i=this[t+--n];n>0&&(f*=256);)i+=this[t+--n]*f;return f*=128,i>=f&&(i-=Math.pow(2,8*e)),i},Buffer.prototype.readInt8=function(t,e){return e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){checkInt(this,t,e,r,Math.pow(2,8*r)-1,0)}var f=1,i=0;for(this[e]=255&t;++i<r&&(f*=256);)this[e+i]=t/f&255;return e+r},Buffer.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){checkInt(this,t,e,r,Math.pow(2,8*r)-1,0)}var f=r-1,i=1;for(this[e+f]=255&t;--f>=0&&(i*=256);)this[e+f]=t/i&255;return e+r},Buffer.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,t,e,r,f-1,-f)}var i=0,o=1,u=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,t,e,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var f,i=n-r;if(this===t&&r<e&&e<n)for(f=i-1;f>=0;--f)t[f+e]=this[f+r];else if(i<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(f=0;f<i;++f)t[f+e]=this[f+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},Buffer.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var f=t.charCodeAt(0);f<256&&(t=f)}if(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)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var i;if("number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var o=Buffer.isBuffer(t)?t:utf8ToBytes(new Buffer(t,n).toString()),u=o.length;for(i=0;i<r-e;++i)this[i+e]=o[i%u]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;
61
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
62
-
63
- },{"base64-js":26,"ieee754":138,"isarray":139}],29:[function(require,module,exports){
64
- 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"};
65
- },{}],30:[function(require,module,exports){
66
- require("../modules/web.dom.iterable"),require("../modules/es6.string.iterator"),module.exports=require("../modules/core.get-iterator");
67
- },{"../modules/core.get-iterator":117,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":135}],31:[function(require,module,exports){
68
- require("../modules/web.dom.iterable"),require("../modules/es6.string.iterator"),module.exports=require("../modules/core.is-iterable");
69
- },{"../modules/core.is-iterable":118,"../modules/es6.string.iterator":128,"../modules/web.dom.iterable":135}],32:[function(require,module,exports){
70
- require("../../modules/es6.object.assign"),module.exports=require("../../modules/_core").Object.assign;
71
- },{"../../modules/_core":49,"../../modules/es6.object.assign":120}],33:[function(require,module,exports){
72
- require("../../modules/es6.object.create");var $Object=require("../../modules/_core").Object;module.exports=function(e,r){return $Object.create(e,r)};
73
- },{"../../modules/_core":49,"../../modules/es6.object.create":121}],34:[function(require,module,exports){
74
- require("../../modules/es6.object.define-property");var $Object=require("../../modules/_core").Object;module.exports=function(e,r,o){return $Object.defineProperty(e,r,o)};
75
- },{"../../modules/_core":49,"../../modules/es6.object.define-property":122}],35:[function(require,module,exports){
76
- require("../../modules/es7.object.entries"),module.exports=require("../../modules/_core").Object.entries;
77
- },{"../../modules/_core":49,"../../modules/es7.object.entries":130}],36:[function(require,module,exports){
78
- require("../../modules/es6.object.get-prototype-of"),module.exports=require("../../modules/_core").Object.getPrototypeOf;
79
- },{"../../modules/_core":49,"../../modules/es6.object.get-prototype-of":123}],37:[function(require,module,exports){
80
- require("../../modules/es6.object.keys"),module.exports=require("../../modules/_core").Object.keys;
81
- },{"../../modules/_core":49,"../../modules/es6.object.keys":124}],38:[function(require,module,exports){
82
- require("../../modules/es6.object.set-prototype-of"),module.exports=require("../../modules/_core").Object.setPrototypeOf;
83
- },{"../../modules/_core":49,"../../modules/es6.object.set-prototype-of":125}],39:[function(require,module,exports){
84
- require("../modules/es6.object.to-string"),require("../modules/es6.string.iterator"),require("../modules/web.dom.iterable"),require("../modules/es6.promise"),require("../modules/es7.promise.finally"),require("../modules/es7.promise.try"),module.exports=require("../modules/_core").Promise;
85
- },{"../modules/_core":49,"../modules/es6.object.to-string":126,"../modules/es6.promise":127,"../modules/es6.string.iterator":128,"../modules/es7.promise.finally":131,"../modules/es7.promise.try":132,"../modules/web.dom.iterable":135}],40:[function(require,module,exports){
86
- require("../../modules/es6.symbol"),require("../../modules/es6.object.to-string"),require("../../modules/es7.symbol.async-iterator"),require("../../modules/es7.symbol.observable"),module.exports=require("../../modules/_core").Symbol;
87
- },{"../../modules/_core":49,"../../modules/es6.object.to-string":126,"../../modules/es6.symbol":129,"../../modules/es7.symbol.async-iterator":133,"../../modules/es7.symbol.observable":134}],41:[function(require,module,exports){
88
- require("../../modules/es6.string.iterator"),require("../../modules/web.dom.iterable"),module.exports=require("../../modules/_wks-ext").f("iterator");
89
- },{"../../modules/_wks-ext":114,"../../modules/es6.string.iterator":128,"../../modules/web.dom.iterable":135}],42:[function(require,module,exports){
90
- module.exports=function(o){if("function"!=typeof o)throw TypeError(o+" is not a function!");return o};
91
- },{}],43:[function(require,module,exports){
92
- module.exports=function(){};
93
- },{}],44:[function(require,module,exports){
94
- module.exports=function(o,n,r,i){if(!(o instanceof n)||void 0!==i&&i in o)throw TypeError(r+": incorrect invocation!");return o};
95
- },{}],45:[function(require,module,exports){
96
- var isObject=require("./_is-object");module.exports=function(e){if(!isObject(e))throw TypeError(e+" is not an object!");return e};
97
- },{"./_is-object":68}],46:[function(require,module,exports){
98
- var toIObject=require("./_to-iobject"),toLength=require("./_to-length"),toAbsoluteIndex=require("./_to-absolute-index");module.exports=function(e){return function(t,o,r){var n,u=toIObject(t),i=toLength(u.length),f=toAbsoluteIndex(r,i);if(e&&o!=o){for(;i>f;)if((n=u[f++])!=n)return!0}else for(;i>f;f++)if((e||f in u)&&u[f]===o)return e||f||0;return!e&&-1}};
99
- },{"./_to-absolute-index":106,"./_to-iobject":108,"./_to-length":109}],47:[function(require,module,exports){
100
- var cof=require("./_cof"),TAG=require("./_wks")("toStringTag"),ARG="Arguments"==cof(function(){return arguments}()),tryGet=function(t,e){try{return t[e]}catch(t){}};module.exports=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=tryGet(e=Object(t),TAG))?r:ARG?cof(e):"Object"==(n=cof(e))&&"function"==typeof e.callee?"Arguments":n};
101
- },{"./_cof":48,"./_wks":115}],48:[function(require,module,exports){
102
- var toString={}.toString;module.exports=function(t){return toString.call(t).slice(8,-1)};
103
- },{}],49:[function(require,module,exports){
104
- var core=module.exports={version:"2.5.1"};"number"==typeof __e&&(__e=core);
105
- },{}],50:[function(require,module,exports){
106
- var aFunction=require("./_a-function");module.exports=function(n,r,t){if(aFunction(n),void 0===r)return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,u){return n.call(r,t,u)};case 3:return function(t,u,e){return n.call(r,t,u,e)}}return function(){return n.apply(r,arguments)}};
107
- },{"./_a-function":42}],51:[function(require,module,exports){
108
- module.exports=function(o){if(void 0==o)throw TypeError("Can't call method on "+o);return o};
109
- },{}],52:[function(require,module,exports){
110
- module.exports=!require("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a});
111
- },{"./_fails":57}],53:[function(require,module,exports){
112
- var isObject=require("./_is-object"),document=require("./_global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(e){return is?document.createElement(e):{}};
113
- },{"./_global":59,"./_is-object":68}],54:[function(require,module,exports){
114
- module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
115
- },{}],55:[function(require,module,exports){
116
- var getKeys=require("./_object-keys"),gOPS=require("./_object-gops"),pIE=require("./_object-pie");module.exports=function(e){var r=getKeys(e),t=gOPS.f;if(t)for(var o,u=t(e),g=pIE.f,i=0;u.length>i;)g.call(e,o=u[i++])&&r.push(o);return r};
117
- },{"./_object-gops":86,"./_object-keys":89,"./_object-pie":90}],56:[function(require,module,exports){
118
- var global=require("./_global"),core=require("./_core"),ctx=require("./_ctx"),hide=require("./_hide"),PROTOTYPE="prototype",$export=function(e,r,t){var o,n,p,i=e&$export.F,x=e&$export.G,c=e&$export.S,l=e&$export.P,u=e&$export.B,a=e&$export.W,$=x?core:core[r]||(core[r]={}),P=$[PROTOTYPE],f=x?global:c?global[r]:(global[r]||{})[PROTOTYPE];x&&(t=r);for(o in t)(n=!i&&f&&void 0!==f[o])&&o in $||(p=n?f[o]:t[o],$[o]=x&&"function"!=typeof f[o]?t[o]:u&&n?ctx(p,global):a&&f[o]==p?function(e){var r=function(r,t,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,t)}return new e(r,t,o)}return e.apply(this,arguments)};return r[PROTOTYPE]=e[PROTOTYPE],r}(p):l&&"function"==typeof p?ctx(Function.call,p):p,l&&(($.virtual||($.virtual={}))[o]=p,e&$export.R&&P&&!P[o]&&hide(P,o,p)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export;
119
- },{"./_core":49,"./_ctx":50,"./_global":59,"./_hide":61}],57:[function(require,module,exports){
120
- module.exports=function(r){try{return!!r()}catch(r){return!0}};
121
- },{}],58:[function(require,module,exports){
122
- var ctx=require("./_ctx"),call=require("./_iter-call"),isArrayIter=require("./_is-array-iter"),anObject=require("./_an-object"),toLength=require("./_to-length"),getIterFn=require("./core.get-iterator-method"),BREAK={},RETURN={},exports=module.exports=function(e,r,t,o,i){var n,a,R,c,l=i?function(){return e}:getIterFn(e),u=ctx(t,o,r?2:1),E=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(isArrayIter(l)){for(n=toLength(e.length);n>E;E++)if((c=r?u(anObject(a=e[E])[0],a[1]):u(e[E]))===BREAK||c===RETURN)return c}else for(R=l.call(e);!(a=R.next()).done;)if((c=call(R,u,a.value,r))===BREAK||c===RETURN)return c};exports.BREAK=BREAK,exports.RETURN=RETURN;
123
- },{"./_an-object":45,"./_ctx":50,"./_is-array-iter":66,"./_iter-call":69,"./_to-length":109,"./core.get-iterator-method":116}],59:[function(require,module,exports){
124
- var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global);
125
- },{}],60:[function(require,module,exports){
126
- var hasOwnProperty={}.hasOwnProperty;module.exports=function(r,e){return hasOwnProperty.call(r,e)};
127
- },{}],61:[function(require,module,exports){
128
- var dP=require("./_object-dp"),createDesc=require("./_property-desc");module.exports=require("./_descriptors")?function(e,r,t){return dP.f(e,r,createDesc(1,t))}:function(e,r,t){return e[r]=t,e};
129
- },{"./_descriptors":52,"./_object-dp":81,"./_property-desc":95}],62:[function(require,module,exports){
130
- var document=require("./_global").document;module.exports=document&&document.documentElement;
131
- },{"./_global":59}],63:[function(require,module,exports){
132
- module.exports=!require("./_descriptors")&&!require("./_fails")(function(){return 7!=Object.defineProperty(require("./_dom-create")("div"),"a",{get:function(){return 7}}).a});
133
- },{"./_descriptors":52,"./_dom-create":53,"./_fails":57}],64:[function(require,module,exports){
134
- module.exports=function(e,r,l){var a=void 0===l;switch(r.length){case 0:return a?e():e.call(l);case 1:return a?e(r[0]):e.call(l,r[0]);case 2:return a?e(r[0],r[1]):e.call(l,r[0],r[1]);case 3:return a?e(r[0],r[1],r[2]):e.call(l,r[0],r[1],r[2]);case 4:return a?e(r[0],r[1],r[2],r[3]):e.call(l,r[0],r[1],r[2],r[3])}return e.apply(l,r)};
135
- },{}],65:[function(require,module,exports){
136
- var cof=require("./_cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==cof(e)?e.split(""):Object(e)};
137
- },{"./_cof":48}],66:[function(require,module,exports){
138
- var Iterators=require("./_iterators"),ITERATOR=require("./_wks")("iterator"),ArrayProto=Array.prototype;module.exports=function(r){return void 0!==r&&(Iterators.Array===r||ArrayProto[ITERATOR]===r)};
139
- },{"./_iterators":74,"./_wks":115}],67:[function(require,module,exports){
140
- var cof=require("./_cof");module.exports=Array.isArray||function(r){return"Array"==cof(r)};
141
- },{"./_cof":48}],68:[function(require,module,exports){
142
- module.exports=function(o){return"object"==typeof o?null!==o:"function"==typeof o};
143
- },{}],69:[function(require,module,exports){
144
- var anObject=require("./_an-object");module.exports=function(r,t,e,a){try{return a?t(anObject(e)[0],e[1]):t(e)}catch(t){var c=r.return;throw void 0!==c&&anObject(c.call(r)),t}};
145
- },{"./_an-object":45}],70:[function(require,module,exports){
146
- "use strict";var create=require("./_object-create"),descriptor=require("./_property-desc"),setToStringTag=require("./_set-to-string-tag"),IteratorPrototype={};require("./_hide")(IteratorPrototype,require("./_wks")("iterator"),function(){return this}),module.exports=function(r,t,e){r.prototype=create(IteratorPrototype,{next:descriptor(1,e)}),setToStringTag(r,t+" Iterator")};
147
- },{"./_hide":61,"./_object-create":80,"./_property-desc":95,"./_set-to-string-tag":100,"./_wks":115}],71:[function(require,module,exports){
148
- "use strict";var LIBRARY=require("./_library"),$export=require("./_export"),redefine=require("./_redefine"),hide=require("./_hide"),has=require("./_has"),Iterators=require("./_iterators"),$iterCreate=require("./_iter-create"),setToStringTag=require("./_set-to-string-tag"),getPrototypeOf=require("./_object-gpo"),ITERATOR=require("./_wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this};module.exports=function(e,r,t,i,n,o,s){$iterCreate(t,r,i);var u,a,T,R=function(e){if(!BUGGY&&e in f)return f[e];switch(e){case KEYS:case VALUES:return function(){return new t(this,e)}}return function(){return new t(this,e)}},A=r+" Iterator",E=n==VALUES,c=!1,f=e.prototype,h=f[ITERATOR]||f[FF_ITERATOR]||n&&f[n],I=h||R(n),p=n?E?R("entries"):I:void 0,_="Array"==r?f.entries||h:h;if(_&&(T=getPrototypeOf(_.call(new e)))!==Object.prototype&&T.next&&(setToStringTag(T,A,!0),LIBRARY||has(T,ITERATOR)||hide(T,ITERATOR,returnThis)),E&&h&&h.name!==VALUES&&(c=!0,I=function(){return h.call(this)}),LIBRARY&&!s||!BUGGY&&!c&&f[ITERATOR]||hide(f,ITERATOR,I),Iterators[r]=I,Iterators[A]=returnThis,n)if(u={values:E?I:R(VALUES),keys:o?I:R(KEYS),entries:p},s)for(a in u)a in f||redefine(f,a,u[a]);else $export($export.P+$export.F*(BUGGY||c),r,u);return u};
149
- },{"./_export":56,"./_has":60,"./_hide":61,"./_iter-create":70,"./_iterators":74,"./_library":75,"./_object-gpo":87,"./_redefine":97,"./_set-to-string-tag":100,"./_wks":115}],72:[function(require,module,exports){
150
- var ITERATOR=require("./_wks")("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR]();riter.return=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(r){}module.exports=function(r,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var e=[7],u=e[ITERATOR]();u.next=function(){return{done:n=!0}},e[ITERATOR]=function(){return u},r(e)}catch(r){}return n};
151
- },{"./_wks":115}],73:[function(require,module,exports){
152
- module.exports=function(e,n){return{value:n,done:!!e}};
153
- },{}],74:[function(require,module,exports){
154
- module.exports={};
155
- },{}],75:[function(require,module,exports){
156
- module.exports=!0;
157
- },{}],76:[function(require,module,exports){
158
- var META=require("./_uid")("meta"),isObject=require("./_is-object"),has=require("./_has"),setDesc=require("./_object-dp").f,id=0,isExtensible=Object.isExtensible||function(){return!0},FREEZE=!require("./_fails")(function(){return isExtensible(Object.preventExtensions({}))}),setMeta=function(e){setDesc(e,META,{value:{i:"O"+ ++id,w:{}}})},fastKey=function(e,t){if(!isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!has(e,META)){if(!isExtensible(e))return"F";if(!t)return"E";setMeta(e)}return e[META].i},getWeak=function(e,t){if(!has(e,META)){if(!isExtensible(e))return!0;if(!t)return!1;setMeta(e)}return e[META].w},onFreeze=function(e){return FREEZE&&meta.NEED&&isExtensible(e)&&!has(e,META)&&setMeta(e),e},meta=module.exports={KEY:META,NEED:!1,fastKey:fastKey,getWeak:getWeak,onFreeze:onFreeze};
159
- },{"./_fails":57,"./_has":60,"./_is-object":68,"./_object-dp":81,"./_uid":112}],77:[function(require,module,exports){
160
- var global=require("./_global"),macrotask=require("./_task").set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode="process"==require("./_cof")(process);module.exports=function(){var e,r,o,s=function(){var s,t;for(isNode&&(s=process.domain)&&s.exit();e;){t=e.fn,e=e.next;try{t()}catch(s){throw e?o():r=void 0,s}}r=void 0,s&&s.enter()};if(isNode)o=function(){process.nextTick(s)};else if(Observer){var t=!0,a=document.createTextNode("");new Observer(s).observe(a,{characterData:!0}),o=function(){a.data=t=!t}}else if(Promise&&Promise.resolve){var i=Promise.resolve();o=function(){i.then(s)}}else o=function(){macrotask.call(global,s)};return function(s){var t={fn:s,next:void 0};r&&(r.next=t),e||(e=t,o()),r=t}};
161
- },{"./_cof":48,"./_global":59,"./_task":105}],78:[function(require,module,exports){
162
- "use strict";function PromiseCapability(i){var o,r;this.promise=new i(function(i,t){if(void 0!==o||void 0!==r)throw TypeError("Bad Promise constructor");o=i,r=t}),this.resolve=aFunction(o),this.reject=aFunction(r)}var aFunction=require("./_a-function");module.exports.f=function(i){return new PromiseCapability(i)};
163
- },{"./_a-function":42}],79:[function(require,module,exports){
164
- "use strict";var getKeys=require("./_object-keys"),gOPS=require("./_object-gops"),pIE=require("./_object-pie"),toObject=require("./_to-object"),IObject=require("./_iobject"),$assign=Object.assign;module.exports=!$assign||require("./_fails")(function(){var e={},t={},r=Symbol(),s="abcdefghijklmnopqrst";return e[r]=7,s.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r]||Object.keys($assign({},t)).join("")!=s})?function(e,t){for(var r=toObject(e),s=arguments.length,i=1,o=gOPS.f,c=pIE.f;s>i;)for(var n,a=IObject(arguments[i++]),g=o?getKeys(a).concat(o(a)):getKeys(a),b=g.length,j=0;b>j;)c.call(a,n=g[j++])&&(r[n]=a[n]);return r}:$assign;
165
- },{"./_fails":57,"./_iobject":65,"./_object-gops":86,"./_object-keys":89,"./_object-pie":90,"./_to-object":110}],80:[function(require,module,exports){
166
- var anObject=require("./_an-object"),dPs=require("./_object-dps"),enumBugKeys=require("./_enum-bug-keys"),IE_PROTO=require("./_shared-key")("IE_PROTO"),Empty=function(){},PROTOTYPE="prototype",createDict=function(){var e,t=require("./_dom-create")("iframe"),r=enumBugKeys.length;for(t.style.display="none",require("./_html").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),createDict=e.F;r--;)delete createDict[PROTOTYPE][enumBugKeys[r]];return createDict()};module.exports=Object.create||function(e,t){var r;return null!==e?(Empty[PROTOTYPE]=anObject(e),r=new Empty,Empty[PROTOTYPE]=null,r[IE_PROTO]=e):r=createDict(),void 0===t?r:dPs(r,t)};
167
- },{"./_an-object":45,"./_dom-create":53,"./_enum-bug-keys":54,"./_html":62,"./_object-dps":82,"./_shared-key":101}],81:[function(require,module,exports){
168
- var anObject=require("./_an-object"),IE8_DOM_DEFINE=require("./_ie8-dom-define"),toPrimitive=require("./_to-primitive"),dP=Object.defineProperty;exports.f=require("./_descriptors")?Object.defineProperty:function(e,r,t){if(anObject(e),r=toPrimitive(r,!0),anObject(t),IE8_DOM_DEFINE)try{return dP(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(e[r]=t.value),e};
169
- },{"./_an-object":45,"./_descriptors":52,"./_ie8-dom-define":63,"./_to-primitive":111}],82:[function(require,module,exports){
170
- var dP=require("./_object-dp"),anObject=require("./_an-object"),getKeys=require("./_object-keys");module.exports=require("./_descriptors")?Object.defineProperties:function(e,r){anObject(e);for(var t,o=getKeys(r),c=o.length,i=0;c>i;)dP.f(e,t=o[i++],r[t]);return e};
171
- },{"./_an-object":45,"./_descriptors":52,"./_object-dp":81,"./_object-keys":89}],83:[function(require,module,exports){
172
- var pIE=require("./_object-pie"),createDesc=require("./_property-desc"),toIObject=require("./_to-iobject"),toPrimitive=require("./_to-primitive"),has=require("./_has"),IE8_DOM_DEFINE=require("./_ie8-dom-define"),gOPD=Object.getOwnPropertyDescriptor;exports.f=require("./_descriptors")?gOPD:function(e,r){if(e=toIObject(e),r=toPrimitive(r,!0),IE8_DOM_DEFINE)try{return gOPD(e,r)}catch(e){}if(has(e,r))return createDesc(!pIE.f.call(e,r),e[r])};
173
- },{"./_descriptors":52,"./_has":60,"./_ie8-dom-define":63,"./_object-pie":90,"./_property-desc":95,"./_to-iobject":108,"./_to-primitive":111}],84:[function(require,module,exports){
174
- var toIObject=require("./_to-iobject"),gOPN=require("./_object-gopn").f,toString={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return gOPN(e)}catch(e){return windowNames.slice()}};module.exports.f=function(e){return windowNames&&"[object Window]"==toString.call(e)?getWindowNames(e):gOPN(toIObject(e))};
175
- },{"./_object-gopn":85,"./_to-iobject":108}],85:[function(require,module,exports){
176
- var $keys=require("./_object-keys-internal"),hiddenKeys=require("./_enum-bug-keys").concat("length","prototype");exports.f=Object.getOwnPropertyNames||function(e){return $keys(e,hiddenKeys)};
177
- },{"./_enum-bug-keys":54,"./_object-keys-internal":88}],86:[function(require,module,exports){
178
- exports.f=Object.getOwnPropertySymbols;
179
- },{}],87:[function(require,module,exports){
180
- var has=require("./_has"),toObject=require("./_to-object"),IE_PROTO=require("./_shared-key")("IE_PROTO"),ObjectProto=Object.prototype;module.exports=Object.getPrototypeOf||function(t){return t=toObject(t),has(t,IE_PROTO)?t[IE_PROTO]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ObjectProto:null};
181
- },{"./_has":60,"./_shared-key":101,"./_to-object":110}],88:[function(require,module,exports){
182
- var has=require("./_has"),toIObject=require("./_to-iobject"),arrayIndexOf=require("./_array-includes")(!1),IE_PROTO=require("./_shared-key")("IE_PROTO");module.exports=function(r,e){var a,t=toIObject(r),u=0,O=[];for(a in t)a!=IE_PROTO&&has(t,a)&&O.push(a);for(;e.length>u;)has(t,a=e[u++])&&(~arrayIndexOf(O,a)||O.push(a));return O};
183
- },{"./_array-includes":46,"./_has":60,"./_shared-key":101,"./_to-iobject":108}],89:[function(require,module,exports){
184
- var $keys=require("./_object-keys-internal"),enumBugKeys=require("./_enum-bug-keys");module.exports=Object.keys||function(e){return $keys(e,enumBugKeys)};
185
- },{"./_enum-bug-keys":54,"./_object-keys-internal":88}],90:[function(require,module,exports){
186
- exports.f={}.propertyIsEnumerable;
187
- },{}],91:[function(require,module,exports){
188
- var $export=require("./_export"),core=require("./_core"),fails=require("./_fails");module.exports=function(e,r){var o=(core.Object||{})[e]||Object[e],t={};t[e]=r(o),$export($export.S+$export.F*fails(function(){o(1)}),"Object",t)};
189
- },{"./_core":49,"./_export":56,"./_fails":57}],92:[function(require,module,exports){
190
- var getKeys=require("./_object-keys"),toIObject=require("./_to-iobject"),isEnum=require("./_object-pie").f;module.exports=function(e){return function(t){for(var r,o=toIObject(t),u=getKeys(o),i=u.length,n=0,c=[];i>n;)isEnum.call(o,r=u[n++])&&c.push(e?[r,o[r]]:o[r]);return c}};
191
- },{"./_object-keys":89,"./_object-pie":90,"./_to-iobject":108}],93:[function(require,module,exports){
192
- module.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}};
193
- },{}],94:[function(require,module,exports){
194
- var anObject=require("./_an-object"),isObject=require("./_is-object"),newPromiseCapability=require("./_new-promise-capability");module.exports=function(e,r){if(anObject(e),isObject(r)&&r.constructor===e)return r;var i=newPromiseCapability.f(e);return(0,i.resolve)(r),i.promise};
195
- },{"./_an-object":45,"./_is-object":68,"./_new-promise-capability":78}],95:[function(require,module,exports){
196
- module.exports=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}};
197
- },{}],96:[function(require,module,exports){
198
- var hide=require("./_hide");module.exports=function(e,r,i){for(var d in r)i&&e[d]?e[d]=r[d]:hide(e,d,r[d]);return e};
199
- },{"./_hide":61}],97:[function(require,module,exports){
200
- module.exports=require("./_hide");
201
- },{"./_hide":61}],98:[function(require,module,exports){
202
- var isObject=require("./_is-object"),anObject=require("./_an-object"),check=function(t,e){if(anObject(t),!isObject(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,c){try{c=require("./_ctx")(Function.call,require("./_object-gopd").f(Object.prototype,"__proto__").set,2),c(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return check(t,r),e?t.__proto__=r:c(t,r),t}}({},!1):void 0),check:check};
203
- },{"./_an-object":45,"./_ctx":50,"./_is-object":68,"./_object-gopd":83}],99:[function(require,module,exports){
204
- "use strict";var global=require("./_global"),core=require("./_core"),dP=require("./_object-dp"),DESCRIPTORS=require("./_descriptors"),SPECIES=require("./_wks")("species");module.exports=function(e){var r="function"==typeof core[e]?core[e]:global[e];DESCRIPTORS&&r&&!r[SPECIES]&&dP.f(r,SPECIES,{configurable:!0,get:function(){return this}})};
205
- },{"./_core":49,"./_descriptors":52,"./_global":59,"./_object-dp":81,"./_wks":115}],100:[function(require,module,exports){
206
- var def=require("./_object-dp").f,has=require("./_has"),TAG=require("./_wks")("toStringTag");module.exports=function(e,r,o){e&&!has(e=o?e:e.prototype,TAG)&&def(e,TAG,{configurable:!0,value:r})};
207
- },{"./_has":60,"./_object-dp":81,"./_wks":115}],101:[function(require,module,exports){
208
- var shared=require("./_shared")("keys"),uid=require("./_uid");module.exports=function(e){return shared[e]||(shared[e]=uid(e))};
209
- },{"./_shared":102,"./_uid":112}],102:[function(require,module,exports){
210
- var global=require("./_global"),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(o){return store[o]||(store[o]={})};
211
- },{"./_global":59}],103:[function(require,module,exports){
212
- var anObject=require("./_an-object"),aFunction=require("./_a-function"),SPECIES=require("./_wks")("species");module.exports=function(e,n){var r,t=anObject(e).constructor;return void 0===t||void 0==(r=anObject(t)[SPECIES])?n:aFunction(r)};
213
- },{"./_a-function":42,"./_an-object":45,"./_wks":115}],104:[function(require,module,exports){
214
- var toInteger=require("./_to-integer"),defined=require("./_defined");module.exports=function(e){return function(r,t){var n,i,d=String(defined(r)),o=toInteger(t),u=d.length;return o<0||o>=u?e?"":void 0:(n=d.charCodeAt(o),n<55296||n>56319||o+1===u||(i=d.charCodeAt(o+1))<56320||i>57343?e?d.charAt(o):n:e?d.slice(o,o+2):i-56320+(n-55296<<10)+65536)}};
215
- },{"./_defined":51,"./_to-integer":107}],105:[function(require,module,exports){
216
- var ctx=require("./_ctx"),invoke=require("./_invoke"),html=require("./_html"),cel=require("./_dom-create"),global=require("./_global"),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,Dispatch=global.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port,run=function(){var e=+this;if(queue.hasOwnProperty(e)){var t=queue[e];delete queue[e],t()}},listener=function(e){run.call(e.data)};setTask&&clearTask||(setTask=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return queue[++counter]=function(){invoke("function"==typeof e?e:Function(e),t)},defer(counter),counter},clearTask=function(e){delete queue[e]},"process"==require("./_cof")(process)?defer=function(e){process.nextTick(ctx(run,e,1))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(ctx(run,e,1))}:MessageChannel?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=ctx(port.postMessage,port,1)):global.addEventListener&&"function"==typeof postMessage&&!global.importScripts?(defer=function(e){global.postMessage(e+"","*")},global.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in cel("script")?function(e){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run.call(e)}}:function(e){setTimeout(ctx(run,e,1),0)}),module.exports={set:setTask,clear:clearTask};
217
- },{"./_cof":48,"./_ctx":50,"./_dom-create":53,"./_global":59,"./_html":62,"./_invoke":64}],106:[function(require,module,exports){
218
- var toInteger=require("./_to-integer"),max=Math.max,min=Math.min;module.exports=function(e,t){return e=toInteger(e),e<0?max(e+t,0):min(e,t)};
219
- },{"./_to-integer":107}],107:[function(require,module,exports){
220
- var ceil=Math.ceil,floor=Math.floor;module.exports=function(o){return isNaN(o=+o)?0:(o>0?floor:ceil)(o)};
221
- },{}],108:[function(require,module,exports){
222
- var IObject=require("./_iobject"),defined=require("./_defined");module.exports=function(e){return IObject(defined(e))};
223
- },{"./_defined":51,"./_iobject":65}],109:[function(require,module,exports){
224
- var toInteger=require("./_to-integer"),min=Math.min;module.exports=function(e){return e>0?min(toInteger(e),9007199254740991):0};
225
- },{"./_to-integer":107}],110:[function(require,module,exports){
226
- var defined=require("./_defined");module.exports=function(e){return Object(defined(e))};
227
- },{"./_defined":51}],111:[function(require,module,exports){
228
- var isObject=require("./_is-object");module.exports=function(t,e){if(!isObject(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!isObject(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!isObject(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!isObject(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")};
229
- },{"./_is-object":68}],112:[function(require,module,exports){
230
- var id=0,px=Math.random();module.exports=function(o){return"Symbol(".concat(void 0===o?"":o,")_",(++id+px).toString(36))};
231
- },{}],113:[function(require,module,exports){
232
- var global=require("./_global"),core=require("./_core"),LIBRARY=require("./_library"),wksExt=require("./_wks-ext"),defineProperty=require("./_object-dp").f;module.exports=function(e){var r=core.Symbol||(core.Symbol=LIBRARY?{}:global.Symbol||{});"_"==e.charAt(0)||e in r||defineProperty(r,e,{value:wksExt.f(e)})};
233
- },{"./_core":49,"./_global":59,"./_library":75,"./_object-dp":81,"./_wks-ext":114}],114:[function(require,module,exports){
234
- exports.f=require("./_wks");
235
- },{"./_wks":115}],115:[function(require,module,exports){
236
- var store=require("./_shared")("wks"),uid=require("./_uid"),Symbol=require("./_global").Symbol,USE_SYMBOL="function"==typeof Symbol,$exports=module.exports=function(o){return store[o]||(store[o]=USE_SYMBOL&&Symbol[o]||(USE_SYMBOL?Symbol:uid)("Symbol."+o))};$exports.store=store;
237
- },{"./_global":59,"./_shared":102,"./_uid":112}],116:[function(require,module,exports){
238
- var classof=require("./_classof"),ITERATOR=require("./_wks")("iterator"),Iterators=require("./_iterators");module.exports=require("./_core").getIteratorMethod=function(r){if(void 0!=r)return r[ITERATOR]||r["@@iterator"]||Iterators[classof(r)]};
239
- },{"./_classof":47,"./_core":49,"./_iterators":74,"./_wks":115}],117:[function(require,module,exports){
240
- var anObject=require("./_an-object"),get=require("./core.get-iterator-method");module.exports=require("./_core").getIterator=function(e){var r=get(e);if("function"!=typeof r)throw TypeError(e+" is not iterable!");return anObject(r.call(e))};
241
- },{"./_an-object":45,"./_core":49,"./core.get-iterator-method":116}],118:[function(require,module,exports){
242
- var classof=require("./_classof"),ITERATOR=require("./_wks")("iterator"),Iterators=require("./_iterators");module.exports=require("./_core").isIterable=function(r){var e=Object(r);return void 0!==e[ITERATOR]||"@@iterator"in e||Iterators.hasOwnProperty(classof(e))};
243
- },{"./_classof":47,"./_core":49,"./_iterators":74,"./_wks":115}],119:[function(require,module,exports){
244
- "use strict";var addToUnscopables=require("./_add-to-unscopables"),step=require("./_iter-step"),Iterators=require("./_iterators"),toIObject=require("./_to-iobject");module.exports=require("./_iter-define")(Array,"Array",function(e,t){this._t=toIObject(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,s=this._i++;return!e||s>=e.length?(this._t=void 0,step(1)):"keys"==t?step(0,s):"values"==t?step(0,e[s]):step(0,[s,e[s]])},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");
245
- },{"./_add-to-unscopables":43,"./_iter-define":71,"./_iter-step":73,"./_iterators":74,"./_to-iobject":108}],120:[function(require,module,exports){
246
- var $export=require("./_export");$export($export.S+$export.F,"Object",{assign:require("./_object-assign")});
247
- },{"./_export":56,"./_object-assign":79}],121:[function(require,module,exports){
248
- var $export=require("./_export");$export($export.S,"Object",{create:require("./_object-create")});
249
- },{"./_export":56,"./_object-create":80}],122:[function(require,module,exports){
250
- var $export=require("./_export");$export($export.S+$export.F*!require("./_descriptors"),"Object",{defineProperty:require("./_object-dp").f});
251
- },{"./_descriptors":52,"./_export":56,"./_object-dp":81}],123:[function(require,module,exports){
252
- var toObject=require("./_to-object"),$getPrototypeOf=require("./_object-gpo");require("./_object-sap")("getPrototypeOf",function(){return function(t){return $getPrototypeOf(toObject(t))}});
253
- },{"./_object-gpo":87,"./_object-sap":91,"./_to-object":110}],124:[function(require,module,exports){
254
- var toObject=require("./_to-object"),$keys=require("./_object-keys");require("./_object-sap")("keys",function(){return function(e){return $keys(toObject(e))}});
255
- },{"./_object-keys":89,"./_object-sap":91,"./_to-object":110}],125:[function(require,module,exports){
256
- var $export=require("./_export");$export($export.S,"Object",{setPrototypeOf:require("./_set-proto").set});
257
- },{"./_export":56,"./_set-proto":98}],126:[function(require,module,exports){
258
- arguments[4][27][0].apply(exports,arguments)
259
- },{"dup":27}],127:[function(require,module,exports){
260
- "use strict";var LIBRARY=require("./_library"),global=require("./_global"),ctx=require("./_ctx"),classof=require("./_classof"),$export=require("./_export"),isObject=require("./_is-object"),aFunction=require("./_a-function"),anInstance=require("./_an-instance"),forOf=require("./_for-of"),speciesConstructor=require("./_species-constructor"),task=require("./_task").set,microtask=require("./_microtask")(),newPromiseCapabilityModule=require("./_new-promise-capability"),perform=require("./_perform"),promiseResolve=require("./_promise-resolve"),PROMISE="Promise",TypeError=global.TypeError,process=global.process,$Promise=global[PROMISE],isNode="process"==classof(process),empty=function(){},Internal,newGenericPromiseCapability,OwnPromiseCapability,Wrapper,newPromiseCapability=newGenericPromiseCapability=newPromiseCapabilityModule.f,USE_NATIVE=!!function(){try{var e=$Promise.resolve(1),r=(e.constructor={})[require("./_wks")("species")]=function(e){e(empty,empty)};return(isNode||"function"==typeof PromiseRejectionEvent)&&e.then(empty)instanceof r}catch(e){}}(),isThenable=function(e){var r;return!(!isObject(e)||"function"!=typeof(r=e.then))&&r},notify=function(e,r){if(!e._n){e._n=!0;var i=e._c;microtask(function(){for(var t=e._v,o=1==e._s,n=0;i.length>n;)!function(r){var i,n,s=o?r.ok:r.fail,a=r.resolve,c=r.reject,l=r.domain;try{s?(o||(2==e._h&&onHandleUnhandled(e),e._h=1),!0===s?i=t:(l&&l.enter(),i=s(t),l&&l.exit()),i===r.promise?c(TypeError("Promise-chain cycle")):(n=isThenable(i))?n.call(i,a,c):a(i)):c(t)}catch(e){c(e)}}(i[n++]);e._c=[],e._n=!1,r&&!e._h&&onUnhandled(e)})}},onUnhandled=function(e){task.call(global,function(){var r,i,t,o=e._v,n=isUnhandled(e);if(n&&(r=perform(function(){isNode?process.emit("unhandledRejection",o,e):(i=global.onunhandledrejection)?i({promise:e,reason:o}):(t=global.console)&&t.error&&t.error("Unhandled promise rejection",o)}),e._h=isNode||isUnhandled(e)?2:1),e._a=void 0,n&&r.e)throw r.v})},isUnhandled=function(e){if(1==e._h)return!1;for(var r,i=e._a||e._c,t=0;i.length>t;)if(r=i[t++],r.fail||!isUnhandled(r.promise))return!1;return!0},onHandleUnhandled=function(e){task.call(global,function(){var r;isNode?process.emit("rejectionHandled",e):(r=global.onrejectionhandled)&&r({promise:e,reason:e._v})})},$reject=function(e){var r=this;r._d||(r._d=!0,r=r._w||r,r._v=e,r._s=2,r._a||(r._a=r._c.slice()),notify(r,!0))},$resolve=function(e){var r,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw TypeError("Promise can't be resolved itself");(r=isThenable(e))?microtask(function(){var t={_w:i,_d:!1};try{r.call(e,ctx($resolve,t,1),ctx($reject,t,1))}catch(e){$reject.call(t,e)}}):(i._v=e,i._s=1,notify(i,!1))}catch(e){$reject.call({_w:i,_d:!1},e)}}};USE_NATIVE||($Promise=function(e){anInstance(this,$Promise,PROMISE,"_h"),aFunction(e),Internal.call(this);try{e(ctx($resolve,this,1),ctx($reject,this,1))}catch(e){$reject.call(this,e)}},Internal=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Internal.prototype=require("./_redefine-all")($Promise.prototype,{then:function(e,r){var i=newPromiseCapability(speciesConstructor(this,$Promise));return i.ok="function"!=typeof e||e,i.fail="function"==typeof r&&r,i.domain=isNode?process.domain:void 0,this._c.push(i),this._a&&this._a.push(i),this._s&&notify(this,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal;this.promise=e,this.resolve=ctx($resolve,e,1),this.reject=ctx($reject,e,1)},newPromiseCapabilityModule.f=newPromiseCapability=function(e){return e===$Promise||e===Wrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$export($export.G+$export.W+$export.F*!USE_NATIVE,{Promise:$Promise}),require("./_set-to-string-tag")($Promise,PROMISE),require("./_set-species")(PROMISE),Wrapper=require("./_core")[PROMISE],$export($export.S+$export.F*!USE_NATIVE,PROMISE,{reject:function(e){var r=newPromiseCapability(this);return(0,r.reject)(e),r.promise}}),$export($export.S+$export.F*(LIBRARY||!USE_NATIVE),PROMISE,{resolve:function(e){return promiseResolve(LIBRARY&&this===Wrapper?$Promise:this,e)}}),$export($export.S+$export.F*!(USE_NATIVE&&require("./_iter-detect")(function(e){$Promise.all(e).catch(empty)})),PROMISE,{all:function(e){var r=this,i=newPromiseCapability(r),t=i.resolve,o=i.reject,n=perform(function(){var i=[],n=0,s=1;forOf(e,!1,function(e){var a=n++,c=!1;i.push(void 0),s++,r.resolve(e).then(function(e){c||(c=!0,i[a]=e,--s||t(i))},o)}),--s||t(i)});return n.e&&o(n.v),i.promise},race:function(e){var r=this,i=newPromiseCapability(r),t=i.reject,o=perform(function(){forOf(e,!1,function(e){r.resolve(e).then(i.resolve,t)})});return o.e&&t(o.v),i.promise}});
261
- },{"./_a-function":42,"./_an-instance":44,"./_classof":47,"./_core":49,"./_ctx":50,"./_export":56,"./_for-of":58,"./_global":59,"./_is-object":68,"./_iter-detect":72,"./_library":75,"./_microtask":77,"./_new-promise-capability":78,"./_perform":93,"./_promise-resolve":94,"./_redefine-all":96,"./_set-species":99,"./_set-to-string-tag":100,"./_species-constructor":103,"./_task":105,"./_wks":115}],128:[function(require,module,exports){
262
- "use strict";var $at=require("./_string-at")(!0);require("./_iter-define")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,i=this._t,e=this._i;return e>=i.length?{value:void 0,done:!0}:(t=$at(i,e),this._i+=t.length,{value:t,done:!1})});
263
- },{"./_iter-define":71,"./_string-at":104}],129:[function(require,module,exports){
264
- "use strict";var global=require("./_global"),has=require("./_has"),DESCRIPTORS=require("./_descriptors"),$export=require("./_export"),redefine=require("./_redefine"),META=require("./_meta").KEY,$fails=require("./_fails"),shared=require("./_shared"),setToStringTag=require("./_set-to-string-tag"),uid=require("./_uid"),wks=require("./_wks"),wksExt=require("./_wks-ext"),wksDefine=require("./_wks-define"),enumKeys=require("./_enum-keys"),isArray=require("./_is-array"),anObject=require("./_an-object"),toIObject=require("./_to-iobject"),toPrimitive=require("./_to-primitive"),createDesc=require("./_property-desc"),_create=require("./_object-create"),gOPNExt=require("./_object-gopn-ext"),$GOPD=require("./_object-gopd"),$DP=require("./_object-dp"),$keys=require("./_object-keys"),gOPD=$GOPD.f,dP=$DP.f,gOPN=gOPNExt.f,$Symbol=global.Symbol,$JSON=global.JSON,_stringify=$JSON&&$JSON.stringify,PROTOTYPE="prototype",HIDDEN=wks("_hidden"),TO_PRIMITIVE=wks("toPrimitive"),isEnum={}.propertyIsEnumerable,SymbolRegistry=shared("symbol-registry"),AllSymbols=shared("symbols"),OPSymbols=shared("op-symbols"),ObjectProto=Object[PROTOTYPE],USE_NATIVE="function"==typeof $Symbol,QObject=global.QObject,setter=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,setSymbolDesc=DESCRIPTORS&&$fails(function(){return 7!=_create(dP({},"a",{get:function(){return dP(this,"a",{value:7}).a}})).a})?function(e,r,t){var o=gOPD(ObjectProto,r);o&&delete ObjectProto[r],dP(e,r,t),o&&e!==ObjectProto&&dP(ObjectProto,r,o)}:dP,wrap=function(e){var r=AllSymbols[e]=_create($Symbol[PROTOTYPE]);return r._k=e,r},isSymbol=USE_NATIVE&&"symbol"==typeof $Symbol.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof $Symbol},$defineProperty=function(e,r,t){return e===ObjectProto&&$defineProperty(OPSymbols,r,t),anObject(e),r=toPrimitive(r,!0),anObject(t),has(AllSymbols,r)?(t.enumerable?(has(e,HIDDEN)&&e[HIDDEN][r]&&(e[HIDDEN][r]=!1),t=_create(t,{enumerable:createDesc(0,!1)})):(has(e,HIDDEN)||dP(e,HIDDEN,createDesc(1,{})),e[HIDDEN][r]=!0),setSymbolDesc(e,r,t)):dP(e,r,t)},$defineProperties=function(e,r){anObject(e);for(var t,o=enumKeys(r=toIObject(r)),i=0,s=o.length;s>i;)$defineProperty(e,t=o[i++],r[t]);return e},$create=function(e,r){return void 0===r?_create(e):$defineProperties(_create(e),r)},$propertyIsEnumerable=function(e){var r=isEnum.call(this,e=toPrimitive(e,!0));return!(this===ObjectProto&&has(AllSymbols,e)&&!has(OPSymbols,e))&&(!(r||!has(this,e)||!has(AllSymbols,e)||has(this,HIDDEN)&&this[HIDDEN][e])||r)},$getOwnPropertyDescriptor=function(e,r){if(e=toIObject(e),r=toPrimitive(r,!0),e!==ObjectProto||!has(AllSymbols,r)||has(OPSymbols,r)){var t=gOPD(e,r);return!t||!has(AllSymbols,r)||has(e,HIDDEN)&&e[HIDDEN][r]||(t.enumerable=!0),t}},$getOwnPropertyNames=function(e){for(var r,t=gOPN(toIObject(e)),o=[],i=0;t.length>i;)has(AllSymbols,r=t[i++])||r==HIDDEN||r==META||o.push(r);return o},$getOwnPropertySymbols=function(e){for(var r,t=e===ObjectProto,o=gOPN(t?OPSymbols:toIObject(e)),i=[],s=0;o.length>s;)!has(AllSymbols,r=o[s++])||t&&!has(ObjectProto,r)||i.push(AllSymbols[r]);return i};USE_NATIVE||($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor!");var e=uid(arguments.length>0?arguments[0]:void 0),r=function(t){this===ObjectProto&&r.call(OPSymbols,t),has(this,HIDDEN)&&has(this[HIDDEN],e)&&(this[HIDDEN][e]=!1),setSymbolDesc(this,e,createDesc(1,t))};return DESCRIPTORS&&setter&&setSymbolDesc(ObjectProto,e,{configurable:!0,set:r}),wrap(e)},redefine($Symbol[PROTOTYPE],"toString",function(){return this._k}),$GOPD.f=$getOwnPropertyDescriptor,$DP.f=$defineProperty,require("./_object-gopn").f=gOPNExt.f=$getOwnPropertyNames,require("./_object-pie").f=$propertyIsEnumerable,require("./_object-gops").f=$getOwnPropertySymbols,DESCRIPTORS&&!require("./_library")&&redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,!0),wksExt.f=function(e){return wrap(wks(e))}),$export($export.G+$export.W+$export.F*!USE_NATIVE,{Symbol:$Symbol});for(var es6Symbols="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),j=0;es6Symbols.length>j;)wks(es6Symbols[j++]);for(var wellKnownSymbols=$keys(wks.store),k=0;wellKnownSymbols.length>k;)wksDefine(wellKnownSymbols[k++]);$export($export.S+$export.F*!USE_NATIVE,"Symbol",{for:function(e){return has(SymbolRegistry,e+="")?SymbolRegistry[e]:SymbolRegistry[e]=$Symbol(e)},keyFor:function(e){if(!isSymbol(e))throw TypeError(e+" is not a symbol!");for(var r in SymbolRegistry)if(SymbolRegistry[r]===e)return r},useSetter:function(){setter=!0},useSimple:function(){setter=!1}}),$export($export.S+$export.F*!USE_NATIVE,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),$JSON&&$export($export.S+$export.F*(!USE_NATIVE||$fails(function(){var e=$Symbol();return"[null]"!=_stringify([e])||"{}"!=_stringify({a:e})||"{}"!=_stringify(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!isSymbol(e)){for(var r,t,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);return r=o[1],"function"==typeof r&&(t=r),!t&&isArray(r)||(r=function(e,r){if(t&&(r=t.call(this,e,r)),!isSymbol(r))return r}),o[1]=r,_stringify.apply($JSON,o)}}}),$Symbol[PROTOTYPE][TO_PRIMITIVE]||require("./_hide")($Symbol[PROTOTYPE],TO_PRIMITIVE,$Symbol[PROTOTYPE].valueOf),setToStringTag($Symbol,"Symbol"),setToStringTag(Math,"Math",!0),setToStringTag(global.JSON,"JSON",!0);
265
- },{"./_an-object":45,"./_descriptors":52,"./_enum-keys":55,"./_export":56,"./_fails":57,"./_global":59,"./_has":60,"./_hide":61,"./_is-array":67,"./_library":75,"./_meta":76,"./_object-create":80,"./_object-dp":81,"./_object-gopd":83,"./_object-gopn":85,"./_object-gopn-ext":84,"./_object-gops":86,"./_object-keys":89,"./_object-pie":90,"./_property-desc":95,"./_redefine":97,"./_set-to-string-tag":100,"./_shared":102,"./_to-iobject":108,"./_to-primitive":111,"./_uid":112,"./_wks":115,"./_wks-define":113,"./_wks-ext":114}],130:[function(require,module,exports){
266
- var $export=require("./_export"),$entries=require("./_object-to-array")(!0);$export($export.S,"Object",{entries:function(e){return $entries(e)}});
267
- },{"./_export":56,"./_object-to-array":92}],131:[function(require,module,exports){
268
- "use strict";var $export=require("./_export"),core=require("./_core"),global=require("./_global"),speciesConstructor=require("./_species-constructor"),promiseResolve=require("./_promise-resolve");$export($export.P+$export.R,"Promise",{finally:function(e){var r=speciesConstructor(this,core.Promise||global.Promise),o="function"==typeof e;return this.then(o?function(o){return promiseResolve(r,e()).then(function(){return o})}:e,o?function(o){return promiseResolve(r,e()).then(function(){throw o})}:e)}});
269
- },{"./_core":49,"./_export":56,"./_global":59,"./_promise-resolve":94,"./_species-constructor":103}],132:[function(require,module,exports){
270
- "use strict";var $export=require("./_export"),newPromiseCapability=require("./_new-promise-capability"),perform=require("./_perform");$export($export.S,"Promise",{try:function(r){var e=newPromiseCapability.f(this),i=perform(r);return(i.e?e.reject:e.resolve)(i.v),e.promise}});
271
- },{"./_export":56,"./_new-promise-capability":78,"./_perform":93}],133:[function(require,module,exports){
272
- require("./_wks-define")("asyncIterator");
273
- },{"./_wks-define":113}],134:[function(require,module,exports){
274
- require("./_wks-define")("observable");
275
- },{"./_wks-define":113}],135:[function(require,module,exports){
276
- require("./es6.array.iterator");for(var global=require("./_global"),hide=require("./_hide"),Iterators=require("./_iterators"),TO_STRING_TAG=require("./_wks")("toStringTag"),DOMIterables="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),i=0;i<DOMIterables.length;i++){var NAME=DOMIterables[i],Collection=global[NAME],proto=Collection&&Collection.prototype;proto&&!proto[TO_STRING_TAG]&&hide(proto,TO_STRING_TAG,NAME),Iterators[NAME]=Iterators.Array}
277
- },{"./_global":59,"./_hide":61,"./_iterators":74,"./_wks":115,"./es6.array.iterator":119}],136:[function(require,module,exports){
278
- function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isUndefined(e){return void 0===e}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(e){if(!isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},EventEmitter.prototype.emit=function(e){var t,i,n,s,r,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i=this._events[e],isUndefined(i))return!1;if(isFunction(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),i.apply(this,s)}else if(isObject(i))for(s=Array.prototype.slice.call(arguments,1),o=i.slice(),n=o.length,r=0;r<n;r++)o[r].apply(this,s);return!0},EventEmitter.prototype.addListener=function(e,t){var i;if(!isFunction(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,isFunction(t.listener)?t.listener:t),this._events[e]?isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,isObject(this._events[e])&&!this._events[e].warned&&(i=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(e,t){function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}if(!isFunction(t))throw TypeError("listener must be a function");var n=!1;return i.listener=t,this.on(e,i),this},EventEmitter.prototype.removeListener=function(e,t){var i,n,s,r;if(!isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],s=i.length,n=-1,i===t||isFunction(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(isObject(i)){for(r=s;r-- >0;)if(i[r]===t||i[r].listener&&i[r].listener===t){n=r;break}if(n<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],isFunction(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},EventEmitter.prototype.listeners=function(e){return this._events&&this._events[e]?isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},EventEmitter.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(isFunction(t))return 1;if(t)return t.length}return 0},EventEmitter.listenerCount=function(e,t){return e.listenerCount(t)};
279
- },{}],137:[function(require,module,exports){
280
- function stringify(r,e,t){decirc(r,"",[],void 0);var i;for(i=0===replacerStack.length?JSON.stringify(r,e,t):JSON.stringify(r,replaceGetterValues(e),t);0!==arr.length;){var c=arr.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}return i}function decirc(r,e,t,i){var c;if("object"==typeof r&&null!==r){for(c=0;c<t.length;c++)if(t[c]===r){var n=Object.getOwnPropertyDescriptor(i,e);return void(void 0!==n.get?n.configurable?(Object.defineProperty(i,e,{value:"[Circular]"}),arr.push([i,e,r,n])):replacerStack.push([r,e]):(i[e]="[Circular]",arr.push([i,e,r])))}if(t.push(r),Array.isArray(r))for(c=0;c<r.length;c++)decirc(r[c],c,t,r);else{var a=Object.keys(r);for(c=0;c<a.length;c++){var o=a[c];decirc(r[o],o,t,r)}}t.pop()}}function compareFunction(r,e){return r<e?-1:r>e?1:0}function deterministicStringify(r,e,t){var i,c=deterministicDecirc(r,"",[],void 0)||r;for(i=0===replacerStack.length?JSON.stringify(c,e,t):JSON.stringify(c,replaceGetterValues(e),t);0!==arr.length;){var n=arr.pop();4===n.length?Object.defineProperty(n[0],n[1],n[3]):n[0][n[1]]=n[2]}return i}function deterministicDecirc(r,e,t,i){var c;if("object"==typeof r&&null!==r){for(c=0;c<t.length;c++)if(t[c]===r){var n=Object.getOwnPropertyDescriptor(i,e);return void(void 0!==n.get?n.configurable?(Object.defineProperty(i,e,{value:"[Circular]"}),arr.push([i,e,r,n])):replacerStack.push([r,e]):(i[e]="[Circular]",arr.push([i,e,r])))}if("function"==typeof r.toJSON)return;if(t.push(r),Array.isArray(r))for(c=0;c<r.length;c++)deterministicDecirc(r[c],c,t,r);else{var a={},o=Object.keys(r).sort(compareFunction);for(c=0;c<o.length;c++){var f=o[c];deterministicDecirc(r[f],f,t,r),a[f]=r[f]}if(void 0===i)return a;arr.push([i,e,r]),i[e]=a}t.pop()}}function replaceGetterValues(r){return r=void 0!==r?r:function(r,e){return e},function(e,t){if(replacerStack.length>0)for(var i=0;i<replacerStack.length;i++){var c=replacerStack[i];if(c[1]===e&&c[0]===t){t="[Circular]",replacerStack.splice(i,1);break}}return r.call(this,e,t)}}module.exports=stringify,stringify.default=stringify,stringify.stable=deterministicStringify,stringify.stableStringify=deterministicStringify;var arr=[],replacerStack=[];
281
- },{}],138:[function(require,module,exports){
282
- 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),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
283
- },{}],139:[function(require,module,exports){
284
- var toString={}.toString;module.exports=Array.isArray||function(r){return"[object Array]"==toString.call(r)};
285
- },{}],140:[function(require,module,exports){
286
- 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 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(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;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};
287
- },{}],141:[function(require,module,exports){
288
- (function (global){
289
- !function(e){function o(e){throw new RangeError(T[e])}function n(e,o){for(var n=e.length,t=[];n--;)t[n]=o(e[n]);return t}function t(e,o){var t=e.split("@"),r="";return t.length>1&&(r=t[0]+"@",e=t[1]),e=e.replace(S,"."),r+n(e.split("."),o).join(".")}function r(e){for(var o,n,t=[],r=0,u=e.length;r<u;)o=e.charCodeAt(r++),o>=55296&&o<=56319&&r<u?(n=e.charCodeAt(r++),56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)):t.push(o);return t}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function f(e,o){return e+22+75*(e<26)-((0!=o)<<5)}function c(e,o,n){var t=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;t+=b)e=M(e/L);return M(t+(L+1)*e/(e+m))}function l(e){var n,t,r,f,l,s,d,p,a,h,v=[],g=e.length,w=0,m=I,j=A;for(t=e.lastIndexOf(E),t<0&&(t=0),r=0;r<t;++r)e.charCodeAt(r)>=128&&o("not-basic"),v.push(e.charCodeAt(r));for(f=t>0?t+1:0;f<g;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),p=i(e.charCodeAt(f++)),(p>=b||p>M((x-w)/s))&&o("overflow"),w+=p*s,a=d<=j?y:d>=j+C?C:d-j,!(p<a);d+=b)h=b-a,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,t,u,i,l,s,d,p,a,h,v,g,w,m,j,F=[];for(e=r(e),g=e.length,n=I,t=0,l=A,s=0;s<g;++s)(v=e[s])<128&&F.push(P(v));for(u=i=F.length,i&&F.push(E);u<g;){for(d=x,s=0;s<g;++s)(v=e[s])>=n&&v<d&&(d=v);for(w=u+1,d-n>M((x-t)/w)&&o("overflow"),t+=(d-n)*w,n=d,s=0;s<g;++s)if(v=e[s],v<n&&++t>x&&o("overflow"),v==n){for(p=t,a=b;h=a<=l?y:a>=l+C?C:a-l,!(p<h);a+=b)j=p-h,m=b-h,F.push(P(f(h+j%m,0))),p=M(j/m);F.push(P(f(p,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return F.join("")}function d(e){return t(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function p(e){return t(e,function(e){return O.test(e)?"xn--"+s(e):e})}var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;v.global!==v&&v.window!==v&&v.self!==v||(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:r,encode:u},decode:l,encode:s,toASCII:p,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(a&&h)if(module.exports==a)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(a[w]=g[w]);else e.punycode=g}(this);
290
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
291
-
292
- },{}],142:[function(require,module,exports){
293
- "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)};
294
- },{}],143:[function(require,module,exports){
295
- "use strict";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 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)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
296
- },{}],144:[function(require,module,exports){
297
- "use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
298
- },{"./decode":142,"./encode":143}],145:[function(require,module,exports){
299
- (function (global){
300
- 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"];
301
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
302
-
303
- },{"./lib/request":147,"./lib/response":148,"builtin-status-codes":29,"url":176,"xtend":167}],146:[function(require,module,exports){
304
- (function (global){
305
- 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);var xhr;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;
306
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
307
-
308
- },{}],147:[function(require,module,exports){
309
- (function (process,global,Buffer){
310
- function decideMode(e,t){return capability.fetch&&t?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&e?"arraybuffer":"text"}function statusValid(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}var capability=require("./capability"),inherits=require("inherits"),response=require("./response"),stream=require("readable-stream"),IncomingMessage=response.IncomingMessage,rStates=response.readyStates,ClientRequest=module.exports=function(e){var t=this;stream.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r,o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!capability.abortController)o=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!capability.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}t._mode=decideMode(r,o),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",function(){t._onFinish()})};inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(e,t){var r=this,o=e.toLowerCase();-1===unsafeHeaders.indexOf(o)&&(r._headers[o]={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(){var e=this;e._resetTimers(!1),statusValid(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},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){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},ClientRequest.prototype.end=function(e,t,r){var o=this;"function"==typeof e&&(r=e,e=void 0),stream.Writable.prototype.end.call(o,e,t,r)},ClientRequest.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._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"];
311
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
312
-
313
- },{"./capability":146,"./response":148,"_process":140,"buffer":28,"inherits":149,"readable-stream":164}],148:[function(require,module,exports){
314
- (function (process,global,Buffer){
315
- 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){function a(){i.read().then(function(e){if(!o._destroyed){if(t(e.done),e.done)return void o.push(null);o.push(Buffer.from(e.value)),a()}}).catch(function(e){t(!0),o._destroyed||o.emit("error",e)})}var o=this;if(stream.Readable.call(o),o._mode=s,o.headers={},o.rawHeaders=[],o.trailers={},o.rawTrailers=[],o.on("end",function(){process.nextTick(function(){o.emit("close")})}),"fetch"===s){if(o._fetchResponse=r,o.url=r.url,o.statusCode=r.status,o.statusMessage=r.statusText,r.headers.forEach(function(e,r){o.headers[r.toLowerCase()]=e,o.rawHeaders.push(r,e)}),capability.writableStream){var n=new WritableStream({write:function(e){return t(!1),new Promise(function(r,s){o._destroyed?s():o.push(Buffer.from(e))?r():o._resumeFetch=r})},close:function(){t(!0),o._destroyed||o.push(null)},abort:function(e){t(!0),o._destroyed||o.emit("error",e)}});try{return void r.body.pipeTo(n).catch(function(e){t(!0),o._destroyed||o.emit("error",e)})}catch(e){}}var i=r.body.getReader();a()}else{o._xhr=e,o._pos=0,o.url=e.responseURL,o.statusCode=e.status,o.statusMessage=e.statusText;if(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===o.headers[s]&&(o.headers[s]=[]),o.headers[s].push(r[2])):void 0!==o.headers[s]?o.headers[s]+=", "+r[2]:o.headers[s]=r[2],o.rawHeaders.push(r[1],r[2])}}),o._charset="x-user-defined",!capability.overrideMimeType){var u=o.rawHeaders["mime-type"];if(u){var c=u.match(/;\s*charset=([^;])(;|$)/);c&&(o._charset=c[1].toLowerCase())}o._charset||(o._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){var e=this,r=e._resumeFetch;r&&(e._resumeFetch=null,r())},IncomingMessage.prototype._onXHRProgress=function(e){var r=this,s=r._xhr,t=null;switch(r._mode){case"text":if(t=s.responseText,t.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))};
316
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
317
-
318
- },{"./capability":146,"_process":140,"buffer":28,"inherits":149,"readable-stream":164}],149:[function(require,module,exports){
319
- "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}};
320
- },{}],150:[function(require,module,exports){
321
- "use strict";function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}function createErrorType(e,r,t){function n(e,t,n){return"string"==typeof r?r:r(e,t,n)}t||(t=Error);var o=function(e){function r(r,t,o){return e.call(this,n(r,t,o))||this}return _inheritsLoose(r,e),r}(t);o.prototype.name=t.name,o.prototype.code=e,codes[e]=o}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)}var codes={};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;"string"==typeof r&&startsWith(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";var o;if(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;
322
- },{}],151:[function(require,module,exports){
323
- (function (process){
324
- "use strict";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()}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])}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)}});
325
- }).call(this,require('_process'))
326
-
327
- },{"./_stream_readable":153,"./_stream_writable":155,"_process":140,"inherits":149}],152:[function(require,module,exports){
328
- "use strict";function PassThrough(r){if(!(this instanceof PassThrough))return new PassThrough(r);Transform.call(this,r)}module.exports=PassThrough;var Transform=require("./_stream_transform");require("inherits")(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,o){o(null,r)};
329
- },{"./_stream_transform":154,"inherits":149}],153:[function(require,module,exports){
330
- (function (process,global){
331
- "use strict";function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}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=e._readableState;if(null===t)i.reading=!1,onEofChunk(e,i);else{var d;if(n||(d=chunkInvalid(i,t)),d)errorOrDestroy(e,d);else if(i.objectMode||t&&t.length>0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===Buffer.prototype||(t=_uint8ArrayToBuffer(t)),a)i.endEmitted?errorOrDestroy(e,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(e,i,t,!0);else if(i.ended)errorOrDestroy(e,new ERR_STREAM_PUSH_AFTER_EOF);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?addChunk(e,i,t,!1):maybeReadMore(e,i)):addChunk(e,i,t,!1)}else a||(i.reading=!1,maybeReadMore(e,i))}return!i.ended&&(i.length<i.highWaterMark||0===i.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}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){if(0===t.length)return null;var r;return 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}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}module.exports=Readable;var Duplex;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(){},debugUtil=require("util"),debug;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var 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,StringDecoder,createReadableStreamAsyncIterator,from;require("inherits")(Readable,Stream);var errorOrDestroy=destroyImpl.errorOrDestroy,kProxyEvents=["error","close","destroy","pause","resume"];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,t!==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;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=t.needReadable;debug("need readable",a),(0===t.length||t.length-e<t.highWaterMark)&&(a=!0,debug("length less than watermark",a)),t.ended||t.reading?(a=!1,debug("reading or ended",a)):a&&(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)));var n;return n=e>0?fromList(e,t):null,null===n?(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!==n&&this.emit("data",n),n},Readable.prototype._read=function(e){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(e,t){function r(e,t){debug("onunpipe"),e===l&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,n())}function a(){debug("onend"),e.end()}function n(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",r),l.removeListener("end",a),l.removeListener("end",u),l.removeListener("data",i),c=!0,!b.awaitDrain||e._writableState&&!e._writableState.needDrain||h()}function i(t){debug("ondata");var r=e.write(t);debug("dest.write",r),!1===r&&((1===b.pipesCount&&b.pipes===e||b.pipesCount>1&&-1!==indexOf(b.pipes,e))&&!c&&(debug("false write response, pause",b.awaitDrain),b.awaitDrain++),l.pause())}function d(t){debug("onerror",t),u(),e.removeListener("error",d),0===EElistenerCount(e,"error")&&errorOrDestroy(e,t)}function o(){e.removeListener("finish",s),u()}function s(){debug("onfinish"),e.removeListener("close",o),u()}function u(){debug("unpipe"),l.unpipe(e)}var l=this,b=this._readableState;switch(b.pipesCount){case 0:b.pipes=e;break;case 1:b.pipes=[b.pipes,e];break;default:b.pipes.push(e)}b.pipesCount+=1,debug("pipe count=%d opts=%j",b.pipesCount,t);var f=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr,p=f?a:u;b.endEmitted?process.nextTick(p):l.once("end",p),e.on("unpipe",r);var h=pipeOnDrain(l);e.on("drain",h);var c=!1;return l.on("data",i),prependListener(e,"error",d),e.once("close",o),e.once("finish",s),e.emit("pipe",l),b.flowing||(debug("pipe resume"),l.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;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){if(debug("wrapped data"),r.decoder&&(n=r.decoder.write(n)),(!r.objectMode||null!==n&&void 0!==n)&&(r.objectMode||n&&n.length)){t.push(n)||(a=!0,e.pause())}});for(var n in 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)});
332
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
333
-
334
- },{"../errors":150,"./_stream_duplex":151,"./internal/streams/async_iterator":156,"./internal/streams/buffer_list":157,"./internal/streams/destroy":158,"./internal/streams/from":160,"./internal/streams/state":162,"./internal/streams/stream":163,"_process":140,"buffer":28,"events":136,"inherits":149,"string_decoder/":166,"util":27}],154:[function(require,module,exports){
335
- "use strict";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)}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");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)})};
336
- },{"../errors":150,"./_stream_duplex":151,"inherits":149}],155:[function(require,module,exports){
337
- (function (process,global){
338
- "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)}}function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}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){Duplex=Duplex||require("./_stream_duplex");var t=this instanceof 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}module.exports=Writable;var Duplex;Writable.WritableState=WritableState;var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},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;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){}}();var realHasInstance;"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&&void 0!==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)};
339
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
340
-
341
- },{"../errors":150,"./_stream_duplex":151,"./internal/streams/destroy":158,"./internal/streams/state":162,"./internal/streams/stream":163,"_process":140,"buffer":28,"inherits":149,"util-deprecate":178}],156:[function(require,module,exports){
342
- (function (process){
343
- "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}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(){if(t[kEnded])return void r(createIterResult(void 0,!0));t[kHandlePromise](r,o)},o)}}var _Object$setPrototypeO,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"),AsyncIteratorPrototype=Object.getPrototypeOf(function(){}),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_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}},_defineProperty(_Object$setPrototypeO,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){if(e)return void r(e);t(createIterResult(void 0,!0))})})}),_Object$setPrototypeO),AsyncIteratorPrototype),createReadableStreamAsyncIterator=function(e){var t,r=Object.create(ReadableStreamAsyncIteratorPrototype,(t={},_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;
344
- }).call(this,require('_process'))
345
-
346
- },{"./end-of-stream":159,"_process":140}],157:[function(require,module,exports){
347
- "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}function copyBuffer(e,t,n){Buffer.prototype.copy.call(e,t,n)}var _require=require("buffer"),Buffer=_require.Buffer,_require2=require("util"),inspect=_require2.inspect,custom=inspect&&inspect.custom||"inspect";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}();
348
- },{"buffer":28,"util":27}],158:[function(require,module,exports){
349
- (function (process){
350
- "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};
351
- }).call(this,require('_process'))
352
-
353
- },{"_process":140}],159:[function(require,module,exports){
354
- "use strict";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)}}var ERR_STREAM_PREMATURE_CLOSE=require("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;module.exports=eos;
355
- },{"../../../errors":150}],160:[function(require,module,exports){
356
- module.exports=function(){throw new Error("Readable.from is not available in the browser")};
357
- },{}],161:[function(require,module,exports){
358
- "use strict";function once(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}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=popCallback(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new ERR_MISSING_ARGS("streams");var t,i=r.map(function(e,n){var u=n<r.length-1;return destroyer(e,u,n>0,function(e){t||(t=e),e&&i.forEach(call),u||(i.forEach(call),o(t))})});return r.reduce(pipe)}var eos,_require$codes=require("../../../errors").codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;module.exports=pipeline;
359
- },{"../../../errors":150,"./end-of-stream":159}],162:[function(require,module,exports){
360
- "use strict";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}var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;module.exports={getHighWaterMark:getHighWaterMark};
361
- },{"../../../errors":150}],163:[function(require,module,exports){
362
- module.exports=require("events").EventEmitter;
363
- },{"events":136}],164:[function(require,module,exports){
364
- 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");
365
- },{"./lib/_stream_duplex.js":151,"./lib/_stream_passthrough.js":152,"./lib/_stream_readable.js":153,"./lib/_stream_transform.js":154,"./lib/_stream_writable.js":155,"./lib/internal/streams/end-of-stream.js":159,"./lib/internal/streams/pipeline.js":161}],165:[function(require,module,exports){
366
- function copyProps(f,e){for(var r in f)e[r]=f[r]}function SafeBuffer(f,e,r){return Buffer(f,e,r)}var buffer=require("buffer"),Buffer=buffer.Buffer;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)};
367
- },{"buffer":28}],166:[function(require,module,exports){
368
- "use strict";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){this.encoding=normalizeEncoding(t);var e;switch(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]),n>=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):""}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}};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};
369
- },{"safe-buffer":165}],167:[function(require,module,exports){
370
- 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}module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;
371
- },{}],168:[function(require,module,exports){
372
- module.exports=function(r){return function(u){return"/"===u.url[0]&&(u.url=r+u.url),u}};
373
- },{}],169:[function(require,module,exports){
374
- "use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var r=0,e=new Array(t.length);r<t.length;r++)e[r]=t[r];return e}}function Agent(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(t){Agent.prototype[t]=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return this._defaults.push({fn:t,args:e}),this}}),Agent.prototype._setDefaults=function(t){this._defaults.forEach(function(r){t[r.fn].apply(t,_toConsumableArray(r.args))})},module.exports=Agent;
375
- },{}],170:[function(require,module,exports){
376
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function noop(){}function serialize(e){if(!isObject(e))return e;var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&pushEncodedKeyValuePair(t,r,e[r]);return t.join("&")}function pushEncodedKeyValuePair(e,t,r){if(void 0!==r){if(null===r)return void e.push(encodeURIComponent(t));if(Array.isArray(r))r.forEach(function(r){pushEncodedKeyValuePair(e,t,r)});else if(isObject(r))for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&pushEncodedKeyValuePair(e,"".concat(t,"[").concat(s,"]"),r[s]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}}function parseString(e){for(var t,r,s={},o=e.split("&"),n=0,i=o.length;n<i;++n)t=o[n],r=t.indexOf("="),-1===r?s[decodeURIComponent(t)]="":s[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return s}function parseHeader(e){for(var t,r,s,o,n=e.split(/\r?\n/),i={},a=0,u=n.length;a<u;++a)r=n[a],-1!==(t=r.indexOf(":"))&&(s=r.slice(0,t).toLowerCase(),o=trim(r.slice(t+1)),i[s]=o);return i}function isJSON(e){return/[/+]json($|[^-\w])/.test(e)}function Response(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=parseHeader(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function Request(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new Response(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",t);var s;try{r._isResponseOK(t)||(s=new Error(t.statusText||"Unsuccessful HTTP response"))}catch(e){s=e}s?(s.original=e,s.response=t,s.status=t.status,r.callback(s,t)):r.callback(null,t)})}function del(e,t,r){var s=request("DELETE",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s}var root;"undefined"!=typeof window?root=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),root=void 0):root=self;var Emitter=require("component-emitter"),safeStringify=require("fast-safe-stringify"),RequestBase=require("./request-base"),isObject=require("./is-object"),ResponseBase=require("./response-base"),Agent=require("./agent-base");module.exports=function(e,t){return"function"==typeof t?new exports.Request("GET",e).end(t):1===arguments.length?new exports.Request("GET",e):new exports.Request(e,t)},exports=module.exports;var request=exports;exports.Request=Request,request.getXHR=function(){if(root.XMLHttpRequest&&(!root.location||"file:"!==root.location.protocol||!root.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var trim="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};request.serializeObject=serialize,request.parseString=parseString,request.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},request.serialize={"application/x-www-form-urlencoded":serialize,"application/json":safeStringify},request.parse={"application/x-www-form-urlencoded":parseString,"application/json":JSON.parse},ResponseBase(Response.prototype),Response.prototype._parseBody=function(e){var t=request.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&isJSON(this.type)&&(t=request.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},Response.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,s="cannot ".concat(t," ").concat(r," (").concat(this.status,")"),o=new Error(s);return o.status=this.status,o.method=t,o.url=r,o},request.Response=Response,Emitter(Request.prototype),RequestBase(Request.prototype),Request.prototype.type=function(e){return this.set("Content-Type",request.types[e]||e),this},Request.prototype.accept=function(e){return this.set("Accept",request.types[e]||e),this},Request.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===_typeof(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var s=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,s)},Request.prototype.query=function(e){return"string"!=typeof e&&(e=serialize(e)),e&&this._query.push(e),this},Request.prototype.attach=function(e,t,r){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},Request.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},Request.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},Request.prototype.buffer=Request.prototype.ca,Request.prototype.ca=Request.prototype.agent,Request.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},Request.prototype.pipe=Request.prototype.write,Request.prototype._isHost=function(e){return e&&"object"===_typeof(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},Request.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||noop,this._finalizeQueryString(),this._end()},Request.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},Request.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=request.getXHR();var t=this.xhr,r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===r){var s;try{s=t.status}catch(e){s=0}if(!s){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var s=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(e._uploadTimeoutTimer)),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.addEventListener("progress",s.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",s.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],n=this._serializer||request.serialize[o?o.split(";")[0]:""];!n&&isJSON(o)&&(n=request.serialize["application/json"]),n&&(r=n(r))}for(var i in this.header)null!==this.header[i]&&Object.prototype.hasOwnProperty.call(this.header,i)&&t.setRequestHeader(i,this.header[i]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===r?null:r)},request.agent=function(){return new Agent},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){Agent.prototype[e.toLowerCase()]=function(t,r){var s=new request.Request(e,t);return this._setDefaults(s),r&&s.end(r),s}}),Agent.prototype.del=Agent.prototype.delete,request.get=function(e,t,r){var s=request("GET",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},request.head=function(e,t,r){var s=request("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},request.options=function(e,t,r){var s=request("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.del=del,request.delete=del,request.patch=function(e,t,r){var s=request("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.post=function(e,t,r){var s=request("POST",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.put=function(e,t,r){var s=request("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s};
377
- },{"./agent-base":169,"./is-object":171,"./request-base":172,"./response-base":173,"component-emitter":175,"fast-safe-stringify":137}],171:[function(require,module,exports){
378
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function isObject(t){return null!==t&&"object"===_typeof(t)}module.exports=isObject;
379
- },{}],172:[function(require,module,exports){
380
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function RequestBase(t){if(t)return mixin(t)}function mixin(t){for(var e in RequestBase.prototype)Object.prototype.hasOwnProperty.call(RequestBase.prototype,e)&&(t[e]=RequestBase.prototype[e]);return t}var isObject=require("./is-object");module.exports=RequestBase,RequestBase.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},RequestBase.prototype.parse=function(t){return this._parser=t,this},RequestBase.prototype.responseType=function(t){return this._responseType=t,this},RequestBase.prototype.serialize=function(t){return this._serializer=t,this},RequestBase.prototype.timeout=function(t){if(!t||"object"!==_typeof(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},RequestBase.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var ERROR_CODES=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];RequestBase.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var s=this._retryCallback(t,e);if(!0===s)return!0;if(!1===s)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&ERROR_CODES.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},RequestBase.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},RequestBase.prototype.then=function(t,e){var s=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){r.on("abort",function(){var t=new Error("Aborted");t.code="ABORTED",t.status=s.status,t.method=s.method,t.url=s.url,e(t)}),r.end(function(s,r){s?e(s):t(r)})})}return this._fullfilledPromise.then(t,e)},RequestBase.prototype.catch=function(t){return this.then(void 0,t)},RequestBase.prototype.use=function(t){return t(this),this},RequestBase.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},RequestBase.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},RequestBase.prototype.get=function(t){return this._header[t.toLowerCase()]},RequestBase.prototype.getHeader=RequestBase.prototype.get,RequestBase.prototype.set=function(t,e){if(isObject(t)){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.set(s,t[s]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},RequestBase.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},RequestBase.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(isObject(t)){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.field(s,t[s]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},RequestBase.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},RequestBase.prototype._auth=function(t,e,s,r){switch(s.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},RequestBase.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},RequestBase.prototype.redirects=function(t){return this._maxRedirects=t,this},RequestBase.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},RequestBase.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},RequestBase.prototype.send=function(t){var e=isObject(t),s=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&isObject(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(s||this.type("form"),s=this._header["content-type"],this._data="application/x-www-form-urlencoded"===s?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(s||this.type("json"),this)},RequestBase.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},RequestBase.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var s=this.url.slice(e+1).split("&");"function"==typeof this._sort?s.sort(this._sort):s.sort(),this.url=this.url.slice(0,e)+"?"+s.join("&")}}},RequestBase.prototype._appendQueryString=function(){console.warn("Unsupported")},RequestBase.prototype._timeoutError=function(t,e,s){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=s,this.timedout=!0,this.abort(),this.callback(r)}},RequestBase.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};
381
- },{"./is-object":171}],173:[function(require,module,exports){
382
- "use strict";function ResponseBase(t){if(t)return mixin(t)}function mixin(t){for(var e in ResponseBase.prototype)Object.prototype.hasOwnProperty.call(ResponseBase.prototype,e)&&(t[e]=ResponseBase.prototype[e]);return t}var utils=require("./utils");module.exports=ResponseBase,ResponseBase.prototype.get=function(t){return this.header[t.toLowerCase()]},ResponseBase.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=utils.type(e);var s=utils.params(e);for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(this[r]=s[r]);this.links={};try{t.link&&(this.links=utils.parseLinks(t.link))}catch(t){}},ResponseBase.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t};
383
- },{"./utils":174}],174:[function(require,module,exports){
384
- "use strict";exports.type=function(e){return e.split(/ *; */).shift()},exports.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},exports.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},exports.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e};
385
- },{}],175:[function(require,module,exports){
386
- function Emitter(t){if(t)return mixin(t)}function mixin(t){for(var e in Emitter.prototype)t[e]=Emitter.prototype[e];return t}"undefined"!=typeof module&&(module.exports=Emitter),Emitter.prototype.on=Emitter.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Emitter.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,s=0;s<i.length;s++)if((r=i[s])===e||r.fn===e){i.splice(s,1);break}return 0===i.length&&delete this._callbacks["$"+t],this},Emitter.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(i){i=i.slice(0);for(var r=0,s=i.length;r<s;++r)i[r].apply(this,e)}return this},Emitter.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Emitter.prototype.hasListeners=function(t){return!!this.listeners(t).length};
387
- },{}],176:[function(require,module,exports){
388
- "use strict";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}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}var punycode=require("punycode"),util=require("./util");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");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),o=/\\/g;a[0]=a[0].replace(o,"/"),t=a.join(r);var n=t;if(n=n.trim(),!e&&1===t.split("#").length){var i=simplePathPattern.exec(n);if(i)return this.path=n,this.href=n,this.pathname=i[1],i[2]?(this.search=i[2],this.query=s?querystring.parse(this.search.substr(1)):this.search.substr(1)):s&&(this.search="",this.query={}),this}var l=protocolPattern.exec(n);if(l){l=l[0];var u=l.toLowerCase();this.protocol=u,n=n.substr(l.length)}if(e||l||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===n.substr(0,2);!p||l&&hostlessProtocol[l]||(n=n.substr(2),this.slashes=!0)}if(!hostlessProtocol[l]&&(p||l&&!slashedProtocol[l])){for(var c=-1,f=0;f<hostEndingChars.length;f++){var m=n.indexOf(hostEndingChars[f]);-1!==m&&(-1===c||m<c)&&(c=m)}var v,g;g=-1===c?n.lastIndexOf("@"):n.lastIndexOf("@",c),-1!==g&&(v=n.slice(0,g),n=n.slice(g+1),this.auth=decodeURIComponent(v)),c=-1;for(var f=0;f<nonHostChars.length;f++){var m=n.indexOf(nonHostChars[f]);-1!==m&&(-1===c||m<c)&&(c=m)}-1===c&&(c=n.length),this.host=n.slice(0,c),n=n.slice(c),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var P=this.hostname.split(/\./),f=0,d=P.length;f<d;f++){var b=P[f];if(b&&!b.match(hostnamePartPattern)){for(var q="",O=0,j=b.length;O<j;O++)b.charCodeAt(O)>127?q+="x":q+=b[O];if(!q.match(hostnamePartPattern)){var x=P.slice(0,f),U=P.slice(f+1),C=b.match(hostnamePartStart);C&&(x.push(C[1]),U.unshift(C[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=x.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=punycode.toASCII(this.hostname));var A=this.port?":"+this.port:"",w=this.hostname||"";this.host=w+A,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!unsafeProtocol[u])for(var f=0,d=autoEscape.length;f<d;f++){var E=autoEscape[f];if(-1!==n.indexOf(E)){var I=encodeURIComponent(E);I===E&&(I=escape(E)),n=n.split(E).join(I)}}var R=n.indexOf("#");-1!==R&&(this.hash=n.substr(R),n=n.slice(0,R));var S=n.indexOf("?");if(-1!==S?(this.search=n.substr(S),this.query=n.substr(S+1),s&&(this.query=querystring.parse(this.query)),n=n.slice(0,S)):s&&(this.search="",this.query={}),n&&(this.pathname=n),slashedProtocol[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var A=this.pathname||"",k=this.search||"";this.path=A+k}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=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),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),o=o.replace("#","%23"),s+r+e+o+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("/")||[],c=t.pathname&&t.pathname.split("/")||[],b=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();var q=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");q&&(e.auth=q.shift(),e.host=e.hostname=q.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 O=d.slice(-1)[0],j=(e.host||t.host||d.length>1)&&("."===O||".."===O)||""===O,x=0,U=d.length;U>=0;U--)O=d[U],"."===O?d.splice(U,1):".."===O?(d.splice(U,1),x++):x&&(d.splice(U,1),x--);if(!y&&!P)for(;x--;x)d.unshift("..");!y||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),j&&"/"!==d.join("/").substr(-1)&&d.push("");var C=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(b){e.hostname=e.host=C?"":d.length?d.shift():"";var q=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");q&&(e.auth=q.shift(),e.host=e.hostname=q.shift())}return y=y||e.host&&d.length,y&&!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],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
389
- },{"./util":177,"punycode":141,"querystring":144}],177:[function(require,module,exports){
390
- "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}};
391
- },{}],178:[function(require,module,exports){
392
- (function (global){
393
- function deprecate(r,e){function o(){if(!t){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}if(config("noDeprecation"))return r;var t=!1;return o}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;
394
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
395
-
396
- },{}]},{},[6])(6)
397
- });
398
-
399
-
1
+ var Particle;(()=>{var e={9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),h=0,l=u>0?a-4:a;for(r=0;r<l;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[h++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),o=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(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 l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.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 h(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 l(e){return h(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(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');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(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);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(o)return n?-1:G(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let 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 I(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function _(e,t,r,n){return K(G(t,e.length-r),e,r,n)}function x(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return K(z(t),e,r,n)}function E(e,t,r,n){return K(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return h(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return l(e)},u.allocUnsafeSlow=function(e){return l(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},u.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}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.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===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),c=this.slice(n,o),h=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==h[e]){i=c[e],a=h[e];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},u.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)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=X[e[n]];return o}function j(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function M(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function B(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return t=+t,r>>>=0,i||B(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||B(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const 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);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),u.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeBigUInt64LE=Q((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeBigInt64LE=Q((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.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);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},u.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&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=u.isBuffer(e)?e:u.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const U={};function D(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=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 z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},584:e=>{e.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"}},1924:(e,t,r)=>{"use strict";var n=r(210),o=r(5559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),o=r(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),h=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);u&&c&&(u(t,"length").configurable&&c(t,"length",{value:1+h(0,e.length-(arguments.length-1))}));return t};var l=function(){return s(n,i,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=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 o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,r)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,a,c;if(s(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=u(e))>0&&a.length>o&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=a.length,c=h,console&&console.warn&&console.warn(c)}return e}function h(){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 l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=h.bind(n);return o.listener=r,n.wrapFn=o,o}function f(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):p(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);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 o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,h=p(u,c);for(r=0;r<c;++r)n(h[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6230:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},7648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),s=[],u=0;u<a;u++)s.push("$"+u);if(o=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,i.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,i.concat(t.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},h=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=r(1405)(),f=r(8185)(),d=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&d?d(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));g["%Error.prototype%"]=m}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&d&&(r=d(o.prototype))}return g[t]=r,r},b={"%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"]},w=r(8612),_=r(7642),x=w.call(Function.call,Array.prototype.concat),S=w.call(Function.apply,Array.prototype.splice),E=w.call(Function.call,String.prototype.replace),A=w.call(Function.call,String.prototype.slice),T=w.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,O=function(e,t){var r,n=e;if(_(b,n)&&(n="%"+(r=b[n])[0]+"%"),_(g,n)){var i=g[n];if(i===p&&(i=v(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,k,(function(e,t,r,o){n[n.length]=r?E(o,R,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=O("%"+n+"%",t),s=i.name,c=i.value,h=!1,l=i.alias;l&&(n=l[0],S(r,x([0,1],l)));for(var f=1,d=!0;f<r.length;f+=1){var p=r[f],y=A(p,0,1),m=A(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new o("property names with quotes must have matching quotes");if("constructor"!==p&&d||(h=!0),_(g,s="%"+(n+="."+p)+"%"))c=g[s];else if(null!=c){if(!(p in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&f+1>=r.length){var v=u(c,p);c=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else d=_(c,p),c=c[p];d&&!h&&(g[s]=c)}}return c}},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,h=-7,l=r?o-1:0,f=r?-1:1,d=e[t+l];for(l+=f,i=d&(1<<-h)-1,d>>=-h,h+=s;h>0;i=256*i+e[t+l],l+=f,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+e[t+l],l+=f,h-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,h=(1<<c)-1,l=h>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=h?(s=0,a=h):a+l>=1?(s=(t*u-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*y}},3300:(e,t,r)=>{"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},4155:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,h=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):h=-1,u.length&&f())}function f(){if(!c){var e=a(l);c=!0;for(var t=u.length;t;){for(s=u,u=[];++h<t;)s&&s[h].run();h=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.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];u.push(new d(e,t)),1!==u.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},4971:function(e,t,r){var n;e=r.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,u=36,c=1,h=26,l=38,f=700,d=72,p=128,y="-",g=/^xn--/,m=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-c,_=Math.floor,x=String.fromCharCode;function S(e){throw new RangeError(b[e])}function E(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+E((e=e.replace(v,".")).split("."),t).join(".")}function T(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function k(e){return E(e,(function(e){var t="";return e>65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)})).join("")}function R(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,r){var n=0;for(e=r?_(e/f):e>>1,e+=_(e/t);e>w*h>>1;n+=u)e=_(e/w);return _(n+(w+1)*e/(e+l))}function I(e){var t,r,n,o,i,a,l,f,g,m,v,b=[],w=e.length,x=0,E=p,A=d;for((r=e.lastIndexOf(y))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&S("not-basic"),b.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<w;){for(i=x,a=1,l=u;o>=w&&S("invalid-input"),((f=(v=e.charCodeAt(o++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||f>_((s-x)/a))&&S("overflow"),x+=f*a,!(f<(g=l<=A?c:l>=A+h?h:l-A));l+=u)a>_(s/(m=u-g))&&S("overflow"),a*=m;A=O(x-i,t=b.length+1,0==i),_(x/t)>s-E&&S("overflow"),E+=_(x/t),x%=t,b.splice(x++,0,E)}return k(b)}function j(e){var t,r,n,o,i,a,l,f,g,m,v,b,w,E,A,k=[];for(b=(e=T(e)).length,t=p,r=0,i=d,a=0;a<b;++a)(v=e[a])<128&&k.push(x(v));for(n=o=k.length,o&&k.push(y);n<b;){for(l=s,a=0;a<b;++a)(v=e[a])>=t&&v<l&&(l=v);for(l-t>_((s-r)/(w=n+1))&&S("overflow"),r+=(l-t)*w,t=l,a=0;a<b;++a)if((v=e[a])<t&&++r>s&&S("overflow"),v==t){for(f=r,g=u;!(f<(m=g<=i?c:g>=i+h?h:g-i));g+=u)A=f-m,E=u-m,k.push(x(R(m+A%E,0))),f=_(A/E);k.push(x(R(f,0))),i=O(r,w,n==o),r=0,++n}++r,++t}return k.join("")}a={version:"1.4.1",ucs2:{decode:T,encode:k},decode:I,encode:j,toASCII:function(e){return A(e,(function(e){return m.test(e)?"xn--"+j(e):e}))},toUnicode:function(e){return A(e,(function(e){return g.test(e)?I(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},129:(e,t,r)=>{"use strict";var n=r(8261),o=r(5235),i=r(5798);e.exports={formats:i,parse:o,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,h=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;h.push(c)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;h.push(s[1])}return s&&h.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:u(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,h=parseInt(c,10);r.parseArrays||""!==c?!isNaN(h)&&s!==c&&String(h)===c&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[])[h]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(h,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var h="string"==typeof e?function(e,t){var r,c={__proto__:null},h=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,f=h.split(t.delimiter,l),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?p="utf-8":"utf8=%26%2310003%3B"===f[r]&&(p="iso-8859-1"),d=r,r=f.length);for(r=0;r<f.length;++r)if(r!==d){var y,g,m=f[r],v=m.indexOf("]="),b=-1===v?m.indexOf("="):v+1;-1===b?(y=t.decoder(m,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(y=t.decoder(m.slice(0,b),a.decoder,p,"key"),g=n.maybeMap(u(m.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=s(g)),m.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(e,r):e,l=r.plainObjects?Object.create(null):{},f=Object.keys(h),d=0;d<f.length;++d){var p=f[d],y=c(p,h[p],r,"string"==typeof e);l=n.merge(l,y,r)}return!0===r.allowSparse?l:n.compact(l)}},8261:(e,t,r)=>{"use strict";var n=r(7478),o=r(2769),i=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,h=function(e,t){c.apply(e,u(t)?t:[t])},l=Date.prototype.toISOString,f=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p={},y=function e(t,r,i,a,s,c,l,f,y,g,m,v,b,w,_,x){for(var S,E=t,A=x,T=0,k=!1;void 0!==(A=A.get(p))&&!k;){var R=A.get(t);if(T+=1,void 0!==R){if(R===T)throw new RangeError("Cyclic object value");k=!0}void 0===A.get(p)&&(T=0)}if("function"==typeof f?E=f(r,E):E instanceof Date?E=m(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?m(e):e}))),null===E){if(s)return l&&!w?l(r,d.encoder,_,"key",v):r;E=""}if("string"==typeof(S=E)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(E))return l?[b(w?r:l(r,d.encoder,_,"key",v))+"="+b(l(E,d.encoder,_,"value",v))]:[b(r)+"="+b(String(E))];var O,I=[];if(void 0===E)return I;if("comma"===i&&u(E))w&&l&&(E=o.maybeMap(E,l)),O=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(f))O=f;else{var j=Object.keys(E);O=y?j.sort(y):j}for(var P=a&&u(E)&&1===E.length?r+"[]":r,L=0;L<O.length;++L){var C=O[L],M="object"==typeof C&&void 0!==C.value?C.value:E[C];if(!c||null!==M){var B=u(E)?"function"==typeof i?i(P,C):P:P+(g?"."+C:"["+C+"]");x.set(t,T);var N=n();N.set(p,x),h(I,e(M,B,i,a,s,c,"comma"===i&&w&&u(E)?null:l,f,y,g,m,v,b,w,_,N))}}return I};e.exports=function(e,t){var r,o=e,c=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=d.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof c.filter?o=(0,c.filter)("",o):u(c.filter)&&(r=c.filter);var l,f=[];if("object"!=typeof o||null===o)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var p=s[l];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===p&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),c.sort&&r.sort(c.sort);for(var m=n(),v=0;v<r.length;++v){var b=r[v];c.skipNulls&&null===o[b]||h(f,y(o[b],b,p,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,m))}var w=f.join(c.delimiter),_=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),w.length>0?_+w:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],h=a[c];"object"==typeof h&&null!==h&&-1===r.indexOf(h)&&(t.push({obj:a,prop:c}),r.push(h))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var h=s.charCodeAt(c);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===n.RFC1738&&(40===h||41===h)?u+=s.charAt(c):h<128?u+=a[h]:h<2048?u+=a[192|h>>6]+a[128|63&h]:h<55296||h>=57344?u+=a[224|h>>12]+a[128|h>>6&63]+a[128|63&h]:(c+=1,h=65536+((1023&h)<<10|1023&s.charCodeAt(c)),u+=a[240|h>>18]+a[128|h>>12&63]+a[128|h>>6&63]+a[128|63&h])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},7478:(e,t,r)=>{"use strict";var n=r(210),o=r(1924),i=r(7470),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),h=o("WeakMap.prototype.set",!0),l=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),p=o("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return f(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(u){if(t)return p(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),h(e,n,o)):u?(t||(t=new u),d(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},7470:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,h=s&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,E=Array.prototype.join,A=Array.prototype.slice,T=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,j="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,L=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-T(-e):T(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var M=r(7165),B=M.custom,N=F(B)?B:null;function $(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function U(e){return b.call(String(e),/"/g,"&quot;")}function D(e){return!("[object Array]"!==V(e)||j&&"object"==typeof e&&j in e)}function q(e){return!("[object RegExp]"!==V(e)||j&&"object"==typeof e&&j in e)}function F(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var s=r||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return y?C(t,w):w}if("bigint"==typeof t){var x=String(t)+"n";return y?C(t,x):x}var T=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=T&&T>0&&"object"==typeof t)return D(t)?"[Array]":"[Object]";var R=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ")}return{base:r,prev:E.call(Array(t+1),r)}}(s,n);if(void 0===o)o=[];else if(G(o,t)>=0)return"[Circular]";function B(t,r,i){if(r&&(o=A.call(o)).push(r),i){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,n+1,o)}return e(t,s,n+1,o)}if("function"==typeof t&&!q(t)){var H=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),K=Z(t,B);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(K.length>0?" { "+E.call(K,", ")+" }":"")}if(F(t)){var ee=I?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||I?ee:Y(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+_.call(String(t.nodeName)),re=t.attributes||[],ne=0;ne<re.length;ne++)te+=" "+re[ne].name+"="+$(U(re[ne].value),"double",s);return te+=">",t.childNodes&&t.childNodes.length&&(te+="..."),te+="</"+_.call(String(t.nodeName))+">"}if(D(t)){if(0===t.length)return"[]";var oe=Z(t,B);return R&&!function(e){for(var t=0;t<e.length;t++)if(G(e[t],"\n")>=0)return!1;return!0}(oe)?"["+Q(oe,R)+"]":"[ "+E.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||j&&"object"==typeof e&&j in e)}(t)){var ie=Z(t,B);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ie,", ")+" }":"{ ["+String(t)+"] "+E.call(S.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"==typeof t&&u){if(N&&"function"==typeof t[N]&&M)return M(t,{depth:T-n});if("symbol"!==u&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return a&&a.call(t,(function(e,r){ae.push(B(r,t,!0)+" => "+B(e,t))})),X("Map",i.call(t),ae,R)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return h&&h.call(t,(function(e){se.push(B(e,t))})),X("Set",c.call(t),se,R)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==V(e)||j&&"object"==typeof e&&j in e)}(t))return Y(B(Number(t)));if(function(e){if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}(t))return Y(B(k.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||j&&"object"==typeof e&&j in e)}(t))return Y(p.call(t));if(function(e){return!("[object String]"!==V(e)||j&&"object"==typeof e&&j in e)}(t))return Y(B(String(t)));if(!function(e){return!("[object Date]"!==V(e)||j&&"object"==typeof e&&j in e)}(t)&&!q(t)){var ue=Z(t,B),ce=L?L(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",le=!ce&&j&&Object(t)===t&&j in t?v.call(V(t),8,-1):he?"Object":"",fe=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||he?"["+E.call(S.call([],le||[],he||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":R?fe+"{"+Q(ue,R)+"}":fe+"{ "+E.call(ue,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return H.call(e,t)}function V(e){return y.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(v.call(e,0,t.maxStringLength),t)+n}return $(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Y(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):E.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=D(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=W(e,o)?t(e[o],e):""}var i,a="function"==typeof R?R(e):[];if(I){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var u in e)W(e,u)&&(r&&String(Number(u))===u&&u<e.length||I&&i["$"+u]instanceof Symbol||(x.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof R)for(var c=0;c<a.length;c++)P.call(e,a[c])&&n.push("["+t(a[c])+"]: "+t(e[a[c]],e));return n}},8501:(e,t,r)=>{var n=r(1989),o=r(5676),i=r(8234),a=r(584),s=r(8575),u=t;u.request=function(e,t){e="string"==typeof e?s.parse(e):i(e);var o=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,u=e.hostname||e.host,c=e.port,h=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new n(e);return t&&l.on("response",t),l},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.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"]},8725:(e,t,r)=>{var n;function o(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||i("arraybuffer"),t.msstream=!t.fetch&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!o()&&a(o().overrideMimeType),n=null},1989:(e,t,r)=>{var n=r(8764).Buffer,o=r(4155),i=r(8725),a=r(1183),s=r(5676),u=r(925),c=s.IncomingMessage,h=s.readyStates;var l=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.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&&!i.abortController)o=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,o),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(l,u.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(i.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var l=e._xhr=new r.g.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){l.setRequestHeader(e[0],e[1])})),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{l.send(a)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}}}},l.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(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))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},l.prototype.abort=l.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},l.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},l.prototype.flushHeaders=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var f=["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"]},5676:(e,t,r)=>{var n=r(4155),o=r(8764).Buffer,i=r(8725),a=r(1183),s=r(925),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),i.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){u._destroyed?r():u.push(o.from(e))?t():u._resumeFetch=t}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(e){a(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var h=t.body.getReader();!function e(){h.read().then((function(t){u._destroyed||(a(t.done),t.done?u.push(null):(u.push(o.from(t.value)),e()))})).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!i.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var f=l.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,i=null;switch(t._mode){case"text":if((i=n.responseText).length>t._pos){var a=i.substr(t._pos);if("x-user-defined"===t._charset){for(var s=o.alloc(a.length),c=0;c<a.length;c++)s[c]=255&a.charCodeAt(c);t.push(s)}else t.push(a,t._charset);t._pos=i.length}break;case"arraybuffer":if(n.readyState!==u.DONE||!n.response)break;i=n.response,t.push(o.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=n.response,n.readyState!==u.LOADING||!i)break;t.push(o.from(new Uint8Array(i)));break;case"ms-stream":if(i=n.response,n.readyState!==u.LOADING)break;var h=new r.g.MSStreamReader;h.onprogress=function(){h.result.byteLength>t._pos&&(t.push(o.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(i)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},1183:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7303:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var o=function(e){var t,n;function o(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 n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o}(n);o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var o,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},9560:(e,t,r)=>{"use strict";var n=r(4155),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var i=r(4002),a=r(3313);r(1183)(h,i);for(var s=o(a.prototype),u=0;u<s.length;u++){var c=s[u];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(e){if(!(this instanceof h))return new h(e);i.call(this,e),a.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",l)))}function l(){this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.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)}})},4842:(e,t,r)=>{"use strict";e.exports=o;var n=r(1846);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(1183)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},4002:(e,t,r)=>{"use strict";var n,o=r(4155);e.exports=A,A.ReadableState=E;r(7187).EventEmitter;var i=function(e,t){return e.listeners(t).length},a=r(1463),s=r(8764).Buffer,u=r.g.Uint8Array||function(){};var c,h=r(3646);c=h&&h.debuglog?h.debuglog("stream"):function(){};var l,f,d,p=r(6641),y=r(3369),g=r(624).getHighWaterMark,m=r(7303).q,v=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1183)(A,a);var x=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(e,t,o){n=n||r(9560),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",o),this.buffer=new p,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&&(l||(l=r(636).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(9560),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function T(e,t,r,n,o){c("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;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?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}(e,a);else if(o||(i=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),i)x(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?x(e,new _):k(e,a,t,!0);else if(a.ended)x(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):P(e,a)):k(e,a,t,!1)}else n||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&I(e)),P(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=y.destroy,A.prototype._undestroy=y.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},A.prototype.unshift=function(e){return T(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){l||(l=r(636).s);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,o="";null!==n;)o+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var R=1073741824;function O(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=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(j,e))}function j(e){var t=e._readableState;c("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,N(e)}function P(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(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 M(e){c("readable nexttick read 0"),e.read(0)}function B(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function $(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 U(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(D,t,e))}function D(e,t){if(c("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 q(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){c("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 c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):I(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,o=t.needReadable;return c("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",o=!0),t.ended||t.reading?c("reading or ended",o=!1):o&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=O(r,t))),null===(n=e>0?$(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&&U(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){x(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||!1!==t.end)&&e!==o.stdout&&e!==o.stderr?u:g;function s(t,o){c("onunpipe"),t===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){c("onend"),e.end()}n.endEmitted?o.nextTick(a):r.once("end",a),e.on("unpipe",s);var h=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",h);var l=!1;function f(t){c("ondata");var o=e.write(t);c("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==q(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){c("onerror",t),g(),e.removeListener("error",d),0===i(e,"error")&&x(e,t)}function p(){e.removeListener("finish",y),g()}function y(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(e)}return r.on("data",f),function(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)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},A.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||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=q(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?I(this):n.reading||o.nextTick(M,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(C,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(C,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(B,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(c("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<S.length;i++)e.on(S[i],this.emit.bind(this,S[i]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(6819)),f(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=$,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===d&&(d=r(8869)),d(A,e,t)})},1846:(e,t,r)=>{"use strict";e.exports=h;var n=r(7303).q,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(9560);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(1183)(h,u),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new o("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},3313:(e,t,r)=>{"use strict";var n,o=r(4155);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=E;var a={deprecate:r(4927)},s=r(1463),u=r(8764).Buffer,c=r.g.Uint8Array||function(){};var h,l=r(3369),f=r(624).getHighWaterMark,d=r(7303).q,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;function S(){}function E(e,t,a){n=n||r(9560),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(j,e,t),e._writableState.errorEmitted=!0,x(e,n)):(i(n),e._writableState.errorEmitted=!0,x(e,n),j(e,t))}(e,r,n,t,i);else{var a=O(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?o.nextTick(k,e,r,a,i):k(e,r,a,i)}}(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 i(this)}function A(e){var t=this instanceof(n=n||r(9560));if(!t&&!h.call(A,this))return new A(e);this._writableState=new E(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)),s.call(this)}function T(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function k(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),j(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,T(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,h=r.encoding,l=r.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,h,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),j(e,t)}))}function j(e,t){var r=O(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(1183)(A,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.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]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):h=function(e){return e instanceof this},A.prototype.pipe=function(){x(this,new m)},A.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=S),i.ending?function(e,t){var r=new w;x(e,r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new p("chunk",["string","Buffer"],r)),!i||(x(e,i),o.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,s,n,o,i);return c}(this,i,s,e,t,r)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},A.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 _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new y("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=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),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,j(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},6819:(e,t,r)=>{"use strict";var n,o=r(4155);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(5467),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),h=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function g(e){o.nextTick(y,e)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){o.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(p(void 0,!0)):t[f](r,n)}),n)}}(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(p(i,!1));r=new Promise(this[f])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(v,(i(t={},d,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,h,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[s]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[h]=!0})),e.on("readable",g.bind(null,r)),r}},6641:(e,t,r)=>{"use strict";function n(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 o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(8764).Buffer,s=r(1408).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,r=[{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,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,o=a.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,r=o,n=s,a.prototype.copy.call(t,r,n),s+=i.data.length,i=i.next;return o}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&i(t.prototype,r),c&&i(t,c),e}()},3369:(e,t,r)=>{"use strict";var n=r(4155);function o(e,t){a(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(i,r):(r._writableState.errorEmitted=!0,n.nextTick(o,r,e)):n.nextTick(o,r,e):t?(n.nextTick(i,r),t(e)):n.nextTick(i,r)})),this)},undestroy:function(){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)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5467:(e,t,r)=>{"use strict";var n=r(7303).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}(i||o);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){s=!1,c=!0,a||i.call(t)},l=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,l=!0,s||i.call(t)},d=function(e){i.call(t,e)},p=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},y=function(){t.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",h),t.on("abort",p),t.req?y():t.on("request",y)),t.on("end",f),t.on("finish",h),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",y),t.req&&t.req.removeListener("finish",h),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("end",f),t.removeListener("error",d),t.removeListener("close",p)}}},8869:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9689:(e,t,r)=>{"use strict";var n;var o=r(7303).q,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var h,l=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new i("streams");var f=t.map((function(e,o){var i=o<t.length-1;return function(e,t,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=r(5467)),n(e,{readable:t,writable:o},(function(e){if(e)return i(e);s=!0,i()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new a("pipe"))}}(e,i,o>0,(function(e){h||(h=e),e&&f.forEach(u),i||(f.forEach(u),l(h))}))}));return t.reduce(c)}},624:(e,t,r)=>{"use strict";var n=r(7303).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},1463:(e,t,r)=>{e.exports=r(7187).EventEmitter},925:(e,t,r)=>{(t=e.exports=r(4002)).Stream=t,t.Readable=t,t.Writable=r(3313),t.Duplex=r(9560),t.Transform=r(1846),t.PassThrough=r(4842),t.finished=r(5467),t.pipeline=r(9689)},3738:(e,t,r)=>{var n=r(8764),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},636:(e,t,r)=>{"use strict";var n=r(3738).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.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 i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=h,this.end=l,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=a(t[n]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(o=a(t[n]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(o=a(t[n]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8234:e=>{e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var o in n)t.call(n,o)&&(e[o]=n[o])}return e};var t=Object.prototype.hasOwnProperty},8575:(e,t,r)=>{"use strict";var n=r(4971);function o(){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}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(129);function v(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var v=e=u.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var b=s.exec(v);if(b)return this.path=v,this.href=v,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=i.exec(v);if(w){var _=(w=w[0]).toLowerCase();this.protocol=_,v=v.substr(w.length)}if(r||w||v.match(/^\/\/[^@/]+@[^@/]+/)){var x="//"===v.substr(0,2);!x||w&&y[w]||(v=v.substr(2),this.slashes=!0)}if(!y[w]&&(x||w&&!g[w])){for(var S,E,A=-1,T=0;T<l.length;T++){-1!==(k=v.indexOf(l[T]))&&(-1===A||k<A)&&(A=k)}-1!==(E=-1===A?v.lastIndexOf("@"):v.lastIndexOf("@",A))&&(S=v.slice(0,E),v=v.slice(E+1),this.auth=decodeURIComponent(S)),A=-1;for(T=0;T<h.length;T++){var k;-1!==(k=v.indexOf(h[T]))&&(-1===A||k<A)&&(A=k)}-1===A&&(A=v.length),this.host=v.slice(0,A),v=v.slice(A),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var O=this.hostname.split(/\./),I=(T=0,O.length);T<I;T++){var j=O[T];if(j&&!j.match(f)){for(var P="",L=0,C=j.length;L<C;L++)j.charCodeAt(L)>127?P+="x":P+=j[L];if(!P.match(f)){var M=O.slice(0,T),B=O.slice(T+1),N=j.match(d);N&&(M.push(N[1]),B.unshift(N[2])),B.length&&(v="/"+B.join(".")+v),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var $=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+$,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!p[_])for(T=0,I=c.length;T<I;T++){var D=c[T];if(-1!==v.indexOf(D)){var q=encodeURIComponent(D);q===D&&(q=escape(D)),v=v.split(D).join(q)}}var F=v.indexOf("#");-1!==F&&(this.hash=v.substr(F),v=v.slice(0,F));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=m.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),g[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){$=this.pathname||"";var W=this.search||"";this.path=$+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(r[c]=e[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var h=Object.keys(e),l=0;l<h.length;l++){var f=h[l];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",m=r.search||"";r.path=p+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=b||v||r.host&&e.pathname,_=w,x=r.pathname&&r.pathname.split("/")||[],S=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),w=w&&(""===d[0]||""===x[0])),b)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,x=d;else if(d.length)x||(x=[]),x.pop(),x=x.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search){if(S)r.host=x.shift(),r.hostname=r.host,(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=x.slice(-1)[0],A=(r.host||e.host||x.length>1)&&("."===E||".."===E)||""===E,T=0,k=x.length;k>=0;k--)"."===(E=x[k])?x.splice(k,1):".."===E?(x.splice(k,1),T++):T&&(x.splice(k,1),T--);if(!w&&!_)for(;T--;T)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var R,O=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(r.hostname=O?"":x.length?x.shift():"",r.host=r.hostname,(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname));return(w=w||r.host&&x.length)&&!O&&x.unshift(""),x.length>0?r.pathname=x.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},7731:(e,t,r)=>{var n=r(8764).Buffer;const o=r(3300),i=r(6230),a=r(129),s=r(5014),u=r(4147);e.exports=class{constructor(e){this.setBaseUrl(e)}setBaseUrl(e){this.baseUrl=e}get({uri:e,auth:t,headers:r,query:n,context:o}){return this.request({uri:e,method:"get",auth:t,headers:r,query:n,context:o})}head({uri:e,auth:t,headers:r,query:n,context:o}){return this.request({uri:e,method:"head",auth:t,headers:r,query:n,context:o})}post({uri:e,headers:t,data:r,auth:n,context:o}){return this.request({uri:e,method:"post",auth:n,headers:t,data:r,context:o})}put({uri:e,auth:t,headers:r,data:n,context:o}){return this.request({uri:e,method:"put",auth:t,headers:r,data:n,context:o})}delete({uri:e,auth:t,headers:r,data:n,context:o}){return this.request({uri:e,method:"delete",auth:t,headers:r,data:n,context:o})}request({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:a,files:s,context:u,isBuffer:c=!1}){const h=this._sanitizeFiles(s),l=this._buildRequest({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:a,context:u,files:h});return this._promiseResponse(l,c)}_promiseResponse(e,t,r=o){let i;return r(...e).then((e=>(i=e.status,e.ok?204===i?"":t?e.blob():e.json():e.text().then((t=>{const r=JSON.parse(t),n=Object.assign(e,{text:t});throw Object.assign(r,{response:n})}))))).then((e=>t?e.arrayBuffer().then((e=>this.isForBrowser()?e:n.from(e))):{body:e,statusCode:i})).catch((t=>{let r,n=`${i?`HTTP error ${i}`:"Network error"} from ${e[0]}`;t.error_description&&(n=`${n} - ${t.error_description}`,r=t.error_description);const o=new Error(n);throw Object.assign(o,{statusCode:i,errorDescription:n,shortErrorDescription:r,error:t,body:t}),o}))}_buildRequest({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:s,files:c,context:h}){let l=e;if(this.baseUrl&&"/"===e[0]&&(l=`${this.baseUrl}${e}`),i){const e=a.stringify(i),t=l.includes("?");l=`${l}${t?"&":"?"}${e}`}const f={"User-Agent":`${u.name}/${u.version} (${u.repository.url})`};let d,p;c?(p={},d=this._getFromData(c,s)):s?(p={"Content-Type":"application/x-www-form-urlencoded"},d=a.stringify(s)):n&&(p={"Content-Type":"application/json"},d=JSON.stringify(n));return[l,{method:t,body:d,headers:Object.assign({},f,p,this._getAuthorizationHeader(o),this._getContextHeaders(h),r)}]}isForBrowser(){return"undefined"!=typeof window}_getFromData(e,t){const r=new i;for(let[t,n]of Object.entries(e)){let e=n.path,o=n.data;if(!this.isForBrowser()){const t=this._getNodeFormData(n);e=t.path,o=t.file}r.append(t,o,e)}if(t)for(let[e,n]of Object.entries(t))r.append(e,n);return r}_getNodeFormData(e){let t=e.data;return"string"==typeof e.data&&(t=s.createReadStream(e.data)),{file:t,path:{filepath:e.path}}}_getContextHeaders(e={}){return Object.assign({},this._getToolContext(e.tool),this._getProjectContext(e.project))}_getToolContext(e={}){let t="";if(e.name&&(t+=this._toolIdent(e),e.components))for(let r of e.components)t+=", "+this._toolIdent(r);return t?{"X-Particle-Tool":t}:{}}_toolIdent(e){return this._nameAtVersion(e.name,e.version)}_nameAtVersion(e,t){let r="";return e&&(r+=e,t&&(r+="@"+t)),r}_getProjectContext(e={}){let t=this._buildSemicolonSeparatedProperties(e,"name");return t?{"X-Particle-Project":t}:{}}_buildSemicolonSeparatedProperties(e,t){let r="";if(e[t]){r+=e[t];for(let n in e)n!==t&&e.hasOwnProperty(n)&&(r+="; "+n+"="+e[n])}return r}_getAuthorizationHeader(e){if(!e)return{};if("string"==typeof e)return{Authorization:`Bearer ${e}`};let t;return t=this.isForBrowser()?btoa(`${e.username}:${e.password}`):n.from(`${e.username}:${e.password}`).toString("base64"),{Authorization:`Basic ${t}`}}_sanitizeFiles(e){let t;return e&&(t={},Object.keys(e).forEach(((r,n)=>{t[n?`file${n+1}`:"file"]={data:e[r],path:r}}))),t}}},5318:(e,t,r)=>{const n=r(101);let o;e.exports=class{constructor({auth:e,api:t=new o}){this.auth=e,this.api=t}ready(){return Boolean(this.auth)}libraries(e={}){return this.api.listLibraries(Object.assign({},e,{auth:this.auth})).then((e=>(e.body.data||[]).map((e=>new n(this,e)))))}library(e,t={}){return this.api.getLibrary(Object.assign({},t,{name:e,auth:this.auth})).then((e=>{const t=e.body.data||{};return new n(this,t)}))}libraryVersions(e,t={}){return this.api.getLibraryVersions(Object.assign({},t,{name:e,auth:this.auth})).then((e=>(e.body.data||[]).map((e=>new n(this,e)))))}contributeLibrary(e){return this.api.contributeLibrary({archive:e,auth:this.auth}).then((e=>{const t=e.body.data||{};return new n(this,t)}),(e=>{this._throwError(e)}))}publishLibrary(e){return this.api.publishLibrary({name:e,auth:this.auth}).then((e=>{const t=e.body.data||{};return new n(this,t)}),(e=>{this._throwError(e)}))}deleteLibrary({name:e,force:t}){return this.api.deleteLibrary({name:e,force:t,auth:this.auth}).then((()=>!0),(e=>this._throwError(e)))}_throwError(e){if(e.body&&e.body.errors){const t=e.body.errors.map((e=>e.message)).join("\n");throw new Error(t)}throw e}downloadFile(e){return this.api.downloadFile({uri:e})}compileCode(e,t,r){return this.api.compileCode({files:e,platformId:t,targetVersion:r,auth:this.auth})}signalDevice({signal:e,deviceId:t}){return this.api.signalDevice({signal:e,deviceId:t,auth:this.auth})}listDevices(){return this.api.listDevices({auth:this.auth})}listBuildTargets(){return this.api.listBuildTargets({onlyFeatured:!0,auth:this.auth}).then((e=>{let t=[];for(let r of e.body.targets)for(let e of r.platforms)t.push({version:r.version,platform:e,prerelease:r.prereleases.indexOf(e)>-1,firmware_vendor:r.firmware_vendor});return t}),(()=>{}))}trackingIdentity({full:e=!1,context:t}={}){return this.api.trackingIdentity({full:e,context:t,auth:this.auth}).then((e=>e.body))}},o=r(7845)},3822:e=>{e.exports={baseUrl:"https://api.particle.io",clientSecret:"particle-api",clientId:"particle-api",tokenDuration:7776e3,auth:void 0}},705:(e,t,r)=>{const n=r(8501),o=r(8501),i=r(8575),{EventEmitter:a}=r(7187);e.exports=class extends a{constructor(e,t){super(),this.uri=e,this.token=t,this.reconnectInterval=2e3,this.timeout=13e3,this.data="",this.buf="",this.parse=this.parse.bind(this),this.end=this.end.bind(this),this.idleTimeoutExpired=this.idleTimeoutExpired.bind(this)}connect(){return new Promise(((e,t)=>{const{hostname:r,protocol:a,port:s,path:u}=i.parse(this.uri);this.origin=`${a}//${r}${s?":"+s:""}`;const c="https:"===a,h=(c?o:n).request({hostname:r,protocol:a,path:`${u}?access_token=${this.token}`,method:"get",port:parseInt(s,10)||(c?443:80),mode:"prefer-streaming"});this.req=h;let l=!1,f=setTimeout((()=>{this.req&&this.req.abort(),t({error:new Error("Timeout"),errorDescription:`Timeout connecting to ${this.uri}`})}),this.timeout);h.on("error",(e=>{clearTimeout(f),l?this.end():t({error:e,errorDescription:`Network error from ${this.uri}`})})),h.on("response",(r=>{clearTimeout(f);const n=r.statusCode;if(200!==n){let e="";return r.on("data",(t=>e+=t)),void r.on("end",(()=>{try{e=JSON.parse(e)}catch(e){}finally{let r=`HTTP error ${n} from ${this.uri}`;e&&e.error_description&&(r+=" - "+e.error_description),t({statusCode:n,errorDescription:r,body:e}),this.req=void 0}}))}this.data="",this.buf="",l=!0,r.on("data",this.parse),r.once("end",this.end),this.startIdleTimeout(),e(this)})),h.end()}))}abort(){this.req&&(this.req.abort(),this.req=void 0),this.removeAllListeners()}emitSafe(e,t){try{this.emit(e,t)}catch(t){"error"!==e&&this.emitSafe("error",t)}}end(){this.stopIdleTimeout(),this.req&&(this.req=void 0,this.emitSafe("disconnect"),this.reconnect())}reconnect(){setTimeout((()=>{this.isOffline()?this.reconnect():(this.emitSafe("reconnect"),this.connect().then((()=>{this.emitSafe("reconnect-success")})).catch((e=>{this.emitSafe("reconnect-error",e),this.reconnect()})))}),this.reconnectInterval)}isOffline(){return"undefined"!=typeof navigator&&!navigator.hasOwnProperty("onLine")&&!navigator.onLine}startIdleTimeout(){this.stopIdleTimeout(),this.idleTimeout=setTimeout(this.idleTimeoutExpired,this.timeout)}stopIdleTimeout(){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null)}idleTimeoutExpired(){this.req&&(this.req.abort(),this.end())}parse(e){this.startIdleTimeout(),this.buf+=e;let t=0,r=this.buf.length,n=!1;for(;t<r;){n&&("\n"===this.buf[t]&&++t,n=!1);let e=-1,o=-1;for(let i=t;e<0&&i<r;++i){const r=this.buf[i];":"===r?o<0&&(o=i-t):"\r"===r?(n=!0,e=i-t):"\n"===r&&(e=i-t)}if(e<0)break;this.parseEventStreamLine(t,o,e),t+=e+1}t===r?this.buf="":t>0&&(this.buf=this.buf.slice(t))}parseEventStreamLine(e,t,r){if(0===r)try{if(this.data.length>0&&this.event){const e=JSON.parse(this.data);e.name=this.eventName||"",this.emitSafe("event",e)}}catch(e){}finally{this.data="",this.eventName=void 0,this.event=!1}else if(t>0){const n=this.buf.slice(e,e+t);let o=0;o=" "!==this.buf[e+t+1]?t+1:t+2,e+=o;const i=r-o,a=this.buf.slice(e,e+i);"data"===n?this.data+=a+"\n":"event"===n&&(this.eventName=a,this.event=!0)}}}},101:e=>{e.exports=class{constructor(e,t){Object.defineProperty(this,"client",{value:e}),this._assignAttributes(t),this.downloadUrl=t.links&&t.links.download}_assignAttributes(e){Object.assign(this,e.attributes)}download(){return this.downloadUrl?this.client.downloadFile(this.downloadUrl):Promise.reject(new Error("No download URL for this library"))}}},7845:(e,t,r)=>{const n=r(3822),o=r(705),i=r(7731),a=r(5318);class s{constructor(e={}){e.auth&&this.setDefaultAuth(e.auth),Object.assign(this,n,e),this.context={},this.agent=new i(this.baseUrl)}_isValidContext(e,t){return("tool"===e||"project"===e)&&void 0!==t}setContext(e,t){if(void 0!==t){if(!this._isValidContext(e,t))throw Error("unknown context name or undefined context: "+e);this.context[e]=t}}_buildContext(e){return Object.assign(this.context,e)}login({username:e,password:t,tokenDuration:r=this.tokenDuration,headers:n,context:o}){return this.request({uri:"/oauth/token",method:"post",headers:n,form:{username:e,password:t,grant_type:"password",client_id:this.clientId,client_secret:this.clientSecret,expires_in:r},context:o})}sendOtp({mfaToken:e,otp:t,headers:r,context:n}){return this.request({uri:"/oauth/token",method:"post",headers:r,form:{grant_type:"urn:custom:mfa-otp",mfa_token:e,otp:t,client_id:this.clientId,client_secret:this.clientSecret},context:n})}enableMfa({auth:e,headers:t,context:r}){return this.get({uri:"/v1/user/mfa-enable",auth:e,headers:t,context:r})}confirmMfa({mfaToken:e,otp:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){let a={mfa_token:e,otp:t};return r&&(a.invalidate_tokens=!0),this.post({uri:"/v1/user/mfa-enable",auth:n,headers:o,data:a,context:i})}disableMfa({currentPassword:e,auth:t,headers:r,context:n}){return this.put({uri:"/v1/user/mfa-disable",auth:t,headers:r,data:{current_password:e},context:n})}createCustomer({email:e,password:t,product:r,headers:n,context:o}){return this.request({uri:`/v1/products/${r}/customers`,method:"post",headers:n,form:{email:e,password:t,grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:o})}loginAsClientOwner({headers:e,context:t}){return this.request({uri:"/oauth/token",method:"post",headers:e,form:{grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:t})}createUser({username:e,password:t,accountInfo:r,headers:n,context:o}){return this.post({uri:"/v1/users",headers:n,data:{username:e,password:t,account_info:r},context:o})}verifyUser({token:e,headers:t,context:r}){return this.post({uri:"/v1/user/verify",headers:t,data:{token:e},context:r})}resetPassword({username:e,headers:t,context:r}){return this.post({uri:"/v1/user/password-reset",headers:t,data:{username:e},context:r})}deleteAccessToken({username:e,password:t,token:r,headers:n,context:o}){return this.delete({uri:`/v1/access_tokens/${r}`,auth:{username:e,password:t},headers:n,data:{access_token:r},context:o})}deleteCurrentAccessToken({auth:e,headers:t,context:r}){return this.delete({uri:"/v1/access_tokens/current",auth:e,headers:t,context:r})}deleteActiveAccessTokens({auth:e,headers:t,context:r}){return this.delete({uri:"/v1/access_tokens",auth:e,headers:t,context:r})}deleteUser({auth:e,password:t,headers:r,context:n}){return this.delete({uri:"/v1/user",data:{password:t},auth:e,headers:r,context:n})}listAccessTokens({username:e,password:t,otp:r,headers:n,context:o}){return this.get({uri:"/v1/access_tokens",auth:{username:e,password:t},query:r?{otp:r}:void 0,headers:n,context:o})}trackingIdentity({full:e=!1,auth:t,headers:r,context:n}={}){return this.get({uri:"/v1/user/identify",auth:t,headers:r,query:e?void 0:{tracking:1},context:n})}listDevices({deviceId:e,deviceName:t,groups:r,sortAttr:n,sortDir:o,page:i,perPage:a,product:s,auth:u,headers:c,context:h}){let l,f;return s?(l=`/v1/products/${s}/devices`,f={deviceId:e,deviceName:t,groups:Array.isArray(r)?r.join(","):void 0,sortAttr:n,sortDir:o,page:i,per_page:a}):l="/v1/devices",this.get({uri:l,auth:u,headers:c,query:f,context:h})}getDevice({deviceId:e,product:t,auth:r,headers:n,context:o}){const i=this.deviceUri({deviceId:e,product:t});return this.get({uri:i,auth:r,headers:n,context:o})}claimDevice({deviceId:e,requestTransfer:t,auth:r,headers:n,context:o}){return this.post({uri:"/v1/devices",auth:r,headers:n,data:{id:e,request_transfer:!!t},context:o})}addDeviceToProduct({deviceId:e,product:t,file:r,auth:n,headers:o,context:i}){let a,s;return r?a={file:r}:e&&(s={id:e}),this.request({uri:`/v1/products/${t}/devices`,method:"post",headers:o,data:s,files:a,auth:n,context:i})}removeDevice({deviceId:e,deny:t,product:r,auth:n,headers:o,context:i}){const a=this.deviceUri({deviceId:e,product:r}),s=r?{deny:t}:void 0;return this.delete({uri:a,data:s,auth:n,headers:o,context:i})}removeDeviceOwner({deviceId:e,product:t,auth:r,headers:n,context:o}){const i=`/v1/products/${t}/devices/${e}/owner`;return this.delete({uri:i,auth:r,headers:n,context:o})}renameDevice({deviceId:e,name:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,name:t,product:r,auth:n,headers:o,context:i})}signalDevice({deviceId:e,signal:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,signal:t,product:r,auth:n,headers:o,context:i})}setDeviceNotes({deviceId:e,notes:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,notes:t,product:r,auth:n,headers:o,context:i})}markAsDevelopmentDevice({deviceId:e,development:t=!0,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,development:t,product:r,auth:n,headers:o,context:i})}lockDeviceProductFirmware({deviceId:e,desiredFirmwareVersion:t,flash:r,product:n,auth:o,context:i}){return this.updateDevice({deviceId:e,desiredFirmwareVersion:t,flash:r,product:n,auth:o,context:i})}unlockDeviceProductFirmware({deviceId:e,product:t,auth:r,headers:n,context:o}){return this.updateDevice({deviceId:e,desiredFirmwareVersion:null,product:t,auth:r,headers:n,context:o})}updateDevice({deviceId:e,name:t,signal:r,notes:n,development:o,desiredFirmwareVersion:i,flash:a,product:s,auth:u,headers:c,context:h}){let l;void 0!==r&&(l=r?"1":"0");const f=this.deviceUri({deviceId:e,product:s}),d=s?{name:t,signal:l,notes:n,development:o,desired_firmware_version:i,flash:a}:{name:t,signal:l,notes:n};return this.put({uri:f,auth:u,headers:c,data:d,context:h})}provisionDevice({productId:e,auth:t,headers:r,context:n}){return this.post({uri:"/v1/devices",auth:t,headers:r,data:{product_id:e},context:n})}getClaimCode({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/device_claims`:"/v1/device_claims";return this.post({uri:i,auth:r,headers:n,data:{iccid:e},context:o})}validatePromoCode({promoCode:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/promo_code/${e}`,auth:t,headers:r,context:n})}changeProduct({deviceId:e,productId:t,auth:r,headers:n,context:o}){return this.put({uri:`/v1/devices/${e}`,auth:r,headers:n,data:{product_id:t},context:o})}getVariable({deviceId:e,name:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/devices/${e}/${t}`:`/v1/devices/${e}/${t}`;return this.get({uri:a,auth:n,headers:o,context:i})}flashDevice({deviceId:e,product:t,files:r,targetVersion:n,auth:o,headers:i,context:a}){const s=this.deviceUri({deviceId:e,product:t}),u={};return n?u.build_target_version=n:u.latest="true",this.request({uri:s,method:"put",auth:o,headers:i,files:r,form:u,context:a})}flashTinker({deviceId:e,auth:t,headers:r,context:n}){return console&&console.warning&&console.warning("Particle.flashTinker is deprecated"),this.put({uri:`/v1/devices/${e}`,headers:r,data:{app:"tinker"},auth:t,context:n})}compileCode({files:e,platformId:t,targetVersion:r,auth:n,headers:o,context:i}){const a={platform_id:t};return r?a.build_target_version=r:a.latest="true",this.request({uri:"/v1/binaries",method:"post",auth:n,headers:o,files:e,form:a,context:i})}downloadFirmwareBinary({binaryId:e,auth:t,headers:r,context:n}){return this.request({uri:`/v1/binaries/${e}`,method:"get",auth:t,headers:r,context:n,isBuffer:!0})}sendPublicKey({deviceId:e,key:t,algorithm:r,auth:n,headers:o,context:i}){return this.post({uri:`/v1/provisioning/${e}`,auth:n,headers:o,data:{deviceID:e,publicKey:"string"==typeof t?t:t.toString(),filename:"particle-api",order:`manual_${Date.now()}`,algorithm:r||"rsa"},context:i})}callFunction({deviceId:e,name:t,argument:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/devices/${e}/${t}`:`/v1/devices/${e}/${t}`;return this.post({uri:s,auth:o,headers:i,data:{args:r},context:a})}getEventStream({deviceId:e,name:t,org:r,product:n,auth:i}){let a="/v1/";return r&&(a+=`orgs/${r}/`),n&&(a+=`products/${n}/`),e&&(a+="devices/","mine"!==e.toLowerCase()&&(a+=`${e}/`)),a+="events",t&&(a+=`/${encodeURIComponent(t)}`),i=this._getActiveAuthToken(i),new o(`${this.baseUrl}${a}`,i).connect()}publishEvent({name:e,data:t,isPrivate:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/events`:"/v1/devices/events",u={name:e,data:t,private:r};return this.post({uri:s,auth:o,headers:i,data:u,context:a})}createWebhook({event:e,url:t,device:r,rejectUnauthorized:n,noDefaults:o,hook:i,product:a,auth:s,headers:u,context:c}){const h=a?`/v1/products/${a}/webhooks`:"/v1/webhooks",l={event:e,url:t,deviceId:r,rejectUnauthorized:n,noDefaults:o};return i&&(l.requestType=i.method,l.auth=i.auth,l.headers=i.headers,l.query=i.query,l.json=i.json,l.form=i.form,l.body=i.body,l.responseTemplate=i.responseTemplate,l.responseTopic=i.responseEvent,l.errorResponseTopic=i.errorResponseEvent),l.requestType||(l.requestType="POST"),this.post({uri:h,auth:s,headers:u,data:l,context:c})}deleteWebhook({hookId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/webhooks/${e}`:`/v1/webhooks/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listWebhooks({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/webhooks`:"/v1/webhooks";return this.get({uri:o,auth:t,headers:r,context:n})}createIntegration({event:e,settings:t,deviceId:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/integrations`:"/v1/integrations",u=Object.assign({event:e,deviceid:r},t);return this.post({uri:s,data:u,auth:o,headers:i,context:a})}editIntegration({integrationId:e,event:t,settings:r,deviceId:n,product:o,auth:i,headers:a,context:s}){const u=o?`/v1/products/${o}/integrations/${e}`:`/v1/integrations/${e}`,c=Object.assign({event:t,deviceid:n},r);return this.put({uri:u,auth:i,headers:a,data:c,context:s})}deleteIntegration({integrationId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/integrations/${e}`:`/v1/integrations/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listIntegrations({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/integrations`:"/v1/integrations";return this.get({uri:o,auth:t,headers:r,context:n})}getUserInfo({auth:e,headers:t,context:r}){return this.get({uri:"/v1/user",auth:e,headers:t,context:r})}setUserInfo({accountInfo:e,auth:t,headers:r,context:n}){const o={account_info:e};return this.put({uri:"/v1/user",auth:t,headers:r,data:o,context:n})}changeUsername({currentPassword:e,username:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){const a={username:t,current_password:e};return r&&(a.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:o,data:a,context:i})}changeUserPassword({currentPassword:e,password:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){const a={password:t,current_password:e};return r&&(a.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:o,data:a,context:i})}listSIMs({iccid:e,deviceId:t,deviceName:r,page:n,perPage:o,product:i,auth:a,headers:s,context:u}){const c=i?`/v1/products/${i}/sims`:"/v1/sims",h=i?{iccid:e,deviceId:t,deviceName:r,page:n,per_page:o}:void 0;return this.get({uri:c,auth:a,headers:s,query:h,context:u})}getSIMDataUsage({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}/data_usage`:`/v1/sims/${e}/data_usage`;return this.get({uri:i,auth:r,headers:n,context:o})}getFleetDataUsage({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/sims/data_usage`,auth:t,headers:r,context:n})}checkSIM({iccid:e,auth:t,headers:r,context:n}){return this.head({uri:`/v1/sims/${e}`,auth:t,headers:r,context:n})}activateSIM({iccid:e,iccids:t,country:r,promoCode:n,product:o,auth:i,headers:a,context:s}){t=t||[e];const u=o?`/v1/products/${o}/sims`:`/v1/sims/${e}`,c=o?{sims:t,country:r}:{country:r,promoCode:n,action:"activate"},h=o?"post":"put";return this.request({uri:u,method:h,headers:a,data:c,auth:i,context:s})}deactivateSIM({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}`:`/v1/sims/${e}`;return this.put({uri:i,auth:r,headers:n,data:{action:"deactivate"},context:o})}reactivateSIM({iccid:e,mbLimit:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/sims/${e}`:`/v1/sims/${e}`,s={mb_limit:t,action:"reactivate"};return this.put({uri:a,auth:n,headers:o,data:s,context:i})}updateSIM({iccid:e,mbLimit:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/sims/${e}`:`/v1/sims/${e}`,s={mb_limit:t};return this.put({uri:a,auth:n,headers:o,data:s,context:i})}removeSIM({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}`:`/v1/sims/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listBuildTargets({onlyFeatured:e,auth:t,headers:r,context:n}){const o=e?{featured:!!e}:void 0;return this.get({uri:"/v1/build_targets",auth:t,headers:r,query:o,context:n})}listLibraries({page:e,limit:t,filter:r,sort:n,architectures:o,category:i,scope:a,excludeScopes:s,auth:u,headers:c,context:h}){return this.get({uri:"/v1/libraries",auth:u,headers:c,query:{page:e,filter:r,limit:t,sort:n,architectures:this._asList(o),category:i,scope:a,excludeScopes:this._asList(s)},context:h})}_asList(e){return Array.isArray(e)?e.join(","):e}getLibrary({name:e,version:t,auth:r,headers:n,context:o}){return this.get({uri:`/v1/libraries/${e}`,auth:r,headers:n,query:{version:t},context:o})}getLibraryVersions({name:e,page:t,limit:r,auth:n,headers:o,context:i}){return this.get({uri:`/v1/libraries/${e}/versions`,auth:n,headers:o,query:{page:t,limit:r},context:i})}contributeLibrary({archive:e,auth:t,headers:r,context:n}){const o={"archive.tar.gz":e};return this.request({uri:"/v1/libraries",method:"post",auth:t,headers:r,files:o,context:n})}publishLibrary({name:e,auth:t,headers:r,context:n}){return this.request({uri:`/v1/libraries/${e}`,method:"patch",auth:t,headers:r,data:{visibility:"public"},context:n})}deleteLibrary({name:e,force:t,auth:r,headers:n,context:o}){return this.delete({uri:`/v1/libraries/${e}`,auth:r,headers:n,data:{force:t},context:o})}downloadFile({uri:e,headers:t,context:r}){return this.request({uri:e,method:"get",headers:t,context:r,isBuffer:!0})}listOAuthClients({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/clients`:"/v1/clients";return this.get({uri:o,auth:t,headers:r,context:n})}createOAuthClient({name:e,type:t,redirect_uri:r,scope:n,product:o,auth:i,headers:a,context:s}){const u=o?`/v1/products/${o}/clients`:"/v1/clients",c={name:e,type:t,redirect_uri:r,scope:n};return this.post({uri:u,auth:i,headers:a,data:c,context:s})}updateOAuthClient({clientId:e,name:t,scope:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/clients/${e}`:`/v1/clients/${e}`,u={name:t,scope:r};return this.put({uri:s,data:u,auth:o,headers:i,context:a})}deleteOAuthClient({clientId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/clients/${e}`:`/v1/clients/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listProducts({auth:e,headers:t,context:r}){return this.get({uri:"/v1/products",auth:e,headers:t,context:r})}getProduct({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}`,auth:t,headers:r,context:n})}listProductFirmware({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/firmware`,auth:t,headers:r,context:n})}uploadProductFirmware({file:e,version:t,title:r,description:n,product:o,auth:i,headers:a,context:s}){return this.request({uri:`/v1/products/${o}/firmware`,method:"post",auth:i,headers:a,form:{version:t,title:r,description:n},files:{"firmware.bin":e},context:s})}getProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){return this.get({uri:`/v1/products/${t}/firmware/${e}`,auth:r,headers:n,context:o})}updateProductFirmware({version:e,title:t,description:r,product:n,auth:o,headers:i,context:a}){const s=`/v1/products/${n}/firmware/${e}`;return this.put({uri:s,auth:o,headers:i,data:{title:t,description:r},context:a})}downloadProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){return this.request({uri:`/v1/products/${t}/firmware/${e}/binary`,method:"get",auth:r,headers:n,context:o,isBuffer:!0})}releaseProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){const i=`/v1/products/${t}/firmware/release`;return this.put({uri:i,auth:r,headers:n,data:{version:e},context:o})}listTeamMembers({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/team`,auth:t,headers:r,context:n})}inviteTeamMember({username:e,product:t,auth:r,headers:n,context:o}){return this.post({uri:`/v1/products/${t}/team`,auth:r,headers:n,data:{username:e},context:o})}removeTeamMember({username:e,product:t,auth:r,headers:n,context:o}){return this.delete({uri:`/v1/products/${t}/team/${e}`,auth:r,headers:n,context:o})}lookupSerialNumber({serialNumber:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/serial_numbers/${e}`,auth:t,headers:r,context:n})}createMeshNetwork({name:e,deviceId:t,iccid:r,auth:n,headers:o,context:i}){return this.post({uri:"/v1/networks",auth:n,headers:o,data:{name:e,device_id:t,iccid:r},context:i})}removeMeshNetwork({networkId:e,auth:t,headers:r,context:n}){return this.delete({uri:`/v1/networks/${e}`,auth:t,headers:r,context:n})}listMeshNetworks({page:e,perPage:t,auth:r,headers:n,context:o}){const i=e?{page:e,per_page:t}:void 0;return this.get({uri:"/v1/networks",auth:r,headers:n,query:i,context:o})}getMeshNetwork({networkId:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/networks/${e}`,auth:t,headers:r,context:n})}updateMeshNetwork({networkId:e,action:t,deviceId:r,auth:n,headers:o,context:i}){return this.put({uri:`/v1/networks/${e}`,auth:n,headers:o,data:{action:t,device_id:r},context:i})}addMeshNetworkDevice({networkId:e,deviceId:t,auth:r,headers:n,context:o}){return this.updateMeshNetwork({action:"add-device",networkId:e,deviceId:t,auth:r,headers:n,context:o})}removeMeshNetworkDevice({networkId:e,deviceId:t,auth:r,headers:n,context:o}){return e?this.updateMeshNetwork({action:"remove-device",networkId:e,deviceId:t,auth:r,headers:n,context:o}):this.delete({uri:`/v1/devices/${t}/network`,auth:r,headers:n,context:o})}listMeshNetworkDevices({networkId:e,role:t,page:r,perPage:n,auth:o,headers:i,context:a}){const s=t||r?{role:t,page:r,per_page:n}:void 0;return this.get({uri:`/v1/networks/${e}/devices`,auth:o,headers:i,query:s,context:a})}getProductConfiguration({auth:e,product:t,headers:r,context:n}){return this.get({uri:`/v1/products/${t}/config`,auth:e,headers:r,context:n})}getProductConfigurationSchema({auth:e,product:t,headers:r={},context:n}){return r.accept="application/schema+json",this.get({uri:`/v1/products/${t}/config`,auth:e,headers:r,context:n})}getProductDeviceConfiguration({auth:e,product:t,deviceId:r,headers:n,context:o}){return this.get({uri:`/v1/products/${t}/config/${r}`,auth:e,headers:n,context:o})}getProductDeviceConfigurationSchema({auth:e,product:t,deviceId:r,headers:n,context:o}){return n.accept="application/schema+json",this.get({uri:`/v1/products/${t}/config/${r}`,auth:e,headers:n,context:o})}setProductConfiguration({auth:e,product:t,config:r,headers:n,context:o}){return this.put({uri:`/v1/products/${t}/config`,auth:e,data:r,headers:n,context:o})}setProductDeviceConfiguration({auth:e,product:t,deviceId:r,config:n,headers:o,context:i}){return this.put({uri:`/v1/products/${t}/config/${r}`,data:n,auth:e,headers:o,context:i})}getProductLocations({auth:e,product:t,dateRange:r,rectBl:n,rectTr:o,deviceId:i,deviceName:a,groups:s,page:u,perPage:c,headers:h,context:l}){return this.get({uri:`/v1/products/${t}/locations`,query:{date_range:r,rect_bl:n,rect_tr:o,device_id:i,device_name:a,groups:s,page:u,per_page:c},auth:e,headers:h,context:l})}getProductDeviceLocations({auth:e,product:t,dateRange:r,rectBl:n,rectTr:o,deviceId:i,headers:a,context:s}){return this.get({uri:`/v1/products/${t}/locations/${i}`,query:{date_range:r,rect_bl:n,rect_tr:o},auth:e,headers:a,context:s})}createLogicBlock({auth:e,org:t,block:r,headers:n,context:o}){return this.post({uri:`/v1/orgs/${t}/blocks`,auth:e,data:{block:r},headers:n,context:o})}getLogicBlock({auth:e,org:t,blockId:r,headers:n,context:o}){return this.get({uri:`/v1/orgs/${t}/blocks/${r}`,auth:e,headers:n,context:o})}updateLogicBlock({auth:e,org:t,blockId:r,block:n,headers:o,context:i}){return this.put({uri:`/v1/orgs/${t}/blocks/${r}`,auth:e,data:{block:n},headers:o,context:i})}deleteLogicBlock({auth:e,org:t,blockId:r,headers:n,context:o}){return this.delete({uri:`/v1/orgs/${t}/blocks/${r}`,auth:e,headers:n,context:o})}listLogicBlocks({auth:e,org:t,headers:r,context:n}){return this.get({uri:`/v1/orgs/${t}/blocks`,auth:e,headers:r,context:n})}listBlockRuns({auth:e,org:t,blockId:r,headers:n,context:o}){return this.get({uri:`/v1/orgs/${t}/blocks/${r}/runs`,auth:e,headers:n,context:o})}getBlockRun({auth:e,org:t,blockId:r,runId:n,headers:o,context:i}){return this.get({uri:`/v1/orgs/${t}/blocks/${r}/runs/${n}`,auth:e,headers:o,context:i})}getBlockRunLog({auth:e,org:t,blockId:r,runId:n,headers:o,context:i}){return this.get({uri:`/v1/orgs/${t}/blocks/${r}/runs/${n}/logs`,auth:e,headers:o,context:i})}createLedger({auth:e,org:t,ledger:r,headers:n,context:o}){return this.post({uri:`/v1/orgs/${t}/ledgers`,auth:e,data:{ledger:r},headers:n,context:o})}getLedger({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.get({uri:`/v1/orgs/${t}/ledgers/${r}`,auth:e,headers:n,context:o})}updateLedger({auth:e,org:t,ledgerName:r,ledger:n,headers:o,context:i}){return this.put({uri:`/v1/orgs/${t}/ledgers/${r}`,auth:e,data:{ledger:n},headers:o,context:i})}archiveLedger({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.delete({uri:`/v1/orgs/${t}/ledgers/${r}`,auth:e,headers:n,context:o})}listLedgers({auth:e,org:t,headers:r,context:n}){return this.get({uri:`/v1/orgs/${t}/ledgers`,auth:e,headers:r,context:n})}getLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,headers:o,context:i}){return this.get({uri:`/v1/orgs/${t}/ledgers/${r}/instances/${n}`,auth:e,headers:o,context:i})}setLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,data:o,headers:i,context:a}){return this.put({uri:`/v1/orgs/${t}/ledgers/${r}/instances/${n}`,auth:e,data:{data:o},headers:i,context:a})}deleteLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,headers:o,context:i}){return this.delete({uri:`/v1/orgs/${t}/ledgers/${r}/instances/${n}`,auth:e,headers:o,context:i})}listLedgerInstances({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.get({uri:`/v1/orgs/${t}/ledgers/${r}/instances`,auth:e,headers:n,context:o})}setDefaultAuth(e){if("string"!=typeof e||0===e.length)throw new Error("Must pass a non-empty string");this._defaultAuth=e}_getActiveAuthToken(e){return e||this._defaultAuth}deviceUri({deviceId:e,product:t}){return t?`/v1/products/${t}/devices/${e}`:`/v1/devices/${e}`}get({uri:e,auth:t,headers:r,query:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.get({uri:e,auth:t,headers:r,query:n,context:o})}head({uri:e,auth:t,headers:r,query:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.head({uri:e,auth:t,headers:r,query:n,context:o})}post({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.post({uri:e,auth:t,headers:r,data:n,context:o})}put({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.put({uri:e,auth:t,headers:r,data:n,context:o})}delete({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.delete({uri:e,auth:t,headers:r,data:n,context:o})}request(e){return e.context=this._buildContext(e.context),e.auth=this._getActiveAuthToken(e.auth),this.agent.request(e)}client(e={}){return new a(Object.assign({api:this},e))}setBaseUrl(e){this.baseUrl=e,this.agent.setBaseUrl(e)}}s.prototype.removeAccessToken=s.prototype.deleteAccessToken,e.exports=s},7165:()=>{},1408:()=>{},3646:()=>{},5014:()=>{},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"particle-api-js","version":"10.1.0","description":"Particle API Client","main":"src/Particle.js","scripts":{"prepublish":"npm run lint && npm run build","test":"npm run lint && npm run typecheck && npm run test:unit","test:ci":"npm run lint && npm run test:unit -- --forbid-only && npm run coverage","test:unit":"mocha test/ -R spec","test:unit:silent":"npm run test:unit > tmp/test-unit-log.txt 2>&1","test:browser":"karma start --single-run","test:watch":"npm run test:unit -- --watch","typecheck":"tsc --noEmit","coverage":"nyc --reporter=text --include=\'src/**/*.js\' --temp-dir=./tmp/ --check-coverage --lines 91 npm run test:unit:silent","lint":"eslint . --ext .js --format unix --ignore-path .gitignore --ignore-pattern \\"dist/*\\"","lint:fix":"npm run lint -- --fix","docs":"documentation build src/Particle.js --shallow -g -f md -o docs/api.md","build":"webpack --env mode=production","build-nomin":"webpack --env mode=development","preversion":"npm run test && npm run prepublish","reinstall":"rm -rf ./node_modules && npm i","version":"npm run build && npm run docs && npm run update-changelog && git add dist/* docs/*","update-changelog":"VERSION=`node -p -e \\"require(\'./package.json\').version\\"` bash -c \'read -p \\"Update CHANGELOG.md for version $VERSION and press ENTER when done.\\"\' && git add CHANGELOG.md"},"repository":{"type":"git","url":"https://github.com/particle-iot/particle-api-js"},"author":"Julien Vanier <julien@particle.io>","contributors":["Ido Kleinman","Bryce Kahle","Justin Debbink","Matthew McGowan","Julien Vanier","Wojtek Siudzinski","Emily Rose"],"keywords":["particle","library","spark","api"],"license":"Apache-2.0","devDependencies":{"@types/node":"^20.5.9","buffer":"^6.0.3","chai":"^4.3.6","chai-as-promised":"^7.1.1","documentation":"^4.0.0-rc.1","eslint":"^8.17.0","eslint-config-particle":"^2.2.1","events":"^3.3.0","karma":"^1.1.1","karma-chai":"^0.1.0","karma-cli":"^1.0.1","karma-coverage":"^1.1.0","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.1.1","karma-webpack":"^5.0.0","mocha":"^2.5.1","nyc":"^15.1.0","process":"^0.11.10","should":"^9.0.0","sinon":"^7.2.5","sinon-chai":"^3.7.0","terser-webpack-plugin":"^5.3.9","typescript":"^5.2.2","url":"^0.11.3","webpack":"^5.88.2","webpack-cli":"^5.1.4"},"dependencies":{"form-data":"^4.0.0","node-fetch":"^2.7.0","qs":"^6.11.2","stream-http":"^3.2.0"},"browser":{"./fs":false,"http":"stream-http","https":"stream-http"},"engines":{"node":">=12.x","npm":"8.x"}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(7845);Particle=n})();
400
2
  //# sourceMappingURL=particle.min.js.map