├── .gitignore ├── .github └── FUNDING.yml ├── DOCUMENTATION.md ├── example └── index.js ├── LICENSE ├── package.json ├── CONTRIBUTING.md ├── lib └── index.js ├── README.md └── dist └── made-in.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.swo 3 | *~ 4 | *.log 5 | node_modules 6 | *.env 7 | .DS_Store 8 | package-lock.json 9 | .bloggify/* 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: ionicabizau 2 | patreon: ionicabizau 3 | open_collective: ionicabizau 4 | custom: https://www.buymeacoffee.com/h96wwchmy -------------------------------------------------------------------------------- /DOCUMENTATION.md: -------------------------------------------------------------------------------- 1 | ## Documentation 2 | 3 | You can see below the API reference of this module. 4 | 5 | ### `madeIn(loc, options, cb)` 6 | Get GitHub projects created by users from a specific location. 7 | 8 | #### Params 9 | 10 | - **String** `loc`: The user location. 11 | - **Object** `options`: An object containing the following fields: 12 | - language (String): The repository language. 13 | - token (String): The GitHub token. 14 | - **Function** `cb`: The callback function. 15 | 16 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const madeIn = require("../lib"); 4 | 5 | // Some cool JS stuff made in Romania 6 | madeIn("Romania", { 7 | language: "JavaScript" 8 | , token: "..." 9 | }, (err, data) => { 10 | console.log(err || data.map(c => c.full_name).join("\n")); 11 | // IonicaBizau/git-stats 12 | // IonicaBizau/scrape-it 13 | // skidding/cosmos 14 | // victorstanciu/dbv 15 | // skidding/dragdealer 16 | // flaviusmatis/simplePagination.js 17 | // cthackers/adm-zip 18 | // ghinda/jotted 19 | // alessioalex/ClientManager 20 | // IonicaBizau/image-to-ascii 21 | // IonicaBizau/medium-editor-markdown 22 | // balajmarius/adi.js 23 | // ... 24 | }); 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-25 Ionică Bizău (https://ionicabizau.net) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "made-in", 3 | "description": "Get GitHub projects created by users from a specific location.", 4 | "keywords": [ 5 | "made", 6 | "in", 7 | "get", 8 | "github", 9 | "projects", 10 | "created", 11 | "by", 12 | "users", 13 | "from", 14 | "a", 15 | "specific", 16 | "location" 17 | ], 18 | "license": "MIT", 19 | "version": "1.0.14", 20 | "main": "lib/index.js", 21 | "scripts": { 22 | "test": "echo \"Error: no test specified\" && exit 1" 23 | }, 24 | "author": "Ionică Bizău (https://ionicabizau.net)", 25 | "files": [ 26 | "bin/", 27 | "app/", 28 | "lib/", 29 | "dist/", 30 | "src/", 31 | "scripts/", 32 | "resources/", 33 | "menu/", 34 | "cli.js", 35 | "index.js", 36 | "index.d.ts", 37 | "package-lock.json", 38 | "bloggify.js", 39 | "bloggify.json", 40 | "bloggify/" 41 | ], 42 | "repository": { 43 | "type": "git", 44 | "url": "git+ssh://git@github.com/IonicaBizau/made-in.git" 45 | }, 46 | "bugs": { 47 | "url": "https://github.com/IonicaBizau/made-in/issues" 48 | }, 49 | "homepage": "https://github.com/IonicaBizau/made-in#readme", 50 | "dependencies": { 51 | "bindy": "^1.0.4", 52 | "gh.js": "^3.0.6", 53 | "same-time": "^2.3.1", 54 | "ul": "^5.2.2" 55 | }, 56 | "blah": {} 57 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 🌟 Contributing 2 | 3 | Want to contribute to this project? Great! Please read these quick steps to streamline the process and avoid unnecessary tasks. ✨ 4 | 5 | ## 💬 Discuss Changes 6 | Start by opening an issue in the repository using the [bug tracker][1]. Describe your proposed contribution or the bug you've found. If relevant, include platform info and screenshots. 🖼️ 7 | 8 | Wait for feedback before proceeding unless the fix is straightforward, like a typo. 📝 9 | 10 | ## 🔧 Fixing Issues 11 | 12 | Fork the project and create a branch for your fix, naming it `some-great-feature` or `some-issue-fix`. Commit changes while following the [code style][2]. If the project has tests, add one. ✅ 13 | 14 | If a `package.json` or `bower.json` exists, add yourself to the `contributors` array; create it if it doesn't. 🙌 15 | 16 | ```json 17 | { 18 | "contributors": [ 19 | "Your Name (http://your.website)" 20 | ] 21 | } 22 | ``` 23 | 24 | ## 📬 Creating a Pull Request 25 | Open a pull request and reference the initial issue (e.g., *fixes #*). Provide a clear title and consider adding visual aids for clarity. 📊 26 | 27 | ## ⏳ Wait for Feedback 28 | Your contributions will be reviewed. If feedback is given, update your branch as needed, and the pull request will auto-update. 🔄 29 | 30 | ## 🎉 Everyone Is Happy! 31 | Your contributions will be merged, and everyone will appreciate your effort! 😄❤️ 32 | 33 | Thanks! 🤩 34 | 35 | [1]: /issues 36 | [2]: https://github.com/IonicaBizau/code-style -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const GitHub = require("gh.js") 4 | , ul = require("ul") 5 | , bindy = require("bindy") 6 | , sameTime = require("same-time") 7 | ; 8 | 9 | /** 10 | * madeIn 11 | * Get GitHub projects created by users from a specific location. 12 | * 13 | * @name madeIn 14 | * @function 15 | * @param {String} loc The user location. 16 | * @param {Object} options An object containing the following fields: 17 | * 18 | * - language (String): The repository language. 19 | * - token (String): The GitHub token. 20 | * 21 | * @param {Function} cb The callback function. 22 | */ 23 | module.exports = function madeIn (loc, options, cb) { 24 | 25 | options = ul.merge(options, { 26 | language: "" 27 | , token: undefined 28 | }); 29 | 30 | if (options.language) { 31 | options.language = `language:"${options.language}"`; 32 | } 33 | 34 | let gh = new GitHub(options.token); 35 | 36 | gh.get("search/users", { 37 | opts: { 38 | q: `location:${loc} ${options.language}` 39 | , sort: "followers" 40 | // 30 requests per minute 41 | // - 1 for users 42 | // - 29 requests (one for each user) 43 | , per_page: 29 44 | } 45 | }, (err, data) => { 46 | if (err) { return cb(err); } 47 | let users = data.items; 48 | let repos = []; 49 | 50 | sameTime(bindy(users, (cUser, done) => { 51 | gh.get("search/repositories", { 52 | opts: { 53 | q: `user:${cUser.login} fork:false stars:>1 ${options.language}` 54 | , sort: "stars" 55 | } 56 | }, (err, data) => { 57 | if (err) { data = { items: [] }; } 58 | repos = repos.concat(data.items); 59 | done(); 60 | }); 61 | }), (err, data) => { 62 | if (err) { return cb(err); } 63 | repos.sort((a, b) => a.stargazers_count < b.stargazers_count ? 1 : -1) 64 | cb(null, repos); 65 | }); 66 | }); 67 | }; 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | # made-in 21 | 22 | [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/made-in.svg)](https://www.npmjs.com/package/made-in) [![Downloads](https://img.shields.io/npm/dt/made-in.svg)](https://www.npmjs.com/package/made-in) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/@johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github) 23 | 24 | Buy Me A Coffee 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | > Get GitHub projects created by users from a specific location. 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ## :cloud: Installation 51 | 52 | ```sh 53 | # Using npm 54 | npm install --save made-in 55 | 56 | # Using yarn 57 | yarn add made-in 58 | ``` 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | ## :clipboard: Example 73 | 74 | 75 | 76 | ```js 77 | const madeIn = require("made-in"); 78 | 79 | // Some cool JS stuff made in Romania 80 | madeIn("Romania", { 81 | language: "JavaScript" 82 | , token: "..." 83 | }, (err, data) => { 84 | console.log(err || data.map(c => c.full_name).join("\n")); 85 | // IonicaBizau/git-stats 86 | // IonicaBizau/scrape-it 87 | // skidding/cosmos 88 | // victorstanciu/dbv 89 | // skidding/dragdealer 90 | // flaviusmatis/simplePagination.js 91 | // cthackers/adm-zip 92 | // ghinda/jotted 93 | // alessioalex/ClientManager 94 | // IonicaBizau/image-to-ascii 95 | // IonicaBizau/medium-editor-markdown 96 | // balajmarius/adi.js 97 | // ... 98 | }); 99 | ``` 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | ## :question: Get Help 113 | 114 | There are few ways to get help: 115 | 116 | 117 | 118 | 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question. 119 | 2. For bug reports and feature requests, open issues. :bug: 120 | 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket: 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | ## :memo: Documentation 129 | 130 | 131 | ### `madeIn(loc, options, cb)` 132 | Get GitHub projects created by users from a specific location. 133 | 134 | #### Params 135 | 136 | - **String** `loc`: The user location. 137 | - **Object** `options`: An object containing the following fields: 138 | - language (String): The repository language. 139 | - token (String): The GitHub token. 140 | - **Function** `cb`: The callback function. 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | ## :yum: How to contribute 156 | Have an idea? Found a bug? See [how to contribute][contributing]. 157 | 158 | 159 | ## :sparkling_heart: Support my projects 160 | I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, 161 | this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it). 162 | 163 | However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it: 164 | 165 | 166 | - Starring and sharing the projects you like :rocket: 167 | - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book: 168 | - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: 169 | - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone). 170 | - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6` 171 | 172 | ![](https://i.imgur.com/z6OQI95.png) 173 | 174 | 175 | Thanks! :heart: 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | ## :dizzy: Where is this library used? 193 | If you are using this library in one of your projects, add it in this list. :sparkles: 194 | 195 | - `made-in-brazil` 196 | - `made-in-india` 197 | - `made-in-japan` 198 | - `made-in-romania` 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | ## :scroll: License 211 | 212 | [MIT][license] © [Ionică Bizău][website] 213 | 214 | 215 | 216 | 217 | 218 | 219 | [license]: /LICENSE 220 | [website]: https://ionicabizau.net 221 | [contributing]: /CONTRIBUTING.md 222 | [docs]: /DOCUMENTATION.md 223 | [badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg 224 | [badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg 225 | [badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg 226 | [badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg 227 | [patreon]: https://www.patreon.com/ionicabizau 228 | [amazon]: http://amzn.eu/hRo9sIZ 229 | [paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW 230 | -------------------------------------------------------------------------------- /dist/made-in.min.js: -------------------------------------------------------------------------------- 1 | "use strict";var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof2(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.madeIn=e()}}(function(){var e;return function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[s]={exports:{}};e[s][0].call(c.exports,function(t){var r=e[s][1][t];return o(r?r:t)},c,c.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s=0;i--)if(s[i]!=f[i])return!1;for(i=s.length-1;i>=0;i--)if(o=s[i],!a(e[o],t[o]))return!1;return!0}function c(e,t){return e&&t?"[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1:!1}function h(e,t,r,n){var o;l.isString(r)&&(n=r,r=null);try{t()}catch(s){o=s}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&i(o,r,"Missing expected exception"+n),!e&&c(o,r)&&i(o,r,"Got unwanted exception"+n),e&&o&&r&&!c(o,r)||!e&&o)throw o}var l=e("util/"),p=Array.prototype.slice,d=Object.prototype.hasOwnProperty,g=t.exports=s;g.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||i;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,s=t.name,a=n.indexOf("\n"+s);if(a>=0){var u=n.indexOf("\n",a+1);n=n.substring(u+1)}this.stack=n}}},l.inherits(g.AssertionError,Error),g.fail=i,g.ok=s,g.equal=function(e,t,r){e!=t&&i(e,t,r,"==",g.equal)},g.notEqual=function(e,t,r){e==t&&i(e,t,r,"!=",g.notEqual)},g.deepEqual=function(e,t,r){a(e,t)||i(e,t,r,"deepEqual",g.deepEqual)},g.notDeepEqual=function(e,t,r){a(e,t)&&i(e,t,r,"notDeepEqual",g.notDeepEqual)},g.strictEqual=function(e,t,r){e!==t&&i(e,t,r,"===",g.strictEqual)},g.notStrictEqual=function(e,t,r){e===t&&i(e,t,r,"!==",g.notStrictEqual)},g["throws"]=function(){h.apply(this,[!0].concat(p.call(arguments)))},g.doesNotThrow=function(){h.apply(this,[!1].concat(p.call(arguments)))},g.ifError=function(e){if(e)throw e};var y=Object.keys||function(e){var t=[];for(var r in e)d.call(e,r)&&t.push(r);return t}},{"util/":36}],2:[function(e,t,r){function n(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;r>t;++t)u[t]=e[t],f[e.charCodeAt(t)]=t;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63}function o(e){var t,r,n,o,i,s,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[a-2]?2:"="===e[a-1]?1:0,s=new c(3*a/4-i),n=i>0?a-4:a;var u=0;for(t=0,r=0;n>t;t+=4,r+=3)o=f[e.charCodeAt(t)]<<18|f[e.charCodeAt(t+1)]<<12|f[e.charCodeAt(t+2)]<<6|f[e.charCodeAt(t+3)],s[u++]=o>>16&255,s[u++]=o>>8&255,s[u++]=255&o;return 2===i?(o=f[e.charCodeAt(t)]<<2|f[e.charCodeAt(t+1)]>>4,s[u++]=255&o):1===i&&(o=f[e.charCodeAt(t)]<<10|f[e.charCodeAt(t+1)]<<4|f[e.charCodeAt(t+2)]>>2,s[u++]=o>>8&255,s[u++]=255&o),s}function i(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,r){for(var n,o=[],s=t;r>s;s+=3)n=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(i(n));return o.join("")}function a(e){for(var t,r=e.length,n=r%3,o="",i=[],a=16383,f=0,c=r-n;c>f;f+=a)i.push(s(e,f,f+a>c?c:f+a));return 1===n?(t=e[r-1],o+=u[t>>2],o+=u[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=u[t>>10],o+=u[t>>4&63],o+=u[t<<2&63],o+="="),i.push(o),i.join("")}r.toByteArray=o,r.fromByteArray=a;var u=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},{}],3:[function(){},{}],4:[function(e,t,r){(function(t){var n=e("buffer"),o=n.Buffer,i=n.SlowBuffer,s=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof o.alloc)return o.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>s)throw new RangeError("size is too large");var n=r,i=t;void 0===i&&(n=void 0,i=0);var a=new o(e);if("string"==typeof i)for(var u=new o(i,n),f=u.length,c=-1;++cs)throw new RangeError("size is too large");return new o(e)},r.from=function(e,r,n){if("function"==typeof o.from&&(!t.Uint8Array||Uint8Array.from!==o.from))return o.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new o(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var i=r;if(1===arguments.length)return new o(e);"undefined"==typeof i&&(i=0);var s=n;if("undefined"==typeof s&&(s=e.byteLength-i),i>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(s>e.byteLength-i)throw new RangeError("'length' is out of bounds");return new o(e.slice(i,i+s))}if(o.isBuffer(e)){var a=new o(e.length);return e.copy(a,0,0,e.length),a}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new o(e);if("Buffer"===e.type&&Array.isArray(e.data))return new o(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof o.allocUnsafeSlow)return o.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=s)throw new RangeError("size is too large");return new i(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:5}],5:[function(e,t,r){(function(t){function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function o(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(o()=t?i(e,t):void 0!==r?"string"==typeof n?i(e,t).fill(r,n):i(e,t).fill(r):i(e,t)}function c(e,t){if(u(t),e=i(e,0>t?0:0|g(t)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;t>r;++r)e[r]=0;return e}function h(e,t,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|m(t,r);return e=i(e,n),e.write(t,r),e}function l(e,t){var r=0|g(t.length);e=i(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function p(e,t,r,n){if(t.byteLength,0>r||t.byteLength=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),s.alloc(+e)}function m(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,t>>>=0,t>=r)return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return C(this,t,r);case"binary":return j(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n){function o(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}var i=1,s=e.length,a=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,s/=2,a/=2,r/=2}for(var u=-1,f=r;s>f;++f)if(o(e,f)===o(t,-1===u?0:f-u)){if(-1===u&&(u=f),f-u+1===a)return u*i}else-1!==u&&(f-=f-u),u=-1;return-1}function _(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;n>s;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function E(e,t,r,n){return J(H(t,e.length-r),e,r,n)}function R(e,t,r,n){return J(W(t),e,r,n)}function x(e,t,r,n){return R(e,t,r,n)}function S(e,t,r,n){return J($(t),e,r,n)}function A(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function O(e,t,r){return K.fromByteArray(0===t&&r===e.length?e:e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;r>o;){var i=e[o],s=null,a=i>239?4:i>223?3:i>191?2:1;if(r>=o+a){var u,f,c,h;switch(a){case 1:128>i&&(s=i);break;case 2:u=e[o+1],128===(192&u)&&(h=(31&i)<<6|63&u,h>127&&(s=h));break;case 3:u=e[o+1],f=e[o+2],128===(192&u)&&128===(192&f)&&(h=(15&i)<<12|(63&u)<<6|63&f,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:u=e[o+1],f=e[o+2],c=e[o+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(h=(15&i)<<18|(63&u)<<12|(63&f)<<6|63&c,h>65535&&1114112>h&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=a}return T(n)}function T(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var r="",n=0;t>n;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Q));return r}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;++o)n+=String.fromCharCode(127&e[o]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;++o)n+=String.fromCharCode(e[o]);return n}function M(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var o="",i=t;r>i;++i)o+=F(e[i]);return o}function L(e,t,r){for(var n=e.slice(t,r),o="",i=0;ie)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||i>t)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function U(e,t,r,n){0>t&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);i>o;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function q(e,t,r,n){0>t&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);i>o;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function I(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||I(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return o||I(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(e,t,r,n,52,8),r+8}function z(e){if(e=Y(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function F(e){return 16>e?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],s=0;n>s;++s){if(r=e.charCodeAt(s),r>55295&&57344>r){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(56320>r){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>r){if((t-=1)<0)break;i.push(r)}else if(2048>r){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(65536>r){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 W(e){for(var t=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function $(e){return K.toByteArray(z(e))}function J(e,t,r,n){for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function X(e){return e!==e}var K=e("base64-js"),V=e("ieee754"),Z=e("isarray");r.Buffer=s,r.SlowBuffer=y,r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=o(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,r){return a(null,e,t,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,r){return f(null,e,t,r)},s.allocUnsafe=function(e){return c(null,e)},s.allocUnsafeSlow=function(e){return c(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);i>o;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return n>r?-1:r>n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;rt;t+=2)b(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):v.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},s.prototype.compare=function(e,t,r,n,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),0>t||r>e.length||0>n||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(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,a=r-t,u=Math.min(i,a),f=this.slice(n,o),c=e.slice(t,r),h=0;u>h;++h)if(f[h]!==c[h]){i=f[h],a=c[h];break}return a>i?-1:i>a?1:0},s.prototype.indexOf=function(e,t,r){if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:w(this,e,t,r);if("number"==typeof e)return s.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):w(this,[e],t,r);throw new TypeError("val must be string, number or Buffer")},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.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|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(0>r||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return R(this,e,t,r);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 A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e);var n;if(s.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=s.prototype;else{var o=t-e;n=new s(o,void 0);for(var i=0;o>i;++i)n[i]=this[i+e]}return n},s.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||B(e,t,this.length);for(var n=this[e],o=1,i=0;++i0&&(o*=256);)n+=this[e+--t]*o;return n},s.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||B(e,t,this.length);for(var n=this[e],o=1,i=0;++i=o&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||B(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),V.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),V.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),V.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),V.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var o=Math.pow(2,8*r)-1;P(this,e,t,r,o,0)}var i=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+i]=e/s&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):q(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):q(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++ie&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)0>e&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):q(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t=0|t,r||P(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):q(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-tr&&n>t)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(1e3>i||!s.TYPED_ARRAY_SUPPORT)for(o=0;i>o;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);256>o&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e=255&e);if(0>t||this.length=r)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=t;r>i;++i)this[i]=e;else{var a=s.isBuffer(e)?e:H(new s(e,n).toString()),u=a.length;for(i=0;r-t>i;++i)this[i+t]=a[i%u]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":2,ieee754:10,isarray:13}],6:[function(e,t){t.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",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"}},{}],7:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function o(e){return null===e}function i(e){return null==e}function s(e){return"number"==typeof e}function a(e){return"string"==typeof e}function u(e){return"symbol"===("undefined"==typeof e?"undefined":_typeof2(e))}function f(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function h(e){return"object"===("undefined"==typeof e?"undefined":_typeof2(e))&&null!==e}function l(e){return"[object Date]"===y(e)}function p(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":_typeof2(e))||"undefined"==typeof e}function y(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=o,r.isNullOrUndefined=i,r.isNumber=s,r.isString=a,r.isSymbol=u,r.isUndefined=f,r.isRegExp=c,r.isObject=h,r.isDate=l,r.isError=p,r.isFunction=d,r.isPrimitive=g,r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":12}],8:[function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function o(e){return"number"==typeof e}function i(e){return"object"===("undefined"==typeof e?"undefined":_typeof2(e))&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,a,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),f=r.slice(),o=f.length,u=0;o>u;u++)f[u].apply(this,a);return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(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},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,o,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(a=s;a-->0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(0>o)return this; 2 | 3 | 1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],9:[function(e,t){var r=e("http"),n=t.exports;for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o]);n.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",r.request.call(this,e,t)}},{http:26}],10:[function(e,t,r){r.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<>1,c=-7,h=r?o-1:0,l=r?-1:1,p=e[t+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+e[t+h],h+=l,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=l,c-=8);if(0===i)i=1-f;else{if(i===u)return s?0/0:(p?-1:1)*(1/0);s+=Math.pow(2,n),i-=f}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var s,a,u,f=8*i-o-1,c=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+h>=1?l/u:l*Math.pow(2,1-h),t*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,o),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,f-=8);e[r+p-d]|=128*g}},{}],11:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],12:[function(e,t){t.exports=function(e){return!(null==e||!(e._isBuffer||e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)))}},{}],13:[function(e,t){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],14:[function(e,t){(function(e){function r(t,r,n,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,o)});default:for(i=new Array(a-1),s=0;s1)for(var r=1;r1&&(n=r[0]+"@",e=r[1]),e=e.replace(L,".");var o=e.split("."),i=s(o,t).join(".");return n+i}function u(e){for(var t,r,n=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function f(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=q(e>>>10&1023|55296),e=56320|1023&e),t+=q(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:R}function h(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?U(e/O):e>>1,e+=U(e/t);e>P*S>>1;n+=R)e=U(e/P);return U(n+(P+1)*e/(e+A))}function p(e){var t,r,n,o,s,a,u,h,p,d,g=[],y=e.length,m=0,v=T,b=k;for(r=e.lastIndexOf(C),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&i("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;y>o;){for(s=m,a=1,u=R;o>=y&&i("invalid-input"),h=c(e.charCodeAt(o++)),(h>=R||h>U((E-m)/a))&&i("overflow"),m+=h*a,p=b>=u?x:u>=b+S?S:u-b,!(p>h);u+=R)d=R-p,a>U(E/d)&&i("overflow"),a*=d;t=g.length+1,b=l(m-s,t,0==s),U(m/t)>E-v&&i("overflow"),v+=U(m/t),m%=t,g.splice(m++,0,v)}return f(g)}function d(e){var t,r,n,o,s,a,f,c,p,d,g,y,m,v,b,w=[];for(e=u(e),y=e.length,t=T,r=0,s=k,a=0;y>a;++a)g=e[a],128>g&&w.push(q(g));for(n=o=w.length,o&&w.push(C);y>n;){for(f=E,a=0;y>a;++a)g=e[a],g>=t&&f>g&&(f=g);for(m=n+1,f-t>U((E-r)/m)&&i("overflow"),r+=(f-t)*m,t=f,a=0;y>a;++a)if(g=e[a],t>g&&++r>E&&i("overflow"),g==t){for(c=r,p=R;d=s>=p?x:p>=s+S?S:p-s,!(d>c);p+=R)b=c-d,v=R-d,w.push(q(h(d+b%v,0))),c=U(b/v);w.push(q(h(c,0))),s=l(r,m,n==o),r=0,++n}++r,++t}return w.join("")}function g(e){return a(e,function(e){return j.test(e)?p(e.slice(4).toLowerCase()):e})}function y(e){return a(e,function(e){return M.test(e)?"xn--"+d(e):e})}var m="object"==("undefined"==typeof n?"undefined":_typeof2(n))&&n&&!n.nodeType&&n,v="object"==("undefined"==typeof r?"undefined":_typeof2(r))&&r&&!r.nodeType&&r,b="object"==("undefined"==typeof t?"undefined":_typeof2(t))&&t;(b.global===b||b.window===b||b.self===b)&&(o=b);var w,_,E=2147483647,R=36,x=1,S=26,A=38,O=700,k=72,T=128,C="-",j=/^xn--/,M=/[^\x20-\x7E]/,L=/[\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"},P=R-x,U=Math.floor,q=String.fromCharCode;if(w={version:"1.4.1",ucs2:{decode:u,encode:f},decode:p,encode:d,toASCII:y,toUnicode:g},"function"==typeof e&&"object"==_typeof2(e.amd)&&e.amd)e("punycode",function(){return w});else if(m&&v)if(r.exports==m)v.exports=w;else for(_ in w)w.hasOwnProperty(_)&&(m[_]=w[_]);else o.punycode=w}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,o,i){t=t||"&",o=o||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var f=e.length;u>0&&f>u&&(f=u);for(var c=0;f>c;++c){var h,l,p,d,g=e[c].replace(a,"%20"),y=g.indexOf(o);y>=0?(h=g.substr(0,y),l=g.substr(y+1)):(h=g,l=""),p=decodeURIComponent(h),d=decodeURIComponent(l),r(s,p)?n(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],18:[function(e,t){function r(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var f;!t.decoder||o||n||(r=t.decoder.write(r),f=!t.objectMode&&0===r.length),o||(t.reading=!1),f||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&l(e))),d(e,t)}else o||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function f(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function c(e,t){var r=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(e,t){if(!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,l(e)}}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(P("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?A(p,e):p(e))}function p(e){P("emit readable"),e.emit("readable"),w(e)}function d(e,t){t.readingMore||(t.readingMore=!0,A(g,e,t))}function g(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=o)r=i?n.join(""):1===n.length?n[0]:j.concat(n,o),n.length=0;else if(ef&&e>u;f++){var h=n[0],l=Math.min(e-u,h.length);i?r+=h.slice(0,l):h.copy(r,u,0,l),l0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,A(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function x(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function S(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}t.exports=i;var A=e("process-nextick-args"),O=e("isarray");i.ReadableState=o;var k,T=e("events").EventEmitter,C=function(e,t){return e.listeners(t).length};!function(){try{k=e("stream")}catch(t){}finally{k||(k=e("events").EventEmitter)}}();var j=e("buffer").Buffer,M=e("buffer-shims"),L=e("core-util-is");L.inherits=e("inherits");var B=e("util"),P=void 0;P=B&&B.debuglog?B.debuglog("stream"):function(){};var U;L.inherits(i,k);var q,q,I="function"==typeof T.prototype.prependListener;i.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding,t!==r.encoding&&(e=M.from(e,t),t="")),s(this,r,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return s(this,t,e,"",!0)},i.prototype.isPaused=function(){return this._readableState.flowing===!1},i.prototype.setEncoding=function(t){return U||(U=e("string_decoder/").StringDecoder),this._readableState.decoder=new U(t),this._readableState.encoding=t,this};var D=8388608;i.prototype.read=function(e){P("read",e);var t=this._readableState,r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return P("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):l(this),null;if(e=f(e,t),0===e&&t.ended)return 0===t.length&&E(this),null;var n=t.needReadable;P("need readable",n),(0===t.length||t.length-e0?_(e,t):null,null===o&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&E(this),null!==o&&this.emit("data",o),o},i.prototype._read=function(){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function o(e){P("onunpipe"),e===l&&s()}function i(){P("onend"),e.end()}function s(){P("cleanup"),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("drain",m),e.removeListener("error",u),e.removeListener("unpipe",o),l.removeListener("end",i),l.removeListener("end",s),l.removeListener("data",a),v=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||m()}function a(t){P("ondata");var r=e.write(t);!1===r&&((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&-1!==S(p.pipes,e))&&!v&&(P("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++),l.pause())}function u(t){P("onerror",t),h(),e.removeListener("error",u),0===C(e,"error")&&e.emit("error",t)}function f(){e.removeListener("finish",c),h()}function c(){P("onfinish"),e.removeListener("close",f),h()}function h(){P("unpipe"),l.unpipe(e)}var l=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,P("pipe count=%d opts=%j",p.pipesCount,t);var d=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,g=d?i:s;p.endEmitted?A(g):l.once("end",g),e.on("unpipe",o);var m=y(l);e.on("drain",m);var v=!1;return l.on("data",a),n(e,"error",u),e.once("close",f),e.once("finish",c),e.emit("pipe",l),p.flowing||(P("pipe resume"),l.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;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),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;n>o;o++)r[o].emit("unpipe",this);return this}var i=S(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=k.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&l(this,n):A(m,this))}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(P("resume"),e.flowing=!0,v(this,e)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(P("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(o){if(P("wrapped data"),t.decoder&&(o=t.decoder.write(o)),(!t.objectMode||null!==o&&void 0!==o)&&(t.objectMode||o&&o.length)){var i=n.push(o);i||(r=!0,e.pause())}});for(var o in e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));var i=["error","close","destroy","pause","resume"];return x(i,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){P("wrapped _read",t),r&&(r=!1,e.resume())},n},i._fromList=_}).call(this,e("_process"))},{"./_stream_duplex":20,_process:15,buffer:5,"buffer-shims":4,"core-util-is":7,events:8,inherits:11,isarray:13,"process-nextick-args":14,"string_decoder/":30,util:3}],23:[function(e,t){function r(e){this.afterTransform=function(t,r){return n(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function n(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),o(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.length-1?setImmediate:R;s.WritableState=i;var S=e("core-util-is");S.inherits=e("inherits");var A,O={deprecate:e("util-deprecate")};!function(){try{A=e("stream")}catch(t){}finally{A||(A=e("events").EventEmitter)}}();var k=e("buffer").Buffer,T=e("buffer-shims");S.inherits(s,A);var C;i.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(i.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var C;s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,r){var o=this._writableState,i=!1;return"function"==typeof t&&(r=t,t=null),k.isBuffer(e)?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=n),o.ended?a(this,r):u(this,o,e,r)&&(o.pendingcb++,i=c(this,o,e,t,r)),i},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},s.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 TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,r){r(new Error("not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,r){var n=this._writableState;"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),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||_(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":20,_process:15,buffer:5,"buffer-shims":4,"core-util-is":7,events:8,inherits:11,"process-nextick-args":14,"util-deprecate":34}],25:[function(e,t,r){(function(n){var o=function(){try{return e("stream")}catch(t){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=o||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&o&&(t.exports=o)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":20,"./lib/_stream_passthrough.js":21,"./lib/_stream_readable.js":22,"./lib/_stream_transform.js":23,"./lib/_stream_writable.js":24,_process:15}],26:[function(e,t,r){(function(t){var n=e("./lib/request"),o=e("xtend"),i=e("builtin-status-codes"),s=e("url"),a=r;a.request=function(e,r){e="string"==typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,f=e.port,c=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(f?":"+f:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return r&&h.on("response",r),h},a.get=function(e,t){var r=a.request(e,t);return r.end(),r},a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.STATUS_CODES=i,a.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"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":28,"builtin-status-codes":6,url:32,xtend:37}],27:[function(e,t,r){(function(e){function t(e){try{return i.responseType=e,i.responseType===e}catch(t){}return!1}function n(e){return"function"==typeof e}r.fetch=n(e.fetch)&&n(e.ReadableByteStream),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(o){}var i=new e.XMLHttpRequest;i.open("GET",e.location.host?"/":"https://example.com");var s="undefined"!=typeof e.ArrayBuffer,a=s&&n(e.ArrayBuffer.prototype.slice);r.arraybuffer=s&&t("arraybuffer"),r.msstream=!r.fetch&&a&&t("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&s&&t("moz-chunked-arraybuffer"),r.overrideMimeType=n(i.overrideMimeType),r.vbArray=n(e.VBArray),i=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t){(function(r,n,o){function i(e){return a.fetch?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":a.vbArray&&e?"text:vbarray":"text"}function s(e){try{var t=e.status;return null!==t&&0!==t}catch(r){return!1}}var a=e("./capability"),u=e("inherits"),f=e("./response"),c=e("readable-stream"),h=e("to-arraybuffer"),l=f.IncomingMessage,p=f.readyStates,d=t.exports=function(e){var t=this;c.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new o(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r;if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!a.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}t._mode=i(r),t.on("finish",function(){t._onFinish()})};u(d,c.Writable),d.prototype.setHeader=function(e,t){var r=this,n=e.toLowerCase();-1===g.indexOf(n)&&(r._headers[n]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this;return t._headers[e.toLowerCase()].value},d.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,i=e._opts,s=e._headers;if(("POST"===i.method||"PUT"===i.method||"PATCH"===i.method)&&(t=a.blobConstructor?new n.Blob(e._body.map(function(e){return h(e)}),{type:(s["content-type"]||{}).value||""}):o.concat(e._body).toString()),"fetch"===e._mode){var u=Object.keys(s).map(function(e){return[s[e].name,s[e].value]});n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:t,mode:"cors",credentials:i.withCredentials?"include":"same-origin"}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var f=e._xhr=new n.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(c){return void r.nextTick(function(){e.emit("error",c); 4 | 5 | })}"responseType"in f&&(f.responseType=e._mode.split(":")[0]),"withCredentials"in f&&(f.withCredentials=!!i.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(s).forEach(function(e){f.setRequestHeader(s[e].name,s[e].value)}),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{f.send(t)}catch(c){return void r.nextTick(function(){e.emit("error",c)})}}}},d.prototype._onXHRProgress=function(){var e=this;s(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},d.prototype._write=function(e,t,r){var n=this;n._body.push(e),r()},d.prototype.abort=d.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},d.prototype.end=function(e,t,r){var n=this;"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(n,e,t,r)},d.prototype.flushHeaders=function(){},d.prototype.setTimeout=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var g=["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","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":27,"./response":29,_process:15,buffer:5,inherits:11,"readable-stream":25,"to-arraybuffer":31}],29:[function(e,t,r){(function(t,n,o){var i=e("./capability"),s=e("inherits"),a=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=r.IncomingMessage=function(e,r,n){var s=this;if(a.Readable.call(s),s._mode=n,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){t.nextTick(function(){s.emit("close")})}),"fetch"===n){var u,f,c,h;!function(){var e=function t(){h.read().then(function(e){if(!s._destroyed){if(e.done)return void s.push(null);s.push(new o(e.value)),t()}})};for(s._fetchResponse=r,s.url=r.url,s.statusCode=r.status,s.statusMessage=r.statusText,c=r.headers[Symbol.iterator]();u=(f=c.next()).value,!f.done;)s.headers[u[0].toLowerCase()]=u[1],s.rawHeaders.push(u[0],u[1]);h=r.body.getReader(),e()}()}else{s._xhr=e,s._pos=0,s.url=e.responseURL,s.statusCode=e.status,s.statusMessage=e.statusText;var l=e.getAllResponseHeaders().split(/\r?\n/);if(l.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===s.headers[r]&&(s.headers[r]=[]),s.headers[r].push(t[2])):void 0!==s.headers[r]?s.headers[r]+=", "+t[2]:s.headers[r]=t[2],s.rawHeaders.push(t[1],t[2])}}),s._charset="x-user-defined",!i.overrideMimeType){var p=s.rawHeaders["mime-type"];if(p){var d=p.match(/;\s*charset=([^;])(;|$)/);d&&(s._charset=d[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};s(f,a.Readable),f.prototype._read=function(){},f.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(i){}if(null!==r){e.push(new o(r));break}case"text":try{r=t.responseText}catch(i){e._mode="text:vbarray";break}if(r.length>e._pos){var s=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new o(s.length),f=0;fe._pos&&(e.push(new o(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":27,_process:15,buffer:5,inherits:11,"readable-stream":25}],30:[function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function o(e){return e.toString(this.encoding)}function i(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function s(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var a=e("buffer").Buffer,u=a.isEncoding||function(e){switch(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}},f=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=i;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=o)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};f.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var o=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,o),o-=this.charReceived),t+=e.toString(this.encoding,0,o);var o=t.length-1,n=t.charCodeAt(o);if(n>=55296&&56319>=n){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,o)}return t},f.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},f.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,o=this.encoding;t+=n.slice(0,r).toString(o)}return t}},{buffer:5}],31:[function(e,t){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,o=0;n>o;o++)t[o]=e[o];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:5}],32:[function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(e,t,r){if(e&&f.isObject(e)&&e instanceof n)return e;var o=new n;return o.parse(e,t,r),o}function i(e){return f.isString(e)&&(e=o(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return o(e,!1,!0).resolve(t)}function a(e,t){return e?o(e,!1,!0).resolveObject(t):t}var u=e("punycode"),f=e("./util");r.parse=o,r.resolve=s,r.resolveObject=a,r.format=i,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n"," "],d=["{","}","|","\\","^","`"].concat(p),g=["'"].concat(d),y=["%","/","?",";","#"].concat(g),m=["/","?","#"],v=255,b=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},R={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=e("querystring");n.prototype.parse=function(e,t,r){if(!f.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof e?"undefined":_typeof2(e)));var n=e.indexOf("?"),o=-1!==n&&nk)&&(A=k)}var T,C;C=-1===A?a.lastIndexOf("@"):a.lastIndexOf("@",A),-1!==C&&(T=a.slice(0,C),a=a.slice(C+1),this.auth=decodeURIComponent(T)),A=-1;for(var O=0;Ok)&&(A=k)}-1===A&&(A=a.length),this.host=a.slice(0,A),a=a.slice(A),this.parseHost(),this.hostname=this.hostname||"";var j="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!j)for(var M=this.hostname.split(/\./),O=0,L=M.length;L>O;O++){var B=M[O];if(B&&!B.match(b)){for(var P="",U=0,q=B.length;q>U;U++)P+=B.charCodeAt(U)>127?"x":B[U];if(!P.match(b)){var I=M.slice(0,O),D=M.slice(O+1),N=B.match(w);N&&(I.push(N[1]),D.unshift(N[2])),D.length&&(a="/"+D.join(".")+a),this.hostname=I.join(".");break}}}this.hostname=this.hostname.length>v?"":this.hostname.toLowerCase(),j||(this.hostname=u.toASCII(this.hostname));var z=this.port?":"+this.port:"",Y=this.hostname||"";this.host=Y+z,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!_[d])for(var O=0,L=g.length;L>O;O++){var F=g[O];if(-1!==a.indexOf(F)){var H=encodeURIComponent(F);H===F&&(H=escape(F)),a=a.split(F).join(H)}}var W=a.indexOf("#");-1!==W&&(this.hash=a.substr(W),a=a.slice(0,W));var G=a.indexOf("?");if(-1!==G?(this.search=a.substr(G),this.query=a.substr(G+1),t&&(this.query=x.parse(this.query)),a=a.slice(0,G)):t&&(this.search="",this.query={}),a&&(this.pathname=a),R[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var z=this.pathname||"",$=this.search||"";this.path=z+$}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",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&&f.isObject(this.query)&&Object.keys(this.query).length&&(i=x.stringify(this.query));var s=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||R[t])&&o!==!1?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+o+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(f.isString(e)){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,o=Object.keys(this),i=0;i0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return r.search=e.search,r.query=e.query,f.isNull(r.pathname)&&f.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var A=_.slice(-1)[0],O=(r.host||e.host||_.length>1)&&("."===A||".."===A)||""===A,k=0,T=_.length;T>=0;T--)A=_[T],"."===A?_.splice(T,1):".."===A?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!b&&!w)for(;k--;k)_.unshift("..");!b||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),O&&"/"!==_.join("/").substr(-1)&&_.push("");var C=""===_[0]||_[0]&&"/"===_[0].charAt(0);if(x){r.hostname=r.host=C?"":_.length?_.shift():"";var S=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return b=b||r.host&&_.length,b&&!C&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),f.isNull(r.pathname)&&f.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":33,punycode:16,querystring:19}],33:[function(e,t){t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===("undefined"==typeof e?"undefined":_typeof2(e))&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],34:[function(e,t){(function(e){function r(e,t){function r(){if(!o){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),o=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var o=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(r){return!1}var n=e.localStorage[t];return null==n?!1:"true"===String(n).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(e,t){t.exports=function(e){return e&&"object"===("undefined"==typeof e?"undefined":_typeof2(e))&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],36:[function(e,t,r){(function(t,n){function o(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),u(n,e,n.depth)}function i(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function s(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return b(o)||(o=u(e,o,n)),o}var i=f(e,t);if(i)return i;var s=Object.keys(t),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),S(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(t);if(0===s.length){if(A(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return c(t)}var m="",v=!1,w=["{","}"];if(d(t)&&(v=!0,w=["[","]"]),A(t)){var _=t.name?": "+t.name:"";m=" [Function"+_+"]"}if(E(t)&&(m=" "+RegExp.prototype.toString.call(t)),x(t)&&(m=" "+Date.prototype.toUTCString.call(t)),S(t)&&(m=" "+c(t)),0===s.length&&(!v||0==t.length))return w[0]+m+w[1];if(0>n)return E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var R;return R=v?h(e,t,n,g,s):s.map(function(r){return l(e,t,n,g,r,v)}),e.seen.pop(),p(R,m,w)}function f(e,t){if(_(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,o){for(var i=[],s=0,a=t.length;a>s;++s)i.push(j(t,String(s))?l(e,t,r,n,String(s),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||i.push(l(e,t,r,n,o,!0))}),i}function l(e,t,r,n,o,i){var s,a,f;if(f=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},f.get?a=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(a=e.stylize("[Setter]","special")),j(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(f.value)<0?(a=y(r)?u(e,f.value,null):u(e,f.value,r-1),a.indexOf("\n")>-1&&(a=i?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),_(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e,t,r){var n=0,o=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"===("undefined"==typeof e?"undefined":_typeof2(e))}function _(e){return void 0===e}function E(e){return R(e)&&"[object RegExp]"===k(e)}function R(e){return"object"===("undefined"==typeof e?"undefined":_typeof2(e))&&null!==e}function x(e){return R(e)&&"[object Date]"===k(e)}function S(e){return R(e)&&("[object Error]"===k(e)||e instanceof Error)}function A(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":_typeof2(e))||"undefined"==typeof e}function k(e){return Object.prototype.toString.call(e)}function T(e){return 10>e?"0"+e.toString(10):e.toString(10)}function C(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var M=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),a=n[r];i>r;a=n[++r])s+=y(a)||!R(a)?" "+a:" "+o(a);return s},r.deprecate=function(e,o){function i(){if(!s){if(t.throwDeprecation)throw new Error(o);t.traceDeprecation?console.trace(o):console.error(o),s=!0}return e.apply(this,arguments)}if(_(n.process))return function(){return r.deprecate(e,o).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return i};var L,B={};r.debuglog=function(e){if(_(L)&&(L=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!B[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var n=t.pid;B[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else B[e]=function(){};return B[e]},r.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=g,r.isNull=y,r.isNullOrUndefined=m,r.isNumber=v,r.isString=b,r.isSymbol=w,r.isUndefined=_,r.isRegExp=E,r.isObject=R,r.isDate=x,r.isError=S,r.isFunction=A,r.isPrimitive=O,r.isBuffer=e("./support/isBuffer");var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",C(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!R(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":35,_process:15,inherits:11}],37:[function(e,t){function r(){for(var e={},t=0;t1 "+(t.language?"language:"+t.language:""),sort:"stars"}},r)}),function(e,t){if(e)return s(e);var r=[];t.forEach(function(e){return r=r.concat(e.items)}),r.sort(function(e,t){return e.stargazers_count=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,n),e}function i(){return"object"===("undefined"==typeof console?"undefined":_typeof2(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(t){}}function a(){var e;try{e=r.storage.debug}catch(t){}return e}function u(){try{return window.localStorage}catch(e){}}r=t.exports=e("./debug"),r.log=i,r.formatArgs=o,r.save=s,r.load=a,r.useColors=n,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(a())},{"./debug":42}],42:[function(e,t,r){function n(){return r.colors[c++%r.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(f||t);e.diff=i,e.prev=f,e.curr=t,f=t,null==e.useColors&&(e.useColors=r.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,n){if("%%"===t)return t;a++;var o=r.formatters[n];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof r.formatArgs&&(s=r.formatArgs.apply(e,s));var u=o.log||r.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=r.enabled(e)?o:t;return i.namespace=e,i}function i(e){r.save(e);for(var t=(e||"").split(/[\s,]+/),n=t.length,o=0;n>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){r.enable("")}function a(e){var t,n;for(t=0,n=r.skips.length;n>t;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;n>t;t++)if(r.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=o,r.coerce=u,r.disable=s,r.enable=i,r.enabled=a,r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var f,c=0},{ms:49}],43:[function(e,t,r){arguments[4][40][0].apply(r,arguments)},{dup:40,typpy:54}],44:[function(e,t){function r(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function n(e){return e.statusCode>=300&&e.statusCode<=399&&"location"in e.headers}function o(e){for(var t=0,r=f.length;r>t;++t)e[f[t]]=null}var i=e("url"),s=e("assert"),a=e("debug")("follow-redirects"),u=e("stream-consume");t.exports=function(e){function t(e,t){function s(t){if(t){var p=i.format(e);if(l.unshift(p),!n(t))return t.fetchedUrls=l,void d.emit("response",t);u(t);var g=i.resolve(p,t.headers.location);a("redirecting to",g),o(e),r(e,i.parse(g))}if(l.length>e.maxRedirects){var y=new Error("Max redirects exceeded.");return c(y)}e.nativeProtocol=h[e.protocol],e.defaultRequest=f;var m=(e.makeRequest||f)(e,s,t);return m.on("error",c),m}function f(e,t,r){r&&307!==r.statusCode&&(e.method="GET");var n=e.nativeProtocol.request(e,t);return r&&n.end(),n}function c(e){d.emit("error",e)}var l=[],p=s(),d=Object.create(p);return d._events={},d._eventsCount=0,t&&d.on("response",t),d}function f(e,r){var n=e+":",o=function(){};o.prototype=h[n]=r,o=new o,l[e]=o,o.request=function(e,r){return t(c(e,n),r)},o.get=function(e,r){var o=t(c(e,n),r);return o.end(),o}}function c(e,t){return"string"==typeof e?(e=i.parse(e),e.maxRedirects=l.maxRedirects):e=r({maxRedirects:l.maxRedirects,protocol:t},e),s.equal(e.protocol,t,"protocol mismatch"),a("options",e),e}var h={},l={maxRedirects:5};for(var p in e)e.hasOwnProperty(p)&&(s(/^[A-Z][A-Z\+\-\.]*$/i.test(p),JSON.stringify(p)+" is not a valid scheme name"),f(p,e[p]));return l};var f=["protocol","slashes","auth","host","port","hostname","hash","search","query","pathname","path","href"]},{assert:1,debug:41,"stream-consume":52,url:32}],45:[function(e,t){t.exports=e("./create")({http:e("http"),https:e("https")})},{"./create":44,http:26,https:9}],46:[function(e,t){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":"undefined"==typeof e?"undefined":_typeof2(e)},o=function(){function e(e,t){for(var r=0;r1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"days":case"day":case"d":return r*f;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(e){return e>=f?Math.round(e/f)+"d":e>=u?Math.round(e/u)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function o(e){return i(e,f,"day")||i(e,u,"hour")||i(e,a,"minute")||i(e,s,"second")||e+" ms"}function i(e,t,r){ 6 | return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var s=1e3,a=60*s,u=60*a,f=24*u,c=365.25*f;t.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?o(e):n(e)}},{}],50:[function(e,t){(function(r){function n(e,t){var n=[],i=0,s=e.length;return e.length?void e.forEach(function(e,r){var a=!1;e(function(){if(!a){a=!0;for(var e=[].slice.call(arguments),u=null,f=0;ft?Math.max(0,t+o):t||0;for(void 0!==r&&(o=0>r?r+o:r);o-->i;)n[o-i]=e[o];return n}},{}],52:[function(e,t){t.exports=function(e){if(e.readable&&"function"==typeof e.resume){var t=e._readableState;if(!t||0===t.pipesCount)try{e.resume()}catch(r){console.error("Got error: "+r)}}}},{}],53:[function(e,t){(function(r){var n=e("follow-redirects").http,o=e("follow-redirects").https,i=e("ul"),s=e("url"),a=e("querystring"),u=e("events"),f=u.EventEmitter;t.exports=function(e,t){"string"==typeof e&&(e={url:e});var u=s.parse(e.url),c=i.clone(u),h=null,l=!1,p="";e=i.deepMerge(e,c,{method:e.method?e.method:e.data?"POST":"GET",headers:{}});var d=function(e,r,n){l||(l=!0,"function"==typeof t&&t(e,r,n))};e.data&&e.data.constructor===Object&&(e.data=a.stringify(e.data)),"string"==typeof e.data&&(e.headers["Content-Length"]=r.byteLength(e.data));var g=new f;return h=("http:"===e.protocol?n:o).request(e,function(e){e.setEncoding("utf8"),p="","function"==typeof t&&e.on("data",function(e){p+=e.toString()}),e.on("data",function(e){g.emit("data",e)}).on("error",function(t){g.emit("error",t),d(t,null,e)}).on("end",function(){g.emit("end"),d(null,p,e)})}).on("error",function(e){d(e,null,null)}),e.data&&h.write(e.data,e.encoding),h.end(),g}}).call(this,e("buffer").Buffer)},{buffer:5,events:8,"follow-redirects":45,querystring:19,ul:55,url:32}],54:[function(e,t){function r(e){return"string"==typeof e?"string":null===e?"null":void 0===e?"undefined":e.constructor.name.toLowerCase()}t.exports=r},{}],55:[function(e,t){(function(r){function n(){}var o=e("typpy"),i=e("deffy");n.prototype.merge=function(e,t){var r={},n=null;t=i(t,{}),e=i(e,{});for(n in t)r[n]=t[n];for(n in e)void 0!==e[n]&&(r[n]=e[n]);return r},n.prototype.deepMerge=function(){for(var e,t,r={},n=[].splice.call(arguments,0);n.length>0;)if(e=n.splice(-1)[0],"object"===o(e))for(t in e)e.hasOwnProperty(t)&&("object"===o(e[t])?r[t]=this.deepMerge(e[t],r[t]||{}):void 0!==e[t]&&(r[t]=e[t]));return r},n.prototype.clone=function(e){if(!e)return e;var t,r,n=this,o=[Number,String,Boolean];if(o.forEach(function(r){e instanceof r&&(t=r(e))}),"undefined"==typeof t)if(Array.isArray(e))t=[],e.forEach(function(e,r){t[r]=n.clone(e)});else if("object"==("undefined"==typeof e?"undefined":_typeof2(e)))if(e.prototype)t=e;else if(e instanceof Date)t=new Date(e);else{t={};for(r in e)t[r]=n.clone(e[r])}else t=e;return t},n.prototype.HOME_DIR=r.env["win32"==r.platform?"USERPROFILE":"HOME"],n.prototype.home=function(){return this.HOME_DIR},t.exports=new n}).call(this,e("_process"))},{_process:15,deffy:43,typpy:54}]},{},[38])(38)}); --------------------------------------------------------------------------------