diff --git a/dist/index.html b/dist/index.html
new file mode 100644
index 0000000..bef2e32
--- /dev/null
+++ b/dist/index.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+ Page Title
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dist/main.js b/dist/main.js
new file mode 100644
index 0000000..b309eeb
--- /dev/null
+++ b/dist/main.js
@@ -0,0 +1 @@
+!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e,n){var o,i=r(1);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:n;var u=Object(i.a)(o);t.a=u}).call(this,r(2),r(3)(e))},function(e,t,r){"use strict";function n(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",function(){return n})},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){"use strict";r.r(t);var n=r(0),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},i={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var c="CREATE_FIB_ARRAY",f={fibArr:[]};var a=function e(t,r,o){var c;if("function"==typeof r&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof r&&void 0===o&&(o=r,r=void 0),void 0!==o){if("function"!=typeof o)throw new Error("Expected the enhancer to be a function.");return o(e)(t,r)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var f=t,a=r,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function b(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function y(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return p(),l.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,p();var r=l.indexOf(e);l.splice(r,1)}}}function h(e){if(!u(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,a=f(a,e)}finally{d=!1}for(var t=s=l,r=0;r0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;return void 0===t.type?(console.log(t),Object.assign({},e,{fibArr:e.fibArr.concat(t.payload)})):e});window.store=a,window.createFibArray=function(e){return{type:c,payload:e}}}]);
\ No newline at end of file
diff --git a/node_modules/.bin/ansi-html b/node_modules/.bin/ansi-html
new file mode 120000
index 0000000..7e3f8fb
--- /dev/null
+++ b/node_modules/.bin/ansi-html
@@ -0,0 +1 @@
+../ansi-html/bin/ansi-html
\ No newline at end of file
diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime
new file mode 120000
index 0000000..fbb7ee0
--- /dev/null
+++ b/node_modules/.bin/mime
@@ -0,0 +1 @@
+../mime/cli.js
\ No newline at end of file
diff --git a/node_modules/.bin/multicast-dns b/node_modules/.bin/multicast-dns
new file mode 120000
index 0000000..801fc52
--- /dev/null
+++ b/node_modules/.bin/multicast-dns
@@ -0,0 +1 @@
+../multicast-dns/cli.js
\ No newline at end of file
diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid
new file mode 120000
index 0000000..b3e45bc
--- /dev/null
+++ b/node_modules/.bin/uuid
@@ -0,0 +1 @@
+../uuid/bin/uuid
\ No newline at end of file
diff --git a/node_modules/.bin/webpack-dev-server b/node_modules/.bin/webpack-dev-server
new file mode 120000
index 0000000..242fe0a
--- /dev/null
+++ b/node_modules/.bin/webpack-dev-server
@@ -0,0 +1 @@
+../webpack-dev-server/bin/webpack-dev-server.js
\ No newline at end of file
diff --git a/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/89/15/d7e2fbb5d29100cc8d82b3dec65d2614ca0fb484ce58d8a2700f6b7be9ff542378d4dbcc7b31a907f53e6e202e7277f073f82fa98d5f480c9f726256fa37 b/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/89/15/d7e2fbb5d29100cc8d82b3dec65d2614ca0fb484ce58d8a2700f6b7be9ff542378d4dbcc7b31a907f53e6e202e7277f073f82fa98d5f480c9f726256fa37
new file mode 100644
index 0000000..fce6d45
--- /dev/null
+++ b/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/89/15/d7e2fbb5d29100cc8d82b3dec65d2614ca0fb484ce58d8a2700f6b7be9ff542378d4dbcc7b31a907f53e6e202e7277f073f82fa98d5f480c9f726256fa37
@@ -0,0 +1 @@
+{"code":"!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=4)}([function(e,t,r){\"use strict\";(function(e,n){var o,i=r(1);o=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==e?e:n;var u=Object(i.a)(o);t.a=u}).call(this,r(2),r(3)(e))},function(e,t,r){\"use strict\";function n(e){var t,r=e.Symbol;return\"function\"==typeof r?r.observable?t=r.observable:(t=r(\"observable\"),r.observable=t):t=\"@@observable\",t}r.d(t,\"a\",function(){return n})},function(e,t){var r;r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,\"loaded\",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,\"id\",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,\"exports\",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){\"use strict\";r.r(t);var n=r(0),o=function(){return Math.random().toString(36).substring(7).split(\"\").join(\".\")},i={INIT:\"@@redux/INIT\"+o(),REPLACE:\"@@redux/REPLACE\"+o(),PROBE_UNKNOWN_ACTION:function(){return\"@@redux/PROBE_UNKNOWN_ACTION\"+o()}};function u(e){if(\"object\"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var c=\"CREATE_FIB_ARRAY\",f={fibArr:[]};var a=function e(t,r,o){var c;if(\"function\"==typeof r&&\"function\"==typeof o||\"function\"==typeof o&&\"function\"==typeof arguments[3])throw new Error(\"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function\");if(\"function\"==typeof r&&void 0===o&&(o=r,r=void 0),void 0!==o){if(\"function\"!=typeof o)throw new Error(\"Expected the enhancer to be a function.\");return o(e)(t,r)}if(\"function\"!=typeof t)throw new Error(\"Expected the reducer to be a function.\");var f=t,a=r,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function b(){if(d)throw new Error(\"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");return a}function y(e){if(\"function\"!=typeof e)throw new Error(\"Expected the listener to be a function.\");if(d)throw new Error(\"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");var t=!0;return p(),l.push(e),function(){if(t){if(d)throw new Error(\"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");t=!1,p();var r=l.indexOf(e);l.splice(r,1)}}}function h(e){if(!u(e))throw new Error(\"Actions must be plain objects. Use custom middleware for async actions.\");if(void 0===e.type)throw new Error('Actions may not have an undefined \"type\" property. Have you misspelled a constant?');if(d)throw new Error(\"Reducers may not dispatch actions.\");try{d=!0,a=f(a,e)}finally{d=!1}for(var t=s=l,r=0;r0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;return void 0===t.type?Object.assign({},e,{fibArr:e.fibArr.concat(t.payload)}):e});window.store=a,window.createFibArray=function(e){return{type:c,payload:e}}}]);","extractedComments":[]}
\ No newline at end of file
diff --git a/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/ad/c8/4f83eb0b10962ae7bcc74b8ef6e4f7f95106e29987e73a9caccb37506aeaebcbc9bd42d634b73ea544c35fc1492bc67509b11f43475e6f1d2e74cacdf8bf b/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/ad/c8/4f83eb0b10962ae7bcc74b8ef6e4f7f95106e29987e73a9caccb37506aeaebcbc9bd42d634b73ea544c35fc1492bc67509b11f43475e6f1d2e74cacdf8bf
new file mode 100644
index 0000000..2428055
--- /dev/null
+++ b/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/ad/c8/4f83eb0b10962ae7bcc74b8ef6e4f7f95106e29987e73a9caccb37506aeaebcbc9bd42d634b73ea544c35fc1492bc67509b11f43475e6f1d2e74cacdf8bf
@@ -0,0 +1 @@
+{"code":"!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=4)}([function(e,t,r){\"use strict\";(function(e,n){var o,i=r(1);o=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==e?e:n;var u=Object(i.a)(o);t.a=u}).call(this,r(2),r(3)(e))},function(e,t,r){\"use strict\";function n(e){var t,r=e.Symbol;return\"function\"==typeof r?r.observable?t=r.observable:(t=r(\"observable\"),r.observable=t):t=\"@@observable\",t}r.d(t,\"a\",function(){return n})},function(e,t){var r;r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,\"loaded\",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,\"id\",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,\"exports\",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){\"use strict\";r.r(t);var n=r(0),o=function(){return Math.random().toString(36).substring(7).split(\"\").join(\".\")},i={INIT:\"@@redux/INIT\"+o(),REPLACE:\"@@redux/REPLACE\"+o(),PROBE_UNKNOWN_ACTION:function(){return\"@@redux/PROBE_UNKNOWN_ACTION\"+o()}};function u(e){if(\"object\"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var c=\"CREATE_FIB_ARRAY\",f={fibArr:[]};var a=function e(t,r,o){var c;if(\"function\"==typeof r&&\"function\"==typeof o||\"function\"==typeof o&&\"function\"==typeof arguments[3])throw new Error(\"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function\");if(\"function\"==typeof r&&void 0===o&&(o=r,r=void 0),void 0!==o){if(\"function\"!=typeof o)throw new Error(\"Expected the enhancer to be a function.\");return o(e)(t,r)}if(\"function\"!=typeof t)throw new Error(\"Expected the reducer to be a function.\");var f=t,a=r,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function b(){if(d)throw new Error(\"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");return a}function y(e){if(\"function\"!=typeof e)throw new Error(\"Expected the listener to be a function.\");if(d)throw new Error(\"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");var t=!0;return p(),l.push(e),function(){if(t){if(d)throw new Error(\"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");t=!1,p();var r=l.indexOf(e);l.splice(r,1)}}}function h(e){if(!u(e))throw new Error(\"Actions must be plain objects. Use custom middleware for async actions.\");if(void 0===e.type)throw new Error('Actions may not have an undefined \"type\" property. Have you misspelled a constant?');if(d)throw new Error(\"Reducers may not dispatch actions.\");try{d=!0,a=f(a,e)}finally{d=!1}for(var t=s=l,r=0;r0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;return void 0===t.type?(console.log(t),Object.assign({},e,{fibArr:e.fibArr.concat(t.payload)})):e});window.store=a,window.createFibArray=function(e){return{type:c,payload:e}}}]);","extractedComments":[]}
\ No newline at end of file
diff --git a/node_modules/.cache/terser-webpack-plugin/index-v5/0e/dc/a4cf1db7fbec73eec9081a628c771e822fbdcbd7d201190c4dd7d79439df b/node_modules/.cache/terser-webpack-plugin/index-v5/0e/dc/a4cf1db7fbec73eec9081a628c771e822fbdcbd7d201190c4dd7d79439df
new file mode 100644
index 0000000..84c5253
--- /dev/null
+++ b/node_modules/.cache/terser-webpack-plugin/index-v5/0e/dc/a4cf1db7fbec73eec9081a628c771e822fbdcbd7d201190c4dd7d79439df
@@ -0,0 +1,2 @@
+
+4e8683533d9c459e2f6142afa222c8fa5a0cc062 {"key":"{\"terser\":\"3.14.1\",\"terser-webpack-plugin\":\"1.2.1\",\"terser-webpack-plugin-options\":{\"test\":/\\.m?js(\\?.*)?$/i,\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":false,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"terserOptions\":{\"output\":{\"comments\":/^\\**!|@preserve|@license|@cc_on/i}}},\"hash\":\"3bc79d906dcbcce57910b3aee3aeca0f\"}","integrity":"sha512-rchPg+sLEJYq57zHS4725Pf5UQbimYfnOpysyzdQaurry8m9QtY0tz6lRMNfwUkrxnUJsR9DR15vHS50ys34vw==","time":1549302319685,"size":5076}
\ No newline at end of file
diff --git a/node_modules/.cache/terser-webpack-plugin/index-v5/5d/85/13c4834576e26b9958575be8b2eda4386602e6fc5e405510fed6949ce45d b/node_modules/.cache/terser-webpack-plugin/index-v5/5d/85/13c4834576e26b9958575be8b2eda4386602e6fc5e405510fed6949ce45d
new file mode 100644
index 0000000..4299a0f
--- /dev/null
+++ b/node_modules/.cache/terser-webpack-plugin/index-v5/5d/85/13c4834576e26b9958575be8b2eda4386602e6fc5e405510fed6949ce45d
@@ -0,0 +1,2 @@
+
+6910f57c6fb1d22de2aba26e50c9a8636c6a1e01 {"key":"{\"terser\":\"3.14.1\",\"terser-webpack-plugin\":\"1.2.1\",\"terser-webpack-plugin-options\":{\"test\":/\\.m?js(\\?.*)?$/i,\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":false,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"terserOptions\":{\"output\":{\"comments\":/^\\**!|@preserve|@license|@cc_on/i}}},\"hash\":\"8a5c163c6c51ea88372f09e5cada1a79\"}","integrity":"sha512-iRXX4vu10pEAzI2Cs97GXSYUyg+0hM5Y2KJwD2t76f9UI3jU28x7MakH9T5uIC5yd/Bz+C+pjV9IDJ9yYlb6Nw==","time":1549301406561,"size":5059}
\ No newline at end of file
diff --git a/node_modules/.cache/terser-webpack-plugin/index-v5/64/60/98546254084468f9155a8cc1d5c0513e044170b02b0c210b3f56f08e0ec6 b/node_modules/.cache/terser-webpack-plugin/index-v5/64/60/98546254084468f9155a8cc1d5c0513e044170b02b0c210b3f56f08e0ec6
new file mode 100644
index 0000000..7e20a5c
--- /dev/null
+++ b/node_modules/.cache/terser-webpack-plugin/index-v5/64/60/98546254084468f9155a8cc1d5c0513e044170b02b0c210b3f56f08e0ec6
@@ -0,0 +1,2 @@
+
+e3fa77b6acf8c9389f2c1538d6a62eacf534eebd {"key":"{\"terser\":\"3.16.1\",\"terser-webpack-plugin\":\"1.2.2\",\"terser-webpack-plugin-options\":{\"test\":/\\.m?js(\\?.*)?$/i,\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":false,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"terserOptions\":{\"output\":{\"comments\":/^\\**!|@preserve|@license|@cc_on/i}}},\"hash\":\"3bc79d906dcbcce57910b3aee3aeca0f\"}","integrity":"sha512-rchPg+sLEJYq57zHS4725Pf5UQbimYfnOpysyzdQaurry8m9QtY0tz6lRMNfwUkrxnUJsR9DR15vHS50ys34vw==","time":1549302873286,"size":5076}
\ No newline at end of file
diff --git a/node_modules/.cache/terser-webpack-plugin/index-v5/c8/90/43de1f6ada2bd4c5dd0b11f25ea30c01e488f8825c74eadc5a2e50579637 b/node_modules/.cache/terser-webpack-plugin/index-v5/c8/90/43de1f6ada2bd4c5dd0b11f25ea30c01e488f8825c74eadc5a2e50579637
new file mode 100644
index 0000000..8d24572
--- /dev/null
+++ b/node_modules/.cache/terser-webpack-plugin/index-v5/c8/90/43de1f6ada2bd4c5dd0b11f25ea30c01e488f8825c74eadc5a2e50579637
@@ -0,0 +1,2 @@
+
+4c312ee7a3d3be3282e3d2ca85725492e0010fb7 {"key":"{\"terser\":\"3.14.1\",\"terser-webpack-plugin\":\"1.2.1\",\"terser-webpack-plugin-options\":{\"test\":/\\.m?js(\\?.*)?$/i,\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":false,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"terserOptions\":{\"output\":{\"comments\":/^\\**!|@preserve|@license|@cc_on/i}}},\"hash\":\"f20f8b12b3c76a1703bc581e408f1696\"}","integrity":"sha512-iRXX4vu10pEAzI2Cs97GXSYUyg+0hM5Y2KJwD2t76f9UI3jU28x7MakH9T5uIC5yd/Bz+C+pjV9IDJ9yYlb6Nw==","time":1549300798193,"size":5059}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/LICENSE b/node_modules/@babel/runtime/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/runtime/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/runtime/README.md b/node_modules/@babel/runtime/README.md
new file mode 100644
index 0000000..75087e3
--- /dev/null
+++ b/node_modules/@babel/runtime/README.md
@@ -0,0 +1,19 @@
+# @babel/runtime
+
+> babel's modular runtime helpers
+
+See our website [@babel/runtime](https://babeljs.io/docs/en/next/babel-runtime.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/runtime
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/runtime --dev
+```
diff --git a/node_modules/@babel/runtime/helpers/AsyncGenerator.js b/node_modules/@babel/runtime/helpers/AsyncGenerator.js
new file mode 100644
index 0000000..4962efc
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/AsyncGenerator.js
@@ -0,0 +1,100 @@
+var AwaitValue = require("./AwaitValue");
+
+function AsyncGenerator(gen) {
+ var front, back;
+
+ function send(key, arg) {
+ return new Promise(function (resolve, reject) {
+ var request = {
+ key: key,
+ arg: arg,
+ resolve: resolve,
+ reject: reject,
+ next: null
+ };
+
+ if (back) {
+ back = back.next = request;
+ } else {
+ front = back = request;
+ resume(key, arg);
+ }
+ });
+ }
+
+ function resume(key, arg) {
+ try {
+ var result = gen[key](arg);
+ var value = result.value;
+ var wrappedAwait = value instanceof AwaitValue;
+ Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
+ if (wrappedAwait) {
+ resume("next", arg);
+ return;
+ }
+
+ settle(result.done ? "return" : "normal", arg);
+ }, function (err) {
+ resume("throw", err);
+ });
+ } catch (err) {
+ settle("throw", err);
+ }
+ }
+
+ function settle(type, value) {
+ switch (type) {
+ case "return":
+ front.resolve({
+ value: value,
+ done: true
+ });
+ break;
+
+ case "throw":
+ front.reject(value);
+ break;
+
+ default:
+ front.resolve({
+ value: value,
+ done: false
+ });
+ break;
+ }
+
+ front = front.next;
+
+ if (front) {
+ resume(front.key, front.arg);
+ } else {
+ back = null;
+ }
+ }
+
+ this._invoke = send;
+
+ if (typeof gen.return !== "function") {
+ this.return = undefined;
+ }
+}
+
+if (typeof Symbol === "function" && Symbol.asyncIterator) {
+ AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
+ return this;
+ };
+}
+
+AsyncGenerator.prototype.next = function (arg) {
+ return this._invoke("next", arg);
+};
+
+AsyncGenerator.prototype.throw = function (arg) {
+ return this._invoke("throw", arg);
+};
+
+AsyncGenerator.prototype.return = function (arg) {
+ return this._invoke("return", arg);
+};
+
+module.exports = AsyncGenerator;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/AwaitValue.js b/node_modules/@babel/runtime/helpers/AwaitValue.js
new file mode 100644
index 0000000..f9f4184
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/AwaitValue.js
@@ -0,0 +1,5 @@
+function _AwaitValue(value) {
+ this.wrapped = value;
+}
+
+module.exports = _AwaitValue;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js b/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js
new file mode 100644
index 0000000..6f5cb09
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js
@@ -0,0 +1,30 @@
+function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
+ var desc = {};
+ Object['ke' + 'ys'](descriptor).forEach(function (key) {
+ desc[key] = descriptor[key];
+ });
+ desc.enumerable = !!desc.enumerable;
+ desc.configurable = !!desc.configurable;
+
+ if ('value' in desc || desc.initializer) {
+ desc.writable = true;
+ }
+
+ desc = decorators.slice().reverse().reduce(function (desc, decorator) {
+ return decorator(target, property, desc) || desc;
+ }, desc);
+
+ if (context && desc.initializer !== void 0) {
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
+ desc.initializer = undefined;
+ }
+
+ if (desc.initializer === void 0) {
+ Object['define' + 'Property'](target, property, desc);
+ desc = null;
+ }
+
+ return desc;
+}
+
+module.exports = _applyDecoratedDescriptor;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/arrayWithHoles.js b/node_modules/@babel/runtime/helpers/arrayWithHoles.js
new file mode 100644
index 0000000..5a62a8c
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/arrayWithHoles.js
@@ -0,0 +1,5 @@
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+module.exports = _arrayWithHoles;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js b/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
new file mode 100644
index 0000000..3234017
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
@@ -0,0 +1,11 @@
+function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
+ arr2[i] = arr[i];
+ }
+
+ return arr2;
+ }
+}
+
+module.exports = _arrayWithoutHoles;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/assertThisInitialized.js b/node_modules/@babel/runtime/helpers/assertThisInitialized.js
new file mode 100644
index 0000000..98d2949
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/assertThisInitialized.js
@@ -0,0 +1,9 @@
+function _assertThisInitialized(self) {
+ if (self === void 0) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return self;
+}
+
+module.exports = _assertThisInitialized;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js b/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
new file mode 100644
index 0000000..3211e9d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
@@ -0,0 +1,53 @@
+function _asyncGeneratorDelegate(inner, awaitWrap) {
+ var iter = {},
+ waiting = false;
+
+ function pump(key, value) {
+ waiting = true;
+ value = new Promise(function (resolve) {
+ resolve(inner[key](value));
+ });
+ return {
+ done: false,
+ value: awaitWrap(value)
+ };
+ }
+
+ ;
+
+ if (typeof Symbol === "function" && Symbol.iterator) {
+ iter[Symbol.iterator] = function () {
+ return this;
+ };
+ }
+
+ iter.next = function (value) {
+ if (waiting) {
+ waiting = false;
+ return value;
+ }
+
+ return pump("next", value);
+ };
+
+ if (typeof inner.throw === "function") {
+ iter.throw = function (value) {
+ if (waiting) {
+ waiting = false;
+ throw value;
+ }
+
+ return pump("throw", value);
+ };
+ }
+
+ if (typeof inner.return === "function") {
+ iter.return = function (value) {
+ return pump("return", value);
+ };
+ }
+
+ return iter;
+}
+
+module.exports = _asyncGeneratorDelegate;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/asyncIterator.js b/node_modules/@babel/runtime/helpers/asyncIterator.js
new file mode 100644
index 0000000..c1a1b31
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/asyncIterator.js
@@ -0,0 +1,19 @@
+function _asyncIterator(iterable) {
+ var method;
+
+ if (typeof Symbol === "function") {
+ if (Symbol.asyncIterator) {
+ method = iterable[Symbol.asyncIterator];
+ if (method != null) return method.call(iterable);
+ }
+
+ if (Symbol.iterator) {
+ method = iterable[Symbol.iterator];
+ if (method != null) return method.call(iterable);
+ }
+ }
+
+ throw new TypeError("Object is not async iterable");
+}
+
+module.exports = _asyncIterator;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/asyncToGenerator.js b/node_modules/@babel/runtime/helpers/asyncToGenerator.js
new file mode 100644
index 0000000..f5db93d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/asyncToGenerator.js
@@ -0,0 +1,37 @@
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+}
+
+function _asyncToGenerator(fn) {
+ return function () {
+ var self = this,
+ args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+}
+
+module.exports = _asyncToGenerator;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js b/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js
new file mode 100644
index 0000000..59f797a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js
@@ -0,0 +1,7 @@
+var AwaitValue = require("./AwaitValue");
+
+function _awaitAsyncGenerator(value) {
+ return new AwaitValue(value);
+}
+
+module.exports = _awaitAsyncGenerator;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classCallCheck.js b/node_modules/@babel/runtime/helpers/classCallCheck.js
new file mode 100644
index 0000000..f389f2e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classCallCheck.js
@@ -0,0 +1,7 @@
+function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+}
+
+module.exports = _classCallCheck;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classNameTDZError.js b/node_modules/@babel/runtime/helpers/classNameTDZError.js
new file mode 100644
index 0000000..8c1bdf5
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classNameTDZError.js
@@ -0,0 +1,5 @@
+function _classNameTDZError(name) {
+ throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys.");
+}
+
+module.exports = _classNameTDZError;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js b/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js
new file mode 100644
index 0000000..4a9c3c8
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js
@@ -0,0 +1,15 @@
+function _classPrivateFieldGet(receiver, privateMap) {
+ if (!privateMap.has(receiver)) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+
+ var descriptor = privateMap.get(receiver);
+
+ if (descriptor.get) {
+ return descriptor.get.call(receiver);
+ }
+
+ return descriptor.value;
+}
+
+module.exports = _classPrivateFieldGet;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js b/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js
new file mode 100644
index 0000000..64ed79d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js
@@ -0,0 +1,9 @@
+function _classPrivateFieldBase(receiver, privateKey) {
+ if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
+ throw new TypeError("attempted to use private field on non-instance");
+ }
+
+ return receiver;
+}
+
+module.exports = _classPrivateFieldBase;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js b/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js
new file mode 100644
index 0000000..a1a6417
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js
@@ -0,0 +1,7 @@
+var id = 0;
+
+function _classPrivateFieldKey(name) {
+ return "__private_" + id++ + "_" + name;
+}
+
+module.exports = _classPrivateFieldKey;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js b/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js
new file mode 100644
index 0000000..0cab869
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js
@@ -0,0 +1,21 @@
+function _classPrivateFieldSet(receiver, privateMap, value) {
+ if (!privateMap.has(receiver)) {
+ throw new TypeError("attempted to set private field on non-instance");
+ }
+
+ var descriptor = privateMap.get(receiver);
+
+ if (descriptor.set) {
+ descriptor.set.call(receiver, value);
+ } else {
+ if (!descriptor.writable) {
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ descriptor.value = value;
+ }
+
+ return value;
+}
+
+module.exports = _classPrivateFieldSet;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js b/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js
new file mode 100644
index 0000000..a3432b9
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js
@@ -0,0 +1,9 @@
+function _classPrivateMethodGet(receiver, privateSet, fn) {
+ if (!privateSet.has(receiver)) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+
+ return fn;
+}
+
+module.exports = _classPrivateMethodGet;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js b/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js
new file mode 100644
index 0000000..3847284
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js
@@ -0,0 +1,5 @@
+function _classPrivateMethodSet() {
+ throw new TypeError("attempted to reassign private method");
+}
+
+module.exports = _classPrivateMethodSet;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js
new file mode 100644
index 0000000..cb75109
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js
@@ -0,0 +1,9 @@
+function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+
+ return descriptor.value;
+}
+
+module.exports = _classStaticPrivateFieldSpecGet;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js
new file mode 100644
index 0000000..d758fcf
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js
@@ -0,0 +1,14 @@
+function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+
+ if (!descriptor.writable) {
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ descriptor.value = value;
+ return value;
+}
+
+module.exports = _classStaticPrivateFieldSpecSet;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/construct.js b/node_modules/@babel/runtime/helpers/construct.js
new file mode 100644
index 0000000..723a7ea
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/construct.js
@@ -0,0 +1,33 @@
+var setPrototypeOf = require("./setPrototypeOf");
+
+function isNativeReflectConstruct() {
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+ if (Reflect.construct.sham) return false;
+ if (typeof Proxy === "function") return true;
+
+ try {
+ Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+function _construct(Parent, args, Class) {
+ if (isNativeReflectConstruct()) {
+ module.exports = _construct = Reflect.construct;
+ } else {
+ module.exports = _construct = function _construct(Parent, args, Class) {
+ var a = [null];
+ a.push.apply(a, args);
+ var Constructor = Function.bind.apply(Parent, a);
+ var instance = new Constructor();
+ if (Class) setPrototypeOf(instance, Class.prototype);
+ return instance;
+ };
+ }
+
+ return _construct.apply(null, arguments);
+}
+
+module.exports = _construct;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/createClass.js b/node_modules/@babel/runtime/helpers/createClass.js
new file mode 100644
index 0000000..f9d4841
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/createClass.js
@@ -0,0 +1,17 @@
+function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+}
+
+function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+}
+
+module.exports = _createClass;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/decorate.js b/node_modules/@babel/runtime/helpers/decorate.js
new file mode 100644
index 0000000..a462a0a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/decorate.js
@@ -0,0 +1,400 @@
+var toArray = require("./toArray");
+
+var toPropertyKey = require("./toPropertyKey");
+
+function _decorate(decorators, factory, superClass, mixins) {
+ var api = _getDecoratorsApi();
+
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ api = mixins[i](api);
+ }
+ }
+
+ var r = factory(function initialize(O) {
+ api.initializeInstanceElements(O, decorated.elements);
+ }, superClass);
+ var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
+ api.initializeClassElements(r.F, decorated.elements);
+ return api.runClassFinishers(r.F, decorated.finishers);
+}
+
+function _getDecoratorsApi() {
+ _getDecoratorsApi = function _getDecoratorsApi() {
+ return api;
+ };
+
+ var api = {
+ elementsDefinitionOrder: [["method"], ["field"]],
+ initializeInstanceElements: function initializeInstanceElements(O, elements) {
+ ["method", "field"].forEach(function (kind) {
+ elements.forEach(function (element) {
+ if (element.kind === kind && element.placement === "own") {
+ this.defineClassElement(O, element);
+ }
+ }, this);
+ }, this);
+ },
+ initializeClassElements: function initializeClassElements(F, elements) {
+ var proto = F.prototype;
+ ["method", "field"].forEach(function (kind) {
+ elements.forEach(function (element) {
+ var placement = element.placement;
+
+ if (element.kind === kind && (placement === "static" || placement === "prototype")) {
+ var receiver = placement === "static" ? F : proto;
+ this.defineClassElement(receiver, element);
+ }
+ }, this);
+ }, this);
+ },
+ defineClassElement: function defineClassElement(receiver, element) {
+ var descriptor = element.descriptor;
+
+ if (element.kind === "field") {
+ var initializer = element.initializer;
+ descriptor = {
+ enumerable: descriptor.enumerable,
+ writable: descriptor.writable,
+ configurable: descriptor.configurable,
+ value: initializer === void 0 ? void 0 : initializer.call(receiver)
+ };
+ }
+
+ Object.defineProperty(receiver, element.key, descriptor);
+ },
+ decorateClass: function decorateClass(elements, decorators) {
+ var newElements = [];
+ var finishers = [];
+ var placements = {
+ static: [],
+ prototype: [],
+ own: []
+ };
+ elements.forEach(function (element) {
+ this.addElementPlacement(element, placements);
+ }, this);
+ elements.forEach(function (element) {
+ if (!_hasDecorators(element)) return newElements.push(element);
+ var elementFinishersExtras = this.decorateElement(element, placements);
+ newElements.push(elementFinishersExtras.element);
+ newElements.push.apply(newElements, elementFinishersExtras.extras);
+ finishers.push.apply(finishers, elementFinishersExtras.finishers);
+ }, this);
+
+ if (!decorators) {
+ return {
+ elements: newElements,
+ finishers: finishers
+ };
+ }
+
+ var result = this.decorateConstructor(newElements, decorators);
+ finishers.push.apply(finishers, result.finishers);
+ result.finishers = finishers;
+ return result;
+ },
+ addElementPlacement: function addElementPlacement(element, placements, silent) {
+ var keys = placements[element.placement];
+
+ if (!silent && keys.indexOf(element.key) !== -1) {
+ throw new TypeError("Duplicated element (" + element.key + ")");
+ }
+
+ keys.push(element.key);
+ },
+ decorateElement: function decorateElement(element, placements) {
+ var extras = [];
+ var finishers = [];
+
+ for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
+ var keys = placements[element.placement];
+ keys.splice(keys.indexOf(element.key), 1);
+ var elementObject = this.fromElementDescriptor(element);
+ var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
+ element = elementFinisherExtras.element;
+ this.addElementPlacement(element, placements);
+
+ if (elementFinisherExtras.finisher) {
+ finishers.push(elementFinisherExtras.finisher);
+ }
+
+ var newExtras = elementFinisherExtras.extras;
+
+ if (newExtras) {
+ for (var j = 0; j < newExtras.length; j++) {
+ this.addElementPlacement(newExtras[j], placements);
+ }
+
+ extras.push.apply(extras, newExtras);
+ }
+ }
+
+ return {
+ element: element,
+ finishers: finishers,
+ extras: extras
+ };
+ },
+ decorateConstructor: function decorateConstructor(elements, decorators) {
+ var finishers = [];
+
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var obj = this.fromClassDescriptor(elements);
+ var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
+
+ if (elementsAndFinisher.finisher !== undefined) {
+ finishers.push(elementsAndFinisher.finisher);
+ }
+
+ if (elementsAndFinisher.elements !== undefined) {
+ elements = elementsAndFinisher.elements;
+
+ for (var j = 0; j < elements.length - 1; j++) {
+ for (var k = j + 1; k < elements.length; k++) {
+ if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
+ throw new TypeError("Duplicated element (" + elements[j].key + ")");
+ }
+ }
+ }
+ }
+ }
+
+ return {
+ elements: elements,
+ finishers: finishers
+ };
+ },
+ fromElementDescriptor: function fromElementDescriptor(element) {
+ var obj = {
+ kind: element.kind,
+ key: element.key,
+ placement: element.placement,
+ descriptor: element.descriptor
+ };
+ var desc = {
+ value: "Descriptor",
+ configurable: true
+ };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+ if (element.kind === "field") obj.initializer = element.initializer;
+ return obj;
+ },
+ toElementDescriptors: function toElementDescriptors(elementObjects) {
+ if (elementObjects === undefined) return;
+ return toArray(elementObjects).map(function (elementObject) {
+ var element = this.toElementDescriptor(elementObject);
+ this.disallowProperty(elementObject, "finisher", "An element descriptor");
+ this.disallowProperty(elementObject, "extras", "An element descriptor");
+ return element;
+ }, this);
+ },
+ toElementDescriptor: function toElementDescriptor(elementObject) {
+ var kind = String(elementObject.kind);
+
+ if (kind !== "method" && kind !== "field") {
+ throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
+ }
+
+ var key = toPropertyKey(elementObject.key);
+ var placement = String(elementObject.placement);
+
+ if (placement !== "static" && placement !== "prototype" && placement !== "own") {
+ throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
+ }
+
+ var descriptor = elementObject.descriptor;
+ this.disallowProperty(elementObject, "elements", "An element descriptor");
+ var element = {
+ kind: kind,
+ key: key,
+ placement: placement,
+ descriptor: Object.assign({}, descriptor)
+ };
+
+ if (kind !== "field") {
+ this.disallowProperty(elementObject, "initializer", "A method descriptor");
+ } else {
+ this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
+ this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
+ this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
+ element.initializer = elementObject.initializer;
+ }
+
+ return element;
+ },
+ toElementFinisherExtras: function toElementFinisherExtras(elementObject) {
+ var element = this.toElementDescriptor(elementObject);
+
+ var finisher = _optionalCallableProperty(elementObject, "finisher");
+
+ var extras = this.toElementDescriptors(elementObject.extras);
+ return {
+ element: element,
+ finisher: finisher,
+ extras: extras
+ };
+ },
+ fromClassDescriptor: function fromClassDescriptor(elements) {
+ var obj = {
+ kind: "class",
+ elements: elements.map(this.fromElementDescriptor, this)
+ };
+ var desc = {
+ value: "Descriptor",
+ configurable: true
+ };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+ return obj;
+ },
+ toClassDescriptor: function toClassDescriptor(obj) {
+ var kind = String(obj.kind);
+
+ if (kind !== "class") {
+ throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
+ }
+
+ this.disallowProperty(obj, "key", "A class descriptor");
+ this.disallowProperty(obj, "placement", "A class descriptor");
+ this.disallowProperty(obj, "descriptor", "A class descriptor");
+ this.disallowProperty(obj, "initializer", "A class descriptor");
+ this.disallowProperty(obj, "extras", "A class descriptor");
+
+ var finisher = _optionalCallableProperty(obj, "finisher");
+
+ var elements = this.toElementDescriptors(obj.elements);
+ return {
+ elements: elements,
+ finisher: finisher
+ };
+ },
+ runClassFinishers: function runClassFinishers(constructor, finishers) {
+ for (var i = 0; i < finishers.length; i++) {
+ var newConstructor = (0, finishers[i])(constructor);
+
+ if (newConstructor !== undefined) {
+ if (typeof newConstructor !== "function") {
+ throw new TypeError("Finishers must return a constructor.");
+ }
+
+ constructor = newConstructor;
+ }
+ }
+
+ return constructor;
+ },
+ disallowProperty: function disallowProperty(obj, name, objectType) {
+ if (obj[name] !== undefined) {
+ throw new TypeError(objectType + " can't have a ." + name + " property.");
+ }
+ }
+ };
+ return api;
+}
+
+function _createElementDescriptor(def) {
+ var key = toPropertyKey(def.key);
+ var descriptor;
+
+ if (def.kind === "method") {
+ descriptor = {
+ value: def.value,
+ writable: true,
+ configurable: true,
+ enumerable: false
+ };
+ } else if (def.kind === "get") {
+ descriptor = {
+ get: def.value,
+ configurable: true,
+ enumerable: false
+ };
+ } else if (def.kind === "set") {
+ descriptor = {
+ set: def.value,
+ configurable: true,
+ enumerable: false
+ };
+ } else if (def.kind === "field") {
+ descriptor = {
+ configurable: true,
+ writable: true,
+ enumerable: true
+ };
+ }
+
+ var element = {
+ kind: def.kind === "field" ? "field" : "method",
+ key: key,
+ placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype",
+ descriptor: descriptor
+ };
+ if (def.decorators) element.decorators = def.decorators;
+ if (def.kind === "field") element.initializer = def.value;
+ return element;
+}
+
+function _coalesceGetterSetter(element, other) {
+ if (element.descriptor.get !== undefined) {
+ other.descriptor.get = element.descriptor.get;
+ } else {
+ other.descriptor.set = element.descriptor.set;
+ }
+}
+
+function _coalesceClassElements(elements) {
+ var newElements = [];
+
+ var isSameElement = function isSameElement(other) {
+ return other.kind === "method" && other.key === element.key && other.placement === element.placement;
+ };
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var other;
+
+ if (element.kind === "method" && (other = newElements.find(isSameElement))) {
+ if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
+ if (_hasDecorators(element) || _hasDecorators(other)) {
+ throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
+ }
+
+ other.descriptor = element.descriptor;
+ } else {
+ if (_hasDecorators(element)) {
+ if (_hasDecorators(other)) {
+ throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
+ }
+
+ other.decorators = element.decorators;
+ }
+
+ _coalesceGetterSetter(element, other);
+ }
+ } else {
+ newElements.push(element);
+ }
+ }
+
+ return newElements;
+}
+
+function _hasDecorators(element) {
+ return element.decorators && element.decorators.length;
+}
+
+function _isDataDescriptor(desc) {
+ return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
+}
+
+function _optionalCallableProperty(obj, name) {
+ var value = obj[name];
+
+ if (value !== undefined && typeof value !== "function") {
+ throw new TypeError("Expected '" + name + "' to be a function");
+ }
+
+ return value;
+}
+
+module.exports = _decorate;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/defaults.js b/node_modules/@babel/runtime/helpers/defaults.js
new file mode 100644
index 0000000..55ba1fe
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/defaults.js
@@ -0,0 +1,16 @@
+function _defaults(obj, defaults) {
+ var keys = Object.getOwnPropertyNames(defaults);
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = Object.getOwnPropertyDescriptor(defaults, key);
+
+ if (value && value.configurable && obj[key] === undefined) {
+ Object.defineProperty(obj, key, value);
+ }
+ }
+
+ return obj;
+}
+
+module.exports = _defaults;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js b/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js
new file mode 100644
index 0000000..5d80ea1
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js
@@ -0,0 +1,24 @@
+function _defineEnumerableProperties(obj, descs) {
+ for (var key in descs) {
+ var desc = descs[key];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, key, desc);
+ }
+
+ if (Object.getOwnPropertySymbols) {
+ var objectSymbols = Object.getOwnPropertySymbols(descs);
+
+ for (var i = 0; i < objectSymbols.length; i++) {
+ var sym = objectSymbols[i];
+ var desc = descs[sym];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, sym, desc);
+ }
+ }
+
+ return obj;
+}
+
+module.exports = _defineEnumerableProperties;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/defineProperty.js b/node_modules/@babel/runtime/helpers/defineProperty.js
new file mode 100644
index 0000000..32a8d73
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/defineProperty.js
@@ -0,0 +1,16 @@
+function _defineProperty(obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+}
+
+module.exports = _defineProperty;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js b/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js
new file mode 100644
index 0000000..9b77468
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js
@@ -0,0 +1,97 @@
+import AwaitValue from "./AwaitValue";
+export default function AsyncGenerator(gen) {
+ var front, back;
+
+ function send(key, arg) {
+ return new Promise(function (resolve, reject) {
+ var request = {
+ key: key,
+ arg: arg,
+ resolve: resolve,
+ reject: reject,
+ next: null
+ };
+
+ if (back) {
+ back = back.next = request;
+ } else {
+ front = back = request;
+ resume(key, arg);
+ }
+ });
+ }
+
+ function resume(key, arg) {
+ try {
+ var result = gen[key](arg);
+ var value = result.value;
+ var wrappedAwait = value instanceof AwaitValue;
+ Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
+ if (wrappedAwait) {
+ resume("next", arg);
+ return;
+ }
+
+ settle(result.done ? "return" : "normal", arg);
+ }, function (err) {
+ resume("throw", err);
+ });
+ } catch (err) {
+ settle("throw", err);
+ }
+ }
+
+ function settle(type, value) {
+ switch (type) {
+ case "return":
+ front.resolve({
+ value: value,
+ done: true
+ });
+ break;
+
+ case "throw":
+ front.reject(value);
+ break;
+
+ default:
+ front.resolve({
+ value: value,
+ done: false
+ });
+ break;
+ }
+
+ front = front.next;
+
+ if (front) {
+ resume(front.key, front.arg);
+ } else {
+ back = null;
+ }
+ }
+
+ this._invoke = send;
+
+ if (typeof gen.return !== "function") {
+ this.return = undefined;
+ }
+}
+
+if (typeof Symbol === "function" && Symbol.asyncIterator) {
+ AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
+ return this;
+ };
+}
+
+AsyncGenerator.prototype.next = function (arg) {
+ return this._invoke("next", arg);
+};
+
+AsyncGenerator.prototype.throw = function (arg) {
+ return this._invoke("throw", arg);
+};
+
+AsyncGenerator.prototype.return = function (arg) {
+ return this._invoke("return", arg);
+};
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/AwaitValue.js b/node_modules/@babel/runtime/helpers/esm/AwaitValue.js
new file mode 100644
index 0000000..5237e18
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/AwaitValue.js
@@ -0,0 +1,3 @@
+export default function _AwaitValue(value) {
+ this.wrapped = value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js b/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
new file mode 100644
index 0000000..7492371
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
@@ -0,0 +1,28 @@
+export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
+ var desc = {};
+ Object['ke' + 'ys'](descriptor).forEach(function (key) {
+ desc[key] = descriptor[key];
+ });
+ desc.enumerable = !!desc.enumerable;
+ desc.configurable = !!desc.configurable;
+
+ if ('value' in desc || desc.initializer) {
+ desc.writable = true;
+ }
+
+ desc = decorators.slice().reverse().reduce(function (desc, decorator) {
+ return decorator(target, property, desc) || desc;
+ }, desc);
+
+ if (context && desc.initializer !== void 0) {
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
+ desc.initializer = undefined;
+ }
+
+ if (desc.initializer === void 0) {
+ Object['define' + 'Property'](target, property, desc);
+ desc = null;
+ }
+
+ return desc;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js b/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
new file mode 100644
index 0000000..be734fc
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
@@ -0,0 +1,3 @@
+export default function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js b/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
new file mode 100644
index 0000000..cbcffa1
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
@@ -0,0 +1,9 @@
+export default function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
+ arr2[i] = arr[i];
+ }
+
+ return arr2;
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js b/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
new file mode 100644
index 0000000..bbf849c
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
@@ -0,0 +1,7 @@
+export default function _assertThisInitialized(self) {
+ if (self === void 0) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return self;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js b/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js
new file mode 100644
index 0000000..8cde993
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js
@@ -0,0 +1,51 @@
+export default function _asyncGeneratorDelegate(inner, awaitWrap) {
+ var iter = {},
+ waiting = false;
+
+ function pump(key, value) {
+ waiting = true;
+ value = new Promise(function (resolve) {
+ resolve(inner[key](value));
+ });
+ return {
+ done: false,
+ value: awaitWrap(value)
+ };
+ }
+
+ ;
+
+ if (typeof Symbol === "function" && Symbol.iterator) {
+ iter[Symbol.iterator] = function () {
+ return this;
+ };
+ }
+
+ iter.next = function (value) {
+ if (waiting) {
+ waiting = false;
+ return value;
+ }
+
+ return pump("next", value);
+ };
+
+ if (typeof inner.throw === "function") {
+ iter.throw = function (value) {
+ if (waiting) {
+ waiting = false;
+ throw value;
+ }
+
+ return pump("throw", value);
+ };
+ }
+
+ if (typeof inner.return === "function") {
+ iter.return = function (value) {
+ return pump("return", value);
+ };
+ }
+
+ return iter;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/asyncIterator.js b/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
new file mode 100644
index 0000000..c43366e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/asyncIterator.js
@@ -0,0 +1,17 @@
+export default function _asyncIterator(iterable) {
+ var method;
+
+ if (typeof Symbol === "function") {
+ if (Symbol.asyncIterator) {
+ method = iterable[Symbol.asyncIterator];
+ if (method != null) return method.call(iterable);
+ }
+
+ if (Symbol.iterator) {
+ method = iterable[Symbol.iterator];
+ if (method != null) return method.call(iterable);
+ }
+ }
+
+ throw new TypeError("Object is not async iterable");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js b/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
new file mode 100644
index 0000000..2a25f54
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
@@ -0,0 +1,35 @@
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+}
+
+export default function _asyncToGenerator(fn) {
+ return function () {
+ var self = this,
+ args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js b/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js
new file mode 100644
index 0000000..462f99c
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js
@@ -0,0 +1,4 @@
+import AwaitValue from "./AwaitValue";
+export default function _awaitAsyncGenerator(value) {
+ return new AwaitValue(value);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classCallCheck.js b/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
new file mode 100644
index 0000000..2f1738a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
@@ -0,0 +1,5 @@
+export default function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js b/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js
new file mode 100644
index 0000000..f7b6dd5
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js
@@ -0,0 +1,3 @@
+export default function _classNameTDZError(name) {
+ throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys.");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js
new file mode 100644
index 0000000..2568212
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js
@@ -0,0 +1,13 @@
+export default function _classPrivateFieldGet(receiver, privateMap) {
+ if (!privateMap.has(receiver)) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+
+ var descriptor = privateMap.get(receiver);
+
+ if (descriptor.get) {
+ return descriptor.get.call(receiver);
+ }
+
+ return descriptor.value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js
new file mode 100644
index 0000000..5b10916
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js
@@ -0,0 +1,7 @@
+export default function _classPrivateFieldBase(receiver, privateKey) {
+ if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
+ throw new TypeError("attempted to use private field on non-instance");
+ }
+
+ return receiver;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js
new file mode 100644
index 0000000..5b7e5ac
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js
@@ -0,0 +1,4 @@
+var id = 0;
+export default function _classPrivateFieldKey(name) {
+ return "__private_" + id++ + "_" + name;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js
new file mode 100644
index 0000000..0ce65f8
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js
@@ -0,0 +1,19 @@
+export default function _classPrivateFieldSet(receiver, privateMap, value) {
+ if (!privateMap.has(receiver)) {
+ throw new TypeError("attempted to set private field on non-instance");
+ }
+
+ var descriptor = privateMap.get(receiver);
+
+ if (descriptor.set) {
+ descriptor.set.call(receiver, value);
+ } else {
+ if (!descriptor.writable) {
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ descriptor.value = value;
+ }
+
+ return value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js
new file mode 100644
index 0000000..38b9d58
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js
@@ -0,0 +1,7 @@
+export default function _classPrivateMethodGet(receiver, privateSet, fn) {
+ if (!privateSet.has(receiver)) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+
+ return fn;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js
new file mode 100644
index 0000000..2bbaf3a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js
@@ -0,0 +1,3 @@
+export default function _classPrivateMethodSet() {
+ throw new TypeError("attempted to reassign private method");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js
new file mode 100644
index 0000000..29ae49b
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js
@@ -0,0 +1,7 @@
+export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+
+ return descriptor.value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js
new file mode 100644
index 0000000..15013f5
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js
@@ -0,0 +1,12 @@
+export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+
+ if (!descriptor.writable) {
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ descriptor.value = value;
+ return value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/construct.js b/node_modules/@babel/runtime/helpers/esm/construct.js
new file mode 100644
index 0000000..82f20fa
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/construct.js
@@ -0,0 +1,31 @@
+import setPrototypeOf from "./setPrototypeOf";
+
+function isNativeReflectConstruct() {
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+ if (Reflect.construct.sham) return false;
+ if (typeof Proxy === "function") return true;
+
+ try {
+ Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+export default function _construct(Parent, args, Class) {
+ if (isNativeReflectConstruct()) {
+ _construct = Reflect.construct;
+ } else {
+ _construct = function _construct(Parent, args, Class) {
+ var a = [null];
+ a.push.apply(a, args);
+ var Constructor = Function.bind.apply(Parent, a);
+ var instance = new Constructor();
+ if (Class) setPrototypeOf(instance, Class.prototype);
+ return instance;
+ };
+ }
+
+ return _construct.apply(null, arguments);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/createClass.js b/node_modules/@babel/runtime/helpers/esm/createClass.js
new file mode 100644
index 0000000..d6cf412
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/createClass.js
@@ -0,0 +1,15 @@
+function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+}
+
+export default function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/decorate.js b/node_modules/@babel/runtime/helpers/esm/decorate.js
new file mode 100644
index 0000000..b2d639a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/decorate.js
@@ -0,0 +1,396 @@
+import toArray from "./toArray";
+import toPropertyKey from "./toPropertyKey";
+export default function _decorate(decorators, factory, superClass, mixins) {
+ var api = _getDecoratorsApi();
+
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ api = mixins[i](api);
+ }
+ }
+
+ var r = factory(function initialize(O) {
+ api.initializeInstanceElements(O, decorated.elements);
+ }, superClass);
+ var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
+ api.initializeClassElements(r.F, decorated.elements);
+ return api.runClassFinishers(r.F, decorated.finishers);
+}
+
+function _getDecoratorsApi() {
+ _getDecoratorsApi = function _getDecoratorsApi() {
+ return api;
+ };
+
+ var api = {
+ elementsDefinitionOrder: [["method"], ["field"]],
+ initializeInstanceElements: function initializeInstanceElements(O, elements) {
+ ["method", "field"].forEach(function (kind) {
+ elements.forEach(function (element) {
+ if (element.kind === kind && element.placement === "own") {
+ this.defineClassElement(O, element);
+ }
+ }, this);
+ }, this);
+ },
+ initializeClassElements: function initializeClassElements(F, elements) {
+ var proto = F.prototype;
+ ["method", "field"].forEach(function (kind) {
+ elements.forEach(function (element) {
+ var placement = element.placement;
+
+ if (element.kind === kind && (placement === "static" || placement === "prototype")) {
+ var receiver = placement === "static" ? F : proto;
+ this.defineClassElement(receiver, element);
+ }
+ }, this);
+ }, this);
+ },
+ defineClassElement: function defineClassElement(receiver, element) {
+ var descriptor = element.descriptor;
+
+ if (element.kind === "field") {
+ var initializer = element.initializer;
+ descriptor = {
+ enumerable: descriptor.enumerable,
+ writable: descriptor.writable,
+ configurable: descriptor.configurable,
+ value: initializer === void 0 ? void 0 : initializer.call(receiver)
+ };
+ }
+
+ Object.defineProperty(receiver, element.key, descriptor);
+ },
+ decorateClass: function decorateClass(elements, decorators) {
+ var newElements = [];
+ var finishers = [];
+ var placements = {
+ static: [],
+ prototype: [],
+ own: []
+ };
+ elements.forEach(function (element) {
+ this.addElementPlacement(element, placements);
+ }, this);
+ elements.forEach(function (element) {
+ if (!_hasDecorators(element)) return newElements.push(element);
+ var elementFinishersExtras = this.decorateElement(element, placements);
+ newElements.push(elementFinishersExtras.element);
+ newElements.push.apply(newElements, elementFinishersExtras.extras);
+ finishers.push.apply(finishers, elementFinishersExtras.finishers);
+ }, this);
+
+ if (!decorators) {
+ return {
+ elements: newElements,
+ finishers: finishers
+ };
+ }
+
+ var result = this.decorateConstructor(newElements, decorators);
+ finishers.push.apply(finishers, result.finishers);
+ result.finishers = finishers;
+ return result;
+ },
+ addElementPlacement: function addElementPlacement(element, placements, silent) {
+ var keys = placements[element.placement];
+
+ if (!silent && keys.indexOf(element.key) !== -1) {
+ throw new TypeError("Duplicated element (" + element.key + ")");
+ }
+
+ keys.push(element.key);
+ },
+ decorateElement: function decorateElement(element, placements) {
+ var extras = [];
+ var finishers = [];
+
+ for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
+ var keys = placements[element.placement];
+ keys.splice(keys.indexOf(element.key), 1);
+ var elementObject = this.fromElementDescriptor(element);
+ var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
+ element = elementFinisherExtras.element;
+ this.addElementPlacement(element, placements);
+
+ if (elementFinisherExtras.finisher) {
+ finishers.push(elementFinisherExtras.finisher);
+ }
+
+ var newExtras = elementFinisherExtras.extras;
+
+ if (newExtras) {
+ for (var j = 0; j < newExtras.length; j++) {
+ this.addElementPlacement(newExtras[j], placements);
+ }
+
+ extras.push.apply(extras, newExtras);
+ }
+ }
+
+ return {
+ element: element,
+ finishers: finishers,
+ extras: extras
+ };
+ },
+ decorateConstructor: function decorateConstructor(elements, decorators) {
+ var finishers = [];
+
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var obj = this.fromClassDescriptor(elements);
+ var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
+
+ if (elementsAndFinisher.finisher !== undefined) {
+ finishers.push(elementsAndFinisher.finisher);
+ }
+
+ if (elementsAndFinisher.elements !== undefined) {
+ elements = elementsAndFinisher.elements;
+
+ for (var j = 0; j < elements.length - 1; j++) {
+ for (var k = j + 1; k < elements.length; k++) {
+ if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
+ throw new TypeError("Duplicated element (" + elements[j].key + ")");
+ }
+ }
+ }
+ }
+ }
+
+ return {
+ elements: elements,
+ finishers: finishers
+ };
+ },
+ fromElementDescriptor: function fromElementDescriptor(element) {
+ var obj = {
+ kind: element.kind,
+ key: element.key,
+ placement: element.placement,
+ descriptor: element.descriptor
+ };
+ var desc = {
+ value: "Descriptor",
+ configurable: true
+ };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+ if (element.kind === "field") obj.initializer = element.initializer;
+ return obj;
+ },
+ toElementDescriptors: function toElementDescriptors(elementObjects) {
+ if (elementObjects === undefined) return;
+ return toArray(elementObjects).map(function (elementObject) {
+ var element = this.toElementDescriptor(elementObject);
+ this.disallowProperty(elementObject, "finisher", "An element descriptor");
+ this.disallowProperty(elementObject, "extras", "An element descriptor");
+ return element;
+ }, this);
+ },
+ toElementDescriptor: function toElementDescriptor(elementObject) {
+ var kind = String(elementObject.kind);
+
+ if (kind !== "method" && kind !== "field") {
+ throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
+ }
+
+ var key = toPropertyKey(elementObject.key);
+ var placement = String(elementObject.placement);
+
+ if (placement !== "static" && placement !== "prototype" && placement !== "own") {
+ throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
+ }
+
+ var descriptor = elementObject.descriptor;
+ this.disallowProperty(elementObject, "elements", "An element descriptor");
+ var element = {
+ kind: kind,
+ key: key,
+ placement: placement,
+ descriptor: Object.assign({}, descriptor)
+ };
+
+ if (kind !== "field") {
+ this.disallowProperty(elementObject, "initializer", "A method descriptor");
+ } else {
+ this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
+ this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
+ this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
+ element.initializer = elementObject.initializer;
+ }
+
+ return element;
+ },
+ toElementFinisherExtras: function toElementFinisherExtras(elementObject) {
+ var element = this.toElementDescriptor(elementObject);
+
+ var finisher = _optionalCallableProperty(elementObject, "finisher");
+
+ var extras = this.toElementDescriptors(elementObject.extras);
+ return {
+ element: element,
+ finisher: finisher,
+ extras: extras
+ };
+ },
+ fromClassDescriptor: function fromClassDescriptor(elements) {
+ var obj = {
+ kind: "class",
+ elements: elements.map(this.fromElementDescriptor, this)
+ };
+ var desc = {
+ value: "Descriptor",
+ configurable: true
+ };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+ return obj;
+ },
+ toClassDescriptor: function toClassDescriptor(obj) {
+ var kind = String(obj.kind);
+
+ if (kind !== "class") {
+ throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
+ }
+
+ this.disallowProperty(obj, "key", "A class descriptor");
+ this.disallowProperty(obj, "placement", "A class descriptor");
+ this.disallowProperty(obj, "descriptor", "A class descriptor");
+ this.disallowProperty(obj, "initializer", "A class descriptor");
+ this.disallowProperty(obj, "extras", "A class descriptor");
+
+ var finisher = _optionalCallableProperty(obj, "finisher");
+
+ var elements = this.toElementDescriptors(obj.elements);
+ return {
+ elements: elements,
+ finisher: finisher
+ };
+ },
+ runClassFinishers: function runClassFinishers(constructor, finishers) {
+ for (var i = 0; i < finishers.length; i++) {
+ var newConstructor = (0, finishers[i])(constructor);
+
+ if (newConstructor !== undefined) {
+ if (typeof newConstructor !== "function") {
+ throw new TypeError("Finishers must return a constructor.");
+ }
+
+ constructor = newConstructor;
+ }
+ }
+
+ return constructor;
+ },
+ disallowProperty: function disallowProperty(obj, name, objectType) {
+ if (obj[name] !== undefined) {
+ throw new TypeError(objectType + " can't have a ." + name + " property.");
+ }
+ }
+ };
+ return api;
+}
+
+function _createElementDescriptor(def) {
+ var key = toPropertyKey(def.key);
+ var descriptor;
+
+ if (def.kind === "method") {
+ descriptor = {
+ value: def.value,
+ writable: true,
+ configurable: true,
+ enumerable: false
+ };
+ } else if (def.kind === "get") {
+ descriptor = {
+ get: def.value,
+ configurable: true,
+ enumerable: false
+ };
+ } else if (def.kind === "set") {
+ descriptor = {
+ set: def.value,
+ configurable: true,
+ enumerable: false
+ };
+ } else if (def.kind === "field") {
+ descriptor = {
+ configurable: true,
+ writable: true,
+ enumerable: true
+ };
+ }
+
+ var element = {
+ kind: def.kind === "field" ? "field" : "method",
+ key: key,
+ placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype",
+ descriptor: descriptor
+ };
+ if (def.decorators) element.decorators = def.decorators;
+ if (def.kind === "field") element.initializer = def.value;
+ return element;
+}
+
+function _coalesceGetterSetter(element, other) {
+ if (element.descriptor.get !== undefined) {
+ other.descriptor.get = element.descriptor.get;
+ } else {
+ other.descriptor.set = element.descriptor.set;
+ }
+}
+
+function _coalesceClassElements(elements) {
+ var newElements = [];
+
+ var isSameElement = function isSameElement(other) {
+ return other.kind === "method" && other.key === element.key && other.placement === element.placement;
+ };
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var other;
+
+ if (element.kind === "method" && (other = newElements.find(isSameElement))) {
+ if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
+ if (_hasDecorators(element) || _hasDecorators(other)) {
+ throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
+ }
+
+ other.descriptor = element.descriptor;
+ } else {
+ if (_hasDecorators(element)) {
+ if (_hasDecorators(other)) {
+ throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
+ }
+
+ other.decorators = element.decorators;
+ }
+
+ _coalesceGetterSetter(element, other);
+ }
+ } else {
+ newElements.push(element);
+ }
+ }
+
+ return newElements;
+}
+
+function _hasDecorators(element) {
+ return element.decorators && element.decorators.length;
+}
+
+function _isDataDescriptor(desc) {
+ return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
+}
+
+function _optionalCallableProperty(obj, name) {
+ var value = obj[name];
+
+ if (value !== undefined && typeof value !== "function") {
+ throw new TypeError("Expected '" + name + "' to be a function");
+ }
+
+ return value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/defaults.js b/node_modules/@babel/runtime/helpers/esm/defaults.js
new file mode 100644
index 0000000..3de1d8e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/defaults.js
@@ -0,0 +1,14 @@
+export default function _defaults(obj, defaults) {
+ var keys = Object.getOwnPropertyNames(defaults);
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = Object.getOwnPropertyDescriptor(defaults, key);
+
+ if (value && value.configurable && obj[key] === undefined) {
+ Object.defineProperty(obj, key, value);
+ }
+ }
+
+ return obj;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js b/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js
new file mode 100644
index 0000000..7981acd
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js
@@ -0,0 +1,22 @@
+export default function _defineEnumerableProperties(obj, descs) {
+ for (var key in descs) {
+ var desc = descs[key];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, key, desc);
+ }
+
+ if (Object.getOwnPropertySymbols) {
+ var objectSymbols = Object.getOwnPropertySymbols(descs);
+
+ for (var i = 0; i < objectSymbols.length; i++) {
+ var sym = objectSymbols[i];
+ var desc = descs[sym];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, sym, desc);
+ }
+ }
+
+ return obj;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/defineProperty.js b/node_modules/@babel/runtime/helpers/esm/defineProperty.js
new file mode 100644
index 0000000..7cf6e59
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/defineProperty.js
@@ -0,0 +1,14 @@
+export default function _defineProperty(obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/extends.js b/node_modules/@babel/runtime/helpers/esm/extends.js
new file mode 100644
index 0000000..b9b138d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/extends.js
@@ -0,0 +1,17 @@
+export default function _extends() {
+ _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+ };
+
+ return _extends.apply(this, arguments);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/get.js b/node_modules/@babel/runtime/helpers/esm/get.js
new file mode 100644
index 0000000..c0b7bce
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/get.js
@@ -0,0 +1,21 @@
+import getPrototypeOf from "./getPrototypeOf";
+import superPropBase from "./superPropBase";
+export default function _get(target, property, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.get) {
+ _get = Reflect.get;
+ } else {
+ _get = function _get(target, property, receiver) {
+ var base = superPropBase(target, property);
+ if (!base) return;
+ var desc = Object.getOwnPropertyDescriptor(base, property);
+
+ if (desc.get) {
+ return desc.get.call(receiver);
+ }
+
+ return desc.value;
+ };
+ }
+
+ return _get(target, property, receiver || target);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js b/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
new file mode 100644
index 0000000..5abafe3
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
@@ -0,0 +1,6 @@
+export default function _getPrototypeOf(o) {
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
+ return o.__proto__ || Object.getPrototypeOf(o);
+ };
+ return _getPrototypeOf(o);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/inherits.js b/node_modules/@babel/runtime/helpers/esm/inherits.js
new file mode 100644
index 0000000..035648d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/inherits.js
@@ -0,0 +1,15 @@
+import setPrototypeOf from "./setPrototypeOf";
+export default function _inherits(subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) setPrototypeOf(subClass, superClass);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js b/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
new file mode 100644
index 0000000..32017e6
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
@@ -0,0 +1,5 @@
+export default function _inheritsLoose(subClass, superClass) {
+ subClass.prototype = Object.create(superClass.prototype);
+ subClass.prototype.constructor = subClass;
+ subClass.__proto__ = superClass;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js b/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js
new file mode 100644
index 0000000..26fdea0
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js
@@ -0,0 +1,9 @@
+export default function _initializerDefineProperty(target, property, descriptor, context) {
+ if (!descriptor) return;
+ Object.defineProperty(target, property, {
+ enumerable: descriptor.enumerable,
+ configurable: descriptor.configurable,
+ writable: descriptor.writable,
+ value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
+ });
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js b/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js
new file mode 100644
index 0000000..d40ca01
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js
@@ -0,0 +1,3 @@
+export default function _initializerWarningHelper(descriptor, context) {
+ throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.');
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/instanceof.js b/node_modules/@babel/runtime/helpers/esm/instanceof.js
new file mode 100644
index 0000000..51f1e67
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/instanceof.js
@@ -0,0 +1,7 @@
+export default function _instanceof(left, right) {
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
+ return right[Symbol.hasInstance](left);
+ } else {
+ return left instanceof right;
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js b/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js
new file mode 100644
index 0000000..dd5e781
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js
@@ -0,0 +1,5 @@
+export default function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ default: obj
+ };
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js b/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js
new file mode 100644
index 0000000..c506514
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js
@@ -0,0 +1,24 @@
+export default function _interopRequireWildcard(obj) {
+ if (obj && obj.__esModule) {
+ return obj;
+ } else {
+ var newObj = {};
+
+ if (obj != null) {
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
+
+ if (desc.get || desc.set) {
+ Object.defineProperty(newObj, key, desc);
+ } else {
+ newObj[key] = obj[key];
+ }
+ }
+ }
+ }
+
+ newObj.default = obj;
+ return newObj;
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js b/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
new file mode 100644
index 0000000..7b1bc82
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
@@ -0,0 +1,3 @@
+export default function _isNativeFunction(fn) {
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/iterableToArray.js b/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
new file mode 100644
index 0000000..671e400
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
@@ -0,0 +1,3 @@
+export default function _iterableToArray(iter) {
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js b/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
new file mode 100644
index 0000000..7234d8e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
@@ -0,0 +1,25 @@
+export default function _iterableToArrayLimit(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js b/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js
new file mode 100644
index 0000000..4261e29
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js
@@ -0,0 +1,11 @@
+export default function _iterableToArrayLimitLoose(arr, i) {
+ var _arr = [];
+
+ for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
+ _arr.push(_step.value);
+
+ if (i && _arr.length === i) break;
+ }
+
+ return _arr;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/jsx.js b/node_modules/@babel/runtime/helpers/esm/jsx.js
new file mode 100644
index 0000000..e6f1bcb
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/jsx.js
@@ -0,0 +1,46 @@
+var REACT_ELEMENT_TYPE;
+export default function _createRawReactElement(type, props, key, children) {
+ if (!REACT_ELEMENT_TYPE) {
+ REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
+ }
+
+ var defaultProps = type && type.defaultProps;
+ var childrenLength = arguments.length - 3;
+
+ if (!props && childrenLength !== 0) {
+ props = {
+ children: void 0
+ };
+ }
+
+ if (props && defaultProps) {
+ for (var propName in defaultProps) {
+ if (props[propName] === void 0) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ } else if (!props) {
+ props = defaultProps || {};
+ }
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = new Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 3];
+ }
+
+ props.children = childArray;
+ }
+
+ return {
+ $$typeof: REACT_ELEMENT_TYPE,
+ type: type,
+ key: key === undefined ? null : '' + key,
+ ref: null,
+ props: props,
+ _owner: null
+ };
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js b/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js
new file mode 100644
index 0000000..d6cd864
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js
@@ -0,0 +1,5 @@
+export default function _newArrowCheck(innerThis, boundThis) {
+ if (innerThis !== boundThis) {
+ throw new TypeError("Cannot instantiate an arrow function");
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js b/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
new file mode 100644
index 0000000..f94186d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
@@ -0,0 +1,3 @@
+export default function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js b/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
new file mode 100644
index 0000000..d6bc738
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
@@ -0,0 +1,3 @@
+export default function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js b/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
new file mode 100644
index 0000000..82b67d2
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
@@ -0,0 +1,3 @@
+export default function _objectDestructuringEmpty(obj) {
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/objectSpread.js b/node_modules/@babel/runtime/helpers/esm/objectSpread.js
new file mode 100644
index 0000000..918bc8e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/objectSpread.js
@@ -0,0 +1,19 @@
+import defineProperty from "./defineProperty";
+export default function _objectSpread(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i] != null ? arguments[i] : {};
+ var ownKeys = Object.keys(source);
+
+ if (typeof Object.getOwnPropertySymbols === 'function') {
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ }));
+ }
+
+ ownKeys.forEach(function (key) {
+ defineProperty(target, key, source[key]);
+ });
+ }
+
+ return target;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js b/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
new file mode 100644
index 0000000..2af6091
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
@@ -0,0 +1,19 @@
+import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose";
+export default function _objectWithoutProperties(source, excluded) {
+ if (source == null) return {};
+ var target = objectWithoutPropertiesLoose(source, excluded);
+ var key, i;
+
+ if (Object.getOwnPropertySymbols) {
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
+ key = sourceSymbolKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js b/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
new file mode 100644
index 0000000..c36815c
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
@@ -0,0 +1,14 @@
+export default function _objectWithoutPropertiesLoose(source, excluded) {
+ if (source == null) return {};
+ var target = {};
+ var sourceKeys = Object.keys(source);
+ var key, i;
+
+ for (i = 0; i < sourceKeys.length; i++) {
+ key = sourceKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ target[key] = source[key];
+ }
+
+ return target;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js b/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
new file mode 100644
index 0000000..be7b7a4
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
@@ -0,0 +1,9 @@
+import _typeof from "../../helpers/esm/typeof";
+import assertThisInitialized from "./assertThisInitialized";
+export default function _possibleConstructorReturn(self, call) {
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
+ return call;
+ }
+
+ return assertThisInitialized(self);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/readOnlyError.js b/node_modules/@babel/runtime/helpers/esm/readOnlyError.js
new file mode 100644
index 0000000..45d01d7
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/readOnlyError.js
@@ -0,0 +1,3 @@
+export default function _readOnlyError(name) {
+ throw new Error("\"" + name + "\" is read-only");
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/set.js b/node_modules/@babel/runtime/helpers/esm/set.js
new file mode 100644
index 0000000..b6a4c34
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/set.js
@@ -0,0 +1,52 @@
+import getPrototypeOf from "./getPrototypeOf";
+import superPropBase from "./superPropBase";
+import defineProperty from "./defineProperty";
+
+function set(target, property, value, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.set) {
+ set = Reflect.set;
+ } else {
+ set = function set(target, property, value, receiver) {
+ var base = superPropBase(target, property);
+ var desc;
+
+ if (base) {
+ desc = Object.getOwnPropertyDescriptor(base, property);
+
+ if (desc.set) {
+ desc.set.call(receiver, value);
+ return true;
+ } else if (!desc.writable) {
+ return false;
+ }
+ }
+
+ desc = Object.getOwnPropertyDescriptor(receiver, property);
+
+ if (desc) {
+ if (!desc.writable) {
+ return false;
+ }
+
+ desc.value = value;
+ Object.defineProperty(receiver, property, desc);
+ } else {
+ defineProperty(receiver, property, value);
+ }
+
+ return true;
+ };
+ }
+
+ return set(target, property, value, receiver);
+}
+
+export default function _set(target, property, value, receiver, isStrict) {
+ var s = set(target, property, value, receiver || target);
+
+ if (!s && isStrict) {
+ throw new Error('failed to set property');
+ }
+
+ return value;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js b/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
new file mode 100644
index 0000000..e6ef03e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
@@ -0,0 +1,8 @@
+export default function _setPrototypeOf(o, p) {
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ o.__proto__ = p;
+ return o;
+ };
+
+ return _setPrototypeOf(o, p);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js b/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js
new file mode 100644
index 0000000..cadd9bb
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js
@@ -0,0 +1,7 @@
+export default function _skipFirstGeneratorNext(fn) {
+ return function () {
+ var it = fn.apply(this, arguments);
+ it.next();
+ return it;
+ };
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/slicedToArray.js b/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
new file mode 100644
index 0000000..f6f1081
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
@@ -0,0 +1,6 @@
+import arrayWithHoles from "./arrayWithHoles";
+import iterableToArrayLimit from "./iterableToArrayLimit";
+import nonIterableRest from "./nonIterableRest";
+export default function _slicedToArray(arr, i) {
+ return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js b/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js
new file mode 100644
index 0000000..e675789
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js
@@ -0,0 +1,6 @@
+import arrayWithHoles from "./arrayWithHoles";
+import iterableToArrayLimitLoose from "./iterableToArrayLimitLoose";
+import nonIterableRest from "./nonIterableRest";
+export default function _slicedToArrayLoose(arr, i) {
+ return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest();
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/superPropBase.js b/node_modules/@babel/runtime/helpers/esm/superPropBase.js
new file mode 100644
index 0000000..eace947
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/superPropBase.js
@@ -0,0 +1,9 @@
+import getPrototypeOf from "./getPrototypeOf";
+export default function _superPropBase(object, property) {
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
+ object = getPrototypeOf(object);
+ if (object === null) break;
+ }
+
+ return object;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js b/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js
new file mode 100644
index 0000000..421f18a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js
@@ -0,0 +1,11 @@
+export default function _taggedTemplateLiteral(strings, raw) {
+ if (!raw) {
+ raw = strings.slice(0);
+ }
+
+ return Object.freeze(Object.defineProperties(strings, {
+ raw: {
+ value: Object.freeze(raw)
+ }
+ }));
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js b/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js
new file mode 100644
index 0000000..c8f081e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js
@@ -0,0 +1,8 @@
+export default function _taggedTemplateLiteralLoose(strings, raw) {
+ if (!raw) {
+ raw = strings.slice(0);
+ }
+
+ strings.raw = raw;
+ return strings;
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/temporalRef.js b/node_modules/@babel/runtime/helpers/esm/temporalRef.js
new file mode 100644
index 0000000..4b0679c
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/temporalRef.js
@@ -0,0 +1,8 @@
+import undef from "./temporalUndefined";
+export default function _temporalRef(val, name) {
+ if (val === undef) {
+ throw new ReferenceError(name + " is not defined - temporal dead zone");
+ } else {
+ return val;
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js b/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js
new file mode 100644
index 0000000..7c645e4
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js
@@ -0,0 +1 @@
+export default {};
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/toArray.js b/node_modules/@babel/runtime/helpers/esm/toArray.js
new file mode 100644
index 0000000..5acb22b
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/toArray.js
@@ -0,0 +1,6 @@
+import arrayWithHoles from "./arrayWithHoles";
+import iterableToArray from "./iterableToArray";
+import nonIterableRest from "./nonIterableRest";
+export default function _toArray(arr) {
+ return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js b/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
new file mode 100644
index 0000000..7e480b9
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
@@ -0,0 +1,6 @@
+import arrayWithoutHoles from "./arrayWithoutHoles";
+import iterableToArray from "./iterableToArray";
+import nonIterableSpread from "./nonIterableSpread";
+export default function _toConsumableArray(arr) {
+ return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/toPrimitive.js b/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
new file mode 100644
index 0000000..72a4a09
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
@@ -0,0 +1,13 @@
+import _typeof from "../../helpers/esm/typeof";
+export default function _toPrimitive(input, hint) {
+ if (_typeof(input) !== "object" || input === null) return input;
+ var prim = input[Symbol.toPrimitive];
+
+ if (prim !== undefined) {
+ var res = prim.call(input, hint || "default");
+ if (_typeof(res) !== "object") return res;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+
+ return (hint === "string" ? String : Number)(input);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js b/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
new file mode 100644
index 0000000..7b53a4d
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
@@ -0,0 +1,6 @@
+import _typeof from "../../helpers/esm/typeof";
+import toPrimitive from "./toPrimitive";
+export default function _toPropertyKey(arg) {
+ var key = toPrimitive(arg, "string");
+ return _typeof(key) === "symbol" ? key : String(key);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/typeof.js b/node_modules/@babel/runtime/helpers/esm/typeof.js
new file mode 100644
index 0000000..7825537
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/typeof.js
@@ -0,0 +1,15 @@
+function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
+
+export default function _typeof(obj) {
+ if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
+ _typeof = function _typeof(obj) {
+ return _typeof2(obj);
+ };
+ } else {
+ _typeof = function _typeof(obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
+ };
+ }
+
+ return _typeof(obj);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js b/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js
new file mode 100644
index 0000000..6d6d981
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js
@@ -0,0 +1,6 @@
+import AsyncGenerator from "./AsyncGenerator";
+export default function _wrapAsyncGenerator(fn) {
+ return function () {
+ return new AsyncGenerator(fn.apply(this, arguments));
+ };
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js b/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
new file mode 100644
index 0000000..5c55d05
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
@@ -0,0 +1,37 @@
+import getPrototypeOf from "./getPrototypeOf";
+import setPrototypeOf from "./setPrototypeOf";
+import isNativeFunction from "./isNativeFunction";
+import construct from "./construct";
+export default function _wrapNativeSuper(Class) {
+ var _cache = typeof Map === "function" ? new Map() : undefined;
+
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
+ if (Class === null || !isNativeFunction(Class)) return Class;
+
+ if (typeof Class !== "function") {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+
+ if (typeof _cache !== "undefined") {
+ if (_cache.has(Class)) return _cache.get(Class);
+
+ _cache.set(Class, Wrapper);
+ }
+
+ function Wrapper() {
+ return construct(Class, arguments, getPrototypeOf(this).constructor);
+ }
+
+ Wrapper.prototype = Object.create(Class.prototype, {
+ constructor: {
+ value: Wrapper,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ return setPrototypeOf(Wrapper, Class);
+ };
+
+ return _wrapNativeSuper(Class);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js b/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js
new file mode 100644
index 0000000..8f395a0
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js
@@ -0,0 +1,69 @@
+import _typeof from "../../helpers/esm/typeof";
+import wrapNativeSuper from "./wrapNativeSuper";
+import getPrototypeOf from "./getPrototypeOf";
+import possibleConstructorReturn from "./possibleConstructorReturn";
+import inherits from "./inherits";
+export default function _wrapRegExp(re, groups) {
+ _wrapRegExp = function _wrapRegExp(re, groups) {
+ return new BabelRegExp(re, groups);
+ };
+
+ var _RegExp = wrapNativeSuper(RegExp);
+
+ var _super = RegExp.prototype;
+
+ var _groups = new WeakMap();
+
+ function BabelRegExp(re, groups) {
+ var _this = _RegExp.call(this, re);
+
+ _groups.set(_this, groups);
+
+ return _this;
+ }
+
+ inherits(BabelRegExp, _RegExp);
+
+ BabelRegExp.prototype.exec = function (str) {
+ var result = _super.exec.call(this, str);
+
+ if (result) result.groups = buildGroups(result, this);
+ return result;
+ };
+
+ BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
+ if (typeof substitution === "string") {
+ var groups = _groups.get(this);
+
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
+ return "$" + groups[name];
+ }));
+ } else if (typeof substitution === "function") {
+ var _this = this;
+
+ return _super[Symbol.replace].call(this, str, function () {
+ var args = [];
+ args.push.apply(args, arguments);
+
+ if (_typeof(args[args.length - 1]) !== "object") {
+ args.push(buildGroups(args, _this));
+ }
+
+ return substitution.apply(this, args);
+ });
+ } else {
+ return _super[Symbol.replace].call(this, str, substitution);
+ }
+ };
+
+ function buildGroups(result, re) {
+ var g = _groups.get(re);
+
+ return Object.keys(groups).reduce(function (groups, name) {
+ groups[name] = result[g[name]];
+ return groups;
+ }, Object.create(null));
+ }
+
+ return _wrapRegExp.apply(this, arguments);
+}
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/extends.js b/node_modules/@babel/runtime/helpers/extends.js
new file mode 100644
index 0000000..1816877
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/extends.js
@@ -0,0 +1,19 @@
+function _extends() {
+ module.exports = _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+ };
+
+ return _extends.apply(this, arguments);
+}
+
+module.exports = _extends;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/get.js b/node_modules/@babel/runtime/helpers/get.js
new file mode 100644
index 0000000..2cd0bb4
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/get.js
@@ -0,0 +1,25 @@
+var getPrototypeOf = require("./getPrototypeOf");
+
+var superPropBase = require("./superPropBase");
+
+function _get(target, property, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.get) {
+ module.exports = _get = Reflect.get;
+ } else {
+ module.exports = _get = function _get(target, property, receiver) {
+ var base = superPropBase(target, property);
+ if (!base) return;
+ var desc = Object.getOwnPropertyDescriptor(base, property);
+
+ if (desc.get) {
+ return desc.get.call(receiver);
+ }
+
+ return desc.value;
+ };
+ }
+
+ return _get(target, property, receiver || target);
+}
+
+module.exports = _get;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/getPrototypeOf.js b/node_modules/@babel/runtime/helpers/getPrototypeOf.js
new file mode 100644
index 0000000..5fc9a16
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/getPrototypeOf.js
@@ -0,0 +1,8 @@
+function _getPrototypeOf(o) {
+ module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
+ return o.__proto__ || Object.getPrototypeOf(o);
+ };
+ return _getPrototypeOf(o);
+}
+
+module.exports = _getPrototypeOf;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/inherits.js b/node_modules/@babel/runtime/helpers/inherits.js
new file mode 100644
index 0000000..6b4f286
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/inherits.js
@@ -0,0 +1,18 @@
+var setPrototypeOf = require("./setPrototypeOf");
+
+function _inherits(subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) setPrototypeOf(subClass, superClass);
+}
+
+module.exports = _inherits;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/inheritsLoose.js b/node_modules/@babel/runtime/helpers/inheritsLoose.js
new file mode 100644
index 0000000..c3f7cdb
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/inheritsLoose.js
@@ -0,0 +1,7 @@
+function _inheritsLoose(subClass, superClass) {
+ subClass.prototype = Object.create(superClass.prototype);
+ subClass.prototype.constructor = subClass;
+ subClass.__proto__ = superClass;
+}
+
+module.exports = _inheritsLoose;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/initializerDefineProperty.js b/node_modules/@babel/runtime/helpers/initializerDefineProperty.js
new file mode 100644
index 0000000..4caa5ca
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/initializerDefineProperty.js
@@ -0,0 +1,11 @@
+function _initializerDefineProperty(target, property, descriptor, context) {
+ if (!descriptor) return;
+ Object.defineProperty(target, property, {
+ enumerable: descriptor.enumerable,
+ configurable: descriptor.configurable,
+ writable: descriptor.writable,
+ value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
+ });
+}
+
+module.exports = _initializerDefineProperty;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/initializerWarningHelper.js b/node_modules/@babel/runtime/helpers/initializerWarningHelper.js
new file mode 100644
index 0000000..56e0c17
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/initializerWarningHelper.js
@@ -0,0 +1,5 @@
+function _initializerWarningHelper(descriptor, context) {
+ throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.');
+}
+
+module.exports = _initializerWarningHelper;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/instanceof.js b/node_modules/@babel/runtime/helpers/instanceof.js
new file mode 100644
index 0000000..d3cd18a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/instanceof.js
@@ -0,0 +1,9 @@
+function _instanceof(left, right) {
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
+ return right[Symbol.hasInstance](left);
+ } else {
+ return left instanceof right;
+ }
+}
+
+module.exports = _instanceof;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/interopRequireDefault.js b/node_modules/@babel/runtime/helpers/interopRequireDefault.js
new file mode 100644
index 0000000..0e65e2b
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/interopRequireDefault.js
@@ -0,0 +1,7 @@
+function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ default: obj
+ };
+}
+
+module.exports = _interopRequireDefault;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/interopRequireWildcard.js b/node_modules/@babel/runtime/helpers/interopRequireWildcard.js
new file mode 100644
index 0000000..baf08e2
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/interopRequireWildcard.js
@@ -0,0 +1,26 @@
+function _interopRequireWildcard(obj) {
+ if (obj && obj.__esModule) {
+ return obj;
+ } else {
+ var newObj = {};
+
+ if (obj != null) {
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
+
+ if (desc.get || desc.set) {
+ Object.defineProperty(newObj, key, desc);
+ } else {
+ newObj[key] = obj[key];
+ }
+ }
+ }
+ }
+
+ newObj.default = obj;
+ return newObj;
+ }
+}
+
+module.exports = _interopRequireWildcard;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/isNativeFunction.js b/node_modules/@babel/runtime/helpers/isNativeFunction.js
new file mode 100644
index 0000000..e2dc3ed
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/isNativeFunction.js
@@ -0,0 +1,5 @@
+function _isNativeFunction(fn) {
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
+}
+
+module.exports = _isNativeFunction;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/iterableToArray.js b/node_modules/@babel/runtime/helpers/iterableToArray.js
new file mode 100644
index 0000000..e917e57
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/iterableToArray.js
@@ -0,0 +1,5 @@
+function _iterableToArray(iter) {
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
+}
+
+module.exports = _iterableToArray;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js b/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js
new file mode 100644
index 0000000..14c1daa
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js
@@ -0,0 +1,27 @@
+function _iterableToArrayLimit(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+module.exports = _iterableToArrayLimit;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js b/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js
new file mode 100644
index 0000000..c7dfeb3
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js
@@ -0,0 +1,13 @@
+function _iterableToArrayLimitLoose(arr, i) {
+ var _arr = [];
+
+ for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
+ _arr.push(_step.value);
+
+ if (i && _arr.length === i) break;
+ }
+
+ return _arr;
+}
+
+module.exports = _iterableToArrayLimitLoose;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/jsx.js b/node_modules/@babel/runtime/helpers/jsx.js
new file mode 100644
index 0000000..db6ffd7
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/jsx.js
@@ -0,0 +1,49 @@
+var REACT_ELEMENT_TYPE;
+
+function _createRawReactElement(type, props, key, children) {
+ if (!REACT_ELEMENT_TYPE) {
+ REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
+ }
+
+ var defaultProps = type && type.defaultProps;
+ var childrenLength = arguments.length - 3;
+
+ if (!props && childrenLength !== 0) {
+ props = {
+ children: void 0
+ };
+ }
+
+ if (props && defaultProps) {
+ for (var propName in defaultProps) {
+ if (props[propName] === void 0) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ } else if (!props) {
+ props = defaultProps || {};
+ }
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = new Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 3];
+ }
+
+ props.children = childArray;
+ }
+
+ return {
+ $$typeof: REACT_ELEMENT_TYPE,
+ type: type,
+ key: key === undefined ? null : '' + key,
+ ref: null,
+ props: props,
+ _owner: null
+ };
+}
+
+module.exports = _createRawReactElement;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/newArrowCheck.js b/node_modules/@babel/runtime/helpers/newArrowCheck.js
new file mode 100644
index 0000000..9b59f58
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/newArrowCheck.js
@@ -0,0 +1,7 @@
+function _newArrowCheck(innerThis, boundThis) {
+ if (innerThis !== boundThis) {
+ throw new TypeError("Cannot instantiate an arrow function");
+ }
+}
+
+module.exports = _newArrowCheck;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/nonIterableRest.js b/node_modules/@babel/runtime/helpers/nonIterableRest.js
new file mode 100644
index 0000000..eb447dd
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/nonIterableRest.js
@@ -0,0 +1,5 @@
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+}
+
+module.exports = _nonIterableRest;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/nonIterableSpread.js b/node_modules/@babel/runtime/helpers/nonIterableSpread.js
new file mode 100644
index 0000000..7d7ca43
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/nonIterableSpread.js
@@ -0,0 +1,5 @@
+function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
+}
+
+module.exports = _nonIterableSpread;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js b/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js
new file mode 100644
index 0000000..1d5c04a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js
@@ -0,0 +1,5 @@
+function _objectDestructuringEmpty(obj) {
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
+}
+
+module.exports = _objectDestructuringEmpty;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/objectSpread.js b/node_modules/@babel/runtime/helpers/objectSpread.js
new file mode 100644
index 0000000..b923400
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/objectSpread.js
@@ -0,0 +1,22 @@
+var defineProperty = require("./defineProperty");
+
+function _objectSpread(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i] != null ? arguments[i] : {};
+ var ownKeys = Object.keys(source);
+
+ if (typeof Object.getOwnPropertySymbols === 'function') {
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ }));
+ }
+
+ ownKeys.forEach(function (key) {
+ defineProperty(target, key, source[key]);
+ });
+ }
+
+ return target;
+}
+
+module.exports = _objectSpread;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/objectWithoutProperties.js b/node_modules/@babel/runtime/helpers/objectWithoutProperties.js
new file mode 100644
index 0000000..253d33c
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/objectWithoutProperties.js
@@ -0,0 +1,22 @@
+var objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose");
+
+function _objectWithoutProperties(source, excluded) {
+ if (source == null) return {};
+ var target = objectWithoutPropertiesLoose(source, excluded);
+ var key, i;
+
+ if (Object.getOwnPropertySymbols) {
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
+ key = sourceSymbolKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
+
+module.exports = _objectWithoutProperties;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js b/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js
new file mode 100644
index 0000000..a58c56b
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js
@@ -0,0 +1,16 @@
+function _objectWithoutPropertiesLoose(source, excluded) {
+ if (source == null) return {};
+ var target = {};
+ var sourceKeys = Object.keys(source);
+ var key, i;
+
+ for (i = 0; i < sourceKeys.length; i++) {
+ key = sourceKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ target[key] = source[key];
+ }
+
+ return target;
+}
+
+module.exports = _objectWithoutPropertiesLoose;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js b/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
new file mode 100644
index 0000000..84f7bf6
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
@@ -0,0 +1,13 @@
+var _typeof = require("../helpers/typeof");
+
+var assertThisInitialized = require("./assertThisInitialized");
+
+function _possibleConstructorReturn(self, call) {
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
+ return call;
+ }
+
+ return assertThisInitialized(self);
+}
+
+module.exports = _possibleConstructorReturn;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/readOnlyError.js b/node_modules/@babel/runtime/helpers/readOnlyError.js
new file mode 100644
index 0000000..4e61e3f
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/readOnlyError.js
@@ -0,0 +1,5 @@
+function _readOnlyError(name) {
+ throw new Error("\"" + name + "\" is read-only");
+}
+
+module.exports = _readOnlyError;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/set.js b/node_modules/@babel/runtime/helpers/set.js
new file mode 100644
index 0000000..aad38c2
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/set.js
@@ -0,0 +1,56 @@
+var getPrototypeOf = require("./getPrototypeOf");
+
+var superPropBase = require("./superPropBase");
+
+var defineProperty = require("./defineProperty");
+
+function set(target, property, value, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.set) {
+ set = Reflect.set;
+ } else {
+ set = function set(target, property, value, receiver) {
+ var base = superPropBase(target, property);
+ var desc;
+
+ if (base) {
+ desc = Object.getOwnPropertyDescriptor(base, property);
+
+ if (desc.set) {
+ desc.set.call(receiver, value);
+ return true;
+ } else if (!desc.writable) {
+ return false;
+ }
+ }
+
+ desc = Object.getOwnPropertyDescriptor(receiver, property);
+
+ if (desc) {
+ if (!desc.writable) {
+ return false;
+ }
+
+ desc.value = value;
+ Object.defineProperty(receiver, property, desc);
+ } else {
+ defineProperty(receiver, property, value);
+ }
+
+ return true;
+ };
+ }
+
+ return set(target, property, value, receiver);
+}
+
+function _set(target, property, value, receiver, isStrict) {
+ var s = set(target, property, value, receiver || target);
+
+ if (!s && isStrict) {
+ throw new Error('failed to set property');
+ }
+
+ return value;
+}
+
+module.exports = _set;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/setPrototypeOf.js b/node_modules/@babel/runtime/helpers/setPrototypeOf.js
new file mode 100644
index 0000000..d86e2fc
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/setPrototypeOf.js
@@ -0,0 +1,10 @@
+function _setPrototypeOf(o, p) {
+ module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ o.__proto__ = p;
+ return o;
+ };
+
+ return _setPrototypeOf(o, p);
+}
+
+module.exports = _setPrototypeOf;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js b/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js
new file mode 100644
index 0000000..e1d6c86
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js
@@ -0,0 +1,9 @@
+function _skipFirstGeneratorNext(fn) {
+ return function () {
+ var it = fn.apply(this, arguments);
+ it.next();
+ return it;
+ };
+}
+
+module.exports = _skipFirstGeneratorNext;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/slicedToArray.js b/node_modules/@babel/runtime/helpers/slicedToArray.js
new file mode 100644
index 0000000..243ea9e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/slicedToArray.js
@@ -0,0 +1,11 @@
+var arrayWithHoles = require("./arrayWithHoles");
+
+var iterableToArrayLimit = require("./iterableToArrayLimit");
+
+var nonIterableRest = require("./nonIterableRest");
+
+function _slicedToArray(arr, i) {
+ return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
+}
+
+module.exports = _slicedToArray;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js b/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js
new file mode 100644
index 0000000..c7e4313
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js
@@ -0,0 +1,11 @@
+var arrayWithHoles = require("./arrayWithHoles");
+
+var iterableToArrayLimitLoose = require("./iterableToArrayLimitLoose");
+
+var nonIterableRest = require("./nonIterableRest");
+
+function _slicedToArrayLoose(arr, i) {
+ return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest();
+}
+
+module.exports = _slicedToArrayLoose;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/superPropBase.js b/node_modules/@babel/runtime/helpers/superPropBase.js
new file mode 100644
index 0000000..bbb34a2
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/superPropBase.js
@@ -0,0 +1,12 @@
+var getPrototypeOf = require("./getPrototypeOf");
+
+function _superPropBase(object, property) {
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
+ object = getPrototypeOf(object);
+ if (object === null) break;
+ }
+
+ return object;
+}
+
+module.exports = _superPropBase;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js b/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js
new file mode 100644
index 0000000..bdcc1e9
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js
@@ -0,0 +1,13 @@
+function _taggedTemplateLiteral(strings, raw) {
+ if (!raw) {
+ raw = strings.slice(0);
+ }
+
+ return Object.freeze(Object.defineProperties(strings, {
+ raw: {
+ value: Object.freeze(raw)
+ }
+ }));
+}
+
+module.exports = _taggedTemplateLiteral;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js b/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js
new file mode 100644
index 0000000..beced54
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js
@@ -0,0 +1,10 @@
+function _taggedTemplateLiteralLoose(strings, raw) {
+ if (!raw) {
+ raw = strings.slice(0);
+ }
+
+ strings.raw = raw;
+ return strings;
+}
+
+module.exports = _taggedTemplateLiteralLoose;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/temporalRef.js b/node_modules/@babel/runtime/helpers/temporalRef.js
new file mode 100644
index 0000000..20b2652
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/temporalRef.js
@@ -0,0 +1,11 @@
+var temporalUndefined = require("./temporalUndefined");
+
+function _temporalRef(val, name) {
+ if (val === temporalUndefined) {
+ throw new ReferenceError(name + " is not defined - temporal dead zone");
+ } else {
+ return val;
+ }
+}
+
+module.exports = _temporalRef;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/temporalUndefined.js b/node_modules/@babel/runtime/helpers/temporalUndefined.js
new file mode 100644
index 0000000..a099545
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/temporalUndefined.js
@@ -0,0 +1 @@
+module.exports = {};
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/toArray.js b/node_modules/@babel/runtime/helpers/toArray.js
new file mode 100644
index 0000000..c28fd9e
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/toArray.js
@@ -0,0 +1,11 @@
+var arrayWithHoles = require("./arrayWithHoles");
+
+var iterableToArray = require("./iterableToArray");
+
+var nonIterableRest = require("./nonIterableRest");
+
+function _toArray(arr) {
+ return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();
+}
+
+module.exports = _toArray;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/toConsumableArray.js b/node_modules/@babel/runtime/helpers/toConsumableArray.js
new file mode 100644
index 0000000..4cd54a3
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/toConsumableArray.js
@@ -0,0 +1,11 @@
+var arrayWithoutHoles = require("./arrayWithoutHoles");
+
+var iterableToArray = require("./iterableToArray");
+
+var nonIterableSpread = require("./nonIterableSpread");
+
+function _toConsumableArray(arr) {
+ return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
+}
+
+module.exports = _toConsumableArray;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/toPrimitive.js b/node_modules/@babel/runtime/helpers/toPrimitive.js
new file mode 100644
index 0000000..cd1d383
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/toPrimitive.js
@@ -0,0 +1,16 @@
+var _typeof = require("../helpers/typeof");
+
+function _toPrimitive(input, hint) {
+ if (_typeof(input) !== "object" || input === null) return input;
+ var prim = input[Symbol.toPrimitive];
+
+ if (prim !== undefined) {
+ var res = prim.call(input, hint || "default");
+ if (_typeof(res) !== "object") return res;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+
+ return (hint === "string" ? String : Number)(input);
+}
+
+module.exports = _toPrimitive;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/toPropertyKey.js b/node_modules/@babel/runtime/helpers/toPropertyKey.js
new file mode 100644
index 0000000..108b083
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/toPropertyKey.js
@@ -0,0 +1,10 @@
+var _typeof = require("../helpers/typeof");
+
+var toPrimitive = require("./toPrimitive");
+
+function _toPropertyKey(arg) {
+ var key = toPrimitive(arg, "string");
+ return _typeof(key) === "symbol" ? key : String(key);
+}
+
+module.exports = _toPropertyKey;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/typeof.js b/node_modules/@babel/runtime/helpers/typeof.js
new file mode 100644
index 0000000..fd7d3ed
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/typeof.js
@@ -0,0 +1,17 @@
+function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
+
+function _typeof(obj) {
+ if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
+ module.exports = _typeof = function _typeof(obj) {
+ return _typeof2(obj);
+ };
+ } else {
+ module.exports = _typeof = function _typeof(obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
+ };
+ }
+
+ return _typeof(obj);
+}
+
+module.exports = _typeof;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js b/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js
new file mode 100644
index 0000000..11554f3
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js
@@ -0,0 +1,9 @@
+var AsyncGenerator = require("./AsyncGenerator");
+
+function _wrapAsyncGenerator(fn) {
+ return function () {
+ return new AsyncGenerator(fn.apply(this, arguments));
+ };
+}
+
+module.exports = _wrapAsyncGenerator;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/wrapNativeSuper.js b/node_modules/@babel/runtime/helpers/wrapNativeSuper.js
new file mode 100644
index 0000000..3d4bd7a
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/wrapNativeSuper.js
@@ -0,0 +1,43 @@
+var getPrototypeOf = require("./getPrototypeOf");
+
+var setPrototypeOf = require("./setPrototypeOf");
+
+var isNativeFunction = require("./isNativeFunction");
+
+var construct = require("./construct");
+
+function _wrapNativeSuper(Class) {
+ var _cache = typeof Map === "function" ? new Map() : undefined;
+
+ module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
+ if (Class === null || !isNativeFunction(Class)) return Class;
+
+ if (typeof Class !== "function") {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+
+ if (typeof _cache !== "undefined") {
+ if (_cache.has(Class)) return _cache.get(Class);
+
+ _cache.set(Class, Wrapper);
+ }
+
+ function Wrapper() {
+ return construct(Class, arguments, getPrototypeOf(this).constructor);
+ }
+
+ Wrapper.prototype = Object.create(Class.prototype, {
+ constructor: {
+ value: Wrapper,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ return setPrototypeOf(Wrapper, Class);
+ };
+
+ return _wrapNativeSuper(Class);
+}
+
+module.exports = _wrapNativeSuper;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/helpers/wrapRegExp.js b/node_modules/@babel/runtime/helpers/wrapRegExp.js
new file mode 100644
index 0000000..0bf3ab2
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/wrapRegExp.js
@@ -0,0 +1,76 @@
+var _typeof = require("../helpers/typeof");
+
+var wrapNativeSuper = require("./wrapNativeSuper");
+
+var getPrototypeOf = require("./getPrototypeOf");
+
+var possibleConstructorReturn = require("./possibleConstructorReturn");
+
+var inherits = require("./inherits");
+
+function _wrapRegExp(re, groups) {
+ module.exports = _wrapRegExp = function _wrapRegExp(re, groups) {
+ return new BabelRegExp(re, groups);
+ };
+
+ var _RegExp = wrapNativeSuper(RegExp);
+
+ var _super = RegExp.prototype;
+
+ var _groups = new WeakMap();
+
+ function BabelRegExp(re, groups) {
+ var _this = _RegExp.call(this, re);
+
+ _groups.set(_this, groups);
+
+ return _this;
+ }
+
+ inherits(BabelRegExp, _RegExp);
+
+ BabelRegExp.prototype.exec = function (str) {
+ var result = _super.exec.call(this, str);
+
+ if (result) result.groups = buildGroups(result, this);
+ return result;
+ };
+
+ BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
+ if (typeof substitution === "string") {
+ var groups = _groups.get(this);
+
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
+ return "$" + groups[name];
+ }));
+ } else if (typeof substitution === "function") {
+ var _this = this;
+
+ return _super[Symbol.replace].call(this, str, function () {
+ var args = [];
+ args.push.apply(args, arguments);
+
+ if (_typeof(args[args.length - 1]) !== "object") {
+ args.push(buildGroups(args, _this));
+ }
+
+ return substitution.apply(this, args);
+ });
+ } else {
+ return _super[Symbol.replace].call(this, str, substitution);
+ }
+ };
+
+ function buildGroups(result, re) {
+ var g = _groups.get(re);
+
+ return Object.keys(groups).reduce(function (groups, name) {
+ groups[name] = result[g[name]];
+ return groups;
+ }, Object.create(null));
+ }
+
+ return _wrapRegExp.apply(this, arguments);
+}
+
+module.exports = _wrapRegExp;
\ No newline at end of file
diff --git a/node_modules/@babel/runtime/package.json b/node_modules/@babel/runtime/package.json
new file mode 100644
index 0000000..3500fbb
--- /dev/null
+++ b/node_modules/@babel/runtime/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "@babel/runtime@^7.2.0",
+ "_id": "@babel/runtime@7.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==",
+ "_location": "/@babel/runtime",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@babel/runtime@^7.2.0",
+ "name": "@babel/runtime",
+ "escapedName": "@babel%2fruntime",
+ "scope": "@babel",
+ "rawSpec": "^7.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^7.2.0"
+ },
+ "_requiredBy": [
+ "/react-redux"
+ ],
+ "_resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz",
+ "_shasum": "574b03e8e8a9898eaf4a872a92ea20b7846f6f2a",
+ "_spec": "@babel/runtime@^7.2.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/react-redux",
+ "author": {
+ "name": "Sebastian McKenzie",
+ "email": "sebmck@gmail.com"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "regenerator-runtime": "^0.12.0"
+ },
+ "deprecated": false,
+ "description": "babel's modular runtime helpers",
+ "devDependencies": {
+ "@babel/helpers": "^7.3.1"
+ },
+ "gitHead": "f2af6c1170ebbea22bd29a2bae01efaec800dfe9",
+ "license": "MIT",
+ "name": "@babel/runtime",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel/tree/master/packages/babel-runtime"
+ },
+ "version": "7.3.1"
+}
diff --git a/node_modules/@babel/runtime/regenerator/index.js b/node_modules/@babel/runtime/regenerator/index.js
new file mode 100644
index 0000000..9fd4158
--- /dev/null
+++ b/node_modules/@babel/runtime/regenerator/index.js
@@ -0,0 +1 @@
+module.exports = require("regenerator-runtime");
diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md
new file mode 100644
index 0000000..f16c17a
--- /dev/null
+++ b/node_modules/accepts/HISTORY.md
@@ -0,0 +1,224 @@
+1.3.5 / 2018-02-28
+==================
+
+ * deps: mime-types@~2.1.18
+ - deps: mime-db@~1.33.0
+
+1.3.4 / 2017-08-22
+==================
+
+ * deps: mime-types@~2.1.16
+ - deps: mime-db@~1.29.0
+
+1.3.3 / 2016-05-02
+==================
+
+ * deps: mime-types@~2.1.11
+ - deps: mime-db@~1.23.0
+ * deps: negotiator@0.6.1
+ - perf: improve `Accept` parsing speed
+ - perf: improve `Accept-Charset` parsing speed
+ - perf: improve `Accept-Encoding` parsing speed
+ - perf: improve `Accept-Language` parsing speed
+
+1.3.2 / 2016-03-08
+==================
+
+ * deps: mime-types@~2.1.10
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+ - deps: mime-db@~1.22.0
+
+1.3.1 / 2016-01-19
+==================
+
+ * deps: mime-types@~2.1.9
+ - deps: mime-db@~1.21.0
+
+1.3.0 / 2015-09-29
+==================
+
+ * deps: mime-types@~2.1.7
+ - deps: mime-db@~1.19.0
+ * deps: negotiator@0.6.0
+ - Fix including type extensions in parameters in `Accept` parsing
+ - Fix parsing `Accept` parameters with quoted equals
+ - Fix parsing `Accept` parameters with quoted semicolons
+ - Lazy-load modules from main entry point
+ - perf: delay type concatenation until needed
+ - perf: enable strict mode
+ - perf: hoist regular expressions
+ - perf: remove closures getting spec properties
+ - perf: remove a closure from media type parsing
+ - perf: remove property delete from media type parsing
+
+1.2.13 / 2015-09-06
+===================
+
+ * deps: mime-types@~2.1.6
+ - deps: mime-db@~1.18.0
+
+1.2.12 / 2015-07-30
+===================
+
+ * deps: mime-types@~2.1.4
+ - deps: mime-db@~1.16.0
+
+1.2.11 / 2015-07-16
+===================
+
+ * deps: mime-types@~2.1.3
+ - deps: mime-db@~1.15.0
+
+1.2.10 / 2015-07-01
+===================
+
+ * deps: mime-types@~2.1.2
+ - deps: mime-db@~1.14.0
+
+1.2.9 / 2015-06-08
+==================
+
+ * deps: mime-types@~2.1.1
+ - perf: fix deopt during mapping
+
+1.2.8 / 2015-06-07
+==================
+
+ * deps: mime-types@~2.1.0
+ - deps: mime-db@~1.13.0
+ * perf: avoid argument reassignment & argument slice
+ * perf: avoid negotiator recursive construction
+ * perf: enable strict mode
+ * perf: remove unnecessary bitwise operator
+
+1.2.7 / 2015-05-10
+==================
+
+ * deps: negotiator@0.5.3
+ - Fix media type parameter matching to be case-insensitive
+
+1.2.6 / 2015-05-07
+==================
+
+ * deps: mime-types@~2.0.11
+ - deps: mime-db@~1.9.1
+ * deps: negotiator@0.5.2
+ - Fix comparing media types with quoted values
+ - Fix splitting media types with quoted commas
+
+1.2.5 / 2015-03-13
+==================
+
+ * deps: mime-types@~2.0.10
+ - deps: mime-db@~1.8.0
+
+1.2.4 / 2015-02-14
+==================
+
+ * Support Node.js 0.6
+ * deps: mime-types@~2.0.9
+ - deps: mime-db@~1.7.0
+ * deps: negotiator@0.5.1
+ - Fix preference sorting to be stable for long acceptable lists
+
+1.2.3 / 2015-01-31
+==================
+
+ * deps: mime-types@~2.0.8
+ - deps: mime-db@~1.6.0
+
+1.2.2 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - deps: mime-db@~1.5.0
+
+1.2.1 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.5
+ - deps: mime-db@~1.3.1
+
+1.2.0 / 2014-12-19
+==================
+
+ * deps: negotiator@0.5.0
+ - Fix list return order when large accepted list
+ - Fix missing identity encoding when q=0 exists
+ - Remove dynamic building of Negotiator class
+
+1.1.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - deps: mime-db@~1.3.0
+
+1.1.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - deps: mime-db@~1.2.0
+
+1.1.2 / 2014-10-14
+==================
+
+ * deps: negotiator@0.4.9
+ - Fix error when media type has invalid parameter
+
+1.1.1 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - deps: mime-db@~1.1.0
+ * deps: negotiator@0.4.8
+ - Fix all negotiations to be case-insensitive
+ - Stable sort preferences of same quality according to client order
+
+1.1.0 / 2014-09-02
+==================
+
+ * update `mime-types`
+
+1.0.7 / 2014-07-04
+==================
+
+ * Fix wrong type returned from `type` when match after unknown extension
+
+1.0.6 / 2014-06-24
+==================
+
+ * deps: negotiator@0.4.7
+
+1.0.5 / 2014-06-20
+==================
+
+ * fix crash when unknown extension given
+
+1.0.4 / 2014-06-19
+==================
+
+ * use `mime-types`
+
+1.0.3 / 2014-06-11
+==================
+
+ * deps: negotiator@0.4.6
+ - Order by specificity when quality is the same
+
+1.0.2 / 2014-05-29
+==================
+
+ * Fix interpretation when header not in request
+ * deps: pin negotiator@0.4.5
+
+1.0.1 / 2014-01-18
+==================
+
+ * Identity encoding isn't always acceptable
+ * deps: negotiator@~0.4.0
+
+1.0.0 / 2013-12-27
+==================
+
+ * Genesis
diff --git a/node_modules/accepts/LICENSE b/node_modules/accepts/LICENSE
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/node_modules/accepts/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/accepts/README.md b/node_modules/accepts/README.md
new file mode 100644
index 0000000..6a2749a
--- /dev/null
+++ b/node_modules/accepts/README.md
@@ -0,0 +1,143 @@
+# accepts
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
+Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+
+In addition to negotiator, it allows:
+
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
+ as well as `('text/html', 'application/json')`.
+- Allows type shorthands such as `json`.
+- Returns `false` when no types match
+- Treats non-existent headers as `*`
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install accepts
+```
+
+## API
+
+
+
+```js
+var accepts = require('accepts')
+```
+
+### accepts(req)
+
+Create a new `Accepts` object for the given `req`.
+
+#### .charset(charsets)
+
+Return the first accepted charset. If nothing in `charsets` is accepted,
+then `false` is returned.
+
+#### .charsets()
+
+Return the charsets that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .encoding(encodings)
+
+Return the first accepted encoding. If nothing in `encodings` is accepted,
+then `false` is returned.
+
+#### .encodings()
+
+Return the encodings that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .language(languages)
+
+Return the first accepted language. If nothing in `languages` is accepted,
+then `false` is returned.
+
+#### .languages()
+
+Return the languages that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .type(types)
+
+Return the first accepted type (and it is returned as the same text as what
+appears in the `types` array). If nothing in `types` is accepted, then `false`
+is returned.
+
+The `types` array can contain full MIME types or file extensions. Any value
+that is not a full MIME types is passed to `require('mime-types').lookup`.
+
+#### .types()
+
+Return the types that the request accepts, in the order of the client's
+preference (most preferred first).
+
+## Examples
+
+### Simple type negotiation
+
+This simple example shows how to use `accepts` to return a different typed
+respond body based on what the client wants to accept. The server lists it's
+preferences in order and will get back the best match between the client and
+server.
+
+```js
+var accepts = require('accepts')
+var http = require('http')
+
+function app (req, res) {
+ var accept = accepts(req)
+
+ // the order of this list is significant; should be server preferred order
+ switch (accept.type(['json', 'html'])) {
+ case 'json':
+ res.setHeader('Content-Type', 'application/json')
+ res.write('{"hello":"world!"}')
+ break
+ case 'html':
+ res.setHeader('Content-Type', 'text/html')
+ res.write('hello, world!')
+ break
+ default:
+ // the fallback is text/plain, so no need to specify it above
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('hello, world!')
+ break
+ }
+
+ res.end()
+}
+
+http.createServer(app).listen(3000)
+```
+
+You can test this out with the cURL program:
+```sh
+curl -I -H'Accept: text/html' http://localhost:3000/
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/accepts.svg
+[npm-url]: https://npmjs.org/package/accepts
+[node-version-image]: https://img.shields.io/node/v/accepts.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg
+[travis-url]: https://travis-ci.org/jshttp/accepts
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts
+[downloads-image]: https://img.shields.io/npm/dm/accepts.svg
+[downloads-url]: https://npmjs.org/package/accepts
diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js
new file mode 100644
index 0000000..e9b2f63
--- /dev/null
+++ b/node_modules/accepts/index.js
@@ -0,0 +1,238 @@
+/*!
+ * accepts
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Negotiator = require('negotiator')
+var mime = require('mime-types')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Accepts
+
+/**
+ * Create a new Accepts object for the given req.
+ *
+ * @param {object} req
+ * @public
+ */
+
+function Accepts (req) {
+ if (!(this instanceof Accepts)) {
+ return new Accepts(req)
+ }
+
+ this.headers = req.headers
+ this.negotiator = new Negotiator(req)
+}
+
+/**
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * this.types('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * this.types('html');
+ * // => "html"
+ * this.types('text/html');
+ * // => "text/html"
+ * this.types('json', 'text');
+ * // => "json"
+ * this.types('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * this.types('image/png');
+ * this.types('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * this.types(['html', 'json']);
+ * this.types('html', 'json');
+ * // => "json"
+ *
+ * @param {String|Array} types...
+ * @return {String|Array|Boolean}
+ * @public
+ */
+
+Accepts.prototype.type =
+Accepts.prototype.types = function (types_) {
+ var types = types_
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i]
+ }
+ }
+
+ // no types, return all requested types
+ if (!types || types.length === 0) {
+ return this.negotiator.mediaTypes()
+ }
+
+ // no accept header, return first given type
+ if (!this.headers.accept) {
+ return types[0]
+ }
+
+ var mimes = types.map(extToMime)
+ var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
+ var first = accepts[0]
+
+ return first
+ ? types[mimes.indexOf(first)]
+ : false
+}
+
+/**
+ * Return accepted encodings or best fit based on `encodings`.
+ *
+ * Given `Accept-Encoding: gzip, deflate`
+ * an array sorted by quality is returned:
+ *
+ * ['gzip', 'deflate']
+ *
+ * @param {String|Array} encodings...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.encoding =
+Accepts.prototype.encodings = function (encodings_) {
+ var encodings = encodings_
+
+ // support flattened arguments
+ if (encodings && !Array.isArray(encodings)) {
+ encodings = new Array(arguments.length)
+ for (var i = 0; i < encodings.length; i++) {
+ encodings[i] = arguments[i]
+ }
+ }
+
+ // no encodings, return all requested encodings
+ if (!encodings || encodings.length === 0) {
+ return this.negotiator.encodings()
+ }
+
+ return this.negotiator.encodings(encodings)[0] || false
+}
+
+/**
+ * Return accepted charsets or best fit based on `charsets`.
+ *
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
+ * an array sorted by quality is returned:
+ *
+ * ['utf-8', 'utf-7', 'iso-8859-1']
+ *
+ * @param {String|Array} charsets...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.charset =
+Accepts.prototype.charsets = function (charsets_) {
+ var charsets = charsets_
+
+ // support flattened arguments
+ if (charsets && !Array.isArray(charsets)) {
+ charsets = new Array(arguments.length)
+ for (var i = 0; i < charsets.length; i++) {
+ charsets[i] = arguments[i]
+ }
+ }
+
+ // no charsets, return all requested charsets
+ if (!charsets || charsets.length === 0) {
+ return this.negotiator.charsets()
+ }
+
+ return this.negotiator.charsets(charsets)[0] || false
+}
+
+/**
+ * Return accepted languages or best fit based on `langs`.
+ *
+ * Given `Accept-Language: en;q=0.8, es, pt`
+ * an array sorted by quality is returned:
+ *
+ * ['es', 'pt', 'en']
+ *
+ * @param {String|Array} langs...
+ * @return {Array|String}
+ * @public
+ */
+
+Accepts.prototype.lang =
+Accepts.prototype.langs =
+Accepts.prototype.language =
+Accepts.prototype.languages = function (languages_) {
+ var languages = languages_
+
+ // support flattened arguments
+ if (languages && !Array.isArray(languages)) {
+ languages = new Array(arguments.length)
+ for (var i = 0; i < languages.length; i++) {
+ languages[i] = arguments[i]
+ }
+ }
+
+ // no languages, return all requested languages
+ if (!languages || languages.length === 0) {
+ return this.negotiator.languages()
+ }
+
+ return this.negotiator.languages(languages)[0] || false
+}
+
+/**
+ * Convert extnames to mime.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function extToMime (type) {
+ return type.indexOf('/') === -1
+ ? mime.lookup(type)
+ : type
+}
+
+/**
+ * Check if mime is valid.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function validMime (type) {
+ return typeof type === 'string'
+}
diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json
new file mode 100644
index 0000000..cc6d378
--- /dev/null
+++ b/node_modules/accepts/package.json
@@ -0,0 +1,87 @@
+{
+ "_from": "accepts@~1.3.5",
+ "_id": "accepts@1.3.5",
+ "_inBundle": false,
+ "_integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
+ "_location": "/accepts",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "accepts@~1.3.5",
+ "name": "accepts",
+ "escapedName": "accepts",
+ "rawSpec": "~1.3.5",
+ "saveSpec": null,
+ "fetchSpec": "~1.3.5"
+ },
+ "_requiredBy": [
+ "/compression",
+ "/express",
+ "/serve-index"
+ ],
+ "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "_shasum": "eb777df6011723a3b14e8a72c0805c8e86746bd2",
+ "_spec": "accepts@~1.3.5",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/compression",
+ "bugs": {
+ "url": "https://github.com/jshttp/accepts/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "dependencies": {
+ "mime-types": "~2.1.18",
+ "negotiator": "0.6.1"
+ },
+ "deprecated": false,
+ "description": "Higher-level content negotiation",
+ "devDependencies": {
+ "eslint": "4.18.1",
+ "eslint-config-standard": "11.0.0",
+ "eslint-plugin-import": "2.9.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "6.0.1",
+ "eslint-plugin-promise": "3.6.0",
+ "eslint-plugin-standard": "3.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "~1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/jshttp/accepts#readme",
+ "keywords": [
+ "content",
+ "negotiation",
+ "accept",
+ "accepts"
+ ],
+ "license": "MIT",
+ "name": "accepts",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/accepts.git"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "version": "1.3.5"
+}
diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md
index c34f3b4..254406a 100644
--- a/node_modules/acorn/CHANGELOG.md
+++ b/node_modules/acorn/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 6.0.7 (2019-02-04)
+
+### Bug fixes
+
+Check that exported bindings are defined.
+
+Don't treat `\u180e` as a whitespace character.
+
+Check for duplicate parameter names in methods.
+
+Don't allow shorthand properties when they are generators or async methods.
+
+Forbid binding `await` in async arrow function's parameter list.
+
## 6.0.6 (2019-01-30)
### Bug fixes
diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md
index e66dac3..3e5f58d 100644
--- a/node_modules/acorn/README.md
+++ b/node_modules/acorn/README.md
@@ -5,7 +5,7 @@ A tiny, fast JavaScript parser written in JavaScript.
## Community
Acorn is open source software released under an
-[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE).
+[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
You are welcome to
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js
index e4a0fe3..913c072 100644
--- a/node_modules/acorn/dist/acorn.js
+++ b/node_modules/acorn/dist/acorn.js
@@ -254,7 +254,7 @@ function isNewLine(code, ecma2019String) {
return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029))
}
-var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
+var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
@@ -272,6 +272,10 @@ var isArray = Array.isArray || (function (obj) { return (
toString.call(obj) === "[object Array]"
); });
+function wordsRegexp(words) {
+ return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
+}
+
// These are used when `options.locations` is on, for the
// `startLoc` and `endLoc` properties.
@@ -460,24 +464,20 @@ var BIND_FUNCTION = 3;
var BIND_SIMPLE_CATCH = 4;
var BIND_OUTSIDE = 5; // Special case for function names as bound inside the function
-function keywordRegexp(words) {
- return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
-}
-
var Parser = function Parser(options, input, startPos) {
this.options = options = getOptions(options);
this.sourceFile = options.sourceFile;
- this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
+ this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
var reserved = "";
if (!options.allowReserved) {
for (var v = options.ecmaVersion;; v--)
{ if (reserved = reservedWords[v]) { break } }
if (options.sourceType === "module") { reserved += " await"; }
}
- this.reservedWords = keywordRegexp(reserved);
+ this.reservedWords = wordsRegexp(reserved);
var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
- this.reservedWordsStrict = keywordRegexp(reservedStrict);
- this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind);
+ this.reservedWordsStrict = wordsRegexp(reservedStrict);
+ this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
this.input = String(input);
// Used to signal to callers of `readWord1` whether the word
@@ -526,9 +526,11 @@ var Parser = function Parser(options, input, startPos) {
this.potentialArrowAt = -1;
// Positions to delayed-check that yield/await does not exist in default parameters.
- this.yieldPos = this.awaitPos = 0;
+ this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
// Labels in scope.
this.labels = [];
+ // Thus-far undefined exports.
+ this.undefinedExports = {};
// If enabled, skip leading hashbang line.
if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!")
@@ -747,6 +749,13 @@ pp$1.parseTopLevel = function(node) {
var stmt = this$1.parseStatement(null, true, exports);
node.body.push(stmt);
}
+ if (this.inModule)
+ { for (var i = 0, list = Object.keys(this$1.undefinedExports); i < list.length; i += 1)
+ {
+ var name = list[i];
+
+ this$1.raiseRecoverable(this$1.undefinedExports[name].start, ("Export '" + name + "' is not defined"));
+ } }
this.adaptDirectivePrologue(node.body);
this.next();
if (this.options.ecmaVersion >= 6) {
@@ -1238,8 +1247,9 @@ var FUNC_HANGING_STATEMENT = 2;
var FUNC_NULLABLE_ID = 4;
// Parse a function declaration or literal (depending on the
-// `isStatement` parameter).
+// `statement & FUNC_STATEMENT`).
+// Remove `allowExpressionBody` for 7.0.0, as it is only called with false
pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) {
this.initFunction(node);
if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
@@ -1260,19 +1270,21 @@ pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) {
{ this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); }
}
- var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos;
+ var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.yieldPos = 0;
this.awaitPos = 0;
+ this.awaitIdentPos = 0;
this.enterScope(functionFlags(node.async, node.generator));
if (!(statement & FUNC_STATEMENT))
{ node.id = this.type === types.name ? this.parseIdent() : null; }
this.parseFunctionParams(node);
- this.parseFunctionBody(node, allowExpressionBody);
+ this.parseFunctionBody(node, allowExpressionBody, false);
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
+ this.awaitIdentPos = oldAwaitIdentPos;
return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression")
};
@@ -1415,7 +1427,7 @@ pp$1.parseExport = function(node, exports) {
var fNode = this.startNode();
this.next();
if (isAsync) { this.next(); }
- node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync, true);
+ node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
} else if (this.type === types._class) {
var cNode = this.startNode();
node.declaration = this.parseClass(cNode, "nullableID");
@@ -1441,11 +1453,13 @@ pp$1.parseExport = function(node, exports) {
if (this.type !== types.string) { this.unexpected(); }
node.source = this.parseExprAtom();
} else {
- // check for keywords used as local names
for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
+ // check for keywords used as local names
var spec = list[i];
this$1.checkUnreserved(spec.local);
+ // check if export is defined
+ this$1.checkLocalExport(spec.local);
}
node.source = null;
@@ -1624,7 +1638,7 @@ pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) {
switch (node.type) {
case "Identifier":
if (this.inAsync && node.name === "await")
- { this.raise(node.start, "Can not use 'await' as identifier inside an async function"); }
+ { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); }
break
case "ObjectPattern":
@@ -2134,20 +2148,25 @@ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
if (computed) { this$1.expect(types.bracketR); }
base = this$1.finishNode(node, "MemberExpression");
} else if (!noCalls && this$1.eat(types.parenL)) {
- var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos;
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos, oldAwaitIdentPos = this$1.awaitIdentPos;
this$1.yieldPos = 0;
this$1.awaitPos = 0;
+ this$1.awaitIdentPos = 0;
var exprList = this$1.parseExprList(types.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors);
if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(types.arrow)) {
this$1.checkPatternErrors(refDestructuringErrors, false);
this$1.checkYieldAwaitInDefaultParams();
+ if (this$1.awaitIdentPos > 0)
+ { this$1.raise(this$1.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); }
this$1.yieldPos = oldYieldPos;
this$1.awaitPos = oldAwaitPos;
+ this$1.awaitIdentPos = oldAwaitIdentPos;
return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
}
this$1.checkExpressionErrors(refDestructuringErrors, true);
this$1.yieldPos = oldYieldPos || this$1.yieldPos;
this$1.awaitPos = oldAwaitPos || this$1.awaitPos;
+ this$1.awaitIdentPos = oldAwaitIdentPos || this$1.awaitIdentPos;
var node$1 = this$1.startNodeAt(startPos, startLoc);
node$1.callee = base;
node$1.arguments = exprList;
@@ -2199,14 +2218,14 @@ pp$3.parseExprAtom = function(refDestructuringErrors) {
case types.name:
var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
- var id = this.parseIdent(this.type !== types.name);
+ var id = this.parseIdent(false);
if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function))
{ return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) }
if (canBeArrow && !this.canInsertSemicolon()) {
if (this.eat(types.arrow))
{ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) }
if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) {
- id = this.parseIdent();
+ id = this.parseIdent(false);
if (this.canInsertSemicolon() || !this.eat(types.arrow))
{ this.unexpected(); }
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
@@ -2295,6 +2314,7 @@ pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
this.yieldPos = 0;
this.awaitPos = 0;
+ // Do not save awaitIdentPos to allow checking awaits nested in parameters
while (this.type !== types.parenR) {
first ? first = false : this$1.expect(types.comma);
if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) {
@@ -2538,7 +2558,10 @@ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
{ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); }
}
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (isGenerator || isAsync) { this.unexpected(); }
this.checkUnreserved(prop.key);
+ if (prop.key.name === "await" && !this.awaitIdentPos)
+ { this.awaitIdentPos = startPos; }
prop.kind = "init";
if (isPattern) {
prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
@@ -2578,7 +2601,7 @@ pp$3.initFunction = function(node) {
// Parse object or class method.
pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
- var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos;
+ var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.initFunction(node);
if (this.options.ecmaVersion >= 6)
@@ -2588,22 +2611,24 @@ pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
this.yieldPos = 0;
this.awaitPos = 0;
+ this.awaitIdentPos = 0;
this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
this.expect(types.parenL);
node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
this.checkYieldAwaitInDefaultParams();
- this.parseFunctionBody(node, false);
+ this.parseFunctionBody(node, false, true);
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
+ this.awaitIdentPos = oldAwaitIdentPos;
return this.finishNode(node, "FunctionExpression")
};
// Parse arrow function expression with given parameters.
pp$3.parseArrowExpression = function(node, params, isAsync) {
- var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos;
+ var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
this.initFunction(node);
@@ -2611,18 +2636,20 @@ pp$3.parseArrowExpression = function(node, params, isAsync) {
this.yieldPos = 0;
this.awaitPos = 0;
+ this.awaitIdentPos = 0;
node.params = this.toAssignableList(params, true);
- this.parseFunctionBody(node, true);
+ this.parseFunctionBody(node, true, false);
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
+ this.awaitIdentPos = oldAwaitIdentPos;
return this.finishNode(node, "ArrowFunctionExpression")
};
// Parse function body and check parameters.
-pp$3.parseFunctionBody = function(node, isArrowFunction) {
+pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) {
var isExpression = isArrowFunction && this.type !== types.braceL;
var oldStrict = this.strict, useStrict = false;
@@ -2648,7 +2675,7 @@ pp$3.parseFunctionBody = function(node, isArrowFunction) {
// Add the params to varDeclaredNames to ensure that an error is thrown
// if a let/const declaration in the function clashes with one of the params.
- this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && this.isSimpleParamList(node.params));
+ this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
node.body = this.parseBlock(false);
node.expression = false;
this.adaptDirectivePrologue(node.body.body);
@@ -2723,9 +2750,9 @@ pp$3.checkUnreserved = function(ref) {
var name = ref.name;
if (this.inGenerator && name === "yield")
- { this.raiseRecoverable(start, "Can not use 'yield' as identifier inside a generator"); }
+ { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
if (this.inAsync && name === "await")
- { this.raiseRecoverable(start, "Can not use 'await' as identifier inside an async function"); }
+ { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
if (this.keywords.test(name))
{ this.raise(start, ("Unexpected keyword '" + name + "'")); }
if (this.options.ecmaVersion < 6 &&
@@ -2733,7 +2760,7 @@ pp$3.checkUnreserved = function(ref) {
var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
if (re.test(name)) {
if (!this.inAsync && name === "await")
- { this.raiseRecoverable(start, "Can not use keyword 'await' outside an async function"); }
+ { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); }
this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved"));
}
};
@@ -2763,7 +2790,11 @@ pp$3.parseIdent = function(liberal, isBinding) {
}
this.next();
this.finishNode(node, "Identifier");
- if (!liberal) { this.checkUnreserved(node); }
+ if (!liberal) {
+ this.checkUnreserved(node);
+ if (node.name === "await" && !this.awaitIdentPos)
+ { this.awaitIdentPos = node.start; }
+ }
return node
};
@@ -2854,6 +2885,8 @@ pp$5.declareName = function(name, bindingType, pos) {
var scope = this.currentScope();
redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
scope.lexical.push(name);
+ if (this.inModule && (scope.flags & SCOPE_TOP))
+ { delete this.undefinedExports[name]; }
} else if (bindingType === BIND_SIMPLE_CATCH) {
var scope$1 = this.currentScope();
scope$1.lexical.push(name);
@@ -2873,12 +2906,22 @@ pp$5.declareName = function(name, bindingType, pos) {
break
}
scope$3.var.push(name);
+ if (this$1.inModule && (scope$3.flags & SCOPE_TOP))
+ { delete this$1.undefinedExports[name]; }
if (scope$3.flags & SCOPE_VAR) { break }
}
}
if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); }
};
+pp$5.checkLocalExport = function(id) {
+ // scope.functions must be empty as Module code is always strict.
+ if (this.scopeStack[0].lexical.indexOf(id.name) === -1 &&
+ this.scopeStack[0].var.indexOf(id.name) === -1) {
+ this.undefinedExports[id.name] = id;
+ }
+};
+
pp$5.currentScope = function() {
return this.scopeStack[this.scopeStack.length - 1]
};
@@ -3094,473 +3137,51 @@ types.name.updateContext = function(prevType) {
this.exprAllowed = allowed;
};
-var data = {
- "$LONE": [
- "ASCII",
- "ASCII_Hex_Digit",
- "AHex",
- "Alphabetic",
- "Alpha",
- "Any",
- "Assigned",
- "Bidi_Control",
- "Bidi_C",
- "Bidi_Mirrored",
- "Bidi_M",
- "Case_Ignorable",
- "CI",
- "Cased",
- "Changes_When_Casefolded",
- "CWCF",
- "Changes_When_Casemapped",
- "CWCM",
- "Changes_When_Lowercased",
- "CWL",
- "Changes_When_NFKC_Casefolded",
- "CWKCF",
- "Changes_When_Titlecased",
- "CWT",
- "Changes_When_Uppercased",
- "CWU",
- "Dash",
- "Default_Ignorable_Code_Point",
- "DI",
- "Deprecated",
- "Dep",
- "Diacritic",
- "Dia",
- "Emoji",
- "Emoji_Component",
- "Emoji_Modifier",
- "Emoji_Modifier_Base",
- "Emoji_Presentation",
- "Extender",
- "Ext",
- "Grapheme_Base",
- "Gr_Base",
- "Grapheme_Extend",
- "Gr_Ext",
- "Hex_Digit",
- "Hex",
- "IDS_Binary_Operator",
- "IDSB",
- "IDS_Trinary_Operator",
- "IDST",
- "ID_Continue",
- "IDC",
- "ID_Start",
- "IDS",
- "Ideographic",
- "Ideo",
- "Join_Control",
- "Join_C",
- "Logical_Order_Exception",
- "LOE",
- "Lowercase",
- "Lower",
- "Math",
- "Noncharacter_Code_Point",
- "NChar",
- "Pattern_Syntax",
- "Pat_Syn",
- "Pattern_White_Space",
- "Pat_WS",
- "Quotation_Mark",
- "QMark",
- "Radical",
- "Regional_Indicator",
- "RI",
- "Sentence_Terminal",
- "STerm",
- "Soft_Dotted",
- "SD",
- "Terminal_Punctuation",
- "Term",
- "Unified_Ideograph",
- "UIdeo",
- "Uppercase",
- "Upper",
- "Variation_Selector",
- "VS",
- "White_Space",
- "space",
- "XID_Continue",
- "XIDC",
- "XID_Start",
- "XIDS"
- ],
- "General_Category": [
- "Cased_Letter",
- "LC",
- "Close_Punctuation",
- "Pe",
- "Connector_Punctuation",
- "Pc",
- "Control",
- "Cc",
- "cntrl",
- "Currency_Symbol",
- "Sc",
- "Dash_Punctuation",
- "Pd",
- "Decimal_Number",
- "Nd",
- "digit",
- "Enclosing_Mark",
- "Me",
- "Final_Punctuation",
- "Pf",
- "Format",
- "Cf",
- "Initial_Punctuation",
- "Pi",
- "Letter",
- "L",
- "Letter_Number",
- "Nl",
- "Line_Separator",
- "Zl",
- "Lowercase_Letter",
- "Ll",
- "Mark",
- "M",
- "Combining_Mark",
- "Math_Symbol",
- "Sm",
- "Modifier_Letter",
- "Lm",
- "Modifier_Symbol",
- "Sk",
- "Nonspacing_Mark",
- "Mn",
- "Number",
- "N",
- "Open_Punctuation",
- "Ps",
- "Other",
- "C",
- "Other_Letter",
- "Lo",
- "Other_Number",
- "No",
- "Other_Punctuation",
- "Po",
- "Other_Symbol",
- "So",
- "Paragraph_Separator",
- "Zp",
- "Private_Use",
- "Co",
- "Punctuation",
- "P",
- "punct",
- "Separator",
- "Z",
- "Space_Separator",
- "Zs",
- "Spacing_Mark",
- "Mc",
- "Surrogate",
- "Cs",
- "Symbol",
- "S",
- "Titlecase_Letter",
- "Lt",
- "Unassigned",
- "Cn",
- "Uppercase_Letter",
- "Lu"
- ],
- "Script": [
- "Adlam",
- "Adlm",
- "Ahom",
- "Anatolian_Hieroglyphs",
- "Hluw",
- "Arabic",
- "Arab",
- "Armenian",
- "Armn",
- "Avestan",
- "Avst",
- "Balinese",
- "Bali",
- "Bamum",
- "Bamu",
- "Bassa_Vah",
- "Bass",
- "Batak",
- "Batk",
- "Bengali",
- "Beng",
- "Bhaiksuki",
- "Bhks",
- "Bopomofo",
- "Bopo",
- "Brahmi",
- "Brah",
- "Braille",
- "Brai",
- "Buginese",
- "Bugi",
- "Buhid",
- "Buhd",
- "Canadian_Aboriginal",
- "Cans",
- "Carian",
- "Cari",
- "Caucasian_Albanian",
- "Aghb",
- "Chakma",
- "Cakm",
- "Cham",
- "Cherokee",
- "Cher",
- "Common",
- "Zyyy",
- "Coptic",
- "Copt",
- "Qaac",
- "Cuneiform",
- "Xsux",
- "Cypriot",
- "Cprt",
- "Cyrillic",
- "Cyrl",
- "Deseret",
- "Dsrt",
- "Devanagari",
- "Deva",
- "Duployan",
- "Dupl",
- "Egyptian_Hieroglyphs",
- "Egyp",
- "Elbasan",
- "Elba",
- "Ethiopic",
- "Ethi",
- "Georgian",
- "Geor",
- "Glagolitic",
- "Glag",
- "Gothic",
- "Goth",
- "Grantha",
- "Gran",
- "Greek",
- "Grek",
- "Gujarati",
- "Gujr",
- "Gurmukhi",
- "Guru",
- "Han",
- "Hani",
- "Hangul",
- "Hang",
- "Hanunoo",
- "Hano",
- "Hatran",
- "Hatr",
- "Hebrew",
- "Hebr",
- "Hiragana",
- "Hira",
- "Imperial_Aramaic",
- "Armi",
- "Inherited",
- "Zinh",
- "Qaai",
- "Inscriptional_Pahlavi",
- "Phli",
- "Inscriptional_Parthian",
- "Prti",
- "Javanese",
- "Java",
- "Kaithi",
- "Kthi",
- "Kannada",
- "Knda",
- "Katakana",
- "Kana",
- "Kayah_Li",
- "Kali",
- "Kharoshthi",
- "Khar",
- "Khmer",
- "Khmr",
- "Khojki",
- "Khoj",
- "Khudawadi",
- "Sind",
- "Lao",
- "Laoo",
- "Latin",
- "Latn",
- "Lepcha",
- "Lepc",
- "Limbu",
- "Limb",
- "Linear_A",
- "Lina",
- "Linear_B",
- "Linb",
- "Lisu",
- "Lycian",
- "Lyci",
- "Lydian",
- "Lydi",
- "Mahajani",
- "Mahj",
- "Malayalam",
- "Mlym",
- "Mandaic",
- "Mand",
- "Manichaean",
- "Mani",
- "Marchen",
- "Marc",
- "Masaram_Gondi",
- "Gonm",
- "Meetei_Mayek",
- "Mtei",
- "Mende_Kikakui",
- "Mend",
- "Meroitic_Cursive",
- "Merc",
- "Meroitic_Hieroglyphs",
- "Mero",
- "Miao",
- "Plrd",
- "Modi",
- "Mongolian",
- "Mong",
- "Mro",
- "Mroo",
- "Multani",
- "Mult",
- "Myanmar",
- "Mymr",
- "Nabataean",
- "Nbat",
- "New_Tai_Lue",
- "Talu",
- "Newa",
- "Nko",
- "Nkoo",
- "Nushu",
- "Nshu",
- "Ogham",
- "Ogam",
- "Ol_Chiki",
- "Olck",
- "Old_Hungarian",
- "Hung",
- "Old_Italic",
- "Ital",
- "Old_North_Arabian",
- "Narb",
- "Old_Permic",
- "Perm",
- "Old_Persian",
- "Xpeo",
- "Old_South_Arabian",
- "Sarb",
- "Old_Turkic",
- "Orkh",
- "Oriya",
- "Orya",
- "Osage",
- "Osge",
- "Osmanya",
- "Osma",
- "Pahawh_Hmong",
- "Hmng",
- "Palmyrene",
- "Palm",
- "Pau_Cin_Hau",
- "Pauc",
- "Phags_Pa",
- "Phag",
- "Phoenician",
- "Phnx",
- "Psalter_Pahlavi",
- "Phlp",
- "Rejang",
- "Rjng",
- "Runic",
- "Runr",
- "Samaritan",
- "Samr",
- "Saurashtra",
- "Saur",
- "Sharada",
- "Shrd",
- "Shavian",
- "Shaw",
- "Siddham",
- "Sidd",
- "SignWriting",
- "Sgnw",
- "Sinhala",
- "Sinh",
- "Sora_Sompeng",
- "Sora",
- "Soyombo",
- "Soyo",
- "Sundanese",
- "Sund",
- "Syloti_Nagri",
- "Sylo",
- "Syriac",
- "Syrc",
- "Tagalog",
- "Tglg",
- "Tagbanwa",
- "Tagb",
- "Tai_Le",
- "Tale",
- "Tai_Tham",
- "Lana",
- "Tai_Viet",
- "Tavt",
- "Takri",
- "Takr",
- "Tamil",
- "Taml",
- "Tangut",
- "Tang",
- "Telugu",
- "Telu",
- "Thaana",
- "Thaa",
- "Thai",
- "Tibetan",
- "Tibt",
- "Tifinagh",
- "Tfng",
- "Tirhuta",
- "Tirh",
- "Ugaritic",
- "Ugar",
- "Vai",
- "Vaii",
- "Warang_Citi",
- "Wara",
- "Yi",
- "Yiii",
- "Zanabazar_Square",
- "Zanb"
- ]
-};
-Array.prototype.push.apply(data.$LONE, data.General_Category);
-data.gc = data.General_Category;
-data.sc = data.Script_Extensions = data.scx = data.Script;
+// This file contains Unicode properties extracted from the ECMAScript
+// specification. The lists are extracted like so:
+// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)
+
+// #table-binary-unicode-properties
+var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
+var unicodeBinaryProperties = {
+ 9: ecma9BinaryProperties,
+ 10: ecma9BinaryProperties + " Extended_Pictographic"
+};
+
+// #table-unicode-general-category-values
+var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
+
+// #table-unicode-script-values
+var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
+var unicodeScriptValues = {
+ 9: ecma9ScriptValues,
+ 10: ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"
+};
+
+var data = {};
+function buildUnicodeData(ecmaVersion) {
+ var d = data[ecmaVersion] = {
+ binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
+ nonBinary: {
+ General_Category: wordsRegexp(unicodeGeneralCategoryValues),
+ Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
+ }
+ };
+ d.nonBinary.Script_Extensions = d.nonBinary.Script;
+
+ d.nonBinary.gc = d.nonBinary.General_Category;
+ d.nonBinary.sc = d.nonBinary.Script;
+ d.nonBinary.scx = d.nonBinary.Script_Extensions;
+}
+buildUnicodeData(9);
+buildUnicodeData(10);
var pp$9 = Parser.prototype;
var RegExpValidationState = function RegExpValidationState(parser) {
this.parser = parser;
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
+ this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion];
this.source = "";
this.flags = "";
this.start = 0;
@@ -4344,14 +3965,14 @@ pp$9.regexp_eatUnicodePropertyValueExpression = function(state) {
return false
};
pp$9.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
- if (!data.hasOwnProperty(name) || data[name].indexOf(value) === -1) {
- state.raise("Invalid property name");
- }
+ if (!has(state.unicodeProperties.nonBinary, name))
+ { state.raise("Invalid property name"); }
+ if (!state.unicodeProperties.nonBinary[name].test(value))
+ { state.raise("Invalid property value"); }
};
pp$9.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
- if (data.$LONE.indexOf(nameOrValue) === -1) {
- state.raise("Invalid property name");
- }
+ if (!state.unicodeProperties.binary.test(nameOrValue))
+ { state.raise("Invalid property name"); }
};
// UnicodePropertyName ::
@@ -5334,7 +4955,7 @@ pp$8.readWord = function() {
//
// [walk]: util/walk.js
-var version = "6.0.6";
+var version = "6.0.7";
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
diff --git a/node_modules/acorn/dist/acorn.js.map b/node_modules/acorn/dist/acorn.js.map
index 63bbd1d..9f9ed77 100644
--- a/node_modules/acorn/dist/acorn.js.map
+++ b/node_modules/acorn/dist/acorn.js.map
@@ -1 +1 @@
-{"version":3,"file":"acorn.js","sources":["../src/identifier.js","../src/tokentype.js","../src/whitespace.js","../src/util.js","../src/locutil.js","../src/options.js","../src/scopeflags.js","../src/state.js","../src/parseutil.js","../src/statement.js","../src/lval.js","../src/expression.js","../src/location.js","../src/scope.js","../src/node.js","../src/tokencontext.js","../src/unicode-property-data.js","../src/regexp.js","../src/tokenize.js","../src/index.js"],"sourcesContent":["// Reserved word lists for various dialects of the language\n\nexport const reservedWords = {\n 3: \"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile\",\n 5: \"class enum extends super const export import\",\n 6: \"enum\",\n strict: \"implements interface let package private protected public static yield\",\n strictBind: \"eval arguments\"\n}\n\n// And the keywords\n\nconst ecma5AndLessKeywords = \"break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this\"\n\nexport const keywords = {\n 5: ecma5AndLessKeywords,\n 6: ecma5AndLessKeywords + \" const class extends export import super\"\n}\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point above 128.\n// Generated by `bin/generate-identifier-regex.js`.\n\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u08a0-\\u08b4\\u08b6-\\u08bd\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fef\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7b9\\ua7f7-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab65\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\"\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u08d3-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf2-\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1df9\\u1dfb-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\"\n\nconst nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\")\nconst nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\")\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null\n\n// These are a run-length and offset encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by bin/generate-identifier-regex.js\n\n// eslint-disable-next-line comma-spacing\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]\n\n// eslint-disable-next-line comma-spacing\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code, set) {\n let pos = 0x10000\n for (let i = 0; i < set.length; i += 2) {\n pos += set[i]\n if (pos > code) return false\n pos += set[i + 1]\n if (pos >= code) return true\n }\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code, astral) {\n if (code < 65) return code === 36\n if (code < 91) return true\n if (code < 97) return code === 95\n if (code < 123) return true\n if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n if (astral === false) return false\n return isInAstralSet(code, astralIdentifierStartCodes)\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code, astral) {\n if (code < 48) return code === 36\n if (code < 58) return true\n if (code < 65) return false\n if (code < 91) return true\n if (code < 97) return code === 95\n if (code < 123) return true\n if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))\n if (astral === false) return false\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)\n}\n","// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between regular\n// expressions and divisions. It is set on all token types that can\n// be followed by an expression (thus, a slash after them would be a\n// regular expression).\n//\n// The `startsExpr` property is used to check if the token ends a\n// `yield` expression. It is set on all token types that either can\n// directly start an expression (like a quotation mark) or can\n// continue an expression (like the body of a string).\n//\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nexport class TokenType {\n constructor(label, conf = {}) {\n this.label = label\n this.keyword = conf.keyword\n this.beforeExpr = !!conf.beforeExpr\n this.startsExpr = !!conf.startsExpr\n this.isLoop = !!conf.isLoop\n this.isAssign = !!conf.isAssign\n this.prefix = !!conf.prefix\n this.postfix = !!conf.postfix\n this.binop = conf.binop || null\n this.updateContext = null\n }\n}\n\nfunction binop(name, prec) {\n return new TokenType(name, {beforeExpr: true, binop: prec})\n}\nconst beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}\n\n// Map keyword names to token types.\n\nexport const keywords = {}\n\n// Succinct definitions of keyword token types\nfunction kw(name, options = {}) {\n options.keyword = name\n return keywords[name] = new TokenType(name, options)\n}\n\nexport const types = {\n num: new TokenType(\"num\", startsExpr),\n regexp: new TokenType(\"regexp\", startsExpr),\n string: new TokenType(\"string\", startsExpr),\n name: new TokenType(\"name\", startsExpr),\n eof: new TokenType(\"eof\"),\n\n // Punctuation token types.\n bracketL: new TokenType(\"[\", {beforeExpr: true, startsExpr: true}),\n bracketR: new TokenType(\"]\"),\n braceL: new TokenType(\"{\", {beforeExpr: true, startsExpr: true}),\n braceR: new TokenType(\"}\"),\n parenL: new TokenType(\"(\", {beforeExpr: true, startsExpr: true}),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", beforeExpr),\n semi: new TokenType(\";\", beforeExpr),\n colon: new TokenType(\":\", beforeExpr),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", beforeExpr),\n arrow: new TokenType(\"=>\", beforeExpr),\n template: new TokenType(\"template\"),\n invalidTemplate: new TokenType(\"invalidTemplate\"),\n ellipsis: new TokenType(\"...\", beforeExpr),\n backQuote: new TokenType(\"`\", startsExpr),\n dollarBraceL: new TokenType(\"${\", {beforeExpr: true, startsExpr: true}),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n eq: new TokenType(\"=\", {beforeExpr: true, isAssign: true}),\n assign: new TokenType(\"_=\", {beforeExpr: true, isAssign: true}),\n incDec: new TokenType(\"++/--\", {prefix: true, postfix: true, startsExpr: true}),\n prefix: new TokenType(\"!/~\", {beforeExpr: true, prefix: true, startsExpr: true}),\n logicalOR: binop(\"||\", 1),\n logicalAND: binop(\"&&\", 2),\n bitwiseOR: binop(\"|\", 3),\n bitwiseXOR: binop(\"^\", 4),\n bitwiseAND: binop(\"&\", 5),\n equality: binop(\"==/!=/===/!==\", 6),\n relational: binop(\">/<=/>=\", 7),\n bitShift: binop(\"<>>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),\n modulo: binop(\"%\", 10),\n star: binop(\"*\", 10),\n slash: binop(\"/\", 10),\n starstar: new TokenType(\"**\", {beforeExpr: true}),\n\n // Keyword token types.\n _break: kw(\"break\"),\n _case: kw(\"case\", beforeExpr),\n _catch: kw(\"catch\"),\n _continue: kw(\"continue\"),\n _debugger: kw(\"debugger\"),\n _default: kw(\"default\", beforeExpr),\n _do: kw(\"do\", {isLoop: true, beforeExpr: true}),\n _else: kw(\"else\", beforeExpr),\n _finally: kw(\"finally\"),\n _for: kw(\"for\", {isLoop: true}),\n _function: kw(\"function\", startsExpr),\n _if: kw(\"if\"),\n _return: kw(\"return\", beforeExpr),\n _switch: kw(\"switch\"),\n _throw: kw(\"throw\", beforeExpr),\n _try: kw(\"try\"),\n _var: kw(\"var\"),\n _const: kw(\"const\"),\n _while: kw(\"while\", {isLoop: true}),\n _with: kw(\"with\"),\n _new: kw(\"new\", {beforeExpr: true, startsExpr: true}),\n _this: kw(\"this\", startsExpr),\n _super: kw(\"super\", startsExpr),\n _class: kw(\"class\", startsExpr),\n _extends: kw(\"extends\", beforeExpr),\n _export: kw(\"export\"),\n _import: kw(\"import\"),\n _null: kw(\"null\", startsExpr),\n _true: kw(\"true\", startsExpr),\n _false: kw(\"false\", startsExpr),\n _in: kw(\"in\", {beforeExpr: true, binop: 7}),\n _instanceof: kw(\"instanceof\", {beforeExpr: true, binop: 7}),\n _typeof: kw(\"typeof\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _void: kw(\"void\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _delete: kw(\"delete\", {beforeExpr: true, prefix: true, startsExpr: true})\n}\n","// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\n\nexport const lineBreak = /\\r\\n?|\\n|\\u2028|\\u2029/\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\")\n\nexport function isNewLine(code, ecma2019String) {\n return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029))\n}\n\nexport const nonASCIIwhitespace = /[\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]/\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g\n","const {hasOwnProperty, toString} = Object.prototype\n\n// Checks if an object has a property.\n\nexport function has(obj, propName) {\n return hasOwnProperty.call(obj, propName)\n}\n\nexport const isArray = Array.isArray || ((obj) => (\n toString.call(obj) === \"[object Array]\"\n))\n","import {lineBreakG} from \"./whitespace\"\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n constructor(line, col) {\n this.line = line\n this.column = col\n }\n\n offset(n) {\n return new Position(this.line, this.column + n)\n }\n}\n\nexport class SourceLocation {\n constructor(p, start, end) {\n this.start = start\n this.end = end\n if (p.sourceFile !== null) this.source = p.sourceFile\n }\n}\n\n// The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\nexport function getLineInfo(input, offset) {\n for (let line = 1, cur = 0;;) {\n lineBreakG.lastIndex = cur\n let match = lineBreakG.exec(input)\n if (match && match.index < offset) {\n ++line\n cur = match.index + match[0].length\n } else {\n return new Position(line, offset - cur)\n }\n }\n}\n","import {has, isArray} from \"./util\"\nimport {SourceLocation} from \"./locutil\"\n\n// A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\nexport const defaultOptions = {\n // `ecmaVersion` indicates the ECMAScript version to parse. Must be\n // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10\n // (2019). This influences support for strict mode, the set of\n // reserved words, and support for new syntax features. The default\n // is 9.\n ecmaVersion: 9,\n // `sourceType` indicates the mode the code should be parsed in.\n // Can be either `\"script\"` or `\"module\"`. This influences global\n // strict mode and parsing of `import` and `export` declarations.\n sourceType: \"script\",\n // `onInsertedSemicolon` can be a callback that will be called\n // when a semicolon is automatically inserted. It will be passed\n // the position of the comma as an offset, and if `locations` is\n // enabled, it is given the location as a `{line, column}` object\n // as second argument.\n onInsertedSemicolon: null,\n // `onTrailingComma` is similar to `onInsertedSemicolon`, but for\n // trailing commas.\n onTrailingComma: null,\n // By default, reserved words are only enforced if ecmaVersion >= 5.\n // Set `allowReserved` to a boolean value to explicitly turn this on\n // an off. When this option has the value \"never\", reserved words\n // and keywords can also not be used as property names.\n allowReserved: null,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // When enabled, await identifiers are allowed to appear at the top-level scope,\n // but they are still not allowed in non-async functions.\n allowAwaitOutsideFunction: false,\n // When enabled, hashbang directive in the beginning of file\n // is allowed and treated as a line comment.\n allowHashBang: false,\n // When `locations` is on, `loc` properties holding objects with\n // `start` and `end` properties in `{line, column}` form (with\n // line being 1-based and column 0-based) will be attached to the\n // nodes.\n locations: false,\n // A function can be passed as `onToken` option, which will\n // cause Acorn to call that function with object in the same\n // format as tokens returned from `tokenizer().getToken()`. Note\n // that you are not allowed to call the parser from the\n // callback—that will corrupt its internal state.\n onToken: null,\n // A function can be passed as `onComment` option, which will\n // cause Acorn to call that function with `(block, text, start,\n // end)` parameters whenever a comment is skipped. `block` is a\n // boolean indicating whether this is a block (`/* */`) comment,\n // `text` is the content of the comment, and `start` and `end` are\n // character offsets that denote the start and end of the comment.\n // When the `locations` option is on, two more parameters are\n // passed, the full `{line, column}` locations of the start and\n // end of the comments. Note that you are not allowed to call the\n // parser from the callback—that will corrupt its internal state.\n onComment: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // It is possible to parse multiple files into a single AST by\n // passing the tree produced by parsing the first file as\n // `program` option in subsequent parses. This will add the\n // toplevel forms of the parsed file to the `Program` (top) node\n // of an existing parse tree.\n program: null,\n // When `locations` is on, you can pass this to record the source\n // file in every node's `loc` object.\n sourceFile: null,\n // This value, if given, is stored in every node, whether\n // `locations` is on or off.\n directSourceFile: null,\n // When enabled, parenthesized expressions are represented by\n // (non-standard) ParenthesizedExpression nodes\n preserveParens: false\n}\n\n// Interpret and default an options object\n\nexport function getOptions(opts) {\n let options = {}\n\n for (let opt in defaultOptions)\n options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]\n\n if (options.ecmaVersion >= 2015)\n options.ecmaVersion -= 2009\n\n if (options.allowReserved == null)\n options.allowReserved = options.ecmaVersion < 5\n\n if (isArray(options.onToken)) {\n let tokens = options.onToken\n options.onToken = (token) => tokens.push(token)\n }\n if (isArray(options.onComment))\n options.onComment = pushComment(options, options.onComment)\n\n return options\n}\n\nfunction pushComment(options, array) {\n return function(block, text, start, end, startLoc, endLoc) {\n let comment = {\n type: block ? \"Block\" : \"Line\",\n value: text,\n start: start,\n end: end\n }\n if (options.locations)\n comment.loc = new SourceLocation(this, startLoc, endLoc)\n if (options.ranges)\n comment.range = [start, end]\n array.push(comment)\n }\n}\n","// Each scope gets a bitset that may contain these flags\nexport const\n SCOPE_TOP = 1,\n SCOPE_FUNCTION = 2,\n SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION,\n SCOPE_ASYNC = 4,\n SCOPE_GENERATOR = 8,\n SCOPE_ARROW = 16,\n SCOPE_SIMPLE_CATCH = 32,\n SCOPE_SUPER = 64,\n SCOPE_DIRECT_SUPER = 128\n\nexport function functionFlags(async, generator) {\n return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0)\n}\n\n// Used in checkLVal and declareName to determine the type of a binding\nexport const\n BIND_NONE = 0, // Not a binding\n BIND_VAR = 1, // Var-style binding\n BIND_LEXICAL = 2, // Let- or const-style binding\n BIND_FUNCTION = 3, // Function declaration\n BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding\n BIND_OUTSIDE = 5 // Special case for function names as bound inside the function\n","import {reservedWords, keywords} from \"./identifier\"\nimport {types as tt} from \"./tokentype\"\nimport {lineBreak} from \"./whitespace\"\nimport {getOptions} from \"./options\"\nimport {SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_SUPER, SCOPE_DIRECT_SUPER} from \"./scopeflags\"\n\nfunction keywordRegexp(words) {\n return new RegExp(\"^(?:\" + words.replace(/ /g, \"|\") + \")$\")\n}\n\nexport class Parser {\n constructor(options, input, startPos) {\n this.options = options = getOptions(options)\n this.sourceFile = options.sourceFile\n this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])\n let reserved = \"\"\n if (!options.allowReserved) {\n for (let v = options.ecmaVersion;; v--)\n if (reserved = reservedWords[v]) break\n if (options.sourceType === \"module\") reserved += \" await\"\n }\n this.reservedWords = keywordRegexp(reserved)\n let reservedStrict = (reserved ? reserved + \" \" : \"\") + reservedWords.strict\n this.reservedWordsStrict = keywordRegexp(reservedStrict)\n this.reservedWordsStrictBind = keywordRegexp(reservedStrict + \" \" + reservedWords.strictBind)\n this.input = String(input)\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n this.containsEsc = false\n\n // Set up token state\n\n // The current position of the tokenizer in the input.\n if (startPos) {\n this.pos = startPos\n this.lineStart = this.input.lastIndexOf(\"\\n\", startPos - 1) + 1\n this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length\n } else {\n this.pos = this.lineStart = 0\n this.curLine = 1\n }\n\n // Properties of the current token:\n // Its type\n this.type = tt.eof\n // For tokens that include more information than their type, the value\n this.value = null\n // Its start and end offset\n this.start = this.end = this.pos\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n this.startLoc = this.endLoc = this.curPosition()\n\n // Position information for the previous token\n this.lastTokEndLoc = this.lastTokStartLoc = null\n this.lastTokStart = this.lastTokEnd = this.pos\n\n // The context stack is used to superficially track syntactic\n // context to predict whether a regular expression is allowed in a\n // given position.\n this.context = this.initialContext()\n this.exprAllowed = true\n\n // Figure out if it's a module code.\n this.inModule = options.sourceType === \"module\"\n this.strict = this.inModule || this.strictDirective(this.pos)\n\n // Used to signify the start of a potential arrow function\n this.potentialArrowAt = -1\n\n // Positions to delayed-check that yield/await does not exist in default parameters.\n this.yieldPos = this.awaitPos = 0\n // Labels in scope.\n this.labels = []\n\n // If enabled, skip leading hashbang line.\n if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === \"#!\")\n this.skipLineComment(2)\n\n // Scope tracking for duplicate variable names (see scope.js)\n this.scopeStack = []\n this.enterScope(SCOPE_TOP)\n\n // For RegExp validation\n this.regexpState = null\n }\n\n parse() {\n let node = this.options.program || this.startNode()\n this.nextToken()\n return this.parseTopLevel(node)\n }\n\n get inFunction() { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }\n get inGenerator() { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }\n get inAsync() { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }\n get allowSuper() { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }\n get allowDirectSuper() { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }\n get treatFunctionsAsVar() { return this.treatFunctionsAsVarInScope(this.currentScope()) }\n\n // Switch to a getter for 7.0.0.\n inNonArrowFunction() { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }\n\n static extend(...plugins) {\n let cls = this\n for (let i = 0; i < plugins.length; i++) cls = plugins[i](cls)\n return cls\n }\n\n static parse(input, options) {\n return new this(options, input).parse()\n }\n\n static parseExpressionAt(input, pos, options) {\n let parser = new this(options, input, pos)\n parser.nextToken()\n return parser.parseExpression()\n }\n\n static tokenizer(input, options) {\n return new this(options, input)\n }\n}\n","import {types as tt} from \"./tokentype\"\nimport {Parser} from \"./state\"\nimport {lineBreak, skipWhiteSpace} from \"./whitespace\"\n\nconst pp = Parser.prototype\n\n// ## Parser utilities\n\nconst literal = /^(?:'((?:\\\\.|[^'])*?)'|\"((?:\\\\.|[^\"])*?)\")/\npp.strictDirective = function(start) {\n for (;;) {\n // Try to find string literal.\n skipWhiteSpace.lastIndex = start\n start += skipWhiteSpace.exec(this.input)[0].length\n let match = literal.exec(this.input.slice(start))\n if (!match) return false\n if ((match[1] || match[2]) === \"use strict\") return true\n start += match[0].length\n\n // Skip semicolon, if any.\n skipWhiteSpace.lastIndex = start\n start += skipWhiteSpace.exec(this.input)[0].length\n if (this.input[start] === ';')\n start++\n }\n}\n\n// Predicate that tests whether the next token is of the given\n// type, and if yes, consumes it as a side effect.\n\npp.eat = function(type) {\n if (this.type === type) {\n this.next()\n return true\n } else {\n return false\n }\n}\n\n// Tests whether parsed token is a contextual keyword.\n\npp.isContextual = function(name) {\n return this.type === tt.name && this.value === name && !this.containsEsc\n}\n\n// Consumes contextual keyword if possible.\n\npp.eatContextual = function(name) {\n if (!this.isContextual(name)) return false\n this.next()\n return true\n}\n\n// Asserts that following token is given contextual keyword.\n\npp.expectContextual = function(name) {\n if (!this.eatContextual(name)) this.unexpected()\n}\n\n// Test whether a semicolon can be inserted at the current position.\n\npp.canInsertSemicolon = function() {\n return this.type === tt.eof ||\n this.type === tt.braceR ||\n lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n}\n\npp.insertSemicolon = function() {\n if (this.canInsertSemicolon()) {\n if (this.options.onInsertedSemicolon)\n this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)\n return true\n }\n}\n\n// Consume a semicolon, or, failing that, see if we are allowed to\n// pretend that there is a semicolon at this position.\n\npp.semicolon = function() {\n if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()\n}\n\npp.afterTrailingComma = function(tokType, notNext) {\n if (this.type === tokType) {\n if (this.options.onTrailingComma)\n this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)\n if (!notNext)\n this.next()\n return true\n }\n}\n\n// Expect a token of a given type. If found, consume it, otherwise,\n// raise an unexpected token error.\n\npp.expect = function(type) {\n this.eat(type) || this.unexpected()\n}\n\n// Raise an unexpected token error.\n\npp.unexpected = function(pos) {\n this.raise(pos != null ? pos : this.start, \"Unexpected token\")\n}\n\nexport function DestructuringErrors() {\n this.shorthandAssign =\n this.trailingComma =\n this.parenthesizedAssign =\n this.parenthesizedBind =\n this.doubleProto =\n -1\n}\n\npp.checkPatternErrors = function(refDestructuringErrors, isAssign) {\n if (!refDestructuringErrors) return\n if (refDestructuringErrors.trailingComma > -1)\n this.raiseRecoverable(refDestructuringErrors.trailingComma, \"Comma is not permitted after the rest element\")\n let parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind\n if (parens > -1) this.raiseRecoverable(parens, \"Parenthesized pattern\")\n}\n\npp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {\n if (!refDestructuringErrors) return false\n let {shorthandAssign, doubleProto} = refDestructuringErrors\n if (!andThrow) return shorthandAssign >= 0 || doubleProto >= 0\n if (shorthandAssign >= 0)\n this.raise(shorthandAssign, \"Shorthand property assignments are valid only in destructuring patterns\")\n if (doubleProto >= 0)\n this.raiseRecoverable(doubleProto, \"Redefinition of __proto__ property\")\n}\n\npp.checkYieldAwaitInDefaultParams = function() {\n if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))\n this.raise(this.yieldPos, \"Yield expression cannot be a default value\")\n if (this.awaitPos)\n this.raise(this.awaitPos, \"Await expression cannot be a default value\")\n}\n\npp.isSimpleAssignTarget = function(expr) {\n if (expr.type === \"ParenthesizedExpression\")\n return this.isSimpleAssignTarget(expr.expression)\n return expr.type === \"Identifier\" || expr.type === \"MemberExpression\"\n}\n","import {types as tt} from \"./tokentype\"\nimport {Parser} from \"./state\"\nimport {lineBreak, skipWhiteSpace} from \"./whitespace\"\nimport {isIdentifierStart, isIdentifierChar, keywordRelationalOperator} from \"./identifier\"\nimport {has} from \"./util\"\nimport {DestructuringErrors} from \"./parseutil\"\nimport {functionFlags, SCOPE_SIMPLE_CATCH, BIND_SIMPLE_CATCH, BIND_LEXICAL, BIND_VAR, BIND_FUNCTION} from \"./scopeflags\"\n\nconst pp = Parser.prototype\n\n// ### Statement parsing\n\n// Parse a program. Initializes the parser, reads any number of\n// statements, and wraps them in a Program node. Optionally takes a\n// `program` argument. If present, the statements will be appended\n// to its body instead of creating a new node.\n\npp.parseTopLevel = function(node) {\n let exports = {}\n if (!node.body) node.body = []\n while (this.type !== tt.eof) {\n let stmt = this.parseStatement(null, true, exports)\n node.body.push(stmt)\n }\n this.adaptDirectivePrologue(node.body)\n this.next()\n if (this.options.ecmaVersion >= 6) {\n node.sourceType = this.options.sourceType\n }\n return this.finishNode(node, \"Program\")\n}\n\nconst loopLabel = {kind: \"loop\"}, switchLabel = {kind: \"switch\"}\n\npp.isLet = function(context) {\n if (this.options.ecmaVersion < 6 || !this.isContextual(\"let\")) return false\n skipWhiteSpace.lastIndex = this.pos\n let skip = skipWhiteSpace.exec(this.input)\n let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)\n // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n if (nextCh === 91) return true // '['\n if (context) return false\n\n if (nextCh === 123) return true // '{'\n if (isIdentifierStart(nextCh, true)) {\n let pos = next + 1\n while (isIdentifierChar(this.input.charCodeAt(pos), true)) ++pos\n let ident = this.input.slice(next, pos)\n if (!keywordRelationalOperator.test(ident)) return true\n }\n return false\n}\n\n// check 'async [no LineTerminator here] function'\n// - 'async /*foo*/ function' is OK.\n// - 'async /*\\n*/ function' is invalid.\npp.isAsyncFunction = function() {\n if (this.options.ecmaVersion < 8 || !this.isContextual(\"async\"))\n return false\n\n skipWhiteSpace.lastIndex = this.pos\n let skip = skipWhiteSpace.exec(this.input)\n let next = this.pos + skip[0].length\n return !lineBreak.test(this.input.slice(this.pos, next)) &&\n this.input.slice(next, next + 8) === \"function\" &&\n (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))\n}\n\n// Parse a single statement.\n//\n// If expecting a statement and finding a slash operator, parse a\n// regular expression literal. This is to handle cases like\n// `if (foo) /blah/.exec(foo)`, where looking at the previous token\n// does not help.\n\npp.parseStatement = function(context, topLevel, exports) {\n let starttype = this.type, node = this.startNode(), kind\n\n if (this.isLet(context)) {\n starttype = tt._var\n kind = \"let\"\n }\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)\n case tt._debugger: return this.parseDebuggerStatement(node)\n case tt._do: return this.parseDoStatement(node)\n case tt._for: return this.parseForStatement(node)\n case tt._function:\n // Function as sole body of either an if statement or a labeled statement\n // works, but not when it is part of a labeled statement that is the sole\n // body of an if statement.\n if ((context && (this.strict || context !== \"if\" && context !== \"label\")) && this.options.ecmaVersion >= 6) this.unexpected()\n return this.parseFunctionStatement(node, false, !context)\n case tt._class:\n if (context) this.unexpected()\n return this.parseClass(node, true)\n case tt._if: return this.parseIfStatement(node)\n case tt._return: return this.parseReturnStatement(node)\n case tt._switch: return this.parseSwitchStatement(node)\n case tt._throw: return this.parseThrowStatement(node)\n case tt._try: return this.parseTryStatement(node)\n case tt._const: case tt._var:\n kind = kind || this.value\n if (context && kind !== \"var\") this.unexpected()\n return this.parseVarStatement(node, kind)\n case tt._while: return this.parseWhileStatement(node)\n case tt._with: return this.parseWithStatement(node)\n case tt.braceL: return this.parseBlock(true, node)\n case tt.semi: return this.parseEmptyStatement(node)\n case tt._export:\n case tt._import:\n if (!this.options.allowImportExportEverywhere) {\n if (!topLevel)\n this.raise(this.start, \"'import' and 'export' may only appear at the top level\")\n if (!this.inModule)\n this.raise(this.start, \"'import' and 'export' may appear only with 'sourceType: module'\")\n }\n return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n default:\n if (this.isAsyncFunction()) {\n if (context) this.unexpected()\n this.next()\n return this.parseFunctionStatement(node, true, !context)\n }\n\n let maybeName = this.value, expr = this.parseExpression()\n if (starttype === tt.name && expr.type === \"Identifier\" && this.eat(tt.colon))\n return this.parseLabeledStatement(node, maybeName, expr, context)\n else return this.parseExpressionStatement(node, expr)\n }\n}\n\npp.parseBreakContinueStatement = function(node, keyword) {\n let isBreak = keyword === \"break\"\n this.next()\n if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null\n else if (this.type !== tt.name) this.unexpected()\n else {\n node.label = this.parseIdent()\n this.semicolon()\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n let i = 0\n for (; i < this.labels.length; ++i) {\n let lab = this.labels[i]\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break\n if (node.label && isBreak) break\n }\n }\n if (i === this.labels.length) this.raise(node.start, \"Unsyntactic \" + keyword)\n return this.finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\")\n}\n\npp.parseDebuggerStatement = function(node) {\n this.next()\n this.semicolon()\n return this.finishNode(node, \"DebuggerStatement\")\n}\n\npp.parseDoStatement = function(node) {\n this.next()\n this.labels.push(loopLabel)\n node.body = this.parseStatement(\"do\")\n this.labels.pop()\n this.expect(tt._while)\n node.test = this.parseParenExpression()\n if (this.options.ecmaVersion >= 6)\n this.eat(tt.semi)\n else\n this.semicolon()\n return this.finishNode(node, \"DoWhileStatement\")\n}\n\n// Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n// loop is non-trivial. Basically, we have to parse the init `var`\n// statement or expression, disallowing the `in` operator (see\n// the second parameter to `parseExpression`), and then check\n// whether the next token is `in` or `of`. When there is no init\n// part (semicolon immediately after the opening parenthesis), it\n// is a regular `for` loop.\n\npp.parseForStatement = function(node) {\n this.next()\n let awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual(\"await\")) ? this.lastTokStart : -1\n this.labels.push(loopLabel)\n this.enterScope(0)\n this.expect(tt.parenL)\n if (this.type === tt.semi) {\n if (awaitAt > -1) this.unexpected(awaitAt)\n return this.parseFor(node, null)\n }\n let isLet = this.isLet()\n if (this.type === tt._var || this.type === tt._const || isLet) {\n let init = this.startNode(), kind = isLet ? \"let\" : this.value\n this.next()\n this.parseVar(init, true, kind)\n this.finishNode(init, \"VariableDeclaration\")\n if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) && init.declarations.length === 1 &&\n !(kind !== \"var\" && init.declarations[0].init)) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === tt._in) {\n if (awaitAt > -1) this.unexpected(awaitAt)\n } else node.await = awaitAt > -1\n }\n return this.parseForIn(node, init)\n }\n if (awaitAt > -1) this.unexpected(awaitAt)\n return this.parseFor(node, init)\n }\n let refDestructuringErrors = new DestructuringErrors\n let init = this.parseExpression(true, refDestructuringErrors)\n if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === tt._in) {\n if (awaitAt > -1) this.unexpected(awaitAt)\n } else node.await = awaitAt > -1\n }\n this.toAssignable(init, false, refDestructuringErrors)\n this.checkLVal(init)\n return this.parseForIn(node, init)\n } else {\n this.checkExpressionErrors(refDestructuringErrors, true)\n }\n if (awaitAt > -1) this.unexpected(awaitAt)\n return this.parseFor(node, init)\n}\n\npp.parseFunctionStatement = function(node, isAsync, declarationPosition) {\n this.next()\n return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync)\n}\n\npp.parseIfStatement = function(node) {\n this.next()\n node.test = this.parseParenExpression()\n // allow function declarations in branches, but only in non-strict mode\n node.consequent = this.parseStatement(\"if\")\n node.alternate = this.eat(tt._else) ? this.parseStatement(\"if\") : null\n return this.finishNode(node, \"IfStatement\")\n}\n\npp.parseReturnStatement = function(node) {\n if (!this.inFunction && !this.options.allowReturnOutsideFunction)\n this.raise(this.start, \"'return' outside of function\")\n this.next()\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null\n else { node.argument = this.parseExpression(); this.semicolon() }\n return this.finishNode(node, \"ReturnStatement\")\n}\n\npp.parseSwitchStatement = function(node) {\n this.next()\n node.discriminant = this.parseParenExpression()\n node.cases = []\n this.expect(tt.braceL)\n this.labels.push(switchLabel)\n this.enterScope(0)\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n let cur\n for (let sawDefault = false; this.type !== tt.braceR;) {\n if (this.type === tt._case || this.type === tt._default) {\n let isCase = this.type === tt._case\n if (cur) this.finishNode(cur, \"SwitchCase\")\n node.cases.push(cur = this.startNode())\n cur.consequent = []\n this.next()\n if (isCase) {\n cur.test = this.parseExpression()\n } else {\n if (sawDefault) this.raiseRecoverable(this.lastTokStart, \"Multiple default clauses\")\n sawDefault = true\n cur.test = null\n }\n this.expect(tt.colon)\n } else {\n if (!cur) this.unexpected()\n cur.consequent.push(this.parseStatement(null))\n }\n }\n this.exitScope()\n if (cur) this.finishNode(cur, \"SwitchCase\")\n this.next() // Closing brace\n this.labels.pop()\n return this.finishNode(node, \"SwitchStatement\")\n}\n\npp.parseThrowStatement = function(node) {\n this.next()\n if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))\n this.raise(this.lastTokEnd, \"Illegal newline after throw\")\n node.argument = this.parseExpression()\n this.semicolon()\n return this.finishNode(node, \"ThrowStatement\")\n}\n\n// Reused empty array added for node fields that are always empty.\n\nconst empty = []\n\npp.parseTryStatement = function(node) {\n this.next()\n node.block = this.parseBlock()\n node.handler = null\n if (this.type === tt._catch) {\n let clause = this.startNode()\n this.next()\n if (this.eat(tt.parenL)) {\n clause.param = this.parseBindingAtom()\n let simple = clause.param.type === \"Identifier\"\n this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0)\n this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL)\n this.expect(tt.parenR)\n } else {\n if (this.options.ecmaVersion < 10) this.unexpected()\n clause.param = null\n this.enterScope(0)\n }\n clause.body = this.parseBlock(false)\n this.exitScope()\n node.handler = this.finishNode(clause, \"CatchClause\")\n }\n node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null\n if (!node.handler && !node.finalizer)\n this.raise(node.start, \"Missing catch or finally clause\")\n return this.finishNode(node, \"TryStatement\")\n}\n\npp.parseVarStatement = function(node, kind) {\n this.next()\n this.parseVar(node, false, kind)\n this.semicolon()\n return this.finishNode(node, \"VariableDeclaration\")\n}\n\npp.parseWhileStatement = function(node) {\n this.next()\n node.test = this.parseParenExpression()\n this.labels.push(loopLabel)\n node.body = this.parseStatement(\"while\")\n this.labels.pop()\n return this.finishNode(node, \"WhileStatement\")\n}\n\npp.parseWithStatement = function(node) {\n if (this.strict) this.raise(this.start, \"'with' in strict mode\")\n this.next()\n node.object = this.parseParenExpression()\n node.body = this.parseStatement(\"with\")\n return this.finishNode(node, \"WithStatement\")\n}\n\npp.parseEmptyStatement = function(node) {\n this.next()\n return this.finishNode(node, \"EmptyStatement\")\n}\n\npp.parseLabeledStatement = function(node, maybeName, expr, context) {\n for (let label of this.labels)\n if (label.name === maybeName)\n this.raise(expr.start, \"Label '\" + maybeName + \"' is already declared\")\n let kind = this.type.isLoop ? \"loop\" : this.type === tt._switch ? \"switch\" : null\n for (let i = this.labels.length - 1; i >= 0; i--) {\n let label = this.labels[i]\n if (label.statementStart === node.start) {\n // Update information about previous labels on this node\n label.statementStart = this.start\n label.kind = kind\n } else break\n }\n this.labels.push({name: maybeName, kind, statementStart: this.start})\n node.body = this.parseStatement(context ? context.indexOf(\"label\") === -1 ? context + \"label\" : context : \"label\")\n this.labels.pop()\n node.label = expr\n return this.finishNode(node, \"LabeledStatement\")\n}\n\npp.parseExpressionStatement = function(node, expr) {\n node.expression = expr\n this.semicolon()\n return this.finishNode(node, \"ExpressionStatement\")\n}\n\n// Parse a semicolon-enclosed block of statements, handling `\"use\n// strict\"` declarations when `allowStrict` is true (used for\n// function bodies).\n\npp.parseBlock = function(createNewLexicalScope = true, node = this.startNode()) {\n node.body = []\n this.expect(tt.braceL)\n if (createNewLexicalScope) this.enterScope(0)\n while (!this.eat(tt.braceR)) {\n let stmt = this.parseStatement(null)\n node.body.push(stmt)\n }\n if (createNewLexicalScope) this.exitScope()\n return this.finishNode(node, \"BlockStatement\")\n}\n\n// Parse a regular `for` loop. The disambiguation code in\n// `parseStatement` will already have parsed the init statement or\n// expression.\n\npp.parseFor = function(node, init) {\n node.init = init\n this.expect(tt.semi)\n node.test = this.type === tt.semi ? null : this.parseExpression()\n this.expect(tt.semi)\n node.update = this.type === tt.parenR ? null : this.parseExpression()\n this.expect(tt.parenR)\n node.body = this.parseStatement(\"for\")\n this.exitScope()\n this.labels.pop()\n return this.finishNode(node, \"ForStatement\")\n}\n\n// Parse a `for`/`in` and `for`/`of` loop, which are almost\n// same from parser's perspective.\n\npp.parseForIn = function(node, init) {\n let type = this.type === tt._in ? \"ForInStatement\" : \"ForOfStatement\"\n this.next()\n if (type === \"ForInStatement\") {\n if (init.type === \"AssignmentPattern\" ||\n (init.type === \"VariableDeclaration\" && init.declarations[0].init != null &&\n (this.strict || init.declarations[0].id.type !== \"Identifier\")))\n this.raise(init.start, \"Invalid assignment in for-in loop head\")\n }\n node.left = init\n node.right = type === \"ForInStatement\" ? this.parseExpression() : this.parseMaybeAssign()\n this.expect(tt.parenR)\n node.body = this.parseStatement(\"for\")\n this.exitScope()\n this.labels.pop()\n return this.finishNode(node, type)\n}\n\n// Parse a list of variable declarations.\n\npp.parseVar = function(node, isFor, kind) {\n node.declarations = []\n node.kind = kind\n for (;;) {\n let decl = this.startNode()\n this.parseVarId(decl, kind)\n if (this.eat(tt.eq)) {\n decl.init = this.parseMaybeAssign(isFor)\n } else if (kind === \"const\" && !(this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\")))) {\n this.unexpected()\n } else if (decl.id.type !== \"Identifier\" && !(isFor && (this.type === tt._in || this.isContextual(\"of\")))) {\n this.raise(this.lastTokEnd, \"Complex binding patterns require an initialization value\")\n } else {\n decl.init = null\n }\n node.declarations.push(this.finishNode(decl, \"VariableDeclarator\"))\n if (!this.eat(tt.comma)) break\n }\n return node\n}\n\npp.parseVarId = function(decl, kind) {\n if ((kind === \"const\" || kind === \"let\") && this.isContextual(\"let\")) {\n this.raiseRecoverable(this.start, \"let is disallowed as a lexically bound name\");\n }\n decl.id = this.parseBindingAtom()\n this.checkLVal(decl.id, kind === \"var\" ? BIND_VAR : BIND_LEXICAL, false)\n}\n\nconst FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4\n\n// Parse a function declaration or literal (depending on the\n// `isStatement` parameter).\n\npp.parseFunction = function(node, statement, allowExpressionBody, isAsync) {\n this.initFunction(node)\n if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {\n if (this.type === tt.star && (statement & FUNC_HANGING_STATEMENT))\n this.unexpected()\n node.generator = this.eat(tt.star)\n }\n if (this.options.ecmaVersion >= 8)\n node.async = !!isAsync\n\n if (statement & FUNC_STATEMENT) {\n node.id = (statement & FUNC_NULLABLE_ID) && this.type !== tt.name ? null : this.parseIdent()\n if (node.id && !(statement & FUNC_HANGING_STATEMENT))\n // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);\n }\n\n let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos\n this.yieldPos = 0\n this.awaitPos = 0\n this.enterScope(functionFlags(node.async, node.generator))\n\n if (!(statement & FUNC_STATEMENT))\n node.id = this.type === tt.name ? this.parseIdent() : null\n\n this.parseFunctionParams(node)\n this.parseFunctionBody(node, allowExpressionBody)\n\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n return this.finishNode(node, (statement & FUNC_STATEMENT) ? \"FunctionDeclaration\" : \"FunctionExpression\")\n}\n\npp.parseFunctionParams = function(node) {\n this.expect(tt.parenL)\n node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)\n this.checkYieldAwaitInDefaultParams()\n}\n\n// Parse a class declaration or literal (depending on the\n// `isStatement` parameter).\n\npp.parseClass = function(node, isStatement) {\n this.next()\n\n // ecma-262 14.6 Class Definitions\n // A class definition is always strict mode code.\n const oldStrict = this.strict;\n this.strict = true;\n\n this.parseClassId(node, isStatement)\n this.parseClassSuper(node)\n let classBody = this.startNode()\n let hadConstructor = false\n classBody.body = []\n this.expect(tt.braceL)\n while (!this.eat(tt.braceR)) {\n const element = this.parseClassElement(node.superClass !== null)\n if (element) {\n classBody.body.push(element)\n if (element.type === \"MethodDefinition\" && element.kind === \"constructor\") {\n if (hadConstructor) this.raise(element.start, \"Duplicate constructor in the same class\")\n hadConstructor = true\n }\n }\n }\n node.body = this.finishNode(classBody, \"ClassBody\")\n this.strict = oldStrict;\n return this.finishNode(node, isStatement ? \"ClassDeclaration\" : \"ClassExpression\")\n}\n\npp.parseClassElement = function(constructorAllowsSuper) {\n if (this.eat(tt.semi)) return null\n\n let method = this.startNode()\n const tryContextual = (k, noLineBreak = false) => {\n const start = this.start, startLoc = this.startLoc\n if (!this.eatContextual(k)) return false\n if (this.type !== tt.parenL && (!noLineBreak || !this.canInsertSemicolon())) return true\n if (method.key) this.unexpected()\n method.computed = false\n method.key = this.startNodeAt(start, startLoc)\n method.key.name = k\n this.finishNode(method.key, \"Identifier\")\n return false\n }\n\n method.kind = \"method\"\n method.static = tryContextual(\"static\")\n let isGenerator = this.eat(tt.star)\n let isAsync = false\n if (!isGenerator) {\n if (this.options.ecmaVersion >= 8 && tryContextual(\"async\", true)) {\n isAsync = true\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(tt.star)\n } else if (tryContextual(\"get\")) {\n method.kind = \"get\"\n } else if (tryContextual(\"set\")) {\n method.kind = \"set\"\n }\n }\n if (!method.key) this.parsePropertyName(method)\n let {key} = method\n let allowsDirectSuper = false\n if (!method.computed && !method.static && (key.type === \"Identifier\" && key.name === \"constructor\" ||\n key.type === \"Literal\" && key.value === \"constructor\")) {\n if (method.kind !== \"method\") this.raise(key.start, \"Constructor can't have get/set modifier\")\n if (isGenerator) this.raise(key.start, \"Constructor can't be a generator\")\n if (isAsync) this.raise(key.start, \"Constructor can't be an async method\")\n method.kind = \"constructor\"\n allowsDirectSuper = constructorAllowsSuper\n } else if (method.static && key.type === \"Identifier\" && key.name === \"prototype\") {\n this.raise(key.start, \"Classes may not have a static property named prototype\")\n }\n this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper)\n if (method.kind === \"get\" && method.value.params.length !== 0)\n this.raiseRecoverable(method.value.start, \"getter should have no params\")\n if (method.kind === \"set\" && method.value.params.length !== 1)\n this.raiseRecoverable(method.value.start, \"setter should have exactly one param\")\n if (method.kind === \"set\" && method.value.params[0].type === \"RestElement\")\n this.raiseRecoverable(method.value.params[0].start, \"Setter cannot use rest params\")\n return method\n}\n\npp.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {\n method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper)\n return this.finishNode(method, \"MethodDefinition\")\n}\n\npp.parseClassId = function(node, isStatement) {\n if (this.type === tt.name) {\n node.id = this.parseIdent();\n if (isStatement === true)\n this.checkLVal(node.id, BIND_LEXICAL, false)\n } else {\n if (isStatement === true)\n this.unexpected();\n node.id = null;\n }\n}\n\npp.parseClassSuper = function(node) {\n node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null\n}\n\n// Parses module export declaration.\n\npp.parseExport = function(node, exports) {\n this.next()\n // export * from '...'\n if (this.eat(tt.star)) {\n this.expectContextual(\"from\")\n if (this.type !== tt.string) this.unexpected()\n node.source = this.parseExprAtom()\n this.semicolon()\n return this.finishNode(node, \"ExportAllDeclaration\")\n }\n if (this.eat(tt._default)) { // export default ...\n this.checkExport(exports, \"default\", this.lastTokStart)\n let isAsync\n if (this.type === tt._function || (isAsync = this.isAsyncFunction())) {\n let fNode = this.startNode()\n this.next()\n if (isAsync) this.next()\n node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync, true)\n } else if (this.type === tt._class) {\n let cNode = this.startNode()\n node.declaration = this.parseClass(cNode, \"nullableID\")\n } else {\n node.declaration = this.parseMaybeAssign()\n this.semicolon()\n }\n return this.finishNode(node, \"ExportDefaultDeclaration\")\n }\n // export var|const|let|function|class ...\n if (this.shouldParseExportStatement()) {\n node.declaration = this.parseStatement(null)\n if (node.declaration.type === \"VariableDeclaration\")\n this.checkVariableExport(exports, node.declaration.declarations)\n else\n this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)\n node.specifiers = []\n node.source = null\n } else { // export { x, y as z } [from '...']\n node.declaration = null\n node.specifiers = this.parseExportSpecifiers(exports)\n if (this.eatContextual(\"from\")) {\n if (this.type !== tt.string) this.unexpected()\n node.source = this.parseExprAtom()\n } else {\n // check for keywords used as local names\n for (let spec of node.specifiers) {\n this.checkUnreserved(spec.local)\n }\n\n node.source = null\n }\n this.semicolon()\n }\n return this.finishNode(node, \"ExportNamedDeclaration\")\n}\n\npp.checkExport = function(exports, name, pos) {\n if (!exports) return\n if (has(exports, name))\n this.raiseRecoverable(pos, \"Duplicate export '\" + name + \"'\")\n exports[name] = true\n}\n\npp.checkPatternExport = function(exports, pat) {\n let type = pat.type\n if (type === \"Identifier\")\n this.checkExport(exports, pat.name, pat.start)\n else if (type === \"ObjectPattern\")\n for (let prop of pat.properties)\n this.checkPatternExport(exports, prop)\n else if (type === \"ArrayPattern\")\n for (let elt of pat.elements) {\n if (elt) this.checkPatternExport(exports, elt)\n }\n else if (type === \"Property\")\n this.checkPatternExport(exports, pat.value)\n else if (type === \"AssignmentPattern\")\n this.checkPatternExport(exports, pat.left)\n else if (type === \"RestElement\")\n this.checkPatternExport(exports, pat.argument)\n else if (type === \"ParenthesizedExpression\")\n this.checkPatternExport(exports, pat.expression)\n}\n\npp.checkVariableExport = function(exports, decls) {\n if (!exports) return\n for (let decl of decls)\n this.checkPatternExport(exports, decl.id)\n}\n\npp.shouldParseExportStatement = function() {\n return this.type.keyword === \"var\" ||\n this.type.keyword === \"const\" ||\n this.type.keyword === \"class\" ||\n this.type.keyword === \"function\" ||\n this.isLet() ||\n this.isAsyncFunction()\n}\n\n// Parses a comma-separated list of module exports.\n\npp.parseExportSpecifiers = function(exports) {\n let nodes = [], first = true\n // export { x, y as z } [from '...']\n this.expect(tt.braceL)\n while (!this.eat(tt.braceR)) {\n if (!first) {\n this.expect(tt.comma)\n if (this.afterTrailingComma(tt.braceR)) break\n } else first = false\n\n let node = this.startNode()\n node.local = this.parseIdent(true)\n node.exported = this.eatContextual(\"as\") ? this.parseIdent(true) : node.local\n this.checkExport(exports, node.exported.name, node.exported.start)\n nodes.push(this.finishNode(node, \"ExportSpecifier\"))\n }\n return nodes\n}\n\n// Parses import declaration.\n\npp.parseImport = function(node) {\n this.next()\n // import '...'\n if (this.type === tt.string) {\n node.specifiers = empty\n node.source = this.parseExprAtom()\n } else {\n node.specifiers = this.parseImportSpecifiers()\n this.expectContextual(\"from\")\n node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()\n }\n this.semicolon()\n return this.finishNode(node, \"ImportDeclaration\")\n}\n\n// Parses a comma-separated list of module imports.\n\npp.parseImportSpecifiers = function() {\n let nodes = [], first = true\n if (this.type === tt.name) {\n // import defaultObj, { x, y as z } from '...'\n let node = this.startNode()\n node.local = this.parseIdent()\n this.checkLVal(node.local, BIND_LEXICAL)\n nodes.push(this.finishNode(node, \"ImportDefaultSpecifier\"))\n if (!this.eat(tt.comma)) return nodes\n }\n if (this.type === tt.star) {\n let node = this.startNode()\n this.next()\n this.expectContextual(\"as\")\n node.local = this.parseIdent()\n this.checkLVal(node.local, BIND_LEXICAL)\n nodes.push(this.finishNode(node, \"ImportNamespaceSpecifier\"))\n return nodes\n }\n this.expect(tt.braceL)\n while (!this.eat(tt.braceR)) {\n if (!first) {\n this.expect(tt.comma)\n if (this.afterTrailingComma(tt.braceR)) break\n } else first = false\n\n let node = this.startNode()\n node.imported = this.parseIdent(true)\n if (this.eatContextual(\"as\")) {\n node.local = this.parseIdent()\n } else {\n this.checkUnreserved(node.imported)\n node.local = node.imported\n }\n this.checkLVal(node.local, BIND_LEXICAL)\n nodes.push(this.finishNode(node, \"ImportSpecifier\"))\n }\n return nodes\n}\n\n// Set `ExpressionStatement#directive` property for directive prologues.\npp.adaptDirectivePrologue = function(statements) {\n for (let i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {\n statements[i].directive = statements[i].expression.raw.slice(1, -1)\n }\n}\npp.isDirectiveCandidate = function(statement) {\n return (\n statement.type === \"ExpressionStatement\" &&\n statement.expression.type === \"Literal\" &&\n typeof statement.expression.value === \"string\" &&\n // Reject parenthesized strings.\n (this.input[statement.start] === \"\\\"\" || this.input[statement.start] === \"'\")\n )\n}\n","import {types as tt} from \"./tokentype\"\nimport {Parser} from \"./state\"\nimport {has} from \"./util\"\nimport {BIND_NONE, BIND_OUTSIDE} from \"./scopeflags\"\n\nconst pp = Parser.prototype\n\n// Convert existing expression atom to assignable pattern\n// if possible.\n\npp.toAssignable = function(node, isBinding, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 6 && node) {\n switch (node.type) {\n case \"Identifier\":\n if (this.inAsync && node.name === \"await\")\n this.raise(node.start, \"Can not use 'await' as identifier inside an async function\")\n break\n\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"RestElement\":\n break\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\"\n if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)\n for (let prop of node.properties) {\n this.toAssignable(prop, isBinding)\n // Early error:\n // AssignmentRestProperty[Yield, Await] :\n // `...` DestructuringAssignmentTarget[Yield, Await]\n //\n // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.\n if (\n prop.type === \"RestElement\" &&\n (prop.argument.type === \"ArrayPattern\" || prop.argument.type === \"ObjectPattern\")\n ) {\n this.raise(prop.argument.start, \"Unexpected token\")\n }\n }\n break\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n if (node.kind !== \"init\") this.raise(node.key.start, \"Object pattern can't contain getter or setter\")\n this.toAssignable(node.value, isBinding)\n break\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\"\n if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)\n this.toAssignableList(node.elements, isBinding)\n break\n\n case \"SpreadElement\":\n node.type = \"RestElement\"\n this.toAssignable(node.argument, isBinding)\n if (node.argument.type === \"AssignmentPattern\")\n this.raise(node.argument.start, \"Rest elements cannot have a default value\")\n break\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") this.raise(node.left.end, \"Only '=' operator can be used for specifying default value.\")\n node.type = \"AssignmentPattern\"\n delete node.operator\n this.toAssignable(node.left, isBinding)\n // falls through to AssignmentPattern\n\n case \"AssignmentPattern\":\n break\n\n case \"ParenthesizedExpression\":\n this.toAssignable(node.expression, isBinding, refDestructuringErrors)\n break\n\n case \"MemberExpression\":\n if (!isBinding) break\n\n default:\n this.raise(node.start, \"Assigning to rvalue\")\n }\n } else if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)\n return node\n}\n\n// Convert list of expression atoms to binding list.\n\npp.toAssignableList = function(exprList, isBinding) {\n let end = exprList.length\n for (let i = 0; i < end; i++) {\n let elt = exprList[i]\n if (elt) this.toAssignable(elt, isBinding)\n }\n if (end) {\n let last = exprList[end - 1]\n if (this.options.ecmaVersion === 6 && isBinding && last && last.type === \"RestElement\" && last.argument.type !== \"Identifier\")\n this.unexpected(last.argument.start)\n }\n return exprList\n}\n\n// Parses spread element.\n\npp.parseSpread = function(refDestructuringErrors) {\n let node = this.startNode()\n this.next()\n node.argument = this.parseMaybeAssign(false, refDestructuringErrors)\n return this.finishNode(node, \"SpreadElement\")\n}\n\npp.parseRestBinding = function() {\n let node = this.startNode()\n this.next()\n\n // RestElement inside of a function parameter must be an identifier\n if (this.options.ecmaVersion === 6 && this.type !== tt.name)\n this.unexpected()\n\n node.argument = this.parseBindingAtom()\n\n return this.finishNode(node, \"RestElement\")\n}\n\n// Parses lvalue (assignable) atom.\n\npp.parseBindingAtom = function() {\n if (this.options.ecmaVersion >= 6) {\n switch (this.type) {\n case tt.bracketL:\n let node = this.startNode()\n this.next()\n node.elements = this.parseBindingList(tt.bracketR, true, true)\n return this.finishNode(node, \"ArrayPattern\")\n\n case tt.braceL:\n return this.parseObj(true)\n }\n }\n return this.parseIdent()\n}\n\npp.parseBindingList = function(close, allowEmpty, allowTrailingComma) {\n let elts = [], first = true\n while (!this.eat(close)) {\n if (first) first = false\n else this.expect(tt.comma)\n if (allowEmpty && this.type === tt.comma) {\n elts.push(null)\n } else if (allowTrailingComma && this.afterTrailingComma(close)) {\n break\n } else if (this.type === tt.ellipsis) {\n let rest = this.parseRestBinding()\n this.parseBindingListItem(rest)\n elts.push(rest)\n if (this.type === tt.comma) this.raise(this.start, \"Comma is not permitted after the rest element\")\n this.expect(close)\n break\n } else {\n let elem = this.parseMaybeDefault(this.start, this.startLoc)\n this.parseBindingListItem(elem)\n elts.push(elem)\n }\n }\n return elts\n}\n\npp.parseBindingListItem = function(param) {\n return param\n}\n\n// Parses assignment pattern around given atom if possible.\n\npp.parseMaybeDefault = function(startPos, startLoc, left) {\n left = left || this.parseBindingAtom()\n if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left\n let node = this.startNodeAt(startPos, startLoc)\n node.left = left\n node.right = this.parseMaybeAssign()\n return this.finishNode(node, \"AssignmentPattern\")\n}\n\n// Verify that a node is an lval — something that can be assigned\n// to.\n// bindingType can be either:\n// 'var' indicating that the lval creates a 'var' binding\n// 'let' indicating that the lval creates a lexical ('let' or 'const') binding\n// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references\n\npp.checkLVal = function(expr, bindingType = BIND_NONE, checkClashes) {\n switch (expr.type) {\n case \"Identifier\":\n if (this.strict && this.reservedWordsStrictBind.test(expr.name))\n this.raiseRecoverable(expr.start, (bindingType ? \"Binding \" : \"Assigning to \") + expr.name + \" in strict mode\")\n if (checkClashes) {\n if (has(checkClashes, expr.name))\n this.raiseRecoverable(expr.start, \"Argument name clash\")\n checkClashes[expr.name] = true\n }\n if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) this.declareName(expr.name, bindingType, expr.start)\n break\n\n case \"MemberExpression\":\n if (bindingType) this.raiseRecoverable(expr.start, \"Binding member expression\")\n break\n\n case \"ObjectPattern\":\n for (let prop of expr.properties)\n this.checkLVal(prop, bindingType, checkClashes)\n break\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n this.checkLVal(expr.value, bindingType, checkClashes)\n break\n\n case \"ArrayPattern\":\n for (let elem of expr.elements) {\n if (elem) this.checkLVal(elem, bindingType, checkClashes)\n }\n break\n\n case \"AssignmentPattern\":\n this.checkLVal(expr.left, bindingType, checkClashes)\n break\n\n case \"RestElement\":\n this.checkLVal(expr.argument, bindingType, checkClashes)\n break\n\n case \"ParenthesizedExpression\":\n this.checkLVal(expr.expression, bindingType, checkClashes)\n break\n\n default:\n this.raise(expr.start, (bindingType ? \"Binding\" : \"Assigning to\") + \" rvalue\")\n }\n}\n","// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\nimport {types as tt} from \"./tokentype\"\nimport {Parser} from \"./state\"\nimport {DestructuringErrors} from \"./parseutil\"\nimport {lineBreak} from \"./whitespace\"\nimport {functionFlags, SCOPE_ARROW, SCOPE_SUPER, SCOPE_DIRECT_SUPER, BIND_OUTSIDE, BIND_VAR} from \"./scopeflags\"\n\nconst pp = Parser.prototype\n\n// Check if property name clashes with already added.\n// Object/class getters and setters are not allowed to clash —\n// either with each other or with an init property — and in\n// strict mode, init properties are also not allowed to be repeated.\n\npp.checkPropClash = function(prop, propHash, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 9 && prop.type === \"SpreadElement\")\n return\n if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))\n return\n let {key} = prop, name\n switch (key.type) {\n case \"Identifier\": name = key.name; break\n case \"Literal\": name = String(key.value); break\n default: return\n }\n let {kind} = prop\n if (this.options.ecmaVersion >= 6) {\n if (name === \"__proto__\" && kind === \"init\") {\n if (propHash.proto) {\n if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) refDestructuringErrors.doubleProto = key.start\n // Backwards-compat kludge. Can be removed in version 6.0\n else this.raiseRecoverable(key.start, \"Redefinition of __proto__ property\")\n }\n propHash.proto = true\n }\n return\n }\n name = \"$\" + name\n let other = propHash[name]\n if (other) {\n let redefinition\n if (kind === \"init\") {\n redefinition = this.strict && other.init || other.get || other.set\n } else {\n redefinition = other.init || other[kind]\n }\n if (redefinition)\n this.raiseRecoverable(key.start, \"Redefinition of property\")\n } else {\n other = propHash[name] = {\n init: false,\n get: false,\n set: false\n }\n }\n other[kind] = true\n}\n\n// ### Expression parsing\n\n// These nest, from the most general expression type at the top to\n// 'atomic', nondivisible expression types at the bottom. Most of\n// the functions will simply let the function(s) below them parse,\n// and, *if* the syntactic construct they handle is present, wrap\n// the AST node that the inner parser gave them in another node.\n\n// Parse a full expression. The optional arguments are used to\n// forbid the `in` operator (in for loops initalization expressions)\n// and provide reference for storing '=' operator inside shorthand\n// property assignment in contexts where both object expression\n// and object pattern might appear (so it's possible to raise\n// delayed syntax error at correct position).\n\npp.parseExpression = function(noIn, refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseMaybeAssign(noIn, refDestructuringErrors)\n if (this.type === tt.comma) {\n let node = this.startNodeAt(startPos, startLoc)\n node.expressions = [expr]\n while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors))\n return this.finishNode(node, \"SequenceExpression\")\n }\n return expr\n}\n\n// Parse an assignment expression. This includes applications of\n// operators like `+=`.\n\npp.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {\n if (this.isContextual(\"yield\")) {\n if (this.inGenerator) return this.parseYield(noIn)\n // The tokenizer will assume an expression is allowed after\n // `yield`, but this isn't that kind of yield\n else this.exprAllowed = false\n }\n\n let ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1\n if (refDestructuringErrors) {\n oldParenAssign = refDestructuringErrors.parenthesizedAssign\n oldTrailingComma = refDestructuringErrors.trailingComma\n oldShorthandAssign = refDestructuringErrors.shorthandAssign\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1\n } else {\n refDestructuringErrors = new DestructuringErrors\n ownDestructuringErrors = true\n }\n\n let startPos = this.start, startLoc = this.startLoc\n if (this.type === tt.parenL || this.type === tt.name)\n this.potentialArrowAt = this.start\n let left = this.parseMaybeConditional(noIn, refDestructuringErrors)\n if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)\n if (this.type.isAssign) {\n let node = this.startNodeAt(startPos, startLoc)\n node.operator = this.value\n node.left = this.type === tt.eq ? this.toAssignable(left, false, refDestructuringErrors) : left\n if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)\n refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly\n this.checkLVal(left)\n this.next()\n node.right = this.parseMaybeAssign(noIn)\n return this.finishNode(node, \"AssignmentExpression\")\n } else {\n if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)\n }\n if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign\n if (oldTrailingComma > -1) refDestructuringErrors.trailingComma = oldTrailingComma\n if (oldShorthandAssign > -1) refDestructuringErrors.shorthandAssign = oldShorthandAssign\n return left\n}\n\n// Parse a ternary conditional (`?:`) operator.\n\npp.parseMaybeConditional = function(noIn, refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseExprOps(noIn, refDestructuringErrors)\n if (this.checkExpressionErrors(refDestructuringErrors)) return expr\n if (this.eat(tt.question)) {\n let node = this.startNodeAt(startPos, startLoc)\n node.test = expr\n node.consequent = this.parseMaybeAssign()\n this.expect(tt.colon)\n node.alternate = this.parseMaybeAssign(noIn)\n return this.finishNode(node, \"ConditionalExpression\")\n }\n return expr\n}\n\n// Start the precedence parser.\n\npp.parseExprOps = function(noIn, refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseMaybeUnary(refDestructuringErrors, false)\n if (this.checkExpressionErrors(refDestructuringErrors)) return expr\n return expr.start === startPos && expr.type === \"ArrowFunctionExpression\" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn)\n}\n\n// Parse binary operators with the operator precedence parsing\n// algorithm. `left` is the left-hand side of the operator.\n// `minPrec` provides context that allows the function to stop and\n// defer further parser to one of its callers when it encounters an\n// operator that has a lower precedence than the set it is parsing.\n\npp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {\n let prec = this.type.binop\n if (prec != null && (!noIn || this.type !== tt._in)) {\n if (prec > minPrec) {\n let logical = this.type === tt.logicalOR || this.type === tt.logicalAND\n let op = this.value\n this.next()\n let startPos = this.start, startLoc = this.startLoc\n let right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)\n let node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)\n }\n }\n return left\n}\n\npp.buildBinary = function(startPos, startLoc, left, right, op, logical) {\n let node = this.startNodeAt(startPos, startLoc)\n node.left = left\n node.operator = op\n node.right = right\n return this.finishNode(node, logical ? \"LogicalExpression\" : \"BinaryExpression\")\n}\n\n// Parse unary operators, both prefix and postfix.\n\npp.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {\n let startPos = this.start, startLoc = this.startLoc, expr\n if (this.isContextual(\"await\") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) {\n expr = this.parseAwait()\n sawUnary = true\n } else if (this.type.prefix) {\n let node = this.startNode(), update = this.type === tt.incDec\n node.operator = this.value\n node.prefix = true\n this.next()\n node.argument = this.parseMaybeUnary(null, true)\n this.checkExpressionErrors(refDestructuringErrors, true)\n if (update) this.checkLVal(node.argument)\n else if (this.strict && node.operator === \"delete\" &&\n node.argument.type === \"Identifier\")\n this.raiseRecoverable(node.start, \"Deleting local variable in strict mode\")\n else sawUnary = true\n expr = this.finishNode(node, update ? \"UpdateExpression\" : \"UnaryExpression\")\n } else {\n expr = this.parseExprSubscripts(refDestructuringErrors)\n if (this.checkExpressionErrors(refDestructuringErrors)) return expr\n while (this.type.postfix && !this.canInsertSemicolon()) {\n let node = this.startNodeAt(startPos, startLoc)\n node.operator = this.value\n node.prefix = false\n node.argument = expr\n this.checkLVal(expr)\n this.next()\n expr = this.finishNode(node, \"UpdateExpression\")\n }\n }\n\n if (!sawUnary && this.eat(tt.starstar))\n return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), \"**\", false)\n else\n return expr\n}\n\n// Parse call, dot, and `[]`-subscript expressions.\n\npp.parseExprSubscripts = function(refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseExprAtom(refDestructuringErrors)\n let skipArrowSubscripts = expr.type === \"ArrowFunctionExpression\" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== \")\"\n if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr\n let result = this.parseSubscripts(expr, startPos, startLoc)\n if (refDestructuringErrors && result.type === \"MemberExpression\") {\n if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1\n if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1\n }\n return result\n}\n\npp.parseSubscripts = function(base, startPos, startLoc, noCalls) {\n let maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === \"Identifier\" && base.name === \"async\" &&\n this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === \"async\"\n for (let computed;;) {\n if ((computed = this.eat(tt.bracketL)) || this.eat(tt.dot)) {\n let node = this.startNodeAt(startPos, startLoc)\n node.object = base\n node.property = computed ? this.parseExpression() : this.parseIdent(true)\n node.computed = !!computed\n if (computed) this.expect(tt.bracketR)\n base = this.finishNode(node, \"MemberExpression\")\n } else if (!noCalls && this.eat(tt.parenL)) {\n let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos\n this.yieldPos = 0\n this.awaitPos = 0\n let exprList = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors)\n if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false)\n this.checkYieldAwaitInDefaultParams()\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true)\n }\n this.checkExpressionErrors(refDestructuringErrors, true)\n this.yieldPos = oldYieldPos || this.yieldPos\n this.awaitPos = oldAwaitPos || this.awaitPos\n let node = this.startNodeAt(startPos, startLoc)\n node.callee = base\n node.arguments = exprList\n base = this.finishNode(node, \"CallExpression\")\n } else if (this.type === tt.backQuote) {\n let node = this.startNodeAt(startPos, startLoc)\n node.tag = base\n node.quasi = this.parseTemplate({isTagged: true})\n base = this.finishNode(node, \"TaggedTemplateExpression\")\n } else {\n return base\n }\n }\n}\n\n// Parse an atomic expression — either a single token that is an\n// expression, an expression started by a keyword like `function` or\n// `new`, or an expression wrapped in punctuation like `()`, `[]`,\n// or `{}`.\n\npp.parseExprAtom = function(refDestructuringErrors) {\n // If a division operator appears in an expression position, the\n // tokenizer got confused, and we force it to read a regexp instead.\n if (this.type === tt.slash) this.readRegexp()\n\n let node, canBeArrow = this.potentialArrowAt === this.start\n switch (this.type) {\n case tt._super:\n if (!this.allowSuper)\n this.raise(this.start, \"'super' keyword outside a method\")\n node = this.startNode()\n this.next()\n if (this.type === tt.parenL && !this.allowDirectSuper)\n this.raise(node.start, \"super() call outside constructor of a subclass\")\n // The `super` keyword can appear at below:\n // SuperProperty:\n // super [ Expression ]\n // super . IdentifierName\n // SuperCall:\n // super Arguments\n if (this.type !== tt.dot && this.type !== tt.bracketL && this.type !== tt.parenL)\n this.unexpected()\n return this.finishNode(node, \"Super\")\n\n case tt._this:\n node = this.startNode()\n this.next()\n return this.finishNode(node, \"ThisExpression\")\n\n case tt.name:\n let startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc\n let id = this.parseIdent(this.type !== tt.name)\n if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === \"async\" && !this.canInsertSemicolon() && this.eat(tt._function))\n return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true)\n if (canBeArrow && !this.canInsertSemicolon()) {\n if (this.eat(tt.arrow))\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)\n if (this.options.ecmaVersion >= 8 && id.name === \"async\" && this.type === tt.name && !containsEsc) {\n id = this.parseIdent()\n if (this.canInsertSemicolon() || !this.eat(tt.arrow))\n this.unexpected()\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)\n }\n }\n return id\n\n case tt.regexp:\n let value = this.value\n node = this.parseLiteral(value.value)\n node.regex = {pattern: value.pattern, flags: value.flags}\n return node\n\n case tt.num: case tt.string:\n return this.parseLiteral(this.value)\n\n case tt._null: case tt._true: case tt._false:\n node = this.startNode()\n node.value = this.type === tt._null ? null : this.type === tt._true\n node.raw = this.type.keyword\n this.next()\n return this.finishNode(node, \"Literal\")\n\n case tt.parenL:\n let start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow)\n if (refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))\n refDestructuringErrors.parenthesizedAssign = start\n if (refDestructuringErrors.parenthesizedBind < 0)\n refDestructuringErrors.parenthesizedBind = start\n }\n return expr\n\n case tt.bracketL:\n node = this.startNode()\n this.next()\n node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)\n return this.finishNode(node, \"ArrayExpression\")\n\n case tt.braceL:\n return this.parseObj(false, refDestructuringErrors)\n\n case tt._function:\n node = this.startNode()\n this.next()\n return this.parseFunction(node, 0)\n\n case tt._class:\n return this.parseClass(this.startNode(), false)\n\n case tt._new:\n return this.parseNew()\n\n case tt.backQuote:\n return this.parseTemplate()\n\n default:\n this.unexpected()\n }\n}\n\npp.parseLiteral = function(value) {\n let node = this.startNode()\n node.value = value\n node.raw = this.input.slice(this.start, this.end)\n this.next()\n return this.finishNode(node, \"Literal\")\n}\n\npp.parseParenExpression = function() {\n this.expect(tt.parenL)\n let val = this.parseExpression()\n this.expect(tt.parenR)\n return val\n}\n\npp.parseParenAndDistinguishExpression = function(canBeArrow) {\n let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8\n if (this.options.ecmaVersion >= 6) {\n this.next()\n\n let innerStartPos = this.start, innerStartLoc = this.startLoc\n let exprList = [], first = true, lastIsComma = false\n let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart\n this.yieldPos = 0\n this.awaitPos = 0\n while (this.type !== tt.parenR) {\n first ? first = false : this.expect(tt.comma)\n if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) {\n lastIsComma = true\n break\n } else if (this.type === tt.ellipsis) {\n spreadStart = this.start\n exprList.push(this.parseParenItem(this.parseRestBinding()))\n if (this.type === tt.comma) this.raise(this.start, \"Comma is not permitted after the rest element\")\n break\n } else {\n exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem))\n }\n }\n let innerEndPos = this.start, innerEndLoc = this.startLoc\n this.expect(tt.parenR)\n\n if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false)\n this.checkYieldAwaitInDefaultParams()\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n return this.parseParenArrowList(startPos, startLoc, exprList)\n }\n\n if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)\n if (spreadStart) this.unexpected(spreadStart)\n this.checkExpressionErrors(refDestructuringErrors, true)\n this.yieldPos = oldYieldPos || this.yieldPos\n this.awaitPos = oldAwaitPos || this.awaitPos\n\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc)\n val.expressions = exprList\n this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc)\n } else {\n val = exprList[0]\n }\n } else {\n val = this.parseParenExpression()\n }\n\n if (this.options.preserveParens) {\n let par = this.startNodeAt(startPos, startLoc)\n par.expression = val\n return this.finishNode(par, \"ParenthesizedExpression\")\n } else {\n return val\n }\n}\n\npp.parseParenItem = function(item) {\n return item\n}\n\npp.parseParenArrowList = function(startPos, startLoc, exprList) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)\n}\n\n// New's precedence is slightly tricky. It must allow its argument to\n// be a `[]` or dot subscript expression, but not a call — at least,\n// not without wrapping it in parentheses. Thus, it uses the noCalls\n// argument to parseSubscripts to prevent it from consuming the\n// argument list.\n\nconst empty = []\n\npp.parseNew = function() {\n let node = this.startNode()\n let meta = this.parseIdent(true)\n if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {\n node.meta = meta\n let containsEsc = this.containsEsc\n node.property = this.parseIdent(true)\n if (node.property.name !== \"target\" || containsEsc)\n this.raiseRecoverable(node.property.start, \"The only valid meta property for new is new.target\")\n if (!this.inNonArrowFunction())\n this.raiseRecoverable(node.start, \"new.target can only be used in functions\")\n return this.finishNode(node, \"MetaProperty\")\n }\n let startPos = this.start, startLoc = this.startLoc\n node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)\n if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)\n else node.arguments = empty\n return this.finishNode(node, \"NewExpression\")\n}\n\n// Parse template expression.\n\npp.parseTemplateElement = function({isTagged}) {\n let elem = this.startNode()\n if (this.type === tt.invalidTemplate) {\n if (!isTagged) {\n this.raiseRecoverable(this.start, \"Bad escape sequence in untagged template literal\")\n }\n elem.value = {\n raw: this.value,\n cooked: null\n }\n } else {\n elem.value = {\n raw: this.input.slice(this.start, this.end).replace(/\\r\\n?/g, \"\\n\"),\n cooked: this.value\n }\n }\n this.next()\n elem.tail = this.type === tt.backQuote\n return this.finishNode(elem, \"TemplateElement\")\n}\n\npp.parseTemplate = function({isTagged = false} = {}) {\n let node = this.startNode()\n this.next()\n node.expressions = []\n let curElt = this.parseTemplateElement({isTagged})\n node.quasis = [curElt]\n while (!curElt.tail) {\n if (this.type === tt.eof) this.raise(this.pos, \"Unterminated template literal\")\n this.expect(tt.dollarBraceL)\n node.expressions.push(this.parseExpression())\n this.expect(tt.braceR)\n node.quasis.push(curElt = this.parseTemplateElement({isTagged}))\n }\n this.next()\n return this.finishNode(node, \"TemplateLiteral\")\n}\n\npp.isAsyncProp = function(prop) {\n return !prop.computed && prop.key.type === \"Identifier\" && prop.key.name === \"async\" &&\n (this.type === tt.name || this.type === tt.num || this.type === tt.string || this.type === tt.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === tt.star)) &&\n !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n}\n\n// Parse an object literal or binding pattern.\n\npp.parseObj = function(isPattern, refDestructuringErrors) {\n let node = this.startNode(), first = true, propHash = {}\n node.properties = []\n this.next()\n while (!this.eat(tt.braceR)) {\n if (!first) {\n this.expect(tt.comma)\n if (this.afterTrailingComma(tt.braceR)) break\n } else first = false\n\n const prop = this.parseProperty(isPattern, refDestructuringErrors)\n if (!isPattern) this.checkPropClash(prop, propHash, refDestructuringErrors)\n node.properties.push(prop)\n }\n return this.finishNode(node, isPattern ? \"ObjectPattern\" : \"ObjectExpression\")\n}\n\npp.parseProperty = function(isPattern, refDestructuringErrors) {\n let prop = this.startNode(), isGenerator, isAsync, startPos, startLoc\n if (this.options.ecmaVersion >= 9 && this.eat(tt.ellipsis)) {\n if (isPattern) {\n prop.argument = this.parseIdent(false)\n if (this.type === tt.comma) {\n this.raise(this.start, \"Comma is not permitted after the rest element\")\n }\n return this.finishNode(prop, \"RestElement\")\n }\n // To disallow parenthesized identifier via `this.toAssignable()`.\n if (this.type === tt.parenL && refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0) {\n refDestructuringErrors.parenthesizedAssign = this.start\n }\n if (refDestructuringErrors.parenthesizedBind < 0) {\n refDestructuringErrors.parenthesizedBind = this.start\n }\n }\n // Parse argument.\n prop.argument = this.parseMaybeAssign(false, refDestructuringErrors)\n // To disallow trailing comma via `this.toAssignable()`.\n if (this.type === tt.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {\n refDestructuringErrors.trailingComma = this.start\n }\n // Finish\n return this.finishNode(prop, \"SpreadElement\")\n }\n if (this.options.ecmaVersion >= 6) {\n prop.method = false\n prop.shorthand = false\n if (isPattern || refDestructuringErrors) {\n startPos = this.start\n startLoc = this.startLoc\n }\n if (!isPattern)\n isGenerator = this.eat(tt.star)\n }\n let containsEsc = this.containsEsc\n this.parsePropertyName(prop)\n if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {\n isAsync = true\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(tt.star)\n this.parsePropertyName(prop, refDestructuringErrors)\n } else {\n isAsync = false\n }\n this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc)\n return this.finishNode(prop, \"Property\")\n}\n\npp.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {\n if ((isGenerator || isAsync) && this.type === tt.colon)\n this.unexpected()\n\n if (this.eat(tt.colon)) {\n prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)\n prop.kind = \"init\"\n } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {\n if (isPattern) this.unexpected()\n prop.kind = \"init\"\n prop.method = true\n prop.value = this.parseMethod(isGenerator, isAsync)\n } else if (!isPattern && !containsEsc &&\n this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === \"Identifier\" &&\n (prop.key.name === \"get\" || prop.key.name === \"set\") &&\n (this.type !== tt.comma && this.type !== tt.braceR)) {\n if (isGenerator || isAsync) this.unexpected()\n prop.kind = prop.key.name\n this.parsePropertyName(prop)\n prop.value = this.parseMethod(false)\n let paramCount = prop.kind === \"get\" ? 0 : 1\n if (prop.value.params.length !== paramCount) {\n let start = prop.value.start\n if (prop.kind === \"get\")\n this.raiseRecoverable(start, \"getter should have no params\")\n else\n this.raiseRecoverable(start, \"setter should have exactly one param\")\n } else {\n if (prop.kind === \"set\" && prop.value.params[0].type === \"RestElement\")\n this.raiseRecoverable(prop.value.params[0].start, \"Setter cannot use rest params\")\n }\n } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === \"Identifier\") {\n this.checkUnreserved(prop.key)\n prop.kind = \"init\"\n if (isPattern) {\n prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)\n } else if (this.type === tt.eq && refDestructuringErrors) {\n if (refDestructuringErrors.shorthandAssign < 0)\n refDestructuringErrors.shorthandAssign = this.start\n prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)\n } else {\n prop.value = prop.key\n }\n prop.shorthand = true\n } else this.unexpected()\n}\n\npp.parsePropertyName = function(prop) {\n if (this.options.ecmaVersion >= 6) {\n if (this.eat(tt.bracketL)) {\n prop.computed = true\n prop.key = this.parseMaybeAssign()\n this.expect(tt.bracketR)\n return prop.key\n } else {\n prop.computed = false\n }\n }\n return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true)\n}\n\n// Initialize empty function node.\n\npp.initFunction = function(node) {\n node.id = null\n if (this.options.ecmaVersion >= 6) node.generator = node.expression = false\n if (this.options.ecmaVersion >= 8) node.async = false\n}\n\n// Parse object or class method.\n\npp.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {\n let node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos\n\n this.initFunction(node)\n if (this.options.ecmaVersion >= 6)\n node.generator = isGenerator\n if (this.options.ecmaVersion >= 8)\n node.async = !!isAsync\n\n this.yieldPos = 0\n this.awaitPos = 0\n this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0))\n\n this.expect(tt.parenL)\n node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)\n this.checkYieldAwaitInDefaultParams()\n this.parseFunctionBody(node, false)\n\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n return this.finishNode(node, \"FunctionExpression\")\n}\n\n// Parse arrow function expression with given parameters.\n\npp.parseArrowExpression = function(node, params, isAsync) {\n let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos\n\n this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW)\n this.initFunction(node)\n if (this.options.ecmaVersion >= 8) node.async = !!isAsync\n\n this.yieldPos = 0\n this.awaitPos = 0\n\n node.params = this.toAssignableList(params, true)\n this.parseFunctionBody(node, true)\n\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n return this.finishNode(node, \"ArrowFunctionExpression\")\n}\n\n// Parse function body and check parameters.\n\npp.parseFunctionBody = function(node, isArrowFunction) {\n let isExpression = isArrowFunction && this.type !== tt.braceL\n let oldStrict = this.strict, useStrict = false\n\n if (isExpression) {\n node.body = this.parseMaybeAssign()\n node.expression = true\n this.checkParams(node, false)\n } else {\n let nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params)\n if (!oldStrict || nonSimple) {\n useStrict = this.strictDirective(this.end)\n // If this is a strict mode function, verify that argument names\n // are not repeated, and it does not try to bind the words `eval`\n // or `arguments`.\n if (useStrict && nonSimple)\n this.raiseRecoverable(node.start, \"Illegal 'use strict' directive in function with non-simple parameter list\")\n }\n // Start a new scope with regard to labels and the `inFunction`\n // flag (restore them to their old value afterwards).\n let oldLabels = this.labels\n this.labels = []\n if (useStrict) this.strict = true\n\n // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && this.isSimpleParamList(node.params))\n node.body = this.parseBlock(false)\n node.expression = false\n this.adaptDirectivePrologue(node.body.body)\n this.labels = oldLabels\n }\n this.exitScope()\n\n // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n if (this.strict && node.id) this.checkLVal(node.id, BIND_OUTSIDE)\n this.strict = oldStrict\n}\n\npp.isSimpleParamList = function(params) {\n for (let param of params)\n if (param.type !== \"Identifier\") return false\n return true\n}\n\n// Checks function params for various disallowed patterns such as using \"eval\"\n// or \"arguments\" and duplicate parameters.\n\npp.checkParams = function(node, allowDuplicates) {\n let nameHash = {}\n for (let param of node.params)\n this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash)\n}\n\n// Parses a comma-separated list of expressions, and returns them as\n// an array. `close` is the token type that ends the list, and\n// `allowEmpty` can be turned on to allow subsequent commas with\n// nothing in between them to be parsed as `null` (which is needed\n// for array literals).\n\npp.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {\n let elts = [], first = true\n while (!this.eat(close)) {\n if (!first) {\n this.expect(tt.comma)\n if (allowTrailingComma && this.afterTrailingComma(close)) break\n } else first = false\n\n let elt\n if (allowEmpty && this.type === tt.comma)\n elt = null\n else if (this.type === tt.ellipsis) {\n elt = this.parseSpread(refDestructuringErrors)\n if (refDestructuringErrors && this.type === tt.comma && refDestructuringErrors.trailingComma < 0)\n refDestructuringErrors.trailingComma = this.start\n } else {\n elt = this.parseMaybeAssign(false, refDestructuringErrors)\n }\n elts.push(elt)\n }\n return elts\n}\n\npp.checkUnreserved = function({start, end, name}) {\n if (this.inGenerator && name === \"yield\")\n this.raiseRecoverable(start, \"Can not use 'yield' as identifier inside a generator\")\n if (this.inAsync && name === \"await\")\n this.raiseRecoverable(start, \"Can not use 'await' as identifier inside an async function\")\n if (this.keywords.test(name))\n this.raise(start, `Unexpected keyword '${name}'`)\n if (this.options.ecmaVersion < 6 &&\n this.input.slice(start, end).indexOf(\"\\\\\") !== -1) return\n const re = this.strict ? this.reservedWordsStrict : this.reservedWords\n if (re.test(name)) {\n if (!this.inAsync && name === \"await\")\n this.raiseRecoverable(start, \"Can not use keyword 'await' outside an async function\")\n this.raiseRecoverable(start, `The keyword '${name}' is reserved`)\n }\n}\n\n// Parse the next token as an identifier. If `liberal` is true (used\n// when parsing properties), it will also convert keywords into\n// identifiers.\n\npp.parseIdent = function(liberal, isBinding) {\n let node = this.startNode()\n if (liberal && this.options.allowReserved === \"never\") liberal = false\n if (this.type === tt.name) {\n node.name = this.value\n } else if (this.type.keyword) {\n node.name = this.type.keyword\n\n // To fix https://github.com/acornjs/acorn/issues/575\n // `class` and `function` keywords push new context into this.context.\n // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.\n // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword\n if ((node.name === \"class\" || node.name === \"function\") &&\n (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {\n this.context.pop()\n }\n } else {\n this.unexpected()\n }\n this.next()\n this.finishNode(node, \"Identifier\")\n if (!liberal) this.checkUnreserved(node)\n return node\n}\n\n// Parses yield expression inside generator.\n\npp.parseYield = function(noIn) {\n if (!this.yieldPos) this.yieldPos = this.start\n\n let node = this.startNode()\n this.next()\n if (this.type === tt.semi || this.canInsertSemicolon() || (this.type !== tt.star && !this.type.startsExpr)) {\n node.delegate = false\n node.argument = null\n } else {\n node.delegate = this.eat(tt.star)\n node.argument = this.parseMaybeAssign(noIn)\n }\n return this.finishNode(node, \"YieldExpression\")\n}\n\npp.parseAwait = function() {\n if (!this.awaitPos) this.awaitPos = this.start\n\n let node = this.startNode()\n this.next()\n node.argument = this.parseMaybeUnary(null, true)\n return this.finishNode(node, \"AwaitExpression\")\n}\n","import {Parser} from \"./state\"\nimport {Position, getLineInfo} from \"./locutil\"\n\nconst pp = Parser.prototype\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\npp.raise = function(pos, message) {\n let loc = getLineInfo(this.input, pos)\n message += \" (\" + loc.line + \":\" + loc.column + \")\"\n let err = new SyntaxError(message)\n err.pos = pos; err.loc = loc; err.raisedAt = this.pos\n throw err\n}\n\npp.raiseRecoverable = pp.raise\n\npp.curPosition = function() {\n if (this.options.locations) {\n return new Position(this.curLine, this.pos - this.lineStart)\n }\n}\n","import {Parser} from \"./state\"\nimport {SCOPE_VAR, SCOPE_FUNCTION, SCOPE_TOP, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, BIND_LEXICAL, BIND_SIMPLE_CATCH, BIND_FUNCTION} from \"./scopeflags\"\n\nconst pp = Parser.prototype\n\nclass Scope {\n constructor(flags) {\n this.flags = flags\n // A list of var-declared names in the current lexical scope\n this.var = []\n // A list of lexically-declared names in the current lexical scope\n this.lexical = []\n // A list of lexically-declared FunctionDeclaration names in the current lexical scope\n this.functions = []\n }\n}\n\n// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.\n\npp.enterScope = function(flags) {\n this.scopeStack.push(new Scope(flags))\n}\n\npp.exitScope = function() {\n this.scopeStack.pop()\n}\n\n// The spec says:\n// > At the top level of a function, or script, function declarations are\n// > treated like var declarations rather than like lexical declarations.\npp.treatFunctionsAsVarInScope = function(scope) {\n return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP);\n}\n\npp.declareName = function(name, bindingType, pos) {\n let redeclared = false\n if (bindingType === BIND_LEXICAL) {\n const scope = this.currentScope()\n redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1\n scope.lexical.push(name)\n } else if (bindingType === BIND_SIMPLE_CATCH) {\n const scope = this.currentScope()\n scope.lexical.push(name)\n } else if (bindingType === BIND_FUNCTION) {\n const scope = this.currentScope()\n if (this.treatFunctionsAsVar)\n redeclared = scope.lexical.indexOf(name) > -1;\n else\n redeclared = scope.lexical.indexOf(name) > -1 || scope.var.indexOf(name) > -1\n scope.functions.push(name)\n } else {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n const scope = this.scopeStack[i]\n if (scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH) && scope.lexical[0] === name ||\n !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1) {\n redeclared = true\n break\n }\n scope.var.push(name)\n if (scope.flags & SCOPE_VAR) break\n }\n }\n if (redeclared) this.raiseRecoverable(pos, `Identifier '${name}' has already been declared`)\n}\n\npp.currentScope = function() {\n return this.scopeStack[this.scopeStack.length - 1]\n}\n\npp.currentVarScope = function() {\n for (let i = this.scopeStack.length - 1;; i--) {\n let scope = this.scopeStack[i]\n if (scope.flags & SCOPE_VAR) return scope\n }\n}\n\n// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\npp.currentThisScope = function() {\n for (let i = this.scopeStack.length - 1;; i--) {\n let scope = this.scopeStack[i]\n if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) return scope\n }\n}\n","import {Parser} from \"./state\"\nimport {SourceLocation} from \"./locutil\"\n\nexport class Node {\n constructor(parser, pos, loc) {\n this.type = \"\"\n this.start = pos\n this.end = 0\n if (parser.options.locations)\n this.loc = new SourceLocation(parser, loc)\n if (parser.options.directSourceFile)\n this.sourceFile = parser.options.directSourceFile\n if (parser.options.ranges)\n this.range = [pos, 0]\n }\n}\n\n// Start an AST node, attaching a start offset.\n\nconst pp = Parser.prototype\n\npp.startNode = function() {\n return new Node(this, this.start, this.startLoc)\n}\n\npp.startNodeAt = function(pos, loc) {\n return new Node(this, pos, loc)\n}\n\n// Finish an AST node, adding `type` and `end` properties.\n\nfunction finishNodeAt(node, type, pos, loc) {\n node.type = type\n node.end = pos\n if (this.options.locations)\n node.loc.end = loc\n if (this.options.ranges)\n node.range[1] = pos\n return node\n}\n\npp.finishNode = function(node, type) {\n return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)\n}\n\n// Finish node at given position\n\npp.finishNodeAt = function(node, type, pos, loc) {\n return finishNodeAt.call(this, node, type, pos, loc)\n}\n","// The algorithm used to determine whether a regexp can appear at a\n// given point in the program is loosely based on sweet.js' approach.\n// See https://github.com/mozilla/sweet.js/wiki/design\n\nimport {Parser} from \"./state\"\nimport {types as tt} from \"./tokentype\"\nimport {lineBreak} from \"./whitespace\"\n\nexport class TokContext {\n constructor(token, isExpr, preserveSpace, override, generator) {\n this.token = token\n this.isExpr = !!isExpr\n this.preserveSpace = !!preserveSpace\n this.override = override\n this.generator = !!generator\n }\n}\n\nexport const types = {\n b_stat: new TokContext(\"{\", false),\n b_expr: new TokContext(\"{\", true),\n b_tmpl: new TokContext(\"${\", false),\n p_stat: new TokContext(\"(\", false),\n p_expr: new TokContext(\"(\", true),\n q_tmpl: new TokContext(\"`\", true, true, p => p.tryReadTemplateToken()),\n f_stat: new TokContext(\"function\", false),\n f_expr: new TokContext(\"function\", true),\n f_expr_gen: new TokContext(\"function\", true, false, null, true),\n f_gen: new TokContext(\"function\", false, false, null, true)\n}\n\nconst pp = Parser.prototype\n\npp.initialContext = function() {\n return [types.b_stat]\n}\n\npp.braceIsBlock = function(prevType) {\n let parent = this.curContext()\n if (parent === types.f_expr || parent === types.f_stat)\n return true\n if (prevType === tt.colon && (parent === types.b_stat || parent === types.b_expr))\n return !parent.isExpr\n\n // The check for `tt.name && exprAllowed` detects whether we are\n // after a `yield` or `of` construct. See the `updateContext` for\n // `tt.name`.\n if (prevType === tt._return || prevType === tt.name && this.exprAllowed)\n return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR || prevType === tt.arrow)\n return true\n if (prevType === tt.braceL)\n return parent === types.b_stat\n if (prevType === tt._var || prevType === tt._const || prevType === tt.name)\n return false\n return !this.exprAllowed\n}\n\npp.inGeneratorContext = function() {\n for (let i = this.context.length - 1; i >= 1; i--) {\n let context = this.context[i]\n if (context.token === \"function\")\n return context.generator\n }\n return false\n}\n\npp.updateContext = function(prevType) {\n let update, type = this.type\n if (type.keyword && prevType === tt.dot)\n this.exprAllowed = false\n else if (update = type.updateContext)\n update.call(this, prevType)\n else\n this.exprAllowed = type.beforeExpr\n}\n\n// Token-specific context update code\n\ntt.parenR.updateContext = tt.braceR.updateContext = function() {\n if (this.context.length === 1) {\n this.exprAllowed = true\n return\n }\n let out = this.context.pop()\n if (out === types.b_stat && this.curContext().token === \"function\") {\n out = this.context.pop()\n }\n this.exprAllowed = !out.isExpr\n}\n\ntt.braceL.updateContext = function(prevType) {\n this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)\n this.exprAllowed = true\n}\n\ntt.dollarBraceL.updateContext = function() {\n this.context.push(types.b_tmpl)\n this.exprAllowed = true\n}\n\ntt.parenL.updateContext = function(prevType) {\n let statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while\n this.context.push(statementParens ? types.p_stat : types.p_expr)\n this.exprAllowed = true\n}\n\ntt.incDec.updateContext = function() {\n // tokExprAllowed stays unchanged\n}\n\ntt._function.updateContext = tt._class.updateContext = function(prevType) {\n if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&\n !(prevType === tt._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) &&\n !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))\n this.context.push(types.f_expr)\n else\n this.context.push(types.f_stat)\n this.exprAllowed = false\n}\n\ntt.backQuote.updateContext = function() {\n if (this.curContext() === types.q_tmpl)\n this.context.pop()\n else\n this.context.push(types.q_tmpl)\n this.exprAllowed = false\n}\n\ntt.star.updateContext = function(prevType) {\n if (prevType === tt._function) {\n let index = this.context.length - 1\n if (this.context[index] === types.f_expr)\n this.context[index] = types.f_expr_gen\n else\n this.context[index] = types.f_gen\n }\n this.exprAllowed = true\n}\n\ntt.name.updateContext = function(prevType) {\n let allowed = false\n if (this.options.ecmaVersion >= 6 && prevType !== tt.dot) {\n if (this.value === \"of\" && !this.exprAllowed ||\n this.value === \"yield\" && this.inGeneratorContext())\n allowed = true\n }\n this.exprAllowed = allowed\n}\n","const data = {\n \"$LONE\": [\n \"ASCII\",\n \"ASCII_Hex_Digit\",\n \"AHex\",\n \"Alphabetic\",\n \"Alpha\",\n \"Any\",\n \"Assigned\",\n \"Bidi_Control\",\n \"Bidi_C\",\n \"Bidi_Mirrored\",\n \"Bidi_M\",\n \"Case_Ignorable\",\n \"CI\",\n \"Cased\",\n \"Changes_When_Casefolded\",\n \"CWCF\",\n \"Changes_When_Casemapped\",\n \"CWCM\",\n \"Changes_When_Lowercased\",\n \"CWL\",\n \"Changes_When_NFKC_Casefolded\",\n \"CWKCF\",\n \"Changes_When_Titlecased\",\n \"CWT\",\n \"Changes_When_Uppercased\",\n \"CWU\",\n \"Dash\",\n \"Default_Ignorable_Code_Point\",\n \"DI\",\n \"Deprecated\",\n \"Dep\",\n \"Diacritic\",\n \"Dia\",\n \"Emoji\",\n \"Emoji_Component\",\n \"Emoji_Modifier\",\n \"Emoji_Modifier_Base\",\n \"Emoji_Presentation\",\n \"Extender\",\n \"Ext\",\n \"Grapheme_Base\",\n \"Gr_Base\",\n \"Grapheme_Extend\",\n \"Gr_Ext\",\n \"Hex_Digit\",\n \"Hex\",\n \"IDS_Binary_Operator\",\n \"IDSB\",\n \"IDS_Trinary_Operator\",\n \"IDST\",\n \"ID_Continue\",\n \"IDC\",\n \"ID_Start\",\n \"IDS\",\n \"Ideographic\",\n \"Ideo\",\n \"Join_Control\",\n \"Join_C\",\n \"Logical_Order_Exception\",\n \"LOE\",\n \"Lowercase\",\n \"Lower\",\n \"Math\",\n \"Noncharacter_Code_Point\",\n \"NChar\",\n \"Pattern_Syntax\",\n \"Pat_Syn\",\n \"Pattern_White_Space\",\n \"Pat_WS\",\n \"Quotation_Mark\",\n \"QMark\",\n \"Radical\",\n \"Regional_Indicator\",\n \"RI\",\n \"Sentence_Terminal\",\n \"STerm\",\n \"Soft_Dotted\",\n \"SD\",\n \"Terminal_Punctuation\",\n \"Term\",\n \"Unified_Ideograph\",\n \"UIdeo\",\n \"Uppercase\",\n \"Upper\",\n \"Variation_Selector\",\n \"VS\",\n \"White_Space\",\n \"space\",\n \"XID_Continue\",\n \"XIDC\",\n \"XID_Start\",\n \"XIDS\"\n ],\n \"General_Category\": [\n \"Cased_Letter\",\n \"LC\",\n \"Close_Punctuation\",\n \"Pe\",\n \"Connector_Punctuation\",\n \"Pc\",\n \"Control\",\n \"Cc\",\n \"cntrl\",\n \"Currency_Symbol\",\n \"Sc\",\n \"Dash_Punctuation\",\n \"Pd\",\n \"Decimal_Number\",\n \"Nd\",\n \"digit\",\n \"Enclosing_Mark\",\n \"Me\",\n \"Final_Punctuation\",\n \"Pf\",\n \"Format\",\n \"Cf\",\n \"Initial_Punctuation\",\n \"Pi\",\n \"Letter\",\n \"L\",\n \"Letter_Number\",\n \"Nl\",\n \"Line_Separator\",\n \"Zl\",\n \"Lowercase_Letter\",\n \"Ll\",\n \"Mark\",\n \"M\",\n \"Combining_Mark\",\n \"Math_Symbol\",\n \"Sm\",\n \"Modifier_Letter\",\n \"Lm\",\n \"Modifier_Symbol\",\n \"Sk\",\n \"Nonspacing_Mark\",\n \"Mn\",\n \"Number\",\n \"N\",\n \"Open_Punctuation\",\n \"Ps\",\n \"Other\",\n \"C\",\n \"Other_Letter\",\n \"Lo\",\n \"Other_Number\",\n \"No\",\n \"Other_Punctuation\",\n \"Po\",\n \"Other_Symbol\",\n \"So\",\n \"Paragraph_Separator\",\n \"Zp\",\n \"Private_Use\",\n \"Co\",\n \"Punctuation\",\n \"P\",\n \"punct\",\n \"Separator\",\n \"Z\",\n \"Space_Separator\",\n \"Zs\",\n \"Spacing_Mark\",\n \"Mc\",\n \"Surrogate\",\n \"Cs\",\n \"Symbol\",\n \"S\",\n \"Titlecase_Letter\",\n \"Lt\",\n \"Unassigned\",\n \"Cn\",\n \"Uppercase_Letter\",\n \"Lu\"\n ],\n \"Script\": [\n \"Adlam\",\n \"Adlm\",\n \"Ahom\",\n \"Anatolian_Hieroglyphs\",\n \"Hluw\",\n \"Arabic\",\n \"Arab\",\n \"Armenian\",\n \"Armn\",\n \"Avestan\",\n \"Avst\",\n \"Balinese\",\n \"Bali\",\n \"Bamum\",\n \"Bamu\",\n \"Bassa_Vah\",\n \"Bass\",\n \"Batak\",\n \"Batk\",\n \"Bengali\",\n \"Beng\",\n \"Bhaiksuki\",\n \"Bhks\",\n \"Bopomofo\",\n \"Bopo\",\n \"Brahmi\",\n \"Brah\",\n \"Braille\",\n \"Brai\",\n \"Buginese\",\n \"Bugi\",\n \"Buhid\",\n \"Buhd\",\n \"Canadian_Aboriginal\",\n \"Cans\",\n \"Carian\",\n \"Cari\",\n \"Caucasian_Albanian\",\n \"Aghb\",\n \"Chakma\",\n \"Cakm\",\n \"Cham\",\n \"Cherokee\",\n \"Cher\",\n \"Common\",\n \"Zyyy\",\n \"Coptic\",\n \"Copt\",\n \"Qaac\",\n \"Cuneiform\",\n \"Xsux\",\n \"Cypriot\",\n \"Cprt\",\n \"Cyrillic\",\n \"Cyrl\",\n \"Deseret\",\n \"Dsrt\",\n \"Devanagari\",\n \"Deva\",\n \"Duployan\",\n \"Dupl\",\n \"Egyptian_Hieroglyphs\",\n \"Egyp\",\n \"Elbasan\",\n \"Elba\",\n \"Ethiopic\",\n \"Ethi\",\n \"Georgian\",\n \"Geor\",\n \"Glagolitic\",\n \"Glag\",\n \"Gothic\",\n \"Goth\",\n \"Grantha\",\n \"Gran\",\n \"Greek\",\n \"Grek\",\n \"Gujarati\",\n \"Gujr\",\n \"Gurmukhi\",\n \"Guru\",\n \"Han\",\n \"Hani\",\n \"Hangul\",\n \"Hang\",\n \"Hanunoo\",\n \"Hano\",\n \"Hatran\",\n \"Hatr\",\n \"Hebrew\",\n \"Hebr\",\n \"Hiragana\",\n \"Hira\",\n \"Imperial_Aramaic\",\n \"Armi\",\n \"Inherited\",\n \"Zinh\",\n \"Qaai\",\n \"Inscriptional_Pahlavi\",\n \"Phli\",\n \"Inscriptional_Parthian\",\n \"Prti\",\n \"Javanese\",\n \"Java\",\n \"Kaithi\",\n \"Kthi\",\n \"Kannada\",\n \"Knda\",\n \"Katakana\",\n \"Kana\",\n \"Kayah_Li\",\n \"Kali\",\n \"Kharoshthi\",\n \"Khar\",\n \"Khmer\",\n \"Khmr\",\n \"Khojki\",\n \"Khoj\",\n \"Khudawadi\",\n \"Sind\",\n \"Lao\",\n \"Laoo\",\n \"Latin\",\n \"Latn\",\n \"Lepcha\",\n \"Lepc\",\n \"Limbu\",\n \"Limb\",\n \"Linear_A\",\n \"Lina\",\n \"Linear_B\",\n \"Linb\",\n \"Lisu\",\n \"Lycian\",\n \"Lyci\",\n \"Lydian\",\n \"Lydi\",\n \"Mahajani\",\n \"Mahj\",\n \"Malayalam\",\n \"Mlym\",\n \"Mandaic\",\n \"Mand\",\n \"Manichaean\",\n \"Mani\",\n \"Marchen\",\n \"Marc\",\n \"Masaram_Gondi\",\n \"Gonm\",\n \"Meetei_Mayek\",\n \"Mtei\",\n \"Mende_Kikakui\",\n \"Mend\",\n \"Meroitic_Cursive\",\n \"Merc\",\n \"Meroitic_Hieroglyphs\",\n \"Mero\",\n \"Miao\",\n \"Plrd\",\n \"Modi\",\n \"Mongolian\",\n \"Mong\",\n \"Mro\",\n \"Mroo\",\n \"Multani\",\n \"Mult\",\n \"Myanmar\",\n \"Mymr\",\n \"Nabataean\",\n \"Nbat\",\n \"New_Tai_Lue\",\n \"Talu\",\n \"Newa\",\n \"Nko\",\n \"Nkoo\",\n \"Nushu\",\n \"Nshu\",\n \"Ogham\",\n \"Ogam\",\n \"Ol_Chiki\",\n \"Olck\",\n \"Old_Hungarian\",\n \"Hung\",\n \"Old_Italic\",\n \"Ital\",\n \"Old_North_Arabian\",\n \"Narb\",\n \"Old_Permic\",\n \"Perm\",\n \"Old_Persian\",\n \"Xpeo\",\n \"Old_South_Arabian\",\n \"Sarb\",\n \"Old_Turkic\",\n \"Orkh\",\n \"Oriya\",\n \"Orya\",\n \"Osage\",\n \"Osge\",\n \"Osmanya\",\n \"Osma\",\n \"Pahawh_Hmong\",\n \"Hmng\",\n \"Palmyrene\",\n \"Palm\",\n \"Pau_Cin_Hau\",\n \"Pauc\",\n \"Phags_Pa\",\n \"Phag\",\n \"Phoenician\",\n \"Phnx\",\n \"Psalter_Pahlavi\",\n \"Phlp\",\n \"Rejang\",\n \"Rjng\",\n \"Runic\",\n \"Runr\",\n \"Samaritan\",\n \"Samr\",\n \"Saurashtra\",\n \"Saur\",\n \"Sharada\",\n \"Shrd\",\n \"Shavian\",\n \"Shaw\",\n \"Siddham\",\n \"Sidd\",\n \"SignWriting\",\n \"Sgnw\",\n \"Sinhala\",\n \"Sinh\",\n \"Sora_Sompeng\",\n \"Sora\",\n \"Soyombo\",\n \"Soyo\",\n \"Sundanese\",\n \"Sund\",\n \"Syloti_Nagri\",\n \"Sylo\",\n \"Syriac\",\n \"Syrc\",\n \"Tagalog\",\n \"Tglg\",\n \"Tagbanwa\",\n \"Tagb\",\n \"Tai_Le\",\n \"Tale\",\n \"Tai_Tham\",\n \"Lana\",\n \"Tai_Viet\",\n \"Tavt\",\n \"Takri\",\n \"Takr\",\n \"Tamil\",\n \"Taml\",\n \"Tangut\",\n \"Tang\",\n \"Telugu\",\n \"Telu\",\n \"Thaana\",\n \"Thaa\",\n \"Thai\",\n \"Tibetan\",\n \"Tibt\",\n \"Tifinagh\",\n \"Tfng\",\n \"Tirhuta\",\n \"Tirh\",\n \"Ugaritic\",\n \"Ugar\",\n \"Vai\",\n \"Vaii\",\n \"Warang_Citi\",\n \"Wara\",\n \"Yi\",\n \"Yiii\",\n \"Zanabazar_Square\",\n \"Zanb\"\n ]\n}\nArray.prototype.push.apply(data.$LONE, data.General_Category)\ndata.gc = data.General_Category\ndata.sc = data.Script_Extensions = data.scx = data.Script\n\nexport default data\n","import {isIdentifierStart, isIdentifierChar} from \"./identifier.js\"\nimport {Parser} from \"./state.js\"\nimport UNICODE_PROPERTY_VALUES from \"./unicode-property-data.js\"\n\nconst pp = Parser.prototype\n\nexport class RegExpValidationState {\n constructor(parser) {\n this.parser = parser\n this.validFlags = `gim${parser.options.ecmaVersion >= 6 ? \"uy\" : \"\"}${parser.options.ecmaVersion >= 9 ? \"s\" : \"\"}`\n this.source = \"\"\n this.flags = \"\"\n this.start = 0\n this.switchU = false\n this.switchN = false\n this.pos = 0\n this.lastIntValue = 0\n this.lastStringValue = \"\"\n this.lastAssertionIsQuantifiable = false\n this.numCapturingParens = 0\n this.maxBackReference = 0\n this.groupNames = []\n this.backReferenceNames = []\n }\n\n reset(start, pattern, flags) {\n const unicode = flags.indexOf(\"u\") !== -1\n this.start = start | 0\n this.source = pattern + \"\"\n this.flags = flags\n this.switchU = unicode && this.parser.options.ecmaVersion >= 6\n this.switchN = unicode && this.parser.options.ecmaVersion >= 9\n }\n\n raise(message) {\n this.parser.raiseRecoverable(this.start, `Invalid regular expression: /${this.source}/: ${message}`)\n }\n\n // If u flag is given, this returns the code point at the index (it combines a surrogate pair).\n // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).\n at(i) {\n const s = this.source\n const l = s.length\n if (i >= l) {\n return -1\n }\n const c = s.charCodeAt(i)\n if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return c\n }\n return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00\n }\n\n nextIndex(i) {\n const s = this.source\n const l = s.length\n if (i >= l) {\n return l\n }\n const c = s.charCodeAt(i)\n if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return i + 1\n }\n return i + 2\n }\n\n current() {\n return this.at(this.pos)\n }\n\n lookahead() {\n return this.at(this.nextIndex(this.pos))\n }\n\n advance() {\n this.pos = this.nextIndex(this.pos)\n }\n\n eat(ch) {\n if (this.current() === ch) {\n this.advance()\n return true\n }\n return false\n }\n}\n\nfunction codePointToString(ch) {\n if (ch <= 0xFFFF) return String.fromCharCode(ch)\n ch -= 0x10000\n return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00)\n}\n\n/**\n * Validate the flags part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp.validateRegExpFlags = function(state) {\n const validFlags = state.validFlags\n const flags = state.flags\n\n for (let i = 0; i < flags.length; i++) {\n const flag = flags.charAt(i)\n if (validFlags.indexOf(flag) === -1) {\n this.raise(state.start, \"Invalid regular expression flag\")\n }\n if (flags.indexOf(flag, i + 1) > -1) {\n this.raise(state.start, \"Duplicate regular expression flag\")\n }\n }\n}\n\n/**\n * Validate the pattern part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp.validateRegExpPattern = function(state) {\n this.regexp_pattern(state)\n\n // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of\n // parsing contains a |GroupName|, reparse with the goal symbol\n // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*\n // exception if _P_ did not conform to the grammar, if any elements of _P_\n // were not matched by the parse, or if any Early Error conditions exist.\n if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {\n state.switchN = true\n this.regexp_pattern(state)\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern\npp.regexp_pattern = function(state) {\n state.pos = 0\n state.lastIntValue = 0\n state.lastStringValue = \"\"\n state.lastAssertionIsQuantifiable = false\n state.numCapturingParens = 0\n state.maxBackReference = 0\n state.groupNames.length = 0\n state.backReferenceNames.length = 0\n\n this.regexp_disjunction(state)\n\n if (state.pos !== state.source.length) {\n // Make the same messages as V8.\n if (state.eat(0x29 /* ) */)) {\n state.raise(\"Unmatched ')'\")\n }\n if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) {\n state.raise(\"Lone quantifier brackets\")\n }\n }\n if (state.maxBackReference > state.numCapturingParens) {\n state.raise(\"Invalid escape\")\n }\n for (const name of state.backReferenceNames) {\n if (state.groupNames.indexOf(name) === -1) {\n state.raise(\"Invalid named capture referenced\")\n }\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction\npp.regexp_disjunction = function(state) {\n this.regexp_alternative(state)\n while (state.eat(0x7C /* | */)) {\n this.regexp_alternative(state)\n }\n\n // Make the same message as V8.\n if (this.regexp_eatQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\")\n }\n if (state.eat(0x7B /* { */)) {\n state.raise(\"Lone quantifier brackets\")\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative\npp.regexp_alternative = function(state) {\n while (state.pos < state.source.length && this.regexp_eatTerm(state))\n ;\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term\npp.regexp_eatTerm = function(state) {\n if (this.regexp_eatAssertion(state)) {\n // Handle `QuantifiableAssertion Quantifier` alternative.\n // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion\n // is a QuantifiableAssertion.\n if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {\n // Make the same message as V8.\n if (state.switchU) {\n state.raise(\"Invalid quantifier\")\n }\n }\n return true\n }\n\n if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {\n this.regexp_eatQuantifier(state)\n return true\n }\n\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion\npp.regexp_eatAssertion = function(state) {\n const start = state.pos\n state.lastAssertionIsQuantifiable = false\n\n // ^, $\n if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {\n return true\n }\n\n // \\b \\B\n if (state.eat(0x5C /* \\ */)) {\n if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {\n return true\n }\n state.pos = start\n }\n\n // Lookahead / Lookbehind\n if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {\n let lookbehind = false\n if (this.options.ecmaVersion >= 9) {\n lookbehind = state.eat(0x3C /* < */)\n }\n if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {\n this.regexp_disjunction(state)\n if (!state.eat(0x29 /* ) */)) {\n state.raise(\"Unterminated group\")\n }\n state.lastAssertionIsQuantifiable = !lookbehind\n return true\n }\n }\n\n state.pos = start\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier\npp.regexp_eatQuantifier = function(state, noError = false) {\n if (this.regexp_eatQuantifierPrefix(state, noError)) {\n state.eat(0x3F /* ? */)\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix\npp.regexp_eatQuantifierPrefix = function(state, noError) {\n return (\n state.eat(0x2A /* * */) ||\n state.eat(0x2B /* + */) ||\n state.eat(0x3F /* ? */) ||\n this.regexp_eatBracedQuantifier(state, noError)\n )\n}\npp.regexp_eatBracedQuantifier = function(state, noError) {\n const start = state.pos\n if (state.eat(0x7B /* { */)) {\n let min = 0, max = -1\n if (this.regexp_eatDecimalDigits(state)) {\n min = state.lastIntValue\n if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {\n max = state.lastIntValue\n }\n if (state.eat(0x7D /* } */)) {\n // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term\n if (max !== -1 && max < min && !noError) {\n state.raise(\"numbers out of order in {} quantifier\")\n }\n return true\n }\n }\n if (state.switchU && !noError) {\n state.raise(\"Incomplete quantifier\")\n }\n state.pos = start\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom\npp.regexp_eatAtom = function(state) {\n return (\n this.regexp_eatPatternCharacters(state) ||\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state)\n )\n}\npp.regexp_eatReverseSolidusAtomEscape = function(state) {\n const start = state.pos\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatAtomEscape(state)) {\n return true\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatUncapturingGroup = function(state) {\n const start = state.pos\n if (state.eat(0x28 /* ( */)) {\n if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) {\n this.regexp_disjunction(state)\n if (state.eat(0x29 /* ) */)) {\n return true\n }\n state.raise(\"Unterminated group\")\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatCapturingGroup = function(state) {\n if (state.eat(0x28 /* ( */)) {\n if (this.options.ecmaVersion >= 9) {\n this.regexp_groupSpecifier(state)\n } else if (state.current() === 0x3F /* ? */) {\n state.raise(\"Invalid group\")\n }\n this.regexp_disjunction(state)\n if (state.eat(0x29 /* ) */)) {\n state.numCapturingParens += 1\n return true\n }\n state.raise(\"Unterminated group\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom\npp.regexp_eatExtendedAtom = function(state) {\n return (\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state) ||\n this.regexp_eatInvalidBracedQuantifier(state) ||\n this.regexp_eatExtendedPatternCharacter(state)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier\npp.regexp_eatInvalidBracedQuantifier = function(state) {\n if (this.regexp_eatBracedQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter\npp.regexp_eatSyntaxCharacter = function(state) {\n const ch = state.current()\n if (isSyntaxCharacter(ch)) {\n state.lastIntValue = ch\n state.advance()\n return true\n }\n return false\n}\nfunction isSyntaxCharacter(ch) {\n return (\n ch === 0x24 /* $ */ ||\n ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||\n ch === 0x2E /* . */ ||\n ch === 0x3F /* ? */ ||\n ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||\n ch >= 0x7B /* { */ && ch <= 0x7D /* } */\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter\n// But eat eager.\npp.regexp_eatPatternCharacters = function(state) {\n const start = state.pos\n let ch = 0\n while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {\n state.advance()\n }\n return state.pos !== start\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter\npp.regexp_eatExtendedPatternCharacter = function(state) {\n const ch = state.current()\n if (\n ch !== -1 &&\n ch !== 0x24 /* $ */ &&\n !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&\n ch !== 0x2E /* . */ &&\n ch !== 0x3F /* ? */ &&\n ch !== 0x5B /* [ */ &&\n ch !== 0x5E /* ^ */ &&\n ch !== 0x7C /* | */\n ) {\n state.advance()\n return true\n }\n return false\n}\n\n// GroupSpecifier[U] ::\n// [empty]\n// `?` GroupName[?U]\npp.regexp_groupSpecifier = function(state) {\n if (state.eat(0x3F /* ? */)) {\n if (this.regexp_eatGroupName(state)) {\n if (state.groupNames.indexOf(state.lastStringValue) !== -1) {\n state.raise(\"Duplicate capture group name\")\n }\n state.groupNames.push(state.lastStringValue)\n return\n }\n state.raise(\"Invalid group\")\n }\n}\n\n// GroupName[U] ::\n// `<` RegExpIdentifierName[?U] `>`\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp.regexp_eatGroupName = function(state) {\n state.lastStringValue = \"\"\n if (state.eat(0x3C /* < */)) {\n if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {\n return true\n }\n state.raise(\"Invalid capture group name\")\n }\n return false\n}\n\n// RegExpIdentifierName[U] ::\n// RegExpIdentifierStart[?U]\n// RegExpIdentifierName[?U] RegExpIdentifierPart[?U]\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp.regexp_eatRegExpIdentifierName = function(state) {\n state.lastStringValue = \"\"\n if (this.regexp_eatRegExpIdentifierStart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue)\n while (this.regexp_eatRegExpIdentifierPart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue)\n }\n return true\n }\n return false\n}\n\n// RegExpIdentifierStart[U] ::\n// UnicodeIDStart\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[?U]\npp.regexp_eatRegExpIdentifierStart = function(state) {\n const start = state.pos\n let ch = state.current()\n state.advance()\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) {\n ch = state.lastIntValue\n }\n if (isRegExpIdentifierStart(ch)) {\n state.lastIntValue = ch\n return true\n }\n\n state.pos = start\n return false\n}\nfunction isRegExpIdentifierStart(ch) {\n return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */\n}\n\n// RegExpIdentifierPart[U] ::\n// UnicodeIDContinue\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[?U]\n// \n// \npp.regexp_eatRegExpIdentifierPart = function(state) {\n const start = state.pos\n let ch = state.current()\n state.advance()\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) {\n ch = state.lastIntValue\n }\n if (isRegExpIdentifierPart(ch)) {\n state.lastIntValue = ch\n return true\n }\n\n state.pos = start\n return false\n}\nfunction isRegExpIdentifierPart(ch) {\n return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape\npp.regexp_eatAtomEscape = function(state) {\n if (\n this.regexp_eatBackReference(state) ||\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state) ||\n (state.switchN && this.regexp_eatKGroupName(state))\n ) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n if (state.current() === 0x63 /* c */) {\n state.raise(\"Invalid unicode escape\")\n }\n state.raise(\"Invalid escape\")\n }\n return false\n}\npp.regexp_eatBackReference = function(state) {\n const start = state.pos\n if (this.regexp_eatDecimalEscape(state)) {\n const n = state.lastIntValue\n if (state.switchU) {\n // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape\n if (n > state.maxBackReference) {\n state.maxBackReference = n\n }\n return true\n }\n if (n <= state.numCapturingParens) {\n return true\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatKGroupName = function(state) {\n if (state.eat(0x6B /* k */)) {\n if (this.regexp_eatGroupName(state)) {\n state.backReferenceNames.push(state.lastStringValue)\n return true\n }\n state.raise(\"Invalid named reference\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape\npp.regexp_eatCharacterEscape = function(state) {\n return (\n this.regexp_eatControlEscape(state) ||\n this.regexp_eatCControlLetter(state) ||\n this.regexp_eatZero(state) ||\n this.regexp_eatHexEscapeSequence(state) ||\n this.regexp_eatRegExpUnicodeEscapeSequence(state) ||\n (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||\n this.regexp_eatIdentityEscape(state)\n )\n}\npp.regexp_eatCControlLetter = function(state) {\n const start = state.pos\n if (state.eat(0x63 /* c */)) {\n if (this.regexp_eatControlLetter(state)) {\n return true\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatZero = function(state) {\n if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {\n state.lastIntValue = 0\n state.advance()\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape\npp.regexp_eatControlEscape = function(state) {\n const ch = state.current()\n if (ch === 0x74 /* t */) {\n state.lastIntValue = 0x09 /* \\t */\n state.advance()\n return true\n }\n if (ch === 0x6E /* n */) {\n state.lastIntValue = 0x0A /* \\n */\n state.advance()\n return true\n }\n if (ch === 0x76 /* v */) {\n state.lastIntValue = 0x0B /* \\v */\n state.advance()\n return true\n }\n if (ch === 0x66 /* f */) {\n state.lastIntValue = 0x0C /* \\f */\n state.advance()\n return true\n }\n if (ch === 0x72 /* r */) {\n state.lastIntValue = 0x0D /* \\r */\n state.advance()\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter\npp.regexp_eatControlLetter = function(state) {\n const ch = state.current()\n if (isControlLetter(ch)) {\n state.lastIntValue = ch % 0x20\n state.advance()\n return true\n }\n return false\n}\nfunction isControlLetter(ch) {\n return (\n (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||\n (ch >= 0x61 /* a */ && ch <= 0x7A /* z */)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence\npp.regexp_eatRegExpUnicodeEscapeSequence = function(state) {\n const start = state.pos\n\n if (state.eat(0x75 /* u */)) {\n if (this.regexp_eatFixedHexDigits(state, 4)) {\n const lead = state.lastIntValue\n if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) {\n const leadSurrogateEnd = state.pos\n if (state.eat(0x5C /* \\ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {\n const trail = state.lastIntValue\n if (trail >= 0xDC00 && trail <= 0xDFFF) {\n state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000\n return true\n }\n }\n state.pos = leadSurrogateEnd\n state.lastIntValue = lead\n }\n return true\n }\n if (\n state.switchU &&\n state.eat(0x7B /* { */) &&\n this.regexp_eatHexDigits(state) &&\n state.eat(0x7D /* } */) &&\n isValidUnicode(state.lastIntValue)\n ) {\n return true\n }\n if (state.switchU) {\n state.raise(\"Invalid unicode escape\")\n }\n state.pos = start\n }\n\n return false\n}\nfunction isValidUnicode(ch) {\n return ch >= 0 && ch <= 0x10FFFF\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape\npp.regexp_eatIdentityEscape = function(state) {\n if (state.switchU) {\n if (this.regexp_eatSyntaxCharacter(state)) {\n return true\n }\n if (state.eat(0x2F /* / */)) {\n state.lastIntValue = 0x2F /* / */\n return true\n }\n return false\n }\n\n const ch = state.current()\n if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {\n state.lastIntValue = ch\n state.advance()\n return true\n }\n\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape\npp.regexp_eatDecimalEscape = function(state) {\n state.lastIntValue = 0\n let ch = state.current()\n if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {\n do {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */)\n state.advance()\n } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape\npp.regexp_eatCharacterClassEscape = function(state) {\n const ch = state.current()\n\n if (isCharacterClassEscape(ch)) {\n state.lastIntValue = -1\n state.advance()\n return true\n }\n\n if (\n state.switchU &&\n this.options.ecmaVersion >= 9 &&\n (ch === 0x50 /* P */ || ch === 0x70 /* p */)\n ) {\n state.lastIntValue = -1\n state.advance()\n if (\n state.eat(0x7B /* { */) &&\n this.regexp_eatUnicodePropertyValueExpression(state) &&\n state.eat(0x7D /* } */)\n ) {\n return true\n }\n state.raise(\"Invalid property name\")\n }\n\n return false\n}\nfunction isCharacterClassEscape(ch) {\n return (\n ch === 0x64 /* d */ ||\n ch === 0x44 /* D */ ||\n ch === 0x73 /* s */ ||\n ch === 0x53 /* S */ ||\n ch === 0x77 /* w */ ||\n ch === 0x57 /* W */\n )\n}\n\n// UnicodePropertyValueExpression ::\n// UnicodePropertyName `=` UnicodePropertyValue\n// LoneUnicodePropertyNameOrValue\npp.regexp_eatUnicodePropertyValueExpression = function(state) {\n const start = state.pos\n\n // UnicodePropertyName `=` UnicodePropertyValue\n if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {\n const name = state.lastStringValue\n if (this.regexp_eatUnicodePropertyValue(state)) {\n const value = state.lastStringValue\n this.regexp_validateUnicodePropertyNameAndValue(state, name, value)\n return true\n }\n }\n state.pos = start\n\n // LoneUnicodePropertyNameOrValue\n if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {\n const nameOrValue = state.lastStringValue\n this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue)\n return true\n }\n return false\n}\npp.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {\n if (!UNICODE_PROPERTY_VALUES.hasOwnProperty(name) || UNICODE_PROPERTY_VALUES[name].indexOf(value) === -1) {\n state.raise(\"Invalid property name\")\n }\n}\npp.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {\n if (UNICODE_PROPERTY_VALUES.$LONE.indexOf(nameOrValue) === -1) {\n state.raise(\"Invalid property name\")\n }\n}\n\n// UnicodePropertyName ::\n// UnicodePropertyNameCharacters\npp.regexp_eatUnicodePropertyName = function(state) {\n let ch = 0\n state.lastStringValue = \"\"\n while (isUnicodePropertyNameCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch)\n state.advance()\n }\n return state.lastStringValue !== \"\"\n}\nfunction isUnicodePropertyNameCharacter(ch) {\n return isControlLetter(ch) || ch === 0x5F /* _ */\n}\n\n// UnicodePropertyValue ::\n// UnicodePropertyValueCharacters\npp.regexp_eatUnicodePropertyValue = function(state) {\n let ch = 0\n state.lastStringValue = \"\"\n while (isUnicodePropertyValueCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch)\n state.advance()\n }\n return state.lastStringValue !== \"\"\n}\nfunction isUnicodePropertyValueCharacter(ch) {\n return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)\n}\n\n// LoneUnicodePropertyNameOrValue ::\n// UnicodePropertyValueCharacters\npp.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {\n return this.regexp_eatUnicodePropertyValue(state)\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass\npp.regexp_eatCharacterClass = function(state) {\n if (state.eat(0x5B /* [ */)) {\n state.eat(0x5E /* ^ */)\n this.regexp_classRanges(state)\n if (state.eat(0x5D /* [ */)) {\n return true\n }\n // Unreachable since it threw \"unterminated regular expression\" error before.\n state.raise(\"Unterminated character class\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash\npp.regexp_classRanges = function(state) {\n while (this.regexp_eatClassAtom(state)) {\n const left = state.lastIntValue\n if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {\n const right = state.lastIntValue\n if (state.switchU && (left === -1 || right === -1)) {\n state.raise(\"Invalid character class\")\n }\n if (left !== -1 && right !== -1 && left > right) {\n state.raise(\"Range out of order in character class\")\n }\n }\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash\npp.regexp_eatClassAtom = function(state) {\n const start = state.pos\n\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatClassEscape(state)) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n const ch = state.current()\n if (ch === 0x63 /* c */ || isOctalDigit(ch)) {\n state.raise(\"Invalid class escape\")\n }\n state.raise(\"Invalid escape\")\n }\n state.pos = start\n }\n\n const ch = state.current()\n if (ch !== 0x5D /* [ */) {\n state.lastIntValue = ch\n state.advance()\n return true\n }\n\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape\npp.regexp_eatClassEscape = function(state) {\n const start = state.pos\n\n if (state.eat(0x62 /* b */)) {\n state.lastIntValue = 0x08 /* */\n return true\n }\n\n if (state.switchU && state.eat(0x2D /* - */)) {\n state.lastIntValue = 0x2D /* - */\n return true\n }\n\n if (!state.switchU && state.eat(0x63 /* c */)) {\n if (this.regexp_eatClassControlLetter(state)) {\n return true\n }\n state.pos = start\n }\n\n return (\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter\npp.regexp_eatClassControlLetter = function(state) {\n const ch = state.current()\n if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {\n state.lastIntValue = ch % 0x20\n state.advance()\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp.regexp_eatHexEscapeSequence = function(state) {\n const start = state.pos\n if (state.eat(0x78 /* x */)) {\n if (this.regexp_eatFixedHexDigits(state, 2)) {\n return true\n }\n if (state.switchU) {\n state.raise(\"Invalid escape\")\n }\n state.pos = start\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits\npp.regexp_eatDecimalDigits = function(state) {\n const start = state.pos\n let ch = 0\n state.lastIntValue = 0\n while (isDecimalDigit(ch = state.current())) {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */)\n state.advance()\n }\n return state.pos !== start\n}\nfunction isDecimalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits\npp.regexp_eatHexDigits = function(state) {\n const start = state.pos\n let ch = 0\n state.lastIntValue = 0\n while (isHexDigit(ch = state.current())) {\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch)\n state.advance()\n }\n return state.pos !== start\n}\nfunction isHexDigit(ch) {\n return (\n (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) ||\n (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) ||\n (ch >= 0x61 /* a */ && ch <= 0x66 /* f */)\n )\n}\nfunction hexToInt(ch) {\n if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {\n return 10 + (ch - 0x41 /* A */)\n }\n if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {\n return 10 + (ch - 0x61 /* a */)\n }\n return ch - 0x30 /* 0 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence\n// Allows only 0-377(octal) i.e. 0-255(decimal).\npp.regexp_eatLegacyOctalEscapeSequence = function(state) {\n if (this.regexp_eatOctalDigit(state)) {\n const n1 = state.lastIntValue\n if (this.regexp_eatOctalDigit(state)) {\n const n2 = state.lastIntValue\n if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {\n state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue\n } else {\n state.lastIntValue = n1 * 8 + n2\n }\n } else {\n state.lastIntValue = n1\n }\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit\npp.regexp_eatOctalDigit = function(state) {\n const ch = state.current()\n if (isOctalDigit(ch)) {\n state.lastIntValue = ch - 0x30 /* 0 */\n state.advance()\n return true\n }\n state.lastIntValue = 0\n return false\n}\nfunction isOctalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit\n// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp.regexp_eatFixedHexDigits = function(state, length) {\n const start = state.pos\n state.lastIntValue = 0\n for (let i = 0; i < length; ++i) {\n const ch = state.current()\n if (!isHexDigit(ch)) {\n state.pos = start\n return false\n }\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch)\n state.advance()\n }\n return true\n}\n","import {isIdentifierStart, isIdentifierChar} from \"./identifier\"\nimport {types as tt, keywords as keywordTypes} from \"./tokentype\"\nimport {Parser} from \"./state\"\nimport {SourceLocation} from \"./locutil\"\nimport {RegExpValidationState} from \"./regexp\"\nimport {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from \"./whitespace\"\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(p) {\n this.type = p.type\n this.value = p.value\n this.start = p.start\n this.end = p.end\n if (p.options.locations)\n this.loc = new SourceLocation(p, p.startLoc, p.endLoc)\n if (p.options.ranges)\n this.range = [p.start, p.end]\n }\n}\n\n// ## Tokenizer\n\nconst pp = Parser.prototype\n\n// Move to the next token\n\npp.next = function() {\n if (this.options.onToken)\n this.options.onToken(new Token(this))\n\n this.lastTokEnd = this.end\n this.lastTokStart = this.start\n this.lastTokEndLoc = this.endLoc\n this.lastTokStartLoc = this.startLoc\n this.nextToken()\n}\n\npp.getToken = function() {\n this.next()\n return new Token(this)\n}\n\n// If we're in an ES6 environment, make parsers iterable\nif (typeof Symbol !== \"undefined\")\n pp[Symbol.iterator] = function() {\n return {\n next: () => {\n let token = this.getToken()\n return {\n done: token.type === tt.eof,\n value: token\n }\n }\n }\n }\n\n// Toggle strict mode. Re-reads the next number or string to please\n// pedantic tests (`\"use strict\"; 010;` should fail).\n\npp.curContext = function() {\n return this.context[this.context.length - 1]\n}\n\n// Read a single token, updating the parser object's token-related\n// properties.\n\npp.nextToken = function() {\n let curContext = this.curContext()\n if (!curContext || !curContext.preserveSpace) this.skipSpace()\n\n this.start = this.pos\n if (this.options.locations) this.startLoc = this.curPosition()\n if (this.pos >= this.input.length) return this.finishToken(tt.eof)\n\n if (curContext.override) return curContext.override(this)\n else this.readToken(this.fullCharCodeAtPos())\n}\n\npp.readToken = function(code) {\n // Identifier or keyword. '\\uXXXX' sequences are allowed in\n // identifiers, so '\\' also dispatches to that.\n if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\\' */)\n return this.readWord()\n\n return this.getTokenFromCode(code)\n}\n\npp.fullCharCodeAtPos = function() {\n let code = this.input.charCodeAt(this.pos)\n if (code <= 0xd7ff || code >= 0xe000) return code\n let next = this.input.charCodeAt(this.pos + 1)\n return (code << 10) + next - 0x35fdc00\n}\n\npp.skipBlockComment = function() {\n let startLoc = this.options.onComment && this.curPosition()\n let start = this.pos, end = this.input.indexOf(\"*/\", this.pos += 2)\n if (end === -1) this.raise(this.pos - 2, \"Unterminated comment\")\n this.pos = end + 2\n if (this.options.locations) {\n lineBreakG.lastIndex = start\n let match\n while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {\n ++this.curLine\n this.lineStart = match.index + match[0].length\n }\n }\n if (this.options.onComment)\n this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,\n startLoc, this.curPosition())\n}\n\npp.skipLineComment = function(startSkip) {\n let start = this.pos\n let startLoc = this.options.onComment && this.curPosition()\n let ch = this.input.charCodeAt(this.pos += startSkip)\n while (this.pos < this.input.length && !isNewLine(ch)) {\n ch = this.input.charCodeAt(++this.pos)\n }\n if (this.options.onComment)\n this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,\n startLoc, this.curPosition())\n}\n\n// Called at the start of the parse and after every token. Skips\n// whitespace and comments, and.\n\npp.skipSpace = function() {\n loop: while (this.pos < this.input.length) {\n let ch = this.input.charCodeAt(this.pos)\n switch (ch) {\n case 32: case 160: // ' '\n ++this.pos\n break\n case 13:\n if (this.input.charCodeAt(this.pos + 1) === 10) {\n ++this.pos\n }\n case 10: case 8232: case 8233:\n ++this.pos\n if (this.options.locations) {\n ++this.curLine\n this.lineStart = this.pos\n }\n break\n case 47: // '/'\n switch (this.input.charCodeAt(this.pos + 1)) {\n case 42: // '*'\n this.skipBlockComment()\n break\n case 47:\n this.skipLineComment(2)\n break\n default:\n break loop\n }\n break\n default:\n if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {\n ++this.pos\n } else {\n break loop\n }\n }\n }\n}\n\n// Called at the end of every token. Sets `end`, `val`, and\n// maintains `context` and `exprAllowed`, and skips the space after\n// the token, so that the next one's `start` will point at the\n// right position.\n\npp.finishToken = function(type, val) {\n this.end = this.pos\n if (this.options.locations) this.endLoc = this.curPosition()\n let prevType = this.type\n this.type = type\n this.value = val\n\n this.updateContext(prevType)\n}\n\n// ### Token reading\n\n// This is the function that is called to fetch the next token. It\n// is somewhat obscure, because it works in character codes rather\n// than characters, and because operator parsing has been inlined\n// into it.\n//\n// All in the name of speed.\n//\npp.readToken_dot = function() {\n let next = this.input.charCodeAt(this.pos + 1)\n if (next >= 48 && next <= 57) return this.readNumber(true)\n let next2 = this.input.charCodeAt(this.pos + 2)\n if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'\n this.pos += 3\n return this.finishToken(tt.ellipsis)\n } else {\n ++this.pos\n return this.finishToken(tt.dot)\n }\n}\n\npp.readToken_slash = function() { // '/'\n let next = this.input.charCodeAt(this.pos + 1)\n if (this.exprAllowed) { ++this.pos; return this.readRegexp() }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.slash, 1)\n}\n\npp.readToken_mult_modulo_exp = function(code) { // '%*'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n let tokentype = code === 42 ? tt.star : tt.modulo\n\n // exponentiation operator ** and **=\n if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {\n ++size\n tokentype = tt.starstar\n next = this.input.charCodeAt(this.pos + 2)\n }\n\n if (next === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tokentype, size)\n}\n\npp.readToken_pipe_amp = function(code) { // '|&'\n let next = this.input.charCodeAt(this.pos + 1)\n if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)\n}\n\npp.readToken_caret = function() { // '^'\n let next = this.input.charCodeAt(this.pos + 1)\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.bitwiseXOR, 1)\n}\n\npp.readToken_plus_min = function(code) { // '+-'\n let next = this.input.charCodeAt(this.pos + 1)\n if (next === code) {\n if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 &&\n (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {\n // A `-->` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `
+
+```js
+var bodyParser = require('body-parser')
+```
+
+The `bodyParser` object exposes various factories to create middlewares. All
+middlewares will populate the `req.body` property with the parsed body when
+the `Content-Type` request header matches the `type` option, or an empty
+object (`{}`) if there was no body to parse, the `Content-Type` was not matched,
+or an error occurred.
+
+The various errors returned by this module are described in the
+[errors section](#errors).
+
+### bodyParser.json([options])
+
+Returns middleware that only parses `json` and only looks at requests where
+the `Content-Type` header matches the `type` option. This parser accepts any
+Unicode encoding of the body and supports automatic inflation of `gzip` and
+`deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`).
+
+#### Options
+
+The `json` function takes an optional `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### reviver
+
+The `reviver` option is passed directly to `JSON.parse` as the second
+argument. You can find more information on this argument
+[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
+
+##### strict
+
+When set to `true`, will only accept arrays and objects; when `false` will
+accept anything `JSON.parse` accepts. Defaults to `true`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function. If not a
+function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
+be an extension name (like `json`), a mime type (like `application/json`), or
+a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type`
+option is called as `fn(req)` and the request is parsed if it returns a truthy
+value. Defaults to `application/json`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.raw([options])
+
+Returns middleware that parses all bodies as a `Buffer` and only looks at
+requests where the `Content-Type` header matches the `type` option. This
+parser supports automatic inflation of `gzip` and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a `Buffer` object
+of the body.
+
+#### Options
+
+The `raw` function takes an optional `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function.
+If not a function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this
+can be an extension name (like `bin`), a mime type (like
+`application/octet-stream`), or a mime type with a wildcard (like `*/*` or
+`application/*`). If a function, the `type` option is called as `fn(req)`
+and the request is parsed if it returns a truthy value. Defaults to
+`application/octet-stream`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.text([options])
+
+Returns middleware that parses all bodies as a string and only looks at
+requests where the `Content-Type` header matches the `type` option. This
+parser supports automatic inflation of `gzip` and `deflate` encodings.
+
+A new `body` string containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a string of the
+body.
+
+#### Options
+
+The `text` function takes an optional `options` object that may contain any of
+the following keys:
+
+##### defaultCharset
+
+Specify the default character set for the text content if the charset is not
+specified in the `Content-Type` header of the request. Defaults to `utf-8`.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function. If not
+a function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
+be an extension name (like `txt`), a mime type (like `text/plain`), or a mime
+type with a wildcard (like `*/*` or `text/*`). If a function, the `type`
+option is called as `fn(req)` and the request is parsed if it returns a
+truthy value. Defaults to `text/plain`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.urlencoded([options])
+
+Returns middleware that only parses `urlencoded` bodies and only looks at
+requests where the `Content-Type` header matches the `type` option. This
+parser accepts only UTF-8 encoding of the body and supports automatic
+inflation of `gzip` and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This object will contain
+key-value pairs, where the value can be a string or array (when `extended` is
+`false`), or any type (when `extended` is `true`).
+
+#### Options
+
+The `urlencoded` function takes an optional `options` object that may contain
+any of the following keys:
+
+##### extended
+
+The `extended` option allows to choose between parsing the URL-encoded data
+with the `querystring` library (when `false`) or the `qs` library (when
+`true`). The "extended" syntax allows for rich objects and arrays to be
+encoded into the URL-encoded format, allowing for a JSON-like experience
+with URL-encoded. For more information, please
+[see the qs library](https://www.npmjs.org/package/qs#readme).
+
+Defaults to `true`, but using the default has been deprecated. Please
+research into the difference between `qs` and `querystring` and choose the
+appropriate setting.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### parameterLimit
+
+The `parameterLimit` option controls the maximum number of parameters that
+are allowed in the URL-encoded data. If a request contains more parameters
+than this value, a 413 will be returned to the client. Defaults to `1000`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function. If not
+a function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
+be an extension name (like `urlencoded`), a mime type (like
+`application/x-www-form-urlencoded`), or a mime type with a wildcard (like
+`*/x-www-form-urlencoded`). If a function, the `type` option is called as
+`fn(req)` and the request is parsed if it returns a truthy value. Defaults
+to `application/x-www-form-urlencoded`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+## Errors
+
+The middlewares provided by this module create errors depending on the error
+condition during parsing. The errors will typically have a `status`/`statusCode`
+property that contains the suggested HTTP response code, an `expose` property
+to determine if the `message` property should be displayed to the client, a
+`type` property to determine the type of error without matching against the
+`message`, and a `body` property containing the read body, if available.
+
+The following are the common errors emitted, though any error can come through
+for various reasons.
+
+### content encoding unsupported
+
+This error will occur when the request had a `Content-Encoding` header that
+contained an encoding but the "inflation" option was set to `false`. The
+`status` property is set to `415`, the `type` property is set to
+`'encoding.unsupported'`, and the `charset` property will be set to the
+encoding that is unsupported.
+
+### request aborted
+
+This error will occur when the request is aborted by the client before reading
+the body has finished. The `received` property will be set to the number of
+bytes received before the request was aborted and the `expected` property is
+set to the number of expected bytes. The `status` property is set to `400`
+and `type` property is set to `'request.aborted'`.
+
+### request entity too large
+
+This error will occur when the request body's size is larger than the "limit"
+option. The `limit` property will be set to the byte limit and the `length`
+property will be set to the request body's length. The `status` property is
+set to `413` and the `type` property is set to `'entity.too.large'`.
+
+### request size did not match content length
+
+This error will occur when the request's length did not match the length from
+the `Content-Length` header. This typically occurs when the request is malformed,
+typically when the `Content-Length` header was calculated based on characters
+instead of bytes. The `status` property is set to `400` and the `type` property
+is set to `'request.size.invalid'`.
+
+### stream encoding should not be set
+
+This error will occur when something called the `req.setEncoding` method prior
+to this middleware. This module operates directly on bytes only and you cannot
+call `req.setEncoding` when using this module. The `status` property is set to
+`500` and the `type` property is set to `'stream.encoding.set'`.
+
+### too many parameters
+
+This error will occur when the content of the request exceeds the configured
+`parameterLimit` for the `urlencoded` parser. The `status` property is set to
+`413` and the `type` property is set to `'parameters.too.many'`.
+
+### unsupported charset "BOGUS"
+
+This error will occur when the request had a charset parameter in the
+`Content-Type` header, but the `iconv-lite` module does not support it OR the
+parser does not support it. The charset is contained in the message as well
+as in the `charset` property. The `status` property is set to `415`, the
+`type` property is set to `'charset.unsupported'`, and the `charset` property
+is set to the charset that is unsupported.
+
+### unsupported content encoding "bogus"
+
+This error will occur when the request had a `Content-Encoding` header that
+contained an unsupported encoding. The encoding is contained in the message
+as well as in the `encoding` property. The `status` property is set to `415`,
+the `type` property is set to `'encoding.unsupported'`, and the `encoding`
+property is set to the encoding that is unsupported.
+
+## Examples
+
+### Express/Connect top-level generic
+
+This example demonstrates adding a generic JSON and URL-encoded parser as a
+top-level middleware, which will parse the bodies of all incoming requests.
+This is the simplest setup.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// parse application/x-www-form-urlencoded
+app.use(bodyParser.urlencoded({ extended: false }))
+
+// parse application/json
+app.use(bodyParser.json())
+
+app.use(function (req, res) {
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('you posted:\n')
+ res.end(JSON.stringify(req.body, null, 2))
+})
+```
+
+### Express route-specific
+
+This example demonstrates adding body parsers specifically to the routes that
+need them. In general, this is the most recommended way to use body-parser with
+Express.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// create application/json parser
+var jsonParser = bodyParser.json()
+
+// create application/x-www-form-urlencoded parser
+var urlencodedParser = bodyParser.urlencoded({ extended: false })
+
+// POST /login gets urlencoded bodies
+app.post('/login', urlencodedParser, function (req, res) {
+ if (!req.body) return res.sendStatus(400)
+ res.send('welcome, ' + req.body.username)
+})
+
+// POST /api/users gets JSON bodies
+app.post('/api/users', jsonParser, function (req, res) {
+ if (!req.body) return res.sendStatus(400)
+ // create user in req.body
+})
+```
+
+### Change accepted type for parsers
+
+All the parsers accept a `type` option which allows you to change the
+`Content-Type` that the middleware will parse.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// parse various different custom JSON types as JSON
+app.use(bodyParser.json({ type: 'application/*+json' }))
+
+// parse some custom thing into a Buffer
+app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }))
+
+// parse an HTML body into a string
+app.use(bodyParser.text({ type: 'text/html' }))
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/body-parser.svg
+[npm-url]: https://npmjs.org/package/body-parser
+[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg
+[travis-url]: https://travis-ci.org/expressjs/body-parser
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
+[downloads-url]: https://npmjs.org/package/body-parser
diff --git a/node_modules/body-parser/index.js b/node_modules/body-parser/index.js
new file mode 100644
index 0000000..93c3a1f
--- /dev/null
+++ b/node_modules/body-parser/index.js
@@ -0,0 +1,157 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var deprecate = require('depd')('body-parser')
+
+/**
+ * Cache of loaded parsers.
+ * @private
+ */
+
+var parsers = Object.create(null)
+
+/**
+ * @typedef Parsers
+ * @type {function}
+ * @property {function} json
+ * @property {function} raw
+ * @property {function} text
+ * @property {function} urlencoded
+ */
+
+/**
+ * Module exports.
+ * @type {Parsers}
+ */
+
+exports = module.exports = deprecate.function(bodyParser,
+ 'bodyParser: use individual json/urlencoded middlewares')
+
+/**
+ * JSON parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'json', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('json')
+})
+
+/**
+ * Raw parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'raw', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('raw')
+})
+
+/**
+ * Text parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'text', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('text')
+})
+
+/**
+ * URL-encoded parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'urlencoded', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('urlencoded')
+})
+
+/**
+ * Create a middleware to parse json and urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @deprecated
+ * @public
+ */
+
+function bodyParser (options) {
+ var opts = {}
+
+ // exclude type option
+ if (options) {
+ for (var prop in options) {
+ if (prop !== 'type') {
+ opts[prop] = options[prop]
+ }
+ }
+ }
+
+ var _urlencoded = exports.urlencoded(opts)
+ var _json = exports.json(opts)
+
+ return function bodyParser (req, res, next) {
+ _json(req, res, function (err) {
+ if (err) return next(err)
+ _urlencoded(req, res, next)
+ })
+ }
+}
+
+/**
+ * Create a getter for loading a parser.
+ * @private
+ */
+
+function createParserGetter (name) {
+ return function get () {
+ return loadParser(name)
+ }
+}
+
+/**
+ * Load a parser module.
+ * @private
+ */
+
+function loadParser (parserName) {
+ var parser = parsers[parserName]
+
+ if (parser !== undefined) {
+ return parser
+ }
+
+ // this uses a switch for static require analysis
+ switch (parserName) {
+ case 'json':
+ parser = require('./lib/types/json')
+ break
+ case 'raw':
+ parser = require('./lib/types/raw')
+ break
+ case 'text':
+ parser = require('./lib/types/text')
+ break
+ case 'urlencoded':
+ parser = require('./lib/types/urlencoded')
+ break
+ }
+
+ // store to prevent invoking require()
+ return (parsers[parserName] = parser)
+}
diff --git a/node_modules/body-parser/lib/read.js b/node_modules/body-parser/lib/read.js
new file mode 100644
index 0000000..c102609
--- /dev/null
+++ b/node_modules/body-parser/lib/read.js
@@ -0,0 +1,181 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var createError = require('http-errors')
+var getBody = require('raw-body')
+var iconv = require('iconv-lite')
+var onFinished = require('on-finished')
+var zlib = require('zlib')
+
+/**
+ * Module exports.
+ */
+
+module.exports = read
+
+/**
+ * Read a request into a buffer and parse.
+ *
+ * @param {object} req
+ * @param {object} res
+ * @param {function} next
+ * @param {function} parse
+ * @param {function} debug
+ * @param {object} options
+ * @private
+ */
+
+function read (req, res, next, parse, debug, options) {
+ var length
+ var opts = options
+ var stream
+
+ // flag as parsed
+ req._body = true
+
+ // read options
+ var encoding = opts.encoding !== null
+ ? opts.encoding
+ : null
+ var verify = opts.verify
+
+ try {
+ // get the content stream
+ stream = contentstream(req, debug, opts.inflate)
+ length = stream.length
+ stream.length = undefined
+ } catch (err) {
+ return next(err)
+ }
+
+ // set raw-body options
+ opts.length = length
+ opts.encoding = verify
+ ? null
+ : encoding
+
+ // assert charset is supported
+ if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
+ return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
+ charset: encoding.toLowerCase(),
+ type: 'charset.unsupported'
+ }))
+ }
+
+ // read body
+ debug('read body')
+ getBody(stream, opts, function (error, body) {
+ if (error) {
+ var _error
+
+ if (error.type === 'encoding.unsupported') {
+ // echo back charset
+ _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
+ charset: encoding.toLowerCase(),
+ type: 'charset.unsupported'
+ })
+ } else {
+ // set status code on error
+ _error = createError(400, error)
+ }
+
+ // read off entire request
+ stream.resume()
+ onFinished(req, function onfinished () {
+ next(createError(400, _error))
+ })
+ return
+ }
+
+ // verify
+ if (verify) {
+ try {
+ debug('verify body')
+ verify(req, res, body, encoding)
+ } catch (err) {
+ next(createError(403, err, {
+ body: body,
+ type: err.type || 'entity.verify.failed'
+ }))
+ return
+ }
+ }
+
+ // parse
+ var str = body
+ try {
+ debug('parse body')
+ str = typeof body !== 'string' && encoding !== null
+ ? iconv.decode(body, encoding)
+ : body
+ req.body = parse(str)
+ } catch (err) {
+ next(createError(400, err, {
+ body: str,
+ type: err.type || 'entity.parse.failed'
+ }))
+ return
+ }
+
+ next()
+ })
+}
+
+/**
+ * Get the content stream of the request.
+ *
+ * @param {object} req
+ * @param {function} debug
+ * @param {boolean} [inflate=true]
+ * @return {object}
+ * @api private
+ */
+
+function contentstream (req, debug, inflate) {
+ var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
+ var length = req.headers['content-length']
+ var stream
+
+ debug('content-encoding "%s"', encoding)
+
+ if (inflate === false && encoding !== 'identity') {
+ throw createError(415, 'content encoding unsupported', {
+ encoding: encoding,
+ type: 'encoding.unsupported'
+ })
+ }
+
+ switch (encoding) {
+ case 'deflate':
+ stream = zlib.createInflate()
+ debug('inflate body')
+ req.pipe(stream)
+ break
+ case 'gzip':
+ stream = zlib.createGunzip()
+ debug('gunzip body')
+ req.pipe(stream)
+ break
+ case 'identity':
+ stream = req
+ stream.length = length
+ break
+ default:
+ throw createError(415, 'unsupported content encoding "' + encoding + '"', {
+ encoding: encoding,
+ type: 'encoding.unsupported'
+ })
+ }
+
+ return stream
+}
diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js
new file mode 100644
index 0000000..2971dc1
--- /dev/null
+++ b/node_modules/body-parser/lib/types/json.js
@@ -0,0 +1,230 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var createError = require('http-errors')
+var debug = require('debug')('body-parser:json')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = json
+
+/**
+ * RegExp to match the first non-space in a string.
+ *
+ * Allowed whitespace is defined in RFC 7159:
+ *
+ * ws = *(
+ * %x20 / ; Space
+ * %x09 / ; Horizontal tab
+ * %x0A / ; Line feed or New line
+ * %x0D ) ; Carriage return
+ */
+
+var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex
+
+/**
+ * Create a middleware to parse JSON bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function json (options) {
+ var opts = options || {}
+
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var inflate = opts.inflate !== false
+ var reviver = opts.reviver
+ var strict = opts.strict !== false
+ var type = opts.type || 'application/json'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (body) {
+ if (body.length === 0) {
+ // special-case empty json body, as it's a common client-side mistake
+ // TODO: maybe make this configurable or part of "strict" option
+ return {}
+ }
+
+ if (strict) {
+ var first = firstchar(body)
+
+ if (first !== '{' && first !== '[') {
+ debug('strict violation')
+ throw createStrictSyntaxError(body, first)
+ }
+ }
+
+ try {
+ debug('parse json')
+ return JSON.parse(body, reviver)
+ } catch (e) {
+ throw normalizeJsonSyntaxError(e, {
+ message: e.message,
+ stack: e.stack
+ })
+ }
+ }
+
+ return function jsonParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // assert charset per RFC 7159 sec 8.1
+ var charset = getCharset(req) || 'utf-8'
+ if (charset.substr(0, 4) !== 'utf-') {
+ debug('invalid charset')
+ next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
+ charset: charset,
+ type: 'charset.unsupported'
+ }))
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Create strict violation syntax error matching native error.
+ *
+ * @param {string} str
+ * @param {string} char
+ * @return {Error}
+ * @private
+ */
+
+function createStrictSyntaxError (str, char) {
+ var index = str.indexOf(char)
+ var partial = str.substring(0, index) + '#'
+
+ try {
+ JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
+ } catch (e) {
+ return normalizeJsonSyntaxError(e, {
+ message: e.message.replace('#', char),
+ stack: e.stack
+ })
+ }
+}
+
+/**
+ * Get the first non-whitespace character in a string.
+ *
+ * @param {string} str
+ * @return {function}
+ * @private
+ */
+
+function firstchar (str) {
+ return FIRST_CHAR_REGEXP.exec(str)[1]
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return (contentType.parse(req).parameters.charset || '').toLowerCase()
+ } catch (e) {
+ return undefined
+ }
+}
+
+/**
+ * Normalize a SyntaxError for JSON.parse.
+ *
+ * @param {SyntaxError} error
+ * @param {object} obj
+ * @return {SyntaxError}
+ */
+
+function normalizeJsonSyntaxError (error, obj) {
+ var keys = Object.getOwnPropertyNames(error)
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i]
+ if (key !== 'stack' && key !== 'message') {
+ delete error[key]
+ }
+ }
+
+ // replace stack before message for Node.js 0.10 and below
+ error.stack = obj.stack.replace(error.message, obj.message)
+ error.message = obj.message
+
+ return error
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/node_modules/body-parser/lib/types/raw.js b/node_modules/body-parser/lib/types/raw.js
new file mode 100644
index 0000000..f5d1b67
--- /dev/null
+++ b/node_modules/body-parser/lib/types/raw.js
@@ -0,0 +1,101 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var debug = require('debug')('body-parser:raw')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = raw
+
+/**
+ * Create a middleware to parse raw bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function raw (options) {
+ var opts = options || {}
+
+ var inflate = opts.inflate !== false
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var type = opts.type || 'application/octet-stream'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (buf) {
+ return buf
+ }
+
+ return function rawParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: null,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/node_modules/body-parser/lib/types/text.js b/node_modules/body-parser/lib/types/text.js
new file mode 100644
index 0000000..083a009
--- /dev/null
+++ b/node_modules/body-parser/lib/types/text.js
@@ -0,0 +1,121 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var debug = require('debug')('body-parser:text')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = text
+
+/**
+ * Create a middleware to parse text bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function text (options) {
+ var opts = options || {}
+
+ var defaultCharset = opts.defaultCharset || 'utf-8'
+ var inflate = opts.inflate !== false
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var type = opts.type || 'text/plain'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (buf) {
+ return buf
+ }
+
+ return function textParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // get charset
+ var charset = getCharset(req) || defaultCharset
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return (contentType.parse(req).parameters.charset || '').toLowerCase()
+ } catch (e) {
+ return undefined
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/body-parser/lib/types/urlencoded.js
new file mode 100644
index 0000000..5ccda21
--- /dev/null
+++ b/node_modules/body-parser/lib/types/urlencoded.js
@@ -0,0 +1,284 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var createError = require('http-errors')
+var debug = require('debug')('body-parser:urlencoded')
+var deprecate = require('depd')('body-parser')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = urlencoded
+
+/**
+ * Cache of parser modules.
+ */
+
+var parsers = Object.create(null)
+
+/**
+ * Create a middleware to parse urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function urlencoded (options) {
+ var opts = options || {}
+
+ // notice because option default will flip in next major
+ if (opts.extended === undefined) {
+ deprecate('undefined extended: provide extended option')
+ }
+
+ var extended = opts.extended !== false
+ var inflate = opts.inflate !== false
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var type = opts.type || 'application/x-www-form-urlencoded'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate query parser
+ var queryparse = extended
+ ? extendedparser(opts)
+ : simpleparser(opts)
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (body) {
+ return body.length
+ ? queryparse(body)
+ : {}
+ }
+
+ return function urlencodedParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // assert charset
+ var charset = getCharset(req) || 'utf-8'
+ if (charset !== 'utf-8') {
+ debug('invalid charset')
+ next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
+ charset: charset,
+ type: 'charset.unsupported'
+ }))
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ debug: debug,
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the extended query parser.
+ *
+ * @param {object} options
+ */
+
+function extendedparser (options) {
+ var parameterLimit = options.parameterLimit !== undefined
+ ? options.parameterLimit
+ : 1000
+ var parse = parser('qs')
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse (body) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ debug('too many parameters')
+ throw createError(413, 'too many parameters', {
+ type: 'parameters.too.many'
+ })
+ }
+
+ var arrayLimit = Math.max(100, paramCount)
+
+ debug('parse extended urlencoding')
+ return parse(body, {
+ allowPrototypes: true,
+ arrayLimit: arrayLimit,
+ depth: Infinity,
+ parameterLimit: parameterLimit
+ })
+ }
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return (contentType.parse(req).parameters.charset || '').toLowerCase()
+ } catch (e) {
+ return undefined
+ }
+}
+
+/**
+ * Count the number of parameters, stopping once limit reached
+ *
+ * @param {string} body
+ * @param {number} limit
+ * @api private
+ */
+
+function parameterCount (body, limit) {
+ var count = 0
+ var index = 0
+
+ while ((index = body.indexOf('&', index)) !== -1) {
+ count++
+ index++
+
+ if (count === limit) {
+ return undefined
+ }
+ }
+
+ return count
+}
+
+/**
+ * Get parser for module name dynamically.
+ *
+ * @param {string} name
+ * @return {function}
+ * @api private
+ */
+
+function parser (name) {
+ var mod = parsers[name]
+
+ if (mod !== undefined) {
+ return mod.parse
+ }
+
+ // this uses a switch for static require analysis
+ switch (name) {
+ case 'qs':
+ mod = require('qs')
+ break
+ case 'querystring':
+ mod = require('querystring')
+ break
+ }
+
+ // store to prevent invoking require()
+ parsers[name] = mod
+
+ return mod.parse
+}
+
+/**
+ * Get the simple query parser.
+ *
+ * @param {object} options
+ */
+
+function simpleparser (options) {
+ var parameterLimit = options.parameterLimit !== undefined
+ ? options.parameterLimit
+ : 1000
+ var parse = parser('querystring')
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse (body) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ debug('too many parameters')
+ throw createError(413, 'too many parameters', {
+ type: 'parameters.too.many'
+ })
+ }
+
+ debug('parse urlencoding')
+ return parse(body, undefined, undefined, {maxKeys: parameterLimit})
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/node_modules/body-parser/package.json b/node_modules/body-parser/package.json
new file mode 100644
index 0000000..a5c24fd
--- /dev/null
+++ b/node_modules/body-parser/package.json
@@ -0,0 +1,91 @@
+{
+ "_from": "body-parser@1.18.3",
+ "_id": "body-parser@1.18.3",
+ "_inBundle": false,
+ "_integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
+ "_location": "/body-parser",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "body-parser@1.18.3",
+ "name": "body-parser",
+ "escapedName": "body-parser",
+ "rawSpec": "1.18.3",
+ "saveSpec": null,
+ "fetchSpec": "1.18.3"
+ },
+ "_requiredBy": [
+ "/express"
+ ],
+ "_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
+ "_shasum": "5b292198ffdd553b3a0f20ded0592b956955c8b4",
+ "_spec": "body-parser@1.18.3",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "bugs": {
+ "url": "https://github.com/expressjs/body-parser/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "dependencies": {
+ "bytes": "3.0.0",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "http-errors": "~1.6.3",
+ "iconv-lite": "0.4.23",
+ "on-finished": "~2.3.0",
+ "qs": "6.5.2",
+ "raw-body": "2.3.3",
+ "type-is": "~1.6.16"
+ },
+ "deprecated": false,
+ "description": "Node.js body parsing middleware",
+ "devDependencies": {
+ "eslint": "4.19.1",
+ "eslint-config-standard": "11.0.0",
+ "eslint-plugin-import": "2.11.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "6.0.1",
+ "eslint-plugin-promise": "3.7.0",
+ "eslint-plugin-standard": "3.1.0",
+ "istanbul": "0.4.5",
+ "methods": "1.1.2",
+ "mocha": "2.5.3",
+ "safe-buffer": "5.1.2",
+ "supertest": "1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "lib/",
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/expressjs/body-parser#readme",
+ "license": "MIT",
+ "name": "body-parser",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/expressjs/body-parser.git"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/"
+ },
+ "version": "1.18.3"
+}
diff --git a/node_modules/bonjour/.npmignore b/node_modules/bonjour/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/bonjour/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/bonjour/.travis.yml b/node_modules/bonjour/.travis.yml
new file mode 100644
index 0000000..562298c
--- /dev/null
+++ b/node_modules/bonjour/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+os:
+- linux
+- osx
+node_js:
+- '6'
+- '5'
+- '4'
+- '0.12'
+- '0.10'
diff --git a/node_modules/bonjour/LICENSE b/node_modules/bonjour/LICENSE
new file mode 100644
index 0000000..ee5acbb
--- /dev/null
+++ b/node_modules/bonjour/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2016 Thomas Watson Steen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/bonjour/README.md b/node_modules/bonjour/README.md
new file mode 100644
index 0000000..31b5f47
--- /dev/null
+++ b/node_modules/bonjour/README.md
@@ -0,0 +1,181 @@
+# bonjour
+
+A Bonjour/Zeroconf protocol implementation in pure JavaScript. Publish
+services on the local network or discover existing services using
+multicast DNS.
+
+[](https://travis-ci.org/watson/bonjour)
+[](https://github.com/feross/standard)
+
+## Installation
+
+```
+npm install bonjour
+```
+
+## Usage
+
+```js
+var bonjour = require('bonjour')()
+
+// advertise an HTTP server on port 3000
+bonjour.publish({ name: 'My Web Server', type: 'http', port: 3000 })
+
+// browse for all http services
+bonjour.find({ type: 'http' }, function (service) {
+ console.log('Found an HTTP server:', service)
+})
+```
+
+## API
+
+### Initializing
+
+```js
+var bonjour = require('bonjour')([options])
+```
+
+The `options` are optional and will be used when initializing the
+underlying multicast-dns server. For details see [the multicast-dns
+documentation](https://github.com/mafintosh/multicast-dns#mdns--multicastdnsoptions).
+
+### Publishing
+
+#### `var service = bonjour.publish(options)`
+
+Publishes a new service.
+
+Options are:
+
+- `name` (string)
+- `host` (string, optional) - defaults to local hostname
+- `port` (number)
+- `type` (string)
+- `subtypes` (array of strings, optional)
+- `protocol` (string, optional) - `udp` or `tcp` (default)
+- `txt` (object, optional) - a key/value object to broadcast as the TXT
+ record
+
+IANA maintains a [list of official service types and port
+numbers](http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml).
+
+#### `bonjour.unpublishAll([callback])`
+
+Unpublish all services. The optional `callback` will be called when the
+services have been unpublished.
+
+#### `bonjour.destroy()`
+
+Destroy the mdns instance. Closes the udp socket.
+
+### Browser
+
+#### `var browser = bonjour.find(options[, onup])`
+
+Listen for services advertised on the network. An optional callback can
+be provided as the 2nd argument and will be added as an event listener
+for the `up` event.
+
+Options (all optional):
+
+- `type` (string)
+- `subtypes` (array of strings)
+- `protocol` (string) - defaults to `tcp`
+- `txt` (object) - passed into [dns-txt
+ module](https://github.com/watson/dns-txt) contructor. Set to `{
+ binary: true }` if you want to keep the TXT records in binary
+
+#### `var browser = bonjour.findOne(options[, callback])`
+
+Listen for and call the `callback` with the first instance of a service
+matching the `options`. If no `callback` is given, it's expected that
+you listen for the `up` event. The returned `browser` will automatically
+stop it self after the first matching service.
+
+Options are the same as given in the `browser.find` function.
+
+#### `Event: up`
+
+Emitted every time a new service is found that matches the browser.
+
+#### `Event: down`
+
+Emitted every time an existing service emmits a goodbye message.
+
+#### `browser.services`
+
+An array of services known by the browser to be online.
+
+#### `browser.start()`
+
+Start looking for matching services.
+
+#### `browser.stop()`
+
+Stop looking for matching services.
+
+#### `browser.update()`
+
+Broadcast the query again.
+
+### Service
+
+#### `Event: up`
+
+Emitted when the service is up.
+
+#### `Event: error`
+
+Emitted if an error occurrs while publishing the service.
+
+#### `service.stop([callback])`
+
+Unpublish the service. The optional `callback` will be called when the
+service have been unpublished.
+
+#### `service.start()`
+
+Publish the service.
+
+#### `service.name`
+
+The name of the service, e.g. `Apple TV`.
+
+#### `service.type`
+
+The type of the service, e.g. `http`.
+
+#### `service.subtypes`
+
+An array of subtypes. Note that this property might be `null`.
+
+#### `service.protocol`
+
+The protocol used by the service, e.g. `tcp`.
+
+#### `service.host`
+
+The hostname or ip address where the service resides.
+
+#### `service.port`
+
+The port on which the service listens, e.g. `5000`.
+
+#### `service.fqdn`
+
+The fully qualified domain name of the service. E.g. if given the name
+`Foo Bar`, the type `http` and the protocol `tcp`, the `service.fqdn`
+property will be `Foo Bar._http._tcp.local`.
+
+#### `service.txt`
+
+The TXT record advertised by the service (a key/value object). Note that
+this property might be `null`.
+
+#### `service.published`
+
+A boolean indicating if the service is currently published.
+
+## License
+
+MIT
diff --git a/node_modules/bonjour/index.js b/node_modules/bonjour/index.js
new file mode 100644
index 0000000..bb9c1c2
--- /dev/null
+++ b/node_modules/bonjour/index.js
@@ -0,0 +1,39 @@
+'use strict'
+
+var Registry = require('./lib/registry')
+var Server = require('./lib/mdns-server')
+var Browser = require('./lib/browser')
+
+module.exports = Bonjour
+
+function Bonjour (opts) {
+ if (!(this instanceof Bonjour)) return new Bonjour(opts)
+ this._server = new Server(opts)
+ this._registry = new Registry(this._server)
+}
+
+Bonjour.prototype.publish = function (opts) {
+ return this._registry.publish(opts)
+}
+
+Bonjour.prototype.unpublishAll = function (cb) {
+ this._registry.unpublishAll(cb)
+}
+
+Bonjour.prototype.find = function (opts, onup) {
+ return new Browser(this._server.mdns, opts, onup)
+}
+
+Bonjour.prototype.findOne = function (opts, cb) {
+ var browser = new Browser(this._server.mdns, opts)
+ browser.once('up', function (service) {
+ browser.stop()
+ if (cb) cb(service)
+ })
+ return browser
+}
+
+Bonjour.prototype.destroy = function () {
+ this._registry.destroy()
+ this._server.mdns.destroy()
+}
diff --git a/node_modules/bonjour/lib/browser.js b/node_modules/bonjour/lib/browser.js
new file mode 100644
index 0000000..ba34e8b
--- /dev/null
+++ b/node_modules/bonjour/lib/browser.js
@@ -0,0 +1,198 @@
+'use strict'
+
+var util = require('util')
+var EventEmitter = require('events').EventEmitter
+var serviceName = require('multicast-dns-service-types')
+var dnsEqual = require('dns-equal')
+var dnsTxt = require('dns-txt')
+
+var TLD = '.local'
+var WILDCARD = '_services._dns-sd._udp' + TLD
+
+module.exports = Browser
+
+util.inherits(Browser, EventEmitter)
+
+/**
+ * Start a browser
+ *
+ * The browser listens for services by querying for PTR records of a given
+ * type, protocol and domain, e.g. _http._tcp.local.
+ *
+ * If no type is given, a wild card search is performed.
+ *
+ * An internal list of online services is kept which starts out empty. When
+ * ever a new service is discovered, it's added to the list and an "up" event
+ * is emitted with that service. When it's discovered that the service is no
+ * longer available, it is removed from the list and a "down" event is emitted
+ * with that service.
+ */
+function Browser (mdns, opts, onup) {
+ if (typeof opts === 'function') return new Browser(mdns, null, opts)
+
+ EventEmitter.call(this)
+
+ this._mdns = mdns
+ this._onresponse = null
+ this._serviceMap = {}
+ this._txt = dnsTxt(opts.txt)
+
+ if (!opts || !opts.type) {
+ this._name = WILDCARD
+ this._wildcard = true
+ } else {
+ this._name = serviceName.stringify(opts.type, opts.protocol || 'tcp') + TLD
+ if (opts.name) this._name = opts.name + '.' + this._name
+ this._wildcard = false
+ }
+
+ this.services = []
+
+ if (onup) this.on('up', onup)
+
+ this.start()
+}
+
+Browser.prototype.start = function () {
+ if (this._onresponse) return
+
+ var self = this
+
+ // List of names for the browser to listen for. In a normal search this will
+ // be the primary name stored on the browser. In case of a wildcard search
+ // the names will be determined at runtime as responses come in.
+ var nameMap = {}
+ if (!this._wildcard) nameMap[this._name] = true
+
+ this._onresponse = function (packet, rinfo) {
+ if (self._wildcard) {
+ packet.answers.forEach(function (answer) {
+ if (answer.type !== 'PTR' || answer.name !== self._name || answer.name in nameMap) return
+ nameMap[answer.data] = true
+ self._mdns.query(answer.data, 'PTR')
+ })
+ }
+
+ Object.keys(nameMap).forEach(function (name) {
+ // unregister all services shutting down
+ goodbyes(name, packet).forEach(self._removeService.bind(self))
+
+ // register all new services
+ var matches = buildServicesFor(name, packet, self._txt, rinfo)
+ if (matches.length === 0) return
+
+ matches.forEach(function (service) {
+ if (self._serviceMap[service.fqdn]) return // ignore already registered services
+ self._addService(service)
+ })
+ })
+ }
+
+ this._mdns.on('response', this._onresponse)
+ this.update()
+}
+
+Browser.prototype.stop = function () {
+ if (!this._onresponse) return
+
+ this._mdns.removeListener('response', this._onresponse)
+ this._onresponse = null
+}
+
+Browser.prototype.update = function () {
+ this._mdns.query(this._name, 'PTR')
+}
+
+Browser.prototype._addService = function (service) {
+ this.services.push(service)
+ this._serviceMap[service.fqdn] = true
+ this.emit('up', service)
+}
+
+Browser.prototype._removeService = function (fqdn) {
+ var service, index
+ this.services.some(function (s, i) {
+ if (dnsEqual(s.fqdn, fqdn)) {
+ service = s
+ index = i
+ return true
+ }
+ })
+ if (!service) return
+ this.services.splice(index, 1)
+ delete this._serviceMap[fqdn]
+ this.emit('down', service)
+}
+
+// PTR records with a TTL of 0 is considered a "goodbye" announcement. I.e. a
+// DNS response broadcasted when a service shuts down in order to let the
+// network know that the service is no longer going to be available.
+//
+// For more info see:
+// https://tools.ietf.org/html/rfc6762#section-8.4
+//
+// This function returns an array of all resource records considered a goodbye
+// record
+function goodbyes (name, packet) {
+ return packet.answers.concat(packet.additionals)
+ .filter(function (rr) {
+ return rr.type === 'PTR' && rr.ttl === 0 && dnsEqual(rr.name, name)
+ })
+ .map(function (rr) {
+ return rr.data
+ })
+}
+
+function buildServicesFor (name, packet, txt, referer) {
+ var records = packet.answers.concat(packet.additionals).filter(function (rr) {
+ return rr.ttl > 0 // ignore goodbye messages
+ })
+
+ return records
+ .filter(function (rr) {
+ return rr.type === 'PTR' && dnsEqual(rr.name, name)
+ })
+ .map(function (ptr) {
+ var service = {
+ addresses: []
+ }
+
+ records
+ .filter(function (rr) {
+ return (rr.type === 'SRV' || rr.type === 'TXT') && dnsEqual(rr.name, ptr.data)
+ })
+ .forEach(function (rr) {
+ if (rr.type === 'SRV') {
+ var parts = rr.name.split('.')
+ var name = parts[0]
+ var types = serviceName.parse(parts.slice(1, -1).join('.'))
+ service.name = name
+ service.fqdn = rr.name
+ service.host = rr.data.target
+ service.referer = referer
+ service.port = rr.data.port
+ service.type = types.name
+ service.protocol = types.protocol
+ service.subtypes = types.subtypes
+ } else if (rr.type === 'TXT') {
+ service.rawTxt = rr.data
+ service.txt = txt.decode(rr.data)
+ }
+ })
+
+ if (!service.name) return
+
+ records
+ .filter(function (rr) {
+ return (rr.type === 'A' || rr.type === 'AAAA') && dnsEqual(rr.name, service.host)
+ })
+ .forEach(function (rr) {
+ service.addresses.push(rr.data)
+ })
+
+ return service
+ })
+ .filter(function (rr) {
+ return !!rr
+ })
+}
diff --git a/node_modules/bonjour/lib/mdns-server.js b/node_modules/bonjour/lib/mdns-server.js
new file mode 100644
index 0000000..82a6b54
--- /dev/null
+++ b/node_modules/bonjour/lib/mdns-server.js
@@ -0,0 +1,116 @@
+'use strict'
+
+var multicastdns = require('multicast-dns')
+var dnsEqual = require('dns-equal')
+var flatten = require('array-flatten')
+var deepEqual = require('deep-equal')
+
+module.exports = Server
+
+function Server (opts) {
+ this.mdns = multicastdns(opts)
+ this.mdns.setMaxListeners(0)
+ this.registry = {}
+ this.mdns.on('query', this._respondToQuery.bind(this))
+}
+
+Server.prototype.register = function (records) {
+ var self = this
+
+ if (Array.isArray(records)) records.forEach(register)
+ else register(records)
+
+ function register (record) {
+ var subRegistry = self.registry[record.type]
+ if (!subRegistry) subRegistry = self.registry[record.type] = []
+ else if (subRegistry.some(isDuplicateRecord(record))) return
+ subRegistry.push(record)
+ }
+}
+
+Server.prototype.unregister = function (records) {
+ var self = this
+
+ if (Array.isArray(records)) records.forEach(unregister)
+ else unregister(records)
+
+ function unregister (record) {
+ var type = record.type
+ if (!(type in self.registry)) return
+ self.registry[type] = self.registry[type].filter(function (r) {
+ return r.name !== record.name
+ })
+ }
+}
+
+Server.prototype._respondToQuery = function (query) {
+ var self = this
+ query.questions.forEach(function (question) {
+ var type = question.type
+ var name = question.name
+
+ // generate the answers section
+ var answers = type === 'ANY'
+ ? flatten.depth(Object.keys(self.registry).map(self._recordsFor.bind(self, name)), 1)
+ : self._recordsFor(name, type)
+
+ if (answers.length === 0) return
+
+ // generate the additionals section
+ var additionals = []
+ if (type !== 'ANY') {
+ answers.forEach(function (answer) {
+ if (answer.type !== 'PTR') return
+ additionals = additionals
+ .concat(self._recordsFor(answer.data, 'SRV'))
+ .concat(self._recordsFor(answer.data, 'TXT'))
+ })
+
+ // to populate the A and AAAA records, we need to get a set of unique
+ // targets from the SRV record
+ additionals
+ .filter(function (record) {
+ return record.type === 'SRV'
+ })
+ .map(function (record) {
+ return record.data.target
+ })
+ .filter(unique())
+ .forEach(function (target) {
+ additionals = additionals
+ .concat(self._recordsFor(target, 'A'))
+ .concat(self._recordsFor(target, 'AAAA'))
+ })
+ }
+
+ self.mdns.respond({ answers: answers, additionals: additionals }, function (err) {
+ if (err) throw err // TODO: Handle this (if no callback is given, the error will be ignored)
+ })
+ })
+}
+
+Server.prototype._recordsFor = function (name, type) {
+ if (!(type in this.registry)) return []
+
+ return this.registry[type].filter(function (record) {
+ var _name = ~name.indexOf('.') ? record.name : record.name.split('.')[0]
+ return dnsEqual(_name, name)
+ })
+}
+
+function isDuplicateRecord (a) {
+ return function (b) {
+ return a.type === b.type &&
+ a.name === b.name &&
+ deepEqual(a.data, b.data)
+ }
+}
+
+function unique () {
+ var set = []
+ return function (obj) {
+ if (~set.indexOf(obj)) return false
+ set.push(obj)
+ return true
+ }
+}
diff --git a/node_modules/bonjour/lib/registry.js b/node_modules/bonjour/lib/registry.js
new file mode 100644
index 0000000..04e57d7
--- /dev/null
+++ b/node_modules/bonjour/lib/registry.js
@@ -0,0 +1,189 @@
+'use strict'
+
+var dnsEqual = require('dns-equal')
+var flatten = require('array-flatten')
+var Service = require('./service')
+
+var REANNOUNCE_MAX_MS = 60 * 60 * 1000
+var REANNOUNCE_FACTOR = 3
+
+module.exports = Registry
+
+function Registry (server) {
+ this._server = server
+ this._services = []
+}
+
+Registry.prototype.publish = function (opts) {
+ var service = new Service(opts)
+ service.start = start.bind(service, this)
+ service.stop = stop.bind(service, this)
+ service.start({ probe: opts.probe !== false })
+ return service
+}
+
+Registry.prototype.unpublishAll = function (cb) {
+ teardown(this._server, this._services, cb)
+ this._services = []
+}
+
+Registry.prototype.destroy = function () {
+ this._services.forEach(function (service) {
+ service._destroyed = true
+ })
+}
+
+function start (registry, opts) {
+ if (this._activated) return
+ this._activated = true
+
+ registry._services.push(this)
+
+ if (opts.probe) {
+ var service = this
+ probe(registry._server.mdns, this, function (exists) {
+ if (exists) {
+ service.stop()
+ service.emit('error', new Error('Service name is already in use on the network'))
+ return
+ }
+ announce(registry._server, service)
+ })
+ } else {
+ announce(registry._server, this)
+ }
+}
+
+function stop (registry, cb) {
+ if (!this._activated) return // TODO: What about the callback?
+
+ teardown(registry._server, this, cb)
+
+ var index = registry._services.indexOf(this)
+ if (index !== -1) registry._services.splice(index, 1)
+}
+
+/**
+ * Check if a service name is already in use on the network.
+ *
+ * Used before announcing the new service.
+ *
+ * To guard against race conditions where multiple services are started
+ * simultaneously on the network, wait a random amount of time (between
+ * 0 and 250 ms) before probing.
+ *
+ * TODO: Add support for Simultaneous Probe Tiebreaking:
+ * https://tools.ietf.org/html/rfc6762#section-8.2
+ */
+function probe (mdns, service, cb) {
+ var sent = false
+ var retries = 0
+ var timer
+
+ mdns.on('response', onresponse)
+ setTimeout(send, Math.random() * 250)
+
+ function send () {
+ // abort if the service have or is being stopped in the meantime
+ if (!service._activated || service._destroyed) return
+
+ mdns.query(service.fqdn, 'ANY', function () {
+ // This function will optionally be called with an error object. We'll
+ // just silently ignore it and retry as we normally would
+ sent = true
+ timer = setTimeout(++retries < 3 ? send : done, 250)
+ timer.unref()
+ })
+ }
+
+ function onresponse (packet) {
+ // Apparently conflicting Multicast DNS responses received *before*
+ // the first probe packet is sent MUST be silently ignored (see
+ // discussion of stale probe packets in RFC 6762 Section 8.2,
+ // "Simultaneous Probe Tiebreaking" at
+ // https://tools.ietf.org/html/rfc6762#section-8.2
+ if (!sent) return
+
+ if (packet.answers.some(matchRR) || packet.additionals.some(matchRR)) done(true)
+ }
+
+ function matchRR (rr) {
+ return dnsEqual(rr.name, service.fqdn)
+ }
+
+ function done (exists) {
+ mdns.removeListener('response', onresponse)
+ clearTimeout(timer)
+ cb(!!exists)
+ }
+}
+
+/**
+ * Initial service announcement
+ *
+ * Used to announce new services when they are first registered.
+ *
+ * Broadcasts right away, then after 3 seconds, 9 seconds, 27 seconds,
+ * and so on, up to a maximum interval of one hour.
+ */
+function announce (server, service) {
+ var delay = 1000
+ var packet = service._records()
+
+ server.register(packet)
+
+ ;(function broadcast () {
+ // abort if the service have or is being stopped in the meantime
+ if (!service._activated || service._destroyed) return
+
+ server.mdns.respond(packet, function () {
+ // This function will optionally be called with an error object. We'll
+ // just silently ignore it and retry as we normally would
+ if (!service.published) {
+ service._activated = true
+ service.published = true
+ service.emit('up')
+ }
+ delay = delay * REANNOUNCE_FACTOR
+ if (delay < REANNOUNCE_MAX_MS && !service._destroyed) {
+ setTimeout(broadcast, delay).unref()
+ }
+ })
+ })()
+}
+
+/**
+ * Stop the given services
+ *
+ * Besides removing a service from the mDNS registry, a "goodbye"
+ * message is sent for each service to let the network know about the
+ * shutdown.
+ */
+function teardown (server, services, cb) {
+ if (!Array.isArray(services)) services = [services]
+
+ services = services.filter(function (service) {
+ return service._activated // ignore services not currently starting or started
+ })
+
+ var records = flatten.depth(services.map(function (service) {
+ service._activated = false
+ var records = service._records()
+ records.forEach(function (record) {
+ record.ttl = 0 // prepare goodbye message
+ })
+ return records
+ }), 1)
+
+ if (records.length === 0) return cb && cb()
+
+ server.unregister(records)
+
+ // send goodbye message
+ server.mdns.respond(records, function () {
+ services.forEach(function (service) {
+ service.published = false
+ })
+ if (cb) cb.apply(null, arguments)
+ })
+}
diff --git a/node_modules/bonjour/lib/service.js b/node_modules/bonjour/lib/service.js
new file mode 100644
index 0000000..091d196
--- /dev/null
+++ b/node_modules/bonjour/lib/service.js
@@ -0,0 +1,98 @@
+'use strict'
+
+var os = require('os')
+var util = require('util')
+var EventEmitter = require('events').EventEmitter
+var serviceName = require('multicast-dns-service-types')
+var txt = require('dns-txt')()
+
+var TLD = '.local'
+
+module.exports = Service
+
+util.inherits(Service, EventEmitter)
+
+function Service (opts) {
+ if (!opts.name) throw new Error('Required name not given')
+ if (!opts.type) throw new Error('Required type not given')
+ if (!opts.port) throw new Error('Required port not given')
+
+ this.name = opts.name
+ this.protocol = opts.protocol || 'tcp'
+ this.type = serviceName.stringify(opts.type, this.protocol)
+ this.host = opts.host || os.hostname()
+ this.port = opts.port
+ this.fqdn = this.name + '.' + this.type + TLD
+ this.subtypes = opts.subtypes || null
+ this.txt = opts.txt || null
+ this.published = false
+
+ this._activated = false // indicates intent - true: starting/started, false: stopping/stopped
+}
+
+Service.prototype._records = function () {
+ var records = [rr_ptr(this), rr_srv(this), rr_txt(this)]
+
+ var self = this
+ var interfaces = os.networkInterfaces()
+ Object.keys(interfaces).forEach(function (name) {
+ interfaces[name].forEach(function (addr) {
+ if (addr.internal) return
+ if (addr.family === 'IPv4') {
+ records.push(rr_a(self, addr.address))
+ } else {
+ records.push(rr_aaaa(self, addr.address))
+ }
+ })
+ })
+
+ return records
+}
+
+function rr_ptr (service) {
+ return {
+ name: service.type + TLD,
+ type: 'PTR',
+ ttl: 28800,
+ data: service.fqdn
+ }
+}
+
+function rr_srv (service) {
+ return {
+ name: service.fqdn,
+ type: 'SRV',
+ ttl: 120,
+ data: {
+ port: service.port,
+ target: service.host
+ }
+ }
+}
+
+function rr_txt (service) {
+ return {
+ name: service.fqdn,
+ type: 'TXT',
+ ttl: 4500,
+ data: txt.encode(service.txt)
+ }
+}
+
+function rr_a (service, ip) {
+ return {
+ name: service.host,
+ type: 'A',
+ ttl: 120,
+ data: ip
+ }
+}
+
+function rr_aaaa (service, ip) {
+ return {
+ name: service.host,
+ type: 'AAAA',
+ ttl: 120,
+ data: ip
+ }
+}
diff --git a/node_modules/bonjour/package.json b/node_modules/bonjour/package.json
new file mode 100644
index 0000000..99f84d2
--- /dev/null
+++ b/node_modules/bonjour/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "bonjour@^3.5.0",
+ "_id": "bonjour@3.5.0",
+ "_inBundle": false,
+ "_integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=",
+ "_location": "/bonjour",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "bonjour@^3.5.0",
+ "name": "bonjour",
+ "escapedName": "bonjour",
+ "rawSpec": "^3.5.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.5.0"
+ },
+ "_requiredBy": [
+ "/webpack-dev-server"
+ ],
+ "_resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz",
+ "_shasum": "8e890a183d8ee9a2393b3844c691a42bcf7bc9f5",
+ "_spec": "bonjour@^3.5.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/webpack-dev-server",
+ "author": {
+ "name": "Thomas Watson Steen",
+ "email": "w@tson.dk",
+ "url": "https://twitter.com/wa7son"
+ },
+ "bugs": {
+ "url": "https://github.com/watson/bonjour/issues"
+ },
+ "bundleDependencies": false,
+ "coordinates": [
+ 55.68250900965318,
+ 12.586377442991648
+ ],
+ "dependencies": {
+ "array-flatten": "^2.1.0",
+ "deep-equal": "^1.0.1",
+ "dns-equal": "^1.0.0",
+ "dns-txt": "^2.0.2",
+ "multicast-dns": "^6.0.1",
+ "multicast-dns-service-types": "^1.1.0"
+ },
+ "deprecated": false,
+ "description": "A Bonjour/Zeroconf implementation in pure JavaScript",
+ "devDependencies": {
+ "after-all": "^2.0.2",
+ "standard": "^6.0.8",
+ "tape": "^4.5.1"
+ },
+ "homepage": "https://github.com/watson/bonjour",
+ "keywords": [
+ "bonjour",
+ "zeroconf",
+ "zero",
+ "configuration",
+ "mdns",
+ "dns",
+ "service",
+ "discovery",
+ "multicast",
+ "broadcast",
+ "dns-sd"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "bonjour",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/watson/bonjour.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ },
+ "version": "3.5.0"
+}
diff --git a/node_modules/bonjour/test/bonjour.js b/node_modules/bonjour/test/bonjour.js
new file mode 100644
index 0000000..1b87080
--- /dev/null
+++ b/node_modules/bonjour/test/bonjour.js
@@ -0,0 +1,179 @@
+'use strict'
+
+var os = require('os')
+var dgram = require('dgram')
+var tape = require('tape')
+var afterAll = require('after-all')
+var Service = require('../lib/service')
+var Bonjour = require('../')
+
+var getAddresses = function () {
+ var addresses = []
+ var itrs = os.networkInterfaces()
+ for (var i in itrs) {
+ var addrs = itrs[i]
+ for (var j in addrs) {
+ if (addrs[j].internal === false) {
+ addresses.push(addrs[j].address)
+ }
+ }
+ }
+ return addresses
+}
+
+var port = function (cb) {
+ var s = dgram.createSocket('udp4')
+ s.bind(0, function () {
+ var port = s.address().port
+ s.on('close', function () {
+ cb(port)
+ })
+ s.close()
+ })
+}
+
+var test = function (name, fn) {
+ tape(name, function (t) {
+ port(function (p) {
+ fn(Bonjour({ ip: '127.0.0.1', port: p, multicast: false }), t)
+ })
+ })
+}
+
+test('bonjour.publish', function (bonjour, t) {
+ var service = bonjour.publish({ name: 'foo', type: 'bar', port: 3000 })
+ t.ok(service instanceof Service)
+ t.equal(service.published, false)
+ service.on('up', function () {
+ t.equal(service.published, true)
+ bonjour.destroy()
+ t.end()
+ })
+})
+
+test('bonjour.unpublishAll', function (bonjour, t) {
+ t.test('published services', function (t) {
+ var service = bonjour.publish({ name: 'foo', type: 'bar', port: 3000 })
+ service.on('up', function () {
+ bonjour.unpublishAll(function (err) {
+ t.error(err)
+ t.equal(service.published, false)
+ bonjour.destroy()
+ t.end()
+ })
+ })
+ })
+
+ t.test('no published services', function (t) {
+ bonjour.unpublishAll(function (err) {
+ t.error(err)
+ t.end()
+ })
+ })
+})
+
+test('bonjour.find', function (bonjour, t) {
+ var next = afterAll(function () {
+ var browser = bonjour.find({ type: 'test' })
+ var ups = 0
+
+ browser.on('up', function (s) {
+ if (s.name === 'Foo Bar') {
+ t.equal(s.name, 'Foo Bar')
+ t.equal(s.fqdn, 'Foo Bar._test._tcp.local')
+ t.deepEqual(s.txt, {})
+ t.deepEqual(s.rawTxt, new Buffer('00', 'hex'))
+ } else {
+ t.equal(s.name, 'Baz')
+ t.equal(s.fqdn, 'Baz._test._tcp.local')
+ t.deepEqual(s.txt, { foo: 'bar' })
+ t.deepEqual(s.rawTxt, new Buffer('07666f6f3d626172', 'hex'))
+ }
+ t.equal(s.host, os.hostname())
+ t.equal(s.port, 3000)
+ t.equal(s.type, 'test')
+ t.equal(s.protocol, 'tcp')
+ t.equal(s.referer.address, '127.0.0.1')
+ t.equal(s.referer.family, 'IPv4')
+ t.ok(Number.isFinite(s.referer.port))
+ t.ok(Number.isFinite(s.referer.size))
+ t.deepEqual(s.subtypes, [])
+ t.deepEqual(s.addresses.sort(), getAddresses().sort())
+
+ if (++ups === 2) {
+ // use timeout in an attempt to make sure the invalid record doesn't
+ // bubble up
+ setTimeout(function () {
+ bonjour.destroy()
+ t.end()
+ }, 50)
+ }
+ })
+ })
+
+ bonjour.publish({ name: 'Foo Bar', type: 'test', port: 3000 }).on('up', next())
+ bonjour.publish({ name: 'Invalid', type: 'test2', port: 3000 }).on('up', next())
+ bonjour.publish({ name: 'Baz', type: 'test', port: 3000, txt: { foo: 'bar' } }).on('up', next())
+})
+
+test('bonjour.find - binary txt', function (bonjour, t) {
+ var next = afterAll(function () {
+ var browser = bonjour.find({ type: 'test', txt: { binary: true } })
+
+ browser.on('up', function (s) {
+ t.equal(s.name, 'Foo')
+ t.deepEqual(s.txt, { bar: new Buffer('buz') })
+ t.deepEqual(s.rawTxt, new Buffer('076261723d62757a', 'hex'))
+ bonjour.destroy()
+ t.end()
+ })
+ })
+
+ bonjour.publish({ name: 'Foo', type: 'test', port: 3000, txt: { bar: new Buffer('buz') } }).on('up', next())
+})
+
+test('bonjour.find - down event', function (bonjour, t) {
+ var service = bonjour.publish({ name: 'Foo Bar', type: 'test', port: 3000 })
+
+ service.on('up', function () {
+ var browser = bonjour.find({ type: 'test' })
+
+ browser.on('up', function (s) {
+ t.equal(s.name, 'Foo Bar')
+ service.stop()
+ })
+
+ browser.on('down', function (s) {
+ t.equal(s.name, 'Foo Bar')
+ bonjour.destroy()
+ t.end()
+ })
+ })
+})
+
+test('bonjour.findOne - callback', function (bonjour, t) {
+ var next = afterAll(function () {
+ bonjour.findOne({ type: 'test' }, function (s) {
+ t.equal(s.name, 'Callback')
+ bonjour.destroy()
+ t.end()
+ })
+ })
+
+ bonjour.publish({ name: 'Invalid', type: 'test2', port: 3000 }).on('up', next())
+ bonjour.publish({ name: 'Callback', type: 'test', port: 3000 }).on('up', next())
+})
+
+test('bonjour.findOne - emitter', function (bonjour, t) {
+ var next = afterAll(function () {
+ var browser = bonjour.findOne({ type: 'test' })
+ browser.on('up', function (s) {
+ t.equal(s.name, 'Emitter')
+ bonjour.destroy()
+ t.end()
+ })
+ })
+
+ bonjour.publish({ name: 'Emitter', type: 'test', port: 3000 }).on('up', next())
+ bonjour.publish({ name: 'Invalid', type: 'test2', port: 3000 }).on('up', next())
+})
diff --git a/node_modules/bonjour/test/service.js b/node_modules/bonjour/test/service.js
new file mode 100644
index 0000000..ab81e41
--- /dev/null
+++ b/node_modules/bonjour/test/service.js
@@ -0,0 +1,92 @@
+'use strict'
+
+var os = require('os')
+var test = require('tape')
+var Service = require('../lib/service')
+
+var getAddressesRecords = function (host) {
+ var addresses_records = []
+ var itrs = os.networkInterfaces()
+ for (var i in itrs) {
+ var addrs = itrs[i]
+ for (var j in addrs) {
+ if (addrs[j].internal === false) {
+ addresses_records.push({ data: addrs[j].address, name: host, ttl: 120, type: addrs[j].family === 'IPv4' ? 'A' : 'AAAA' })
+ }
+ }
+ }
+ return addresses_records
+}
+
+test('no name', function (t) {
+ t.throws(function () {
+ new Service({ type: 'http', port: 3000 }) // eslint-disable-line no-new
+ }, 'Required name not given')
+ t.end()
+})
+
+test('no type', function (t) {
+ t.throws(function () {
+ new Service({ name: 'Foo Bar', port: 3000 }) // eslint-disable-line no-new
+ }, 'Required type not given')
+ t.end()
+})
+
+test('no port', function (t) {
+ t.throws(function () {
+ new Service({ name: 'Foo Bar', type: 'http' }) // eslint-disable-line no-new
+ }, 'Required port not given')
+ t.end()
+})
+
+test('minimal', function (t) {
+ var s = new Service({ name: 'Foo Bar', type: 'http', port: 3000 })
+ t.equal(s.name, 'Foo Bar')
+ t.equal(s.protocol, 'tcp')
+ t.equal(s.type, '_http._tcp')
+ t.equal(s.host, os.hostname())
+ t.equal(s.port, 3000)
+ t.equal(s.fqdn, 'Foo Bar._http._tcp.local')
+ t.equal(s.txt, null)
+ t.equal(s.subtypes, null)
+ t.equal(s.published, false)
+ t.end()
+})
+
+test('protocol', function (t) {
+ var s = new Service({ name: 'Foo Bar', type: 'http', port: 3000, protocol: 'udp' })
+ t.deepEqual(s.protocol, 'udp')
+ t.end()
+})
+
+test('host', function (t) {
+ var s = new Service({ name: 'Foo Bar', type: 'http', port: 3000, host: 'example.com' })
+ t.deepEqual(s.host, 'example.com')
+ t.end()
+})
+
+test('txt', function (t) {
+ var s = new Service({ name: 'Foo Bar', type: 'http', port: 3000, txt: { foo: 'bar' } })
+ t.deepEqual(s.txt, { foo: 'bar' })
+ t.end()
+})
+
+test('_records() - minimal', function (t) {
+ var s = new Service({ name: 'Foo Bar', type: 'http', protocol: 'tcp', port: 3000 })
+ t.deepEqual(s._records(), [
+ { data: s.fqdn, name: '_http._tcp.local', ttl: 28800, type: 'PTR' },
+ { data: { port: 3000, target: os.hostname() }, name: s.fqdn, ttl: 120, type: 'SRV' },
+ { data: new Buffer('00', 'hex'), name: s.fqdn, ttl: 4500, type: 'TXT' }
+ ].concat(getAddressesRecords(s.host)))
+ t.end()
+})
+
+test('_records() - everything', function (t) {
+ var s = new Service({ name: 'Foo Bar', type: 'http', protocol: 'tcp', port: 3000, host: 'example.com', txt: { foo: 'bar' } })
+ t.deepEqual(s._records(), [
+ { data: s.fqdn, name: '_http._tcp.local', ttl: 28800, type: 'PTR' },
+ { data: { port: 3000, target: 'example.com' }, name: s.fqdn, ttl: 120, type: 'SRV' },
+ { data: new Buffer('07666f6f3d626172', 'hex'), name: s.fqdn, ttl: 4500, type: 'TXT' }
+ ].concat(getAddressesRecords(s.host)))
+ t.end()
+})
diff --git a/node_modules/buffer-indexof/.travis.yml b/node_modules/buffer-indexof/.travis.yml
new file mode 100644
index 0000000..771ec30
--- /dev/null
+++ b/node_modules/buffer-indexof/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - 4
+ - 6
diff --git a/node_modules/buffer-indexof/LICENSE b/node_modules/buffer-indexof/LICENSE
new file mode 100644
index 0000000..f6079df
--- /dev/null
+++ b/node_modules/buffer-indexof/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Ryan Day
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/buffer-indexof/README.md b/node_modules/buffer-indexof/README.md
new file mode 100644
index 0000000..82889b1
--- /dev/null
+++ b/node_modules/buffer-indexof/README.md
@@ -0,0 +1,37 @@
+[](http://travis-ci.org/soldair/node-buffer-indexof)
+
+
+buffer-indexof
+===================
+
+find the index of a buffer in a buffer. should behave like String.indexOf etc.
+
+```js
+
+var bindexOf = require('buffer-indexof');
+
+var newLineBuffer = new Buffer("\n");
+
+var b = new Buffer("hi\nho\nsilver");
+
+
+bindexOf(b,newLineBuffer) === 2
+
+// you can also start from index
+
+bindexOf(b,newLineBuffer,3) === 5
+
+// no match === -1
+
+bindexOf(b,newLineBuffer,6) === -1
+
+
+```
+
+CHANGELOG
+----------
+
+- 1.0.0
+ - fixed issue finding multibyte needles in haystack. thanks @imulus
+- 1.0.1
+ - fixed failing to find partial matches as pointed out by @bahaa-aidi in #2
diff --git a/node_modules/buffer-indexof/bm.js b/node_modules/buffer-indexof/bm.js
new file mode 100644
index 0000000..6912774
--- /dev/null
+++ b/node_modules/buffer-indexof/bm.js
@@ -0,0 +1,58 @@
+//boyer-moore?
+module.exports = function bm(buf,search,offset){
+ var m = 0, j = 0
+ var table = []
+
+ var ret = -1;
+ for(var i=offset||0;i0;--j){
+ table[i].push([i+j,j])
+ console.log('j',j)
+ if(buf[i+j] !== search[j]) {
+
+ //i += j
+ j = -1
+ break
+ }
+ }
+ if(j === 0) {
+ ret = i
+ break
+ }
+ }
+ }
+
+ console.log(table)
+ renderTable(table,buf,search)
+ return ret
+}
+
+
+var chalk = require('chalk')
+function renderTable(table,buf,search){
+ var s = ''
+
+ console.log('-----')
+ console.log('search:',search)
+ console.log('-----')
+ console.log(buf+'')
+
+ table.forEach(function(a){
+ if(!a) return;// console.log('')
+ a.forEach(function(v){
+ if(!v) return;
+ var pad = ''
+ while(pad.length < v[0]){
+ pad += ' '
+ }
+ if(search[v[1]] === buf[v[0]]) console.log(pad+chalk.green(search[v[1]]))
+ else console.log(pad+chalk.red(search[v[1]]))
+
+ })
+ })
+ console.log('-----')
+}
diff --git a/node_modules/buffer-indexof/index.js b/node_modules/buffer-indexof/index.js
new file mode 100644
index 0000000..ae07a96
--- /dev/null
+++ b/node_modules/buffer-indexof/index.js
@@ -0,0 +1,73 @@
+module.exports = function bufferIndexOf(buff, search, offset, encoding){
+ if (!Buffer.isBuffer(buff)) {
+ throw TypeError('buffer is not a buffer');
+ }
+
+ // allow optional offset when providing an encoding
+ if (encoding === undefined && typeof offset === 'string') {
+ encoding = offset;
+ offset = undefined;
+ }
+
+ if (typeof search === 'string') {
+ search = new Buffer(search, encoding || 'utf8');
+ } else if (typeof search === 'number' && !isNaN(search)) {
+ search = new Buffer([search])
+ } else if (!Buffer.isBuffer(search)) {
+ throw TypeError('search is not a bufferable object');
+ }
+
+ if (search.length === 0) {
+ return -1;
+ }
+
+ if (offset === undefined || (typeof offset === 'number' && isNaN(offset))) {
+ offset = 0;
+ } else if (typeof offset !== 'number') {
+ throw TypeError('offset is not a number');
+ }
+
+ if (offset < 0) {
+ offset = buff.length + offset
+ }
+
+ if (offset < 0) {
+ offset = 0;
+ }
+
+ var m = 0;
+ var s = -1;
+
+ for (var i = offset; i < buff.length ; ++i) {
+ if(buff[i] != search[m]){
+ s = -1;
+ // <-- go back
+ // match abc to aabc
+ // 'aabc'
+ // 'aab'
+ // ^ no match
+ // a'abc'
+ // ^ set index here now and look at these again.
+ // 'abc' yay!
+ i -= m-1
+ m = 0;
+ }
+
+ if(buff[i] == search[m]) {
+ if(s == -1) {
+ s = i;
+ }
+ ++m;
+ if(m == search.length) {
+ break;
+ }
+ }
+ }
+
+ if (s > -1 && buff.length - s < search.length) {
+ return -1;
+ }
+ return s;
+}
+
+
diff --git a/node_modules/buffer-indexof/package.json b/node_modules/buffer-indexof/package.json
new file mode 100644
index 0000000..bc7cfb8
--- /dev/null
+++ b/node_modules/buffer-indexof/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "buffer-indexof@^1.0.0",
+ "_id": "buffer-indexof@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==",
+ "_location": "/buffer-indexof",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "buffer-indexof@^1.0.0",
+ "name": "buffer-indexof",
+ "escapedName": "buffer-indexof",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/dns-txt"
+ ],
+ "_resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
+ "_shasum": "52fabcc6a606d1a00302802648ef68f639da268c",
+ "_spec": "buffer-indexof@^1.0.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/dns-txt",
+ "author": {
+ "name": "Ryan Day"
+ },
+ "bugs": {
+ "url": "https://github.com/soldair/node-buffer-indexof/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "find the index of a buffer in a buffer",
+ "devDependencies": {
+ "chalk": "^1.1.3",
+ "tape": "~1.1.0"
+ },
+ "homepage": "https://github.com/soldair/node-buffer-indexof#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "buffer-indexof",
+ "repository": {
+ "url": "git://github.com/soldair/node-buffer-indexof.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "version": "1.1.1"
+}
diff --git a/node_modules/buffer-indexof/test/bm.js b/node_modules/buffer-indexof/test/bm.js
new file mode 100644
index 0000000..9df2662
--- /dev/null
+++ b/node_modules/buffer-indexof/test/bm.js
@@ -0,0 +1,15 @@
+var test = require('tape')
+var bm = require('../bm')
+test("omg",function(t){
+
+ t.equals(bm('abc','bc'),1)
+ t.equals(bm('ababc','bc'),3)
+ t.equals(bm('abc','de'),-1)
+
+ t.equals(bm('123123412345','345'),9)
+
+ t.equals(bm('aaaba','aaba'),1,'partial matches should not be skipped')
+ t.end()
+
+
+})
diff --git a/node_modules/buffer-indexof/test/multibyteneedle.js b/node_modules/buffer-indexof/test/multibyteneedle.js
new file mode 100644
index 0000000..7b10e2d
--- /dev/null
+++ b/node_modules/buffer-indexof/test/multibyteneedle.js
@@ -0,0 +1,15 @@
+var test = require('tape')
+var bindexof = require('../')
+
+test("can find mutibyte needles",function(t){
+
+ t.equals(bindexof(new Buffer("hi"),new Buffer("hi")),0,'should find multibyte needle when its the whole buffer')
+
+ // https://github.com/soldair/node-buffer-indexof/issues/2
+ t.equals(bindexof(new Buffer("aaba"), new Buffer("ab")),1,'should find multibyte needle in haystack')
+
+
+ t.end();
+
+
+})
diff --git a/node_modules/buffer-indexof/test/partial-match.js b/node_modules/buffer-indexof/test/partial-match.js
new file mode 100644
index 0000000..0e8525e
--- /dev/null
+++ b/node_modules/buffer-indexof/test/partial-match.js
@@ -0,0 +1,8 @@
+var test = require('tape')
+var bufferIndexOf = require('../')
+
+test("doesnt skip partial matches",function(t){
+ //'aaaba'.indexOf('aaba') // --> 1
+ t.equals(bufferIndexOf(new Buffer('aaaba'), new Buffer('aaba')),1,'partial matches should not be skipped')
+ t.end()
+})
diff --git a/node_modules/buffer-indexof/test/test-buffer-indexof.js b/node_modules/buffer-indexof/test/test-buffer-indexof.js
new file mode 100644
index 0000000..a0b58db
--- /dev/null
+++ b/node_modules/buffer-indexof/test/test-buffer-indexof.js
@@ -0,0 +1,400 @@
+'use strict';
+var test = require('tape')
+var bindexOf = require('../')
+
+var b = new Buffer('abcdef');
+var buf_a = new Buffer('a');
+var buf_bc = new Buffer('bc');
+var buf_f = new Buffer('f');
+var buf_z = new Buffer('z');
+var buf_empty = new Buffer('');
+
+test('node 6 buffer indexOf tests', function(t) {
+ t.equal(bindexOf(b, 'a'), 0);
+ t.equal(bindexOf(b, 'a', 1), -1);
+ t.equal(bindexOf(b, 'a', -1), -1);
+ t.equal(bindexOf(b, 'a', -4), -1);
+ t.equal(bindexOf(b, 'a', -b.length), 0);
+ t.equal(bindexOf(b, 'a', NaN), 0);
+ t.equal(bindexOf(b, 'a', -Infinity), 0);
+ t.equal(bindexOf(b, 'a', Infinity), -1);
+ t.equal(bindexOf(b, 'bc'), 1);
+ t.equal(bindexOf(b, 'bc', 2), -1);
+ t.equal(bindexOf(b, 'bc', -1), -1);
+ t.equal(bindexOf(b, 'bc', -3), -1);
+ t.equal(bindexOf(b, 'bc', -5), 1);
+ t.equal(bindexOf(b, 'bc', NaN), 1);
+ t.equal(bindexOf(b, 'bc', -Infinity), 1);
+ t.equal(bindexOf(b, 'bc', Infinity), -1);
+ t.equal(bindexOf(b, 'f'), b.length - 1);
+ t.equal(bindexOf(b, 'z'), -1);
+ t.equal(bindexOf(b, ''), -1);
+ t.equal(bindexOf(b, '', 1), -1);
+ t.equal(bindexOf(b, '', b.length + 1), -1);
+ t.equal(bindexOf(b, '', Infinity), -1);
+ t.equal(bindexOf(b, buf_a), 0);
+ t.equal(bindexOf(b, buf_a, 1), -1);
+ t.equal(bindexOf(b, buf_a, -1), -1);
+ t.equal(bindexOf(b, buf_a, -4), -1);
+ t.equal(bindexOf(b, buf_a, -b.length), 0);
+ t.equal(bindexOf(b, buf_a, NaN), 0);
+ t.equal(bindexOf(b, buf_a, -Infinity), 0);
+ t.equal(bindexOf(b, buf_a, Infinity), -1);
+ t.equal(bindexOf(b, buf_bc), 1);
+ t.equal(bindexOf(b, buf_bc, 2), -1);
+ t.equal(bindexOf(b, buf_bc, -1), -1);
+ t.equal(bindexOf(b, buf_bc, -3), -1);
+ t.equal(bindexOf(b, buf_bc, -5), 1);
+ t.equal(bindexOf(b, buf_bc, NaN), 1);
+ t.equal(bindexOf(b, buf_bc, -Infinity), 1);
+ t.equal(bindexOf(b, buf_bc, Infinity), -1);
+ t.equal(bindexOf(b, buf_f), b.length - 1);
+ t.equal(bindexOf(b, buf_z), -1);
+ t.equal(bindexOf(b, buf_empty), -1);
+ t.equal(bindexOf(b, buf_empty, 1), -1);
+ t.equal(bindexOf(b, buf_empty, b.length + 1), -1);
+ t.equal(bindexOf(b, buf_empty, Infinity), -1);
+ t.equal(bindexOf(b, 0x61), 0);
+ t.equal(bindexOf(b, 0x61, 1), -1);
+ t.equal(bindexOf(b, 0x61, -1), -1);
+ t.equal(bindexOf(b, 0x61, -4), -1);
+ t.equal(bindexOf(b, 0x61, -b.length), 0);
+ t.equal(bindexOf(b, 0x61, NaN), 0);
+ t.equal(bindexOf(b, 0x61, -Infinity), 0);
+ t.equal(bindexOf(b, 0x61, Infinity), -1);
+ t.equal(bindexOf(b, 0x0), -1);
+
+ // test offsets
+ t.equal(bindexOf(b, 'd', 2), 3);
+ t.equal(bindexOf(b, 'f', 5), 5);
+ t.equal(bindexOf(b, 'f', -1), 5);
+ t.equal(bindexOf(b, 'f', 6), -1);
+
+ t.equal(bindexOf(b, new Buffer('d'), 2), 3);
+ t.equal(bindexOf(b, new Buffer('f'), 5), 5);
+ t.equal(bindexOf(b, new Buffer('f'), -1), 5);
+ t.equal(bindexOf(b, new Buffer('f'), 6), -1);
+
+ // This one doesn't make any sense
+ // t.equal(bindexOf(new Buffer('ff'), new Buffer('f'), 1, 'ucs2'), -1);
+
+ // test hex encoding
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('hex'), 'hex'),
+ '64',
+ 0,
+ 'hex'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('hex'), 'hex'),
+ new Buffer('64', 'hex'), 0, 'hex'
+ ),
+ 3
+ );
+
+ // test base64 encoding
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('base64'), 'base64'),
+ 'ZA==', 0, 'base64'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('base64'), 'base64'),
+ new Buffer('ZA==', 'base64'), 0, 'base64'
+ ),
+ 3
+ );
+
+ // test ascii encoding
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('ascii'), 'ascii'),
+ 'd', 0, 'ascii'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('ascii'), 'ascii'),
+ new Buffer('d', 'ascii'), 0, 'ascii'
+ ),
+ 3
+ );
+
+ // test latin1 encoding
+ // does not work in LTS
+ /*
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('latin1'), 'latin1'),
+ 'd',
+ 0,
+ 'latin1'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('latin1'), 'latin1'),
+ new Buffer('d', 'latin1'),
+ 0,
+ 'latin1'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer('aa\u00e8aa', 'latin1'),
+ '\u00e8',
+ 'latin1'
+ ),
+ 2
+ );
+ t.equal(
+ bindexOf(
+ new Buffer('\u00e8', 'latin1'),
+ '\u00e8',
+ 'latin1'
+ ),
+ 0
+ );
+ t.equal(
+ bindexOf(
+ new Buffer('\u00e8', 'latin1'),
+ new Buffer('\u00e8', 'latin1'),
+ 0,
+ 'latin1'
+ ),
+ 0
+ );
+ */
+ // test binary encoding
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('binary'), 'binary'),
+ 'd',
+ 0,
+ 'binary'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer(b.toString('binary'), 'binary'),
+ new Buffer('d', 'binary'),
+ 0,
+ 'binary'
+ ),
+ 3
+ );
+ t.equal(
+ bindexOf(
+ new Buffer('aa\u00e8aa', 'binary'),
+ '\u00e8',
+ 0,
+ 'binary'
+ ),
+ 2
+ );
+ t.equal(
+ bindexOf(
+ new Buffer('\u00e8', 'binary'),
+ '\u00e8',
+ 0,
+ 'binary'
+ ),
+ 0
+ );
+ t.equal(
+ bindexOf(
+ new Buffer('\u00e8', 'binary'),
+ new Buffer('\u00e8', 'binary'),
+ 0,
+ 'binary'
+ ),
+ 0
+ );
+
+
+ // test optional offset with passed encoding
+ t.equal(new Buffer('aaaa0').indexOf('30', 'hex'), 4);
+ t.equal(new Buffer('aaaa00a').indexOf('3030', 'hex'), 4);
+
+ {
+ // test usc2 encoding
+ var twoByteString = new Buffer('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');
+
+ t.equal(8, twoByteString.indexOf('\u0395', 4, 'ucs2'));
+ t.equal(6, twoByteString.indexOf('\u03a3', -4, 'ucs2'));
+ t.equal(4, twoByteString.indexOf('\u03a3', -6, 'ucs2'));
+ t.equal(4, twoByteString.indexOf(
+ new Buffer('\u03a3', 'ucs2'), -6, 'ucs2'));
+ t.equal(-1, twoByteString.indexOf('\u03a3', -2, 'ucs2'));
+ }
+
+ var mixedByteStringUcs2 =
+ new Buffer('\u039a\u0391abc\u03a3\u03a3\u0395', 'ucs2');
+ t.equal(6, mixedByteStringUcs2.indexOf('bc', 0, 'ucs2'));
+ t.equal(10, mixedByteStringUcs2.indexOf('\u03a3', 0, 'ucs2'));
+ t.equal(-1, mixedByteStringUcs2.indexOf('\u0396', 0, 'ucs2'));
+
+ t.equal(
+ 6, mixedByteStringUcs2.indexOf(new Buffer('bc', 'ucs2'), 0, 'ucs2'));
+ t.equal(
+ 10, mixedByteStringUcs2.indexOf(new Buffer('\u03a3', 'ucs2'), 0, 'ucs2'));
+ t.equal(
+ -1, mixedByteStringUcs2.indexOf(new Buffer('\u0396', 'ucs2'), 0, 'ucs2'));
+
+ {
+ var twoByteString = new Buffer('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');
+
+ // Test single char pattern
+ t.equal(0, twoByteString.indexOf('\u039a', 0, 'ucs2'));
+ t.equal(2, twoByteString.indexOf('\u0391', 0, 'ucs2'), 'Alpha');
+ t.equal(4, twoByteString.indexOf('\u03a3', 0, 'ucs2'), 'First Sigma');
+ t.equal(6, twoByteString.indexOf('\u03a3', 6, 'ucs2'), 'Second Sigma');
+ t.equal(8, twoByteString.indexOf('\u0395', 0, 'ucs2'), 'Epsilon');
+ t.equal(-1, twoByteString.indexOf('\u0392', 0, 'ucs2'), 'Not beta');
+
+ // Test multi-char pattern
+ t.equal(
+ 0, twoByteString.indexOf('\u039a\u0391', 0, 'ucs2'), 'Lambda Alpha');
+ t.equal(
+ 2, twoByteString.indexOf('\u0391\u03a3', 0, 'ucs2'), 'Alpha Sigma');
+ t.equal(
+ 4, twoByteString.indexOf('\u03a3\u03a3', 0, 'ucs2'), 'Sigma Sigma');
+ t.equal(
+ 6, twoByteString.indexOf('\u03a3\u0395', 0, 'ucs2'), 'Sigma Epsilon');
+ }
+
+ var mixedByteStringUtf8 = new Buffer('\u039a\u0391abc\u03a3\u03a3\u0395');
+ t.equal(5, mixedByteStringUtf8.indexOf('bc'));
+ t.equal(5, mixedByteStringUtf8.indexOf('bc', 5));
+ t.equal(5, mixedByteStringUtf8.indexOf('bc', -8));
+ t.equal(7, mixedByteStringUtf8.indexOf('\u03a3'));
+ t.equal(-1, mixedByteStringUtf8.indexOf('\u0396'));
+
+
+ // Test complex string indexOf algorithms. Only trigger for long strings.
+ // Long string that isn't a simple repeat of a shorter string.
+ var longString = 'A';
+ for (var i = 66; i < 76; i++) { // from 'B' to 'K'
+ longString = longString + String.fromCharCode(i) + longString;
+ }
+
+ var longBufferString = new Buffer(longString);
+
+ // pattern of 15 chars, repeated every 16 chars in long
+ var pattern = 'ABACABADABACABA';
+ for (var i = 0; i < longBufferString.length - pattern.length; i += 7) {
+ var index = longBufferString.indexOf(pattern, i);
+ t.equal((i + 15) & ~0xf, index, 'Long ABACABA...-string at index ' + i);
+ }
+ t.equal(510, longBufferString.indexOf('AJABACA'), 'Long AJABACA, First J');
+ t.equal(
+ 1534, longBufferString.indexOf('AJABACA', 511), 'Long AJABACA, Second J');
+
+ pattern = 'JABACABADABACABA';
+ t.equal(
+ 511, longBufferString.indexOf(pattern), 'Long JABACABA..., First J');
+ t.equal(
+ 1535, longBufferString.indexOf(pattern, 512), 'Long JABACABA..., Second J');
+
+ // Search for a non-ASCII string in a pure ASCII string.
+ var asciiString = new Buffer(
+ 'arglebargleglopglyfarglebargleglopglyfarglebargleglopglyf');
+ t.equal(-1, asciiString.indexOf('\x2061'));
+ t.equal(3, asciiString.indexOf('leb', 0));
+
+ // Search in string containing many non-ASCII chars.
+ var allCodePoints = [];
+ for (var i = 0; i < 65536; i++) allCodePoints[i] = i;
+ var allCharsString = String.fromCharCode.apply(String, allCodePoints);
+ var allCharsBufferUtf8 = new Buffer(allCharsString);
+ var allCharsBufferUcs2 = new Buffer(allCharsString, 'ucs2');
+
+ // Search for string long enough to trigger complex search with ASCII pattern
+ // and UC16 subject.
+ t.equal(-1, allCharsBufferUtf8.indexOf('notfound'));
+ t.equal(-1, allCharsBufferUcs2.indexOf('notfound'));
+
+ // Needle is longer than haystack, but only because it's encoded as UTF-16
+ t.equal(new Buffer('aaaa').indexOf('a'.repeat(4), 'ucs2'), -1);
+
+ t.equal(new Buffer('aaaa').indexOf('a'.repeat(4), 'utf8'), 0);
+ t.equal(new Buffer('aaaa').indexOf('你好', 'ucs2'), -1);
+
+ // Haystack has odd length, but the needle is UCS2.
+ t.equal(new Buffer('aaaaa').indexOf('b', 'ucs2'), -1);
+
+ {
+ // Find substrings in Utf8.
+ var lengths = [1, 3, 15]; // Single char, simple and complex.
+ var indices = [0x5, 0x60, 0x400, 0x680, 0x7ee, 0xFF02, 0x16610, 0x2f77b];
+ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+ for (var i = 0; i < indices.length; i++) {
+ var index = indices[i];
+ var length = lengths[lengthIndex];
+
+ if (index + length > 0x7F) {
+ length = 2 * length;
+ }
+
+ if (index + length > 0x7FF) {
+ length = 3 * length;
+ }
+
+ if (index + length > 0xFFFF) {
+ length = 4 * length;
+ }
+
+ var patternBufferUtf8 = allCharsBufferUtf8.slice(index, index + length);
+ t.equal(index, allCharsBufferUtf8.indexOf(patternBufferUtf8));
+
+ var patternStringUtf8 = patternBufferUtf8.toString();
+ t.equal(index, allCharsBufferUtf8.indexOf(patternStringUtf8));
+ }
+ }
+ }
+
+ {
+ // Find substrings in Usc2.
+ var lengths = [2, 4, 16]; // Single char, simple and complex.
+ var indices = [0x5, 0x65, 0x105, 0x205, 0x285, 0x2005, 0x2085, 0xfff0];
+ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+ for (var i = 0; i < indices.length; i++) {
+ var index = indices[i] * 2;
+ var length = lengths[lengthIndex];
+
+ var patternBufferUcs2 =
+ allCharsBufferUcs2.slice(index, index + length);
+ t.equal(
+ index, allCharsBufferUcs2.indexOf(patternBufferUcs2, 0, 'ucs2'));
+
+ var patternStringUcs2 = patternBufferUcs2.toString('ucs2');
+ t.equal(
+ index, allCharsBufferUcs2.indexOf(patternStringUcs2, 0, 'ucs2'));
+ }
+ }
+ }
+
+ t.throws(function() {
+ bindexOf(b, function() { });
+ });
+ t.throws(function() {
+ bindexOf(b, {});
+ });
+ t.throws(function() {
+ bindexOf(b, []);
+ });
+
+
+ t.end();
+});
diff --git a/node_modules/buffer-indexof/test/test.js b/node_modules/buffer-indexof/test/test.js
new file mode 100644
index 0000000..3ecd73f
--- /dev/null
+++ b/node_modules/buffer-indexof/test/test.js
@@ -0,0 +1,37 @@
+var test = require('tape');
+var bindexOf = require('../');
+
+test("can haz working",function(t){
+
+
+ var newLineBuffer = new Buffer("\n");
+
+ var b = new Buffer("hi\nho\nsilver");
+
+ t.equals(bindexOf(new Buffer('a'), new Buffer('abc')), -1, 'should not match')
+
+
+ t.equals(bindexOf(new Buffer('aaa'), new Buffer('aa'), 2), -1, 'should not match with 2 offset')
+ t.equals(bindexOf(new Buffer('aaa'), new Buffer('aa')), 0, 'should match')
+
+ t.equals(bindexOf(b,newLineBuffer),2,'should find newlines');
+
+ // you can also start from index
+
+ t.equals(bindexOf(b,newLineBuffer,3),5,"should find newlines after offset");
+
+ // no match === -1
+
+ t.equals(bindexOf(b,newLineBuffer,6),-1,"should not find newlines where none are.");
+
+
+ t.end();
+})
+
+
+test("can handle overlapping matches",function(t){
+ console.log(1,'aaaba'.indexOf('aaba'))
+ console.log(2,bindexOf(new Buffer('aaaba'), new Buffer('aaba')))
+ console.log(3,(new Buffer('aaaba')).indexOf(new Buffer('aaba')))
+ t.end()
+})
diff --git a/node_modules/bytes/History.md b/node_modules/bytes/History.md
new file mode 100644
index 0000000..13d463a
--- /dev/null
+++ b/node_modules/bytes/History.md
@@ -0,0 +1,82 @@
+3.0.0 / 2017-08-31
+==================
+
+ * Change "kB" to "KB" in format output
+ * Remove support for Node.js 0.6
+ * Remove support for ComponentJS
+
+2.5.0 / 2017-03-24
+==================
+
+ * Add option "unit"
+
+2.4.0 / 2016-06-01
+==================
+
+ * Add option "unitSeparator"
+
+2.3.0 / 2016-02-15
+==================
+
+ * Drop partial bytes on all parsed units
+ * Fix non-finite numbers to `.format` to return `null`
+ * Fix parsing byte string that looks like hex
+ * perf: hoist regular expressions
+
+2.2.0 / 2015-11-13
+==================
+
+ * add option "decimalPlaces"
+ * add option "fixedDecimals"
+
+2.1.0 / 2015-05-21
+==================
+
+ * add `.format` export
+ * add `.parse` export
+
+2.0.2 / 2015-05-20
+==================
+
+ * remove map recreation
+ * remove unnecessary object construction
+
+2.0.1 / 2015-05-07
+==================
+
+ * fix browserify require
+ * remove node.extend dependency
+
+2.0.0 / 2015-04-12
+==================
+
+ * add option "case"
+ * add option "thousandsSeparator"
+ * return "null" on invalid parse input
+ * support proper round-trip: bytes(bytes(num)) === num
+ * units no longer case sensitive when parsing
+
+1.0.0 / 2014-05-05
+==================
+
+ * add negative support. fixes #6
+
+0.3.0 / 2014-03-19
+==================
+
+ * added terabyte support
+
+0.2.1 / 2013-04-01
+==================
+
+ * add .component
+
+0.2.0 / 2012-10-28
+==================
+
+ * bytes(200).should.eql('200b')
+
+0.1.0 / 2012-07-04
+==================
+
+ * add bytes to string conversion [yields]
diff --git a/node_modules/bytes/LICENSE b/node_modules/bytes/LICENSE
new file mode 100644
index 0000000..63e95a9
--- /dev/null
+++ b/node_modules/bytes/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk
+Copyright (c) 2015 Jed Watson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/bytes/Readme.md b/node_modules/bytes/Readme.md
new file mode 100644
index 0000000..9b53745
--- /dev/null
+++ b/node_modules/bytes/Readme.md
@@ -0,0 +1,125 @@
+# Bytes utility
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```bash
+$ npm install bytes
+```
+
+## Usage
+
+```js
+var bytes = require('bytes');
+```
+
+#### bytes.format(number value, [options]): string|null
+
+Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is
+ rounded.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------|----------|--------------------|
+| value | `number` | Value in bytes |
+| options | `Object` | Conversion options |
+
+**Options**
+
+| Property | Type | Description |
+|-------------------|--------|-----------------------------------------------------------------------------------------|
+| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. |
+| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` |
+| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `.`... Default value to `''`. |
+| unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). |
+| unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|------------------|-------------------------------------------------|
+| results | `string`|`null` | Return null upon error. String value otherwise. |
+
+**Example**
+
+```js
+bytes(1024);
+// output: '1KB'
+
+bytes(1000);
+// output: '1000B'
+
+bytes(1000, {thousandsSeparator: ' '});
+// output: '1 000B'
+
+bytes(1024 * 1.7, {decimalPlaces: 0});
+// output: '2KB'
+
+bytes(1024, {unitSeparator: ' '});
+// output: '1 KB'
+
+```
+
+#### bytes.parse(string|number value): number|null
+
+Parse the string value into an integer in bytes. If no unit is given, or `value`
+is a number, it is assumed the value is in bytes.
+
+Supported units and abbreviations are as follows and are case-insensitive:
+
+ * `b` for bytes
+ * `kb` for kilobytes
+ * `mb` for megabytes
+ * `gb` for gigabytes
+ * `tb` for terabytes
+
+The units are in powers of two, not ten. This means 1kb = 1024b according to this parser.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------------|--------|--------------------|
+| value | `string`|`number` | String to parse, or number in bytes. |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|-------------|-------------------------|
+| results | `number`|`null` | Return null upon error. Value in bytes otherwise. |
+
+**Example**
+
+```js
+bytes('1KB');
+// output: 1024
+
+bytes('1024');
+// output: 1024
+
+bytes(1024);
+// output: 1024
+```
+
+## License
+
+[MIT](LICENSE)
+
+[downloads-image]: https://img.shields.io/npm/dm/bytes.svg
+[downloads-url]: https://npmjs.org/package/bytes
+[npm-image]: https://img.shields.io/npm/v/bytes.svg
+[npm-url]: https://npmjs.org/package/bytes
+[travis-image]: https://img.shields.io/travis/visionmedia/bytes.js/master.svg
+[travis-url]: https://travis-ci.org/visionmedia/bytes.js
+[coveralls-image]: https://img.shields.io/coveralls/visionmedia/bytes.js/master.svg
+[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master
diff --git a/node_modules/bytes/index.js b/node_modules/bytes/index.js
new file mode 100644
index 0000000..1e39afd
--- /dev/null
+++ b/node_modules/bytes/index.js
@@ -0,0 +1,159 @@
+/*!
+ * bytes
+ * Copyright(c) 2012-2014 TJ Holowaychuk
+ * Copyright(c) 2015 Jed Watson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = bytes;
+module.exports.format = format;
+module.exports.parse = parse;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
+
+var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
+
+var map = {
+ b: 1,
+ kb: 1 << 10,
+ mb: 1 << 20,
+ gb: 1 << 30,
+ tb: ((1 << 30) * 1024)
+};
+
+var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;
+
+/**
+ * Convert the given value in bytes into a string or parse to string to an integer in bytes.
+ *
+ * @param {string|number} value
+ * @param {{
+ * case: [string],
+ * decimalPlaces: [number]
+ * fixedDecimals: [boolean]
+ * thousandsSeparator: [string]
+ * unitSeparator: [string]
+ * }} [options] bytes options.
+ *
+ * @returns {string|number|null}
+ */
+
+function bytes(value, options) {
+ if (typeof value === 'string') {
+ return parse(value);
+ }
+
+ if (typeof value === 'number') {
+ return format(value, options);
+ }
+
+ return null;
+}
+
+/**
+ * Format the given value in bytes into a string.
+ *
+ * If the value is negative, it is kept as such. If it is a float,
+ * it is rounded.
+ *
+ * @param {number} value
+ * @param {object} [options]
+ * @param {number} [options.decimalPlaces=2]
+ * @param {number} [options.fixedDecimals=false]
+ * @param {string} [options.thousandsSeparator=]
+ * @param {string} [options.unit=]
+ * @param {string} [options.unitSeparator=]
+ *
+ * @returns {string|null}
+ * @public
+ */
+
+function format(value, options) {
+ if (!Number.isFinite(value)) {
+ return null;
+ }
+
+ var mag = Math.abs(value);
+ var thousandsSeparator = (options && options.thousandsSeparator) || '';
+ var unitSeparator = (options && options.unitSeparator) || '';
+ var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
+ var fixedDecimals = Boolean(options && options.fixedDecimals);
+ var unit = (options && options.unit) || '';
+
+ if (!unit || !map[unit.toLowerCase()]) {
+ if (mag >= map.tb) {
+ unit = 'TB';
+ } else if (mag >= map.gb) {
+ unit = 'GB';
+ } else if (mag >= map.mb) {
+ unit = 'MB';
+ } else if (mag >= map.kb) {
+ unit = 'KB';
+ } else {
+ unit = 'B';
+ }
+ }
+
+ var val = value / map[unit.toLowerCase()];
+ var str = val.toFixed(decimalPlaces);
+
+ if (!fixedDecimals) {
+ str = str.replace(formatDecimalsRegExp, '$1');
+ }
+
+ if (thousandsSeparator) {
+ str = str.replace(formatThousandsRegExp, thousandsSeparator);
+ }
+
+ return str + unitSeparator + unit;
+}
+
+/**
+ * Parse the string value into an integer in bytes.
+ *
+ * If no unit is given, it is assumed the value is in bytes.
+ *
+ * @param {number|string} val
+ *
+ * @returns {number|null}
+ * @public
+ */
+
+function parse(val) {
+ if (typeof val === 'number' && !isNaN(val)) {
+ return val;
+ }
+
+ if (typeof val !== 'string') {
+ return null;
+ }
+
+ // Test if the string passed is valid
+ var results = parseRegExp.exec(val);
+ var floatValue;
+ var unit = 'b';
+
+ if (!results) {
+ // Nothing could be extracted from the given string
+ floatValue = parseInt(val, 10);
+ unit = 'b'
+ } else {
+ // Retrieve the value and the unit
+ floatValue = parseFloat(results[1]);
+ unit = results[4].toLowerCase();
+ }
+
+ return Math.floor(map[unit] * floatValue);
+}
diff --git a/node_modules/bytes/package.json b/node_modules/bytes/package.json
new file mode 100644
index 0000000..4c1b2f6
--- /dev/null
+++ b/node_modules/bytes/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "bytes@3.0.0",
+ "_id": "bytes@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
+ "_location": "/bytes",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "bytes@3.0.0",
+ "name": "bytes",
+ "escapedName": "bytes",
+ "rawSpec": "3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "3.0.0"
+ },
+ "_requiredBy": [
+ "/body-parser",
+ "/compression",
+ "/raw-body"
+ ],
+ "_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "_shasum": "d32815404d689699f85a4ea4fa8755dd13a96048",
+ "_spec": "bytes@3.0.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/compression",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "bugs": {
+ "url": "https://github.com/visionmedia/bytes.js/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jed Watson",
+ "email": "jed.watson@me.com"
+ },
+ {
+ "name": "Théo FIDRY",
+ "email": "theo.fidry@gmail.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "Utility to parse a string bytes to bytes and vice-versa",
+ "devDependencies": {
+ "mocha": "2.5.3",
+ "nyc": "10.3.2"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "History.md",
+ "LICENSE",
+ "Readme.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/visionmedia/bytes.js#readme",
+ "keywords": [
+ "byte",
+ "bytes",
+ "utility",
+ "parse",
+ "parser",
+ "convert",
+ "converter"
+ ],
+ "license": "MIT",
+ "name": "bytes",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/visionmedia/bytes.js.git"
+ },
+ "scripts": {
+ "test": "mocha --check-leaks --reporter spec",
+ "test-ci": "nyc --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/compressible/HISTORY.md b/node_modules/compressible/HISTORY.md
new file mode 100644
index 0000000..f0bc8dd
--- /dev/null
+++ b/node_modules/compressible/HISTORY.md
@@ -0,0 +1,93 @@
+2.0.15 / 2019-09-17
+===================
+
+ * deps: mime-db@'>= 1.36.0 < 2'
+
+2.0.14 / 2019-06-05
+===================
+
+ * deps: mime-db@'>= 1.34.0 < 2'
+ - Mark all XML-derived types as compressible
+
+2.0.13 / 2018-02-17
+===================
+
+ * deps: mime-db@'>= 1.33.0 < 2'
+
+2.0.12 / 2017-10-20
+===================
+
+ * deps: mime-db@'>= 1.30.0 < 2'
+
+2.0.11 / 2017-07-27
+===================
+
+ * deps: mime-db@'>= 1.29.0 < 2'
+
+2.0.10 / 2017-03-23
+===================
+
+ * deps: mime-db@'>= 1.27.0 < 2'
+
+2.0.9 / 2016-10-31
+==================
+
+ * Fix regex fallback to not override `compressible: false` in db
+ * deps: mime-db@'>= 1.24.0 < 2'
+
+2.0.8 / 2016-05-12
+==================
+
+ * deps: mime-db@'>= 1.23.0 < 2'
+
+2.0.7 / 2016-01-18
+==================
+
+ * deps: mime-db@'>= 1.21.0 < 2'
+
+2.0.6 / 2015-09-29
+==================
+
+ * deps: mime-db@'>= 1.19.0 < 2'
+
+2.0.5 / 2015-07-30
+==================
+
+ * deps: mime-db@'>= 1.16.0 < 2'
+
+2.0.4 / 2015-07-01
+==================
+
+ * deps: mime-db@'>= 1.14.0 < 2'
+ * perf: enable strict mode
+
+2.0.3 / 2015-06-08
+==================
+
+ * Fix regex fallback to work if type exists, but is undefined
+ * perf: hoist regex declaration
+ * perf: use regex to extract mime
+ * deps: mime-db@'>= 1.13.0 < 2'
+
+2.0.2 / 2015-01-31
+==================
+
+ * deps: mime-db@'>= 1.1.2 < 2'
+
+2.0.1 / 2014-09-28
+==================
+
+ * deps: mime-db@1.x
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+
+2.0.0 / 2014-09-02
+==================
+
+ * use mime-db
+ * remove .get()
+ * specifications are now private
+ * regex is now private
+ * stricter regex
diff --git a/node_modules/compressible/LICENSE b/node_modules/compressible/LICENSE
new file mode 100644
index 0000000..ce00b3f
--- /dev/null
+++ b/node_modules/compressible/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong
+Copyright (c) 2014 Jeremiah Senkpiel
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/compressible/README.md b/node_modules/compressible/README.md
new file mode 100644
index 0000000..4402937
--- /dev/null
+++ b/node_modules/compressible/README.md
@@ -0,0 +1,62 @@
+# compressible
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Compressible `Content-Type` / `mime` checking.
+
+## Installation
+
+```sh
+$ npm install compressible
+```
+
+## API
+
+
+
+```js
+var compressible = require('compressible')
+```
+
+### compressible(type)
+
+Checks if the given `Content-Type` is compressible. The `type` argument is expected
+to be a value MIME type or `Content-Type` string, though no validation is performed.
+
+The MIME is looked up in the [`mime-db`](https://www.npmjs.com/package/mime-db) and
+if there is compressible information in the database entry, that is returned. Otherwise,
+this module will fallback to `true` for the following types:
+
+ * `text/*`
+ * `*/*+json`
+ * `*/*+text`
+ * `*/*+xml`
+
+If this module is not sure if a type is specifically compressible or specifically
+uncompressible, `undefined` is returned.
+
+
+
+```js
+compressible('text/html') // => true
+compressible('image/png') // => false
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/compressible.svg
+[npm-url]: https://npmjs.org/package/compressible
+[node-version-image]: https://img.shields.io/node/v/compressible.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/compressible/master.svg
+[travis-url]: https://travis-ci.org/jshttp/compressible
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/compressible/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/compressible?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/compressible.svg
+[downloads-url]: https://npmjs.org/package/compressible
diff --git a/node_modules/compressible/index.js b/node_modules/compressible/index.js
new file mode 100644
index 0000000..1184ada
--- /dev/null
+++ b/node_modules/compressible/index.js
@@ -0,0 +1,58 @@
+/*!
+ * compressible
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Jeremiah Senkpiel
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var db = require('mime-db')
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var COMPRESSIBLE_TYPE_REGEXP = /^text\/|\+(?:json|text|xml)$/i
+var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = compressible
+
+/**
+ * Checks if a type is compressible.
+ *
+ * @param {string} type
+ * @return {Boolean} compressible
+ * @public
+ */
+
+function compressible (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // strip parameters
+ var match = EXTRACT_TYPE_REGEXP.exec(type)
+ var mime = match && match[1].toLowerCase()
+ var data = db[mime]
+
+ // return database information
+ if (data && data.compressible !== undefined) {
+ return data.compressible
+ }
+
+ // fallback to regexp or unknown
+ return COMPRESSIBLE_TYPE_REGEXP.test(mime) || undefined
+}
diff --git a/node_modules/compressible/package.json b/node_modules/compressible/package.json
new file mode 100644
index 0000000..0259233
--- /dev/null
+++ b/node_modules/compressible/package.json
@@ -0,0 +1,90 @@
+{
+ "_from": "compressible@~2.0.14",
+ "_id": "compressible@2.0.15",
+ "_inBundle": false,
+ "_integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==",
+ "_location": "/compressible",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "compressible@~2.0.14",
+ "name": "compressible",
+ "escapedName": "compressible",
+ "rawSpec": "~2.0.14",
+ "saveSpec": null,
+ "fetchSpec": "~2.0.14"
+ },
+ "_requiredBy": [
+ "/compression"
+ ],
+ "_resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz",
+ "_shasum": "857a9ab0a7e5a07d8d837ed43fe2defff64fe212",
+ "_spec": "compressible@~2.0.14",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/compression",
+ "bugs": {
+ "url": "https://github.com/jshttp/compressible/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ }
+ ],
+ "dependencies": {
+ "mime-db": ">= 1.36.0 < 2"
+ },
+ "deprecated": false,
+ "description": "Compressible Content-Type / mime checking",
+ "devDependencies": {
+ "eslint": "5.5.0",
+ "eslint-config-standard": "12.0.0",
+ "eslint-plugin-import": "2.14.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "7.0.1",
+ "eslint-plugin-promise": "4.0.1",
+ "eslint-plugin-standard": "4.0.0",
+ "mocha": "5.2.0",
+ "nyc": "13.1.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/jshttp/compressible#readme",
+ "keywords": [
+ "compress",
+ "gzip",
+ "mime",
+ "content-type"
+ ],
+ "license": "MIT",
+ "name": "compressible",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/compressible.git"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "nyc --reporter=html --reporter=text npm test",
+ "test-travis": "nyc --reporter=text npm test"
+ },
+ "version": "2.0.15"
+}
diff --git a/node_modules/compression/HISTORY.md b/node_modules/compression/HISTORY.md
new file mode 100644
index 0000000..69188fc
--- /dev/null
+++ b/node_modules/compression/HISTORY.md
@@ -0,0 +1,297 @@
+1.7.3 / 2018-07-15
+==================
+
+ * deps: accepts@~1.3.5
+ - deps: mime-types@~2.1.18
+ * deps: compressible@~2.0.14
+ - Mark all XML-derived types as compressible
+ - deps: mime-db@'>= 1.34.0 < 2'
+ * deps: safe-buffer@5.1.2
+
+1.7.2 / 2018-02-18
+==================
+
+ * deps: compressible@~2.0.13
+ - deps: mime-db@'>= 1.33.0 < 2'
+
+1.7.1 / 2017-09-26
+==================
+
+ * deps: accepts@~1.3.4
+ - deps: mime-types@~2.1.16
+ * deps: bytes@3.0.0
+ * deps: compressible@~2.0.11
+ - deps: mime-db@'>= 1.29.0 < 2'
+ * deps: debug@2.6.9
+ * deps: vary@~1.1.2
+ - perf: improve header token parsing speed
+
+1.7.0 / 2017-07-10
+==================
+
+ * Use `safe-buffer` for improved Buffer API
+ * deps: bytes@2.5.0
+ * deps: compressible@~2.0.10
+ - Fix regex fallback to not override `compressible: false` in db
+ - deps: mime-db@'>= 1.27.0 < 2'
+ * deps: debug@2.6.8
+ - Allow colors in workers
+ - Deprecated `DEBUG_FD` environment variable set to `3` or higher
+ - Fix error when running under React Native
+ - Fix `DEBUG_MAX_ARRAY_LENGTH`
+ - Use same color for same namespace
+ - deps: ms@2.0.0
+ * deps: vary@~1.1.1
+ - perf: hoist regular expression
+
+1.6.2 / 2016-05-12
+==================
+
+ * deps: accepts@~1.3.3
+ - deps: mime-types@~2.1.11
+ - deps: negotiator@0.6.1
+ * deps: bytes@2.3.0
+ - Drop partial bytes on all parsed units
+ - Fix parsing byte string that looks like hex
+ - perf: hoist regular expressions
+ * deps: compressible@~2.0.8
+ - deps: mime-db@'>= 1.23.0 < 2'
+
+1.6.1 / 2016-01-19
+==================
+
+ * deps: bytes@2.2.0
+ * deps: compressible@~2.0.7
+ - deps: mime-db@'>= 1.21.0 < 2'
+ * deps: accepts@~1.3.1
+ - deps: mime-types@~2.1.9
+
+1.6.0 / 2015-09-29
+==================
+
+ * Skip compression when response has `Cache-Control: no-transform`
+ * deps: accepts@~1.3.0
+ - deps: mime-types@~2.1.7
+ - deps: negotiator@0.6.0
+ * deps: compressible@~2.0.6
+ - deps: mime-db@'>= 1.19.0 < 2'
+ * deps: on-headers@~1.0.1
+ - perf: enable strict mode
+ * deps: vary@~1.1.0
+ - Only accept valid field names in the `field` argument
+
+1.5.2 / 2015-07-30
+==================
+
+ * deps: accepts@~1.2.12
+ - deps: mime-types@~2.1.4
+ * deps: compressible@~2.0.5
+ - deps: mime-db@'>= 1.16.0 < 2'
+ * deps: vary@~1.0.1
+ - Fix setting empty header from empty `field`
+ - perf: enable strict mode
+ - perf: remove argument reassignments
+
+1.5.1 / 2015-07-05
+==================
+
+ * deps: accepts@~1.2.10
+ - deps: mime-types@~2.1.2
+ * deps: compressible@~2.0.4
+ - deps: mime-db@'>= 1.14.0 < 2'
+ - perf: enable strict mode
+
+1.5.0 / 2015-06-09
+==================
+
+ * Fix return value from `.end` and `.write` after end
+ * Improve detection of zero-length body without `Content-Length`
+ * deps: accepts@~1.2.9
+ - deps: mime-types@~2.1.1
+ - perf: avoid argument reassignment & argument slice
+ - perf: avoid negotiator recursive construction
+ - perf: enable strict mode
+ - perf: remove unnecessary bitwise operator
+ * deps: bytes@2.1.0
+ - Slight optimizations
+ - Units no longer case sensitive when parsing
+ * deps: compressible@~2.0.3
+ - Fix regex fallback to work if type exists, but is undefined
+ - deps: mime-db@'>= 1.13.0 < 2'
+ - perf: hoist regex declaration
+ - perf: use regex to extract mime
+ * perf: enable strict mode
+ * perf: remove flush reassignment
+ * perf: simplify threshold detection
+
+1.4.4 / 2015-05-11
+==================
+
+ * deps: accepts@~1.2.7
+ - deps: mime-types@~2.0.11
+ - deps: negotiator@0.5.3
+ * deps: debug@~2.2.0
+ - deps: ms@0.7.1
+
+1.4.3 / 2015-03-14
+==================
+
+ * deps: accepts@~1.2.5
+ - deps: mime-types@~2.0.10
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+
+1.4.2 / 2015-03-11
+==================
+
+ * Fix error when code calls `res.end(str, encoding)`
+ - Specific to Node.js 0.8
+ * deps: debug@~2.1.2
+ - deps: ms@0.7.0
+
+1.4.1 / 2015-02-15
+==================
+
+ * deps: accepts@~1.2.4
+ - deps: mime-types@~2.0.9
+ - deps: negotiator@0.5.1
+
+1.4.0 / 2015-02-01
+==================
+
+ * Prefer `gzip` over `deflate` on the server
+ - Not all clients agree on what "deflate" coding means
+
+1.3.1 / 2015-01-31
+==================
+
+ * deps: accepts@~1.2.3
+ - deps: mime-types@~2.0.8
+ * deps: compressible@~2.0.2
+ - deps: mime-db@'>= 1.1.2 < 2'
+
+1.3.0 / 2014-12-30
+==================
+
+ * Export the default `filter` function for wrapping
+ * deps: accepts@~1.2.2
+ - deps: mime-types@~2.0.7
+ - deps: negotiator@0.5.0
+ * deps: debug@~2.1.1
+
+1.2.2 / 2014-12-10
+==================
+
+ * Fix `.end` to only proxy to `.end`
+ - Fixes an issue with Node.js 0.11.14
+ * deps: accepts@~1.1.4
+ - deps: mime-types@~2.0.4
+
+1.2.1 / 2014-11-23
+==================
+
+ * deps: accepts@~1.1.3
+ - deps: mime-types@~2.0.3
+
+1.2.0 / 2014-10-16
+==================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+
+1.1.2 / 2014-10-15
+==================
+
+ * deps: accepts@~1.1.2
+ - Fix error when media type has invalid parameter
+ - deps: negotiator@0.4.9
+
+1.1.1 / 2014-10-12
+==================
+
+ * deps: accepts@~1.1.1
+ - deps: mime-types@~2.0.2
+ - deps: negotiator@0.4.8
+ * deps: compressible@~2.0.1
+ - deps: mime-db@1.x
+
+1.1.0 / 2014-09-07
+==================
+
+ * deps: accepts@~1.1.0
+ * deps: compressible@~2.0.0
+ * deps: debug@~2.0.0
+
+1.0.11 / 2014-08-10
+===================
+
+ * deps: on-headers@~1.0.0
+ * deps: vary@~1.0.0
+
+1.0.10 / 2014-08-05
+===================
+
+ * deps: compressible@~1.1.1
+ - Fix upper-case Content-Type characters prevent compression
+
+1.0.9 / 2014-07-20
+==================
+
+ * Add `debug` messages
+ * deps: accepts@~1.0.7
+ - deps: negotiator@0.4.7
+
+1.0.8 / 2014-06-20
+==================
+
+ * deps: accepts@~1.0.5
+ - use `mime-types`
+
+1.0.7 / 2014-06-11
+==================
+
+ * use vary module for better `Vary` behavior
+ * deps: accepts@1.0.3
+ * deps: compressible@1.1.0
+
+1.0.6 / 2014-06-03
+==================
+
+ * fix regression when negotiation fails
+
+1.0.5 / 2014-06-03
+==================
+
+ * fix listeners for delayed stream creation
+ - fixes regression for certain `stream.pipe(res)` situations
+
+1.0.4 / 2014-06-03
+==================
+
+ * fix adding `Vary` when value stored as array
+ * fix back-pressure behavior
+ * fix length check for `res.end`
+
+1.0.3 / 2014-05-29
+==================
+
+ * use `accepts` for negotiation
+ * use `on-headers` to handle header checking
+ * deps: bytes@1.0.0
+
+1.0.2 / 2014-04-29
+==================
+
+ * only version compatible with node.js 0.8
+ * support headers given to `res.writeHead`
+ * deps: bytes@0.3.0
+ * deps: negotiator@0.4.3
+
+1.0.1 / 2014-03-08
+==================
+
+ * bump negotiator
+ * use compressible
+ * use .headersSent (drops 0.8 support)
+ * handle identity;q=0 case
diff --git a/node_modules/compression/LICENSE b/node_modules/compression/LICENSE
new file mode 100644
index 0000000..386b7b6
--- /dev/null
+++ b/node_modules/compression/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/compression/README.md b/node_modules/compression/README.md
new file mode 100644
index 0000000..8892e5b
--- /dev/null
+++ b/node_modules/compression/README.md
@@ -0,0 +1,240 @@
+# compression
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Node.js compression middleware.
+
+The following compression codings are supported:
+
+ - deflate
+ - gzip
+
+## Install
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```bash
+$ npm install compression
+```
+
+## API
+
+
+
+```js
+var compression = require('compression')
+```
+
+### compression([options])
+
+Returns the compression middleware using the given `options`. The middleware
+will attempt to compress response bodies for all request that traverse through
+the middleware, based on the given `options`.
+
+This middleware will never compress responses that include a `Cache-Control`
+header with the [`no-transform` directive](https://tools.ietf.org/html/rfc7234#section-5.2.2.4),
+as compressing will transform the body.
+
+#### Options
+
+`compression()` accepts these properties in the options object. In addition to
+those listed below, [zlib](http://nodejs.org/api/zlib.html) options may be
+passed in to the options object.
+
+##### chunkSize
+
+The default value is `zlib.Z_DEFAULT_CHUNK`, or `16384`.
+
+See [Node.js documentation](http://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
+regarding the usage.
+
+##### filter
+
+A function to decide if the response should be considered for compression.
+This function is called as `filter(req, res)` and is expected to return
+`true` to consider the response for compression, or `false` to not compress
+the response.
+
+The default filter function uses the [compressible](https://www.npmjs.com/package/compressible)
+module to determine if `res.getHeader('Content-Type')` is compressible.
+
+##### level
+
+The level of zlib compression to apply to responses. A higher level will result
+in better compression, but will take longer to complete. A lower level will
+result in less compression, but will be much faster.
+
+This is an integer in the range of `0` (no compression) to `9` (maximum
+compression). The special value `-1` can be used to mean the "default
+compression level", which is a default compromise between speed and
+compression (currently equivalent to level 6).
+
+ - `-1` Default compression level (also `zlib.Z_DEFAULT_COMPRESSION`).
+ - `0` No compression (also `zlib.Z_NO_COMPRESSION`).
+ - `1` Fastest compression (also `zlib.Z_BEST_SPEED`).
+ - `2`
+ - `3`
+ - `4`
+ - `5`
+ - `6` (currently what `zlib.Z_DEFAULT_COMPRESSION` points to).
+ - `7`
+ - `8`
+ - `9` Best compression (also `zlib.Z_BEST_COMPRESSION`).
+
+The default value is `zlib.Z_DEFAULT_COMPRESSION`, or `-1`.
+
+**Note** in the list above, `zlib` is from `zlib = require('zlib')`.
+
+##### memLevel
+
+This specifies how much memory should be allocated for the internal compression
+state and is an integer in the range of `1` (minimum level) and `9` (maximum
+level).
+
+The default value is `zlib.Z_DEFAULT_MEMLEVEL`, or `8`.
+
+See [Node.js documentation](http://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
+regarding the usage.
+
+##### strategy
+
+This is used to tune the compression algorithm. This value only affects the
+compression ratio, not the correctness of the compressed output, even if it
+is not set appropriately.
+
+ - `zlib.Z_DEFAULT_STRATEGY` Use for normal data.
+ - `zlib.Z_FILTERED` Use for data produced by a filter (or predictor).
+ Filtered data consists mostly of small values with a somewhat random
+ distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect is to force more Huffman coding and less
+ string matching; it is somewhat intermediate between `zlib.Z_DEFAULT_STRATEGY`
+ and `zlib.Z_HUFFMAN_ONLY`.
+ - `zlib.Z_FIXED` Use to prevent the use of dynamic Huffman codes, allowing
+ for a simpler decoder for special applications.
+ - `zlib.Z_HUFFMAN_ONLY` Use to force Huffman encoding only (no string match).
+ - `zlib.Z_RLE` Use to limit match distances to one (run-length encoding).
+ This is designed to be almost as fast as `zlib.Z_HUFFMAN_ONLY`, but give
+ better compression for PNG image data.
+
+**Note** in the list above, `zlib` is from `zlib = require('zlib')`.
+
+##### threshold
+
+The byte threshold for the response body size before compression is considered
+for the response, defaults to `1kb`. This is a number of bytes or any string
+accepted by the [bytes](https://www.npmjs.com/package/bytes) module.
+
+**Note** this is only an advisory setting; if the response size cannot be determined
+at the time the response headers are written, then it is assumed the response is
+_over_ the threshold. To guarantee the response size can be determined, be sure
+set a `Content-Length` response header.
+
+##### windowBits
+
+The default value is `zlib.Z_DEFAULT_WINDOWBITS`, or `15`.
+
+See [Node.js documentation](http://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
+regarding the usage.
+
+#### .filter
+
+The default `filter` function. This is used to construct a custom filter
+function that is an extension of the default function.
+
+```js
+var compression = require('compression')
+var express = require('express')
+
+var app = express()
+app.use(compression({filter: shouldCompress}))
+
+function shouldCompress (req, res) {
+ if (req.headers['x-no-compression']) {
+ // don't compress responses with this request header
+ return false
+ }
+
+ // fallback to standard filter function
+ return compression.filter(req, res)
+}
+```
+
+### res.flush
+
+This module adds a `res.flush()` method to force the partially-compressed
+response to be flushed to the client.
+
+## Examples
+
+### express/connect
+
+When using this module with express or connect, simply `app.use` the module as
+high as you like. Requests that pass through the middleware will be compressed.
+
+```js
+var compression = require('compression')
+var express = require('express')
+
+var app = express()
+
+// compress all responses
+app.use(compression())
+
+// add all routes
+```
+
+### Server-Sent Events
+
+Because of the nature of compression this module does not work out of the box
+with server-sent events. To compress content, a window of the output needs to
+be buffered up in order to get good compression. Typically when using server-sent
+events, there are certain block of data that need to reach the client.
+
+You can achieve this by calling `res.flush()` when you need the data written to
+actually make it to the client.
+
+```js
+var compression = require('compression')
+var express = require('express')
+
+var app = express()
+
+// compress responses
+app.use(compression())
+
+// server-sent event stream
+app.get('/events', function (req, res) {
+ res.setHeader('Content-Type', 'text/event-stream')
+ res.setHeader('Cache-Control', 'no-cache')
+
+ // send a ping approx every 2 seconds
+ var timer = setInterval(function () {
+ res.write('data: ping\n\n')
+
+ // !!! this is the important part
+ res.flush()
+ }, 2000)
+
+ res.on('close', function () {
+ clearInterval(timer)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/compression.svg
+[npm-url]: https://npmjs.org/package/compression
+[travis-image]: https://img.shields.io/travis/expressjs/compression/master.svg
+[travis-url]: https://travis-ci.org/expressjs/compression
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/compression/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/compression?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/compression.svg
+[downloads-url]: https://npmjs.org/package/compression
diff --git a/node_modules/compression/index.js b/node_modules/compression/index.js
new file mode 100644
index 0000000..f190c68
--- /dev/null
+++ b/node_modules/compression/index.js
@@ -0,0 +1,277 @@
+/*!
+ * compression
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var accepts = require('accepts')
+var Buffer = require('safe-buffer').Buffer
+var bytes = require('bytes')
+var compressible = require('compressible')
+var debug = require('debug')('compression')
+var onHeaders = require('on-headers')
+var vary = require('vary')
+var zlib = require('zlib')
+
+/**
+ * Module exports.
+ */
+
+module.exports = compression
+module.exports.filter = shouldCompress
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var cacheControlNoTransformRegExp = /(?:^|,)\s*?no-transform\s*?(?:,|$)/
+
+/**
+ * Compress response data with gzip / deflate.
+ *
+ * @param {Object} [options]
+ * @return {Function} middleware
+ * @public
+ */
+
+function compression (options) {
+ var opts = options || {}
+
+ // options
+ var filter = opts.filter || shouldCompress
+ var threshold = bytes.parse(opts.threshold)
+
+ if (threshold == null) {
+ threshold = 1024
+ }
+
+ return function compression (req, res, next) {
+ var ended = false
+ var length
+ var listeners = []
+ var stream
+
+ var _end = res.end
+ var _on = res.on
+ var _write = res.write
+
+ // flush
+ res.flush = function flush () {
+ if (stream) {
+ stream.flush()
+ }
+ }
+
+ // proxy
+
+ res.write = function write (chunk, encoding) {
+ if (ended) {
+ return false
+ }
+
+ if (!this._header) {
+ this._implicitHeader()
+ }
+
+ return stream
+ ? stream.write(Buffer.from(chunk, encoding))
+ : _write.call(this, chunk, encoding)
+ }
+
+ res.end = function end (chunk, encoding) {
+ if (ended) {
+ return false
+ }
+
+ if (!this._header) {
+ // estimate the length
+ if (!this.getHeader('Content-Length')) {
+ length = chunkLength(chunk, encoding)
+ }
+
+ this._implicitHeader()
+ }
+
+ if (!stream) {
+ return _end.call(this, chunk, encoding)
+ }
+
+ // mark ended
+ ended = true
+
+ // write Buffer for Node.js 0.8
+ return chunk
+ ? stream.end(Buffer.from(chunk, encoding))
+ : stream.end()
+ }
+
+ res.on = function on (type, listener) {
+ if (!listeners || type !== 'drain') {
+ return _on.call(this, type, listener)
+ }
+
+ if (stream) {
+ return stream.on(type, listener)
+ }
+
+ // buffer listeners for future stream
+ listeners.push([type, listener])
+
+ return this
+ }
+
+ function nocompress (msg) {
+ debug('no compression: %s', msg)
+ addListeners(res, _on, listeners)
+ listeners = null
+ }
+
+ onHeaders(res, function onResponseHeaders () {
+ // determine if request is filtered
+ if (!filter(req, res)) {
+ nocompress('filtered')
+ return
+ }
+
+ // determine if the entity should be transformed
+ if (!shouldTransform(req, res)) {
+ nocompress('no transform')
+ return
+ }
+
+ // vary
+ vary(res, 'Accept-Encoding')
+
+ // content-length below threshold
+ if (Number(res.getHeader('Content-Length')) < threshold || length < threshold) {
+ nocompress('size below threshold')
+ return
+ }
+
+ var encoding = res.getHeader('Content-Encoding') || 'identity'
+
+ // already encoded
+ if (encoding !== 'identity') {
+ nocompress('already encoded')
+ return
+ }
+
+ // head
+ if (req.method === 'HEAD') {
+ nocompress('HEAD request')
+ return
+ }
+
+ // compression method
+ var accept = accepts(req)
+ var method = accept.encoding(['gzip', 'deflate', 'identity'])
+
+ // we really don't prefer deflate
+ if (method === 'deflate' && accept.encoding(['gzip'])) {
+ method = accept.encoding(['gzip', 'identity'])
+ }
+
+ // negotiation failed
+ if (!method || method === 'identity') {
+ nocompress('not acceptable')
+ return
+ }
+
+ // compression stream
+ debug('%s compression', method)
+ stream = method === 'gzip'
+ ? zlib.createGzip(opts)
+ : zlib.createDeflate(opts)
+
+ // add buffered listeners to stream
+ addListeners(stream, stream.on, listeners)
+
+ // header fields
+ res.setHeader('Content-Encoding', method)
+ res.removeHeader('Content-Length')
+
+ // compression
+ stream.on('data', function onStreamData (chunk) {
+ if (_write.call(res, chunk) === false) {
+ stream.pause()
+ }
+ })
+
+ stream.on('end', function onStreamEnd () {
+ _end.call(res)
+ })
+
+ _on.call(res, 'drain', function onResponseDrain () {
+ stream.resume()
+ })
+ })
+
+ next()
+ }
+}
+
+/**
+ * Add bufferred listeners to stream
+ * @private
+ */
+
+function addListeners (stream, on, listeners) {
+ for (var i = 0; i < listeners.length; i++) {
+ on.apply(stream, listeners[i])
+ }
+}
+
+/**
+ * Get the length of a given chunk
+ */
+
+function chunkLength (chunk, encoding) {
+ if (!chunk) {
+ return 0
+ }
+
+ return !Buffer.isBuffer(chunk)
+ ? Buffer.byteLength(chunk, encoding)
+ : chunk.length
+}
+
+/**
+ * Default filter function.
+ * @private
+ */
+
+function shouldCompress (req, res) {
+ var type = res.getHeader('Content-Type')
+
+ if (type === undefined || !compressible(type)) {
+ debug('%s not compressible', type)
+ return false
+ }
+
+ return true
+}
+
+/**
+ * Determine if the entity should be transformed.
+ * @private
+ */
+
+function shouldTransform (req, res) {
+ var cacheControl = res.getHeader('Cache-Control')
+
+ // Don't compress for Cache-Control: no-transform
+ // https://tools.ietf.org/html/rfc7234#section-5.2.2.4
+ return !cacheControl ||
+ !cacheControlNoTransformRegExp.test(cacheControl)
+}
diff --git a/node_modules/compression/package.json b/node_modules/compression/package.json
new file mode 100644
index 0000000..33157e4
--- /dev/null
+++ b/node_modules/compression/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "compression@^1.5.2",
+ "_id": "compression@1.7.3",
+ "_inBundle": false,
+ "_integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==",
+ "_location": "/compression",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "compression@^1.5.2",
+ "name": "compression",
+ "escapedName": "compression",
+ "rawSpec": "^1.5.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.2"
+ },
+ "_requiredBy": [
+ "/webpack-dev-server"
+ ],
+ "_resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz",
+ "_shasum": "27e0e176aaf260f7f2c2813c3e440adb9f1993db",
+ "_spec": "compression@^1.5.2",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/webpack-dev-server",
+ "bugs": {
+ "url": "https://github.com/expressjs/compression/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "dependencies": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.14",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.1",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ },
+ "deprecated": false,
+ "description": "Node.js compression middleware",
+ "devDependencies": {
+ "after": "0.8.2",
+ "eslint": "4.19.1",
+ "eslint-config-standard": "11.0.0",
+ "eslint-plugin-import": "2.13.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "6.0.1",
+ "eslint-plugin-promise": "3.8.0",
+ "eslint-plugin-standard": "3.1.0",
+ "istanbul": "0.4.5",
+ "mocha": "2.5.3",
+ "supertest": "1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/expressjs/compression#readme",
+ "license": "MIT",
+ "name": "compression",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/expressjs/compression.git"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
+ },
+ "version": "1.7.3"
+}
diff --git a/node_modules/connect-history-api-fallback/CHANGELOG.md b/node_modules/connect-history-api-fallback/CHANGELOG.md
new file mode 100644
index 0000000..8a67f5a
--- /dev/null
+++ b/node_modules/connect-history-api-fallback/CHANGELOG.md
@@ -0,0 +1,28 @@
+# Changelog
+
+## v1.6.0
+ - Recommend absolute paths for rewrite targets. Contributed by @helfi92.
+
+## v1.5.0
+ - Expose the HTTP request object in rewrite rules. Contributed by @VladShcherbin.
+
+## v1.4.0
+ - The `.` (DOT) rule should only check the last path element. Contributed by @ntkme.
+
+## v1.3.0
+ - Allow disabling of the `.` (DOT) rule via the `disableDotRule` option.
+
+## v1.2.0
+ - Support definition of custom HTML `Accept` header values. Contributed by @cgmartin.
+
+## v1.1.0
+ - Rewrite rules are now applied before the request URL is checked for dots.
+ - Rewrite rules can be defined as functions to have greater control over the `dot rule`.
+
+## v1.0.0
+This version introduces a fair amount of breaking changes. Specifically, instances of the historyApiFallback need to be created via the exported function. Previously, this was not necessary.
+
+ - **Breaking:** Support multiple instances of the historyApiFallback middleware with different configurations.
+ - **Breaking:** Loggers are configured per historyApiFallback middleware instance (see `README.md`).
+ - The fallback index HTML file can be configured. Default is `/index.html`.
+ - Additional rewrite rules can be defined via regular expressions.
diff --git a/node_modules/connect-history-api-fallback/LICENSE b/node_modules/connect-history-api-fallback/LICENSE
new file mode 100644
index 0000000..8530820
--- /dev/null
+++ b/node_modules/connect-history-api-fallback/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2012 Ben Ripkens http://bripkens.de
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/connect-history-api-fallback/README.md b/node_modules/connect-history-api-fallback/README.md
new file mode 100644
index 0000000..8bbc5f8
--- /dev/null
+++ b/node_modules/connect-history-api-fallback/README.md
@@ -0,0 +1,164 @@
+connect-history-api-fallback
+Middleware to proxy requests through a specified index page, useful for Single Page Applications that utilise the HTML5 History API.
+
+[](https://travis-ci.org/bripkens/connect-history-api-fallback)
+[](https://david-dm.org/bripkens/connect-history-api-fallback/master)
+
+[](https://nodei.co/npm/connect-history-api-fallback/)
+
+
+Table of Contents
+
+
+
+- [Introduction](#introduction)
+- [Usage](#usage)
+- [Options](#options)
+ - [index](#index)
+ - [rewrites](#rewrites)
+ - [verbose](#verbose)
+ - [htmlAcceptHeaders](#htmlacceptheaders)
+ - [disableDotRule](#disabledotrule)
+
+
+
+## Introduction
+
+Single Page Applications (SPA) typically only utilise one index file that is
+accessible by web browsers: usually `index.html`. Navigation in the application
+is then commonly handled using JavaScript with the help of the
+[HTML5 History API](http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-history-interface).
+This results in issues when the user hits the refresh button or is directly
+accessing a page other than the landing page, e.g. `/help` or `/help/online`
+as the web server bypasses the index file to locate the file at this location.
+As your application is a SPA, the web server will fail trying to retrieve the file and return a *404 - Not Found*
+message to the user.
+
+This tiny middleware addresses some of the issues. Specifically, it will change
+the requested location to the index you specify (default being `/index.html`)
+whenever there is a request which fulfills the following criteria:
+
+ 1. The request is a GET request
+ 2. which accepts `text/html`,
+ 3. is not a direct file request, i.e. the requested path does not contain a
+ `.` (DOT) character and
+ 4. does not match a pattern provided in options.rewrites (see options below)
+
+## Usage
+
+The middleware is available through NPM and can easily be added.
+
+```
+npm install --save connect-history-api-fallback
+```
+
+Import the library
+
+```javascript
+var history = require('connect-history-api-fallback');
+```
+
+Now you only need to add the middleware to your application like so
+
+```javascript
+var connect = require('connect');
+
+var app = connect()
+ .use(history())
+ .listen(3000);
+```
+
+Of course you can also use this piece of middleware with express:
+
+```javascript
+var express = require('express');
+
+var app = express();
+app.use(history());
+```
+
+## Options
+You can optionally pass options to the library when obtaining the middleware
+
+```javascript
+var middleware = history({});
+```
+
+### index
+Override the index (default `/index.html`)
+
+```javascript
+history({
+ index: '/default.html'
+});
+```
+
+### rewrites
+Override the index when the request url matches a regex pattern. You can either rewrite to a static string or use a function to transform the incoming request.
+
+The following will rewrite a request that matches the `/\/soccer/` pattern to `/soccer.html`.
+```javascript
+history({
+ rewrites: [
+ { from: /\/soccer/, to: '/soccer.html'}
+ ]
+});
+```
+
+Alternatively functions can be used to have more control over the rewrite process. For instance, the following listing shows how requests to `/libs/jquery/jquery.1.12.0.min.js` and the like can be routed to `./bower_components/libs/jquery/jquery.1.12.0.min.js`. You can also make use of this if you have an API version in the URL path.
+```javascript
+history({
+ rewrites: [
+ {
+ from: /^\/libs\/.*$/,
+ to: function(context) {
+ return '/bower_components' + context.parsedUrl.pathname;
+ }
+ }
+ ]
+});
+```
+
+The function will always be called with a context object that has the following properties:
+
+ - **parsedUrl**: Information about the URL as provided by the [URL module's](https://nodejs.org/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost) `url.parse`.
+ - **match**: An Array of matched results as provided by `String.match(...)`.
+ - **request**: The HTTP request object.
+
+
+### verbose
+This middleware does not log any information by default. If you wish to activate logging, then you can do so via the `verbose` option or by specifying a logger function.
+
+```javascript
+history({
+ verbose: true
+});
+```
+
+Alternatively use your own logger
+
+```javascript
+history({
+ logger: console.log.bind(console)
+});
+```
+
+### htmlAcceptHeaders
+Override the default `Accepts:` headers that are queried when matching HTML content requests (Default: `['text/html', '*/*']`).
+
+```javascript
+history({
+ htmlAcceptHeaders: ['text/html', 'application/xhtml+xml']
+})
+```
+
+### disableDotRule
+Disables the dot rule mentioned above:
+
+> […] is not a direct file request, i.e. the requested path does not contain a `.` (DOT) character […]
+
+```javascript
+history({
+ disableDotRule: true
+})
+```
diff --git a/node_modules/connect-history-api-fallback/lib/index.js b/node_modules/connect-history-api-fallback/lib/index.js
new file mode 100644
index 0000000..443b925
--- /dev/null
+++ b/node_modules/connect-history-api-fallback/lib/index.js
@@ -0,0 +1,120 @@
+'use strict';
+
+var url = require('url');
+
+exports = module.exports = function historyApiFallback(options) {
+ options = options || {};
+ var logger = getLogger(options);
+
+ return function(req, res, next) {
+ var headers = req.headers;
+ if (req.method !== 'GET') {
+ logger(
+ 'Not rewriting',
+ req.method,
+ req.url,
+ 'because the method is not GET.'
+ );
+ return next();
+ } else if (!headers || typeof headers.accept !== 'string') {
+ logger(
+ 'Not rewriting',
+ req.method,
+ req.url,
+ 'because the client did not send an HTTP accept header.'
+ );
+ return next();
+ } else if (headers.accept.indexOf('application/json') === 0) {
+ logger(
+ 'Not rewriting',
+ req.method,
+ req.url,
+ 'because the client prefers JSON.'
+ );
+ return next();
+ } else if (!acceptsHtml(headers.accept, options)) {
+ logger(
+ 'Not rewriting',
+ req.method,
+ req.url,
+ 'because the client does not accept HTML.'
+ );
+ return next();
+ }
+
+ var parsedUrl = url.parse(req.url);
+ var rewriteTarget;
+ options.rewrites = options.rewrites || [];
+ for (var i = 0; i < options.rewrites.length; i++) {
+ var rewrite = options.rewrites[i];
+ var match = parsedUrl.pathname.match(rewrite.from);
+ if (match !== null) {
+ rewriteTarget = evaluateRewriteRule(parsedUrl, match, rewrite.to, req);
+
+ if(rewriteTarget.charAt(0) !== '/') {
+ logger(
+ 'We recommend using an absolute path for the rewrite target.',
+ 'Received a non-absolute rewrite target',
+ rewriteTarget,
+ 'for URL',
+ req.url
+ );
+ }
+
+ logger('Rewriting', req.method, req.url, 'to', rewriteTarget);
+ req.url = rewriteTarget;
+ return next();
+ }
+ }
+
+ var pathname = parsedUrl.pathname;
+ if (pathname.lastIndexOf('.') > pathname.lastIndexOf('/') &&
+ options.disableDotRule !== true) {
+ logger(
+ 'Not rewriting',
+ req.method,
+ req.url,
+ 'because the path includes a dot (.) character.'
+ );
+ return next();
+ }
+
+ rewriteTarget = options.index || '/index.html';
+ logger('Rewriting', req.method, req.url, 'to', rewriteTarget);
+ req.url = rewriteTarget;
+ next();
+ };
+};
+
+function evaluateRewriteRule(parsedUrl, match, rule, req) {
+ if (typeof rule === 'string') {
+ return rule;
+ } else if (typeof rule !== 'function') {
+ throw new Error('Rewrite rule can only be of type string or function.');
+ }
+
+ return rule({
+ parsedUrl: parsedUrl,
+ match: match,
+ request: req
+ });
+}
+
+function acceptsHtml(header, options) {
+ options.htmlAcceptHeaders = options.htmlAcceptHeaders || ['text/html', '*/*'];
+ for (var i = 0; i < options.htmlAcceptHeaders.length; i++) {
+ if (header.indexOf(options.htmlAcceptHeaders[i]) !== -1) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function getLogger(options) {
+ if (options && options.logger) {
+ return options.logger;
+ } else if (options && options.verbose) {
+ return console.log.bind(console);
+ }
+ return function(){};
+}
diff --git a/node_modules/connect-history-api-fallback/package.json b/node_modules/connect-history-api-fallback/package.json
new file mode 100644
index 0000000..99b871c
--- /dev/null
+++ b/node_modules/connect-history-api-fallback/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "connect-history-api-fallback@^1.3.0",
+ "_id": "connect-history-api-fallback@1.6.0",
+ "_inBundle": false,
+ "_integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==",
+ "_location": "/connect-history-api-fallback",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "connect-history-api-fallback@^1.3.0",
+ "name": "connect-history-api-fallback",
+ "escapedName": "connect-history-api-fallback",
+ "rawSpec": "^1.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.0"
+ },
+ "_requiredBy": [
+ "/webpack-dev-server"
+ ],
+ "_resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz",
+ "_shasum": "8b32089359308d111115d81cad3fceab888f97bc",
+ "_spec": "connect-history-api-fallback@^1.3.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/webpack-dev-server",
+ "author": {
+ "name": "Ben Ripkens",
+ "email": "bripkens.dev@gmail.com",
+ "url": "http://bripkens.de"
+ },
+ "bugs": {
+ "url": "https://github.com/bripkens/connect-history-api-fallback/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Craig Myles",
+ "email": "cr@igmyles.com",
+ "url": "http://www.craigmyles.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "Provides a fallback for non-existing directories so that the HTML 5 history API can be used.",
+ "devDependencies": {
+ "eslint": "^0.18.0",
+ "nodeunit": "^0.11.3",
+ "sinon": "^1.14.1"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "files": [
+ "lib"
+ ],
+ "homepage": "https://github.com/bripkens/connect-history-api-fallback#readme",
+ "keyswords": [
+ "connect",
+ "html5",
+ "history api",
+ "fallback",
+ "spa"
+ ],
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "connect-history-api-fallback",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/bripkens/connect-history-api-fallback.git"
+ },
+ "scripts": {
+ "test": "eslint lib/index.js test/index_test.js && nodeunit test/index_test.js"
+ },
+ "version": "1.6.0"
+}
diff --git a/node_modules/content-disposition/HISTORY.md b/node_modules/content-disposition/HISTORY.md
new file mode 100644
index 0000000..53849b6
--- /dev/null
+++ b/node_modules/content-disposition/HISTORY.md
@@ -0,0 +1,50 @@
+0.5.2 / 2016-12-08
+==================
+
+ * Fix `parse` to accept any linear whitespace character
+
+0.5.1 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+0.5.0 / 2014-10-11
+==================
+
+ * Add `parse` function
+
+0.4.0 / 2014-09-21
+==================
+
+ * Expand non-Unicode `filename` to the full ISO-8859-1 charset
+
+0.3.0 / 2014-09-20
+==================
+
+ * Add `fallback` option
+ * Add `type` option
+
+0.2.0 / 2014-09-19
+==================
+
+ * Reduce ambiguity of file names with hex escape in buggy browsers
+
+0.1.2 / 2014-09-19
+==================
+
+ * Fix periodic invalid Unicode filename header
+
+0.1.1 / 2014-09-19
+==================
+
+ * Fix invalid characters appearing in `filename*` parameter
+
+0.1.0 / 2014-09-18
+==================
+
+ * Make the `filename` argument optional
+
+0.0.0 / 2014-09-18
+==================
+
+ * Initial release
diff --git a/node_modules/content-disposition/LICENSE b/node_modules/content-disposition/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/node_modules/content-disposition/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/content-disposition/README.md b/node_modules/content-disposition/README.md
new file mode 100644
index 0000000..992d19a
--- /dev/null
+++ b/node_modules/content-disposition/README.md
@@ -0,0 +1,141 @@
+# content-disposition
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP `Content-Disposition` header
+
+## Installation
+
+```sh
+$ npm install content-disposition
+```
+
+## API
+
+```js
+var contentDisposition = require('content-disposition')
+```
+
+### contentDisposition(filename, options)
+
+Create an attachment `Content-Disposition` header value using the given file name,
+if supplied. The `filename` is optional and if no file name is desired, but you
+want to specify `options`, set `filename` to `undefined`.
+
+```js
+res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
+```
+
+**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
+header through a means different from `setHeader` in Node.js, you'll want to specify
+the `'binary'` encoding in Node.js.
+
+#### Options
+
+`contentDisposition` accepts these properties in the options object.
+
+##### fallback
+
+If the `filename` option is outside ISO-8859-1, then the file name is actually
+stored in a supplemental field for clients that support Unicode file names and
+a ISO-8859-1 version of the file name is automatically generated.
+
+This specifies the ISO-8859-1 file name to override the automatic generation or
+disables the generation all together, defaults to `true`.
+
+ - A string will specify the ISO-8859-1 file name to use in place of automatic
+ generation.
+ - `false` will disable including a ISO-8859-1 file name and only include the
+ Unicode version (unless the file name is already ISO-8859-1).
+ - `true` will enable automatic generation if the file name is outside ISO-8859-1.
+
+If the `filename` option is ISO-8859-1 and this option is specified and has a
+different value, then the `filename` option is encoded in the extended field
+and this set as the fallback field, even though they are both ISO-8859-1.
+
+##### type
+
+Specifies the disposition type, defaults to `"attachment"`. This can also be
+`"inline"`, or any other value (all values except inline are treated like
+`attachment`, but can convey additional information if both parties agree to
+it). The type is normalized to lower-case.
+
+### contentDisposition.parse(string)
+
+```js
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt');
+```
+
+Parse a `Content-Disposition` header string. This automatically handles extended
+("Unicode") parameters by decoding them and providing them under the standard
+parameter name. This will return an object with the following properties (examples
+are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
+
+ - `type`: The disposition type (always lower case). Example: `'attachment'`
+
+ - `parameters`: An object of the parameters in the disposition (name of parameter
+ always lower case and extended versions replace non-extended versions). Example:
+ `{filename: "€ rates.txt"}`
+
+## Examples
+
+### Send a file for download
+
+```js
+var contentDisposition = require('content-disposition')
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+var filePath = '/path/to/public/plans.pdf'
+
+http.createServer(function onRequest(req, res) {
+ // set headers
+ res.setHeader('Content-Type', 'application/pdf')
+ res.setHeader('Content-Disposition', contentDisposition(filePath))
+
+ // send file
+ var stream = fs.createReadStream(filePath)
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## References
+
+- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
+- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
+- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
+- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
+
+[rfc-2616]: https://tools.ietf.org/html/rfc2616
+[rfc-5987]: https://tools.ietf.org/html/rfc5987
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
+[tc-2231]: http://greenbytes.de/tech/tc2231/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat
+[npm-url]: https://npmjs.org/package/content-disposition
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/content-disposition
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat
+[downloads-url]: https://npmjs.org/package/content-disposition
diff --git a/node_modules/content-disposition/index.js b/node_modules/content-disposition/index.js
new file mode 100644
index 0000000..88a0d0a
--- /dev/null
+++ b/node_modules/content-disposition/index.js
@@ -0,0 +1,445 @@
+/*!
+ * content-disposition
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = contentDisposition
+module.exports.parse = parse
+
+/**
+ * Module dependencies.
+ */
+
+var basename = require('path').basename
+
+/**
+ * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
+ */
+
+var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex
+
+/**
+ * RegExp to match percent encoding escape.
+ */
+
+var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/
+var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g
+
+/**
+ * RegExp to match non-latin1 characters.
+ */
+
+var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR =
+ */
+
+var QESC_REGEXP = /\\([\u0000-\u007f])/g
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+
+var QUOTE_REGEXP = /([\\"])/g
+
+/**
+ * RegExp for various RFC 2616 grammar
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = >
+ * quoted-pair = "\" CHAR
+ * CHAR =
+ * TEXT =
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR =
+ * LF =
+ * SP =
+ * HT =
+ * CTL =
+ * OCTET =
+ */
+
+var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex
+var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/
+var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/
+
+/**
+ * RegExp for various RFC 5987 grammar
+ *
+ * ext-value = charset "'" [ language ] "'" value-chars
+ * charset = "UTF-8" / "ISO-8859-1" / mime-charset
+ * mime-charset = 1*mime-charsetc
+ * mime-charsetc = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "%" / "&"
+ * / "+" / "-" / "^" / "_" / "`"
+ * / "{" / "}" / "~"
+ * language = ( 2*3ALPHA [ extlang ] )
+ * / 4ALPHA
+ * / 5*8ALPHA
+ * extlang = *3( "-" 3ALPHA )
+ * value-chars = *( pct-encoded / attr-char )
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * attr-char = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "&" / "+" / "-" / "."
+ * / "^" / "_" / "`" / "|" / "~"
+ */
+
+var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/
+
+/**
+ * RegExp for various RFC 6266 grammar
+ *
+ * disposition-type = "inline" | "attachment" | disp-ext-type
+ * disp-ext-type = token
+ * disposition-parm = filename-parm | disp-ext-parm
+ * filename-parm = "filename" "=" value
+ * | "filename*" "=" ext-value
+ * disp-ext-parm = token "=" value
+ * | ext-token "=" ext-value
+ * ext-token =
+ */
+
+var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex
+
+/**
+ * Create an attachment Content-Disposition header.
+ *
+ * @param {string} [filename]
+ * @param {object} [options]
+ * @param {string} [options.type=attachment]
+ * @param {string|boolean} [options.fallback=true]
+ * @return {string}
+ * @api public
+ */
+
+function contentDisposition (filename, options) {
+ var opts = options || {}
+
+ // get type
+ var type = opts.type || 'attachment'
+
+ // get parameters
+ var params = createparams(filename, opts.fallback)
+
+ // format into string
+ return format(new ContentDisposition(type, params))
+}
+
+/**
+ * Create parameters object from filename and fallback.
+ *
+ * @param {string} [filename]
+ * @param {string|boolean} [fallback=true]
+ * @return {object}
+ * @api private
+ */
+
+function createparams (filename, fallback) {
+ if (filename === undefined) {
+ return
+ }
+
+ var params = {}
+
+ if (typeof filename !== 'string') {
+ throw new TypeError('filename must be a string')
+ }
+
+ // fallback defaults to true
+ if (fallback === undefined) {
+ fallback = true
+ }
+
+ if (typeof fallback !== 'string' && typeof fallback !== 'boolean') {
+ throw new TypeError('fallback must be a string or boolean')
+ }
+
+ if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) {
+ throw new TypeError('fallback must be ISO-8859-1 string')
+ }
+
+ // restrict to file base name
+ var name = basename(filename)
+
+ // determine if name is suitable for quoted string
+ var isQuotedString = TEXT_REGEXP.test(name)
+
+ // generate fallback name
+ var fallbackName = typeof fallback !== 'string'
+ ? fallback && getlatin1(name)
+ : basename(fallback)
+ var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
+
+ // set extended filename parameter
+ if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) {
+ params['filename*'] = name
+ }
+
+ // set filename parameter
+ if (isQuotedString || hasFallback) {
+ params.filename = hasFallback
+ ? fallbackName
+ : name
+ }
+
+ return params
+}
+
+/**
+ * Format object to Content-Disposition header.
+ *
+ * @param {object} obj
+ * @param {string} obj.type
+ * @param {object} [obj.parameters]
+ * @return {string}
+ * @api private
+ */
+
+function format (obj) {
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ // start with normalized type
+ var string = String(type).toLowerCase()
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ var val = param.substr(-1) === '*'
+ ? ustring(parameters[param])
+ : qstring(parameters[param])
+
+ string += '; ' + param + '=' + val
+ }
+ }
+
+ return string
+}
+
+/**
+ * Decode a RFC 6987 field value (gracefully).
+ *
+ * @param {string} str
+ * @return {string}
+ * @api private
+ */
+
+function decodefield (str) {
+ var match = EXT_VALUE_REGEXP.exec(str)
+
+ if (!match) {
+ throw new TypeError('invalid extended field value')
+ }
+
+ var charset = match[1].toLowerCase()
+ var encoded = match[2]
+ var value
+
+ // to binary string
+ var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode)
+
+ switch (charset) {
+ case 'iso-8859-1':
+ value = getlatin1(binary)
+ break
+ case 'utf-8':
+ value = new Buffer(binary, 'binary').toString('utf8')
+ break
+ default:
+ throw new TypeError('unsupported charset in extended field')
+ }
+
+ return value
+}
+
+/**
+ * Get ISO-8859-1 version of string.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function getlatin1 (val) {
+ // simple Unicode -> ISO-8859-1 transformation
+ return String(val).replace(NON_LATIN1_REGEXP, '?')
+}
+
+/**
+ * Parse Content-Disposition header string.
+ *
+ * @param {string} string
+ * @return {object}
+ * @api private
+ */
+
+function parse (string) {
+ if (!string || typeof string !== 'string') {
+ throw new TypeError('argument string is required')
+ }
+
+ var match = DISPOSITION_TYPE_REGEXP.exec(string)
+
+ if (!match) {
+ throw new TypeError('invalid type format')
+ }
+
+ // normalize type
+ var index = match[0].length
+ var type = match[1].toLowerCase()
+
+ var key
+ var names = []
+ var params = {}
+ var value
+
+ // calculate index to start at
+ index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
+ ? index - 1
+ : index
+
+ // match parameters
+ while ((match = PARAM_REGEXP.exec(string))) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (names.indexOf(key) !== -1) {
+ throw new TypeError('invalid duplicate parameter')
+ }
+
+ names.push(key)
+
+ if (key.indexOf('*') + 1 === key.length) {
+ // decode extended value
+ key = key.slice(0, -1)
+ value = decodefield(value)
+
+ // overwrite existing value
+ params[key] = value
+ continue
+ }
+
+ if (typeof params[key] === 'string') {
+ continue
+ }
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(QESC_REGEXP, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return new ContentDisposition(type, params)
+}
+
+/**
+ * Percent decode a single character.
+ *
+ * @param {string} str
+ * @param {string} hex
+ * @return {string}
+ * @api private
+ */
+
+function pdecode (str, hex) {
+ return String.fromCharCode(parseInt(hex, 16))
+}
+
+/**
+ * Percent encode a single character.
+ *
+ * @param {string} char
+ * @return {string}
+ * @api private
+ */
+
+function pencode (char) {
+ var hex = String(char)
+ .charCodeAt(0)
+ .toString(16)
+ .toUpperCase()
+ return hex.length === 1
+ ? '%0' + hex
+ : '%' + hex
+}
+
+/**
+ * Quote a string for HTTP.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring (val) {
+ var str = String(val)
+
+ return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
+}
+
+/**
+ * Encode a Unicode string for HTTP (RFC 5987).
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function ustring (val) {
+ var str = String(val)
+
+ // percent encode as UTF-8
+ var encoded = encodeURIComponent(str)
+ .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode)
+
+ return 'UTF-8\'\'' + encoded
+}
+
+/**
+ * Class for parsed Content-Disposition header for v8 optimization
+ */
+
+function ContentDisposition (type, parameters) {
+ this.type = type
+ this.parameters = parameters
+}
diff --git a/node_modules/content-disposition/package.json b/node_modules/content-disposition/package.json
new file mode 100644
index 0000000..dfbf662
--- /dev/null
+++ b/node_modules/content-disposition/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "content-disposition@0.5.2",
+ "_id": "content-disposition@0.5.2",
+ "_inBundle": false,
+ "_integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=",
+ "_location": "/content-disposition",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "content-disposition@0.5.2",
+ "name": "content-disposition",
+ "escapedName": "content-disposition",
+ "rawSpec": "0.5.2",
+ "saveSpec": null,
+ "fetchSpec": "0.5.2"
+ },
+ "_requiredBy": [
+ "/express"
+ ],
+ "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+ "_shasum": "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4",
+ "_spec": "content-disposition@0.5.2",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "bugs": {
+ "url": "https://github.com/jshttp/content-disposition/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "Create and parse Content-Disposition header",
+ "devDependencies": {
+ "eslint": "3.11.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/jshttp/content-disposition#readme",
+ "keywords": [
+ "content-disposition",
+ "http",
+ "rfc6266",
+ "res"
+ ],
+ "license": "MIT",
+ "name": "content-disposition",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/content-disposition.git"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "version": "0.5.2"
+}
diff --git a/node_modules/content-type/HISTORY.md b/node_modules/content-type/HISTORY.md
new file mode 100644
index 0000000..8f5cb70
--- /dev/null
+++ b/node_modules/content-type/HISTORY.md
@@ -0,0 +1,24 @@
+1.0.4 / 2017-09-11
+==================
+
+ * perf: skip parameter parsing when no parameters
+
+1.0.3 / 2017-09-10
+==================
+
+ * perf: remove argument reassignment
+
+1.0.2 / 2016-05-09
+==================
+
+ * perf: enable strict mode
+
+1.0.1 / 2015-02-13
+==================
+
+ * Improve missing `Content-Type` header error message
+
+1.0.0 / 2015-02-01
+==================
+
+ * Initial implementation, derived from `media-typer@0.3.0`
diff --git a/node_modules/content-type/LICENSE b/node_modules/content-type/LICENSE
new file mode 100644
index 0000000..34b1a2d
--- /dev/null
+++ b/node_modules/content-type/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/content-type/README.md b/node_modules/content-type/README.md
new file mode 100644
index 0000000..3ed6741
--- /dev/null
+++ b/node_modules/content-type/README.md
@@ -0,0 +1,92 @@
+# content-type
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP Content-Type header according to RFC 7231
+
+## Installation
+
+```sh
+$ npm install content-type
+```
+
+## API
+
+```js
+var contentType = require('content-type')
+```
+
+### contentType.parse(string)
+
+```js
+var obj = contentType.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a content type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (the type and subtype, always lower case).
+ Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter
+ always lower case). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the string is missing or invalid.
+
+### contentType.parse(req)
+
+```js
+var obj = contentType.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`contentType.parse(req.headers['content-type'])`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.parse(res)
+
+```js
+var obj = contentType.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`contentType.parse(res.getHeader('content-type'))`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.format(obj)
+
+```js
+var str = contentType.format({type: 'image/svg+xml'})
+```
+
+Format an object into a content type string. This will return a string of the
+content type for the given object with the following properties (examples are
+shown that produce the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of the
+ parameter will be lower-cased). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the object contains an invalid type or parameter names.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-type.svg
+[npm-url]: https://npmjs.org/package/content-type
+[node-version-image]: https://img.shields.io/node/v/content-type.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg
+[travis-url]: https://travis-ci.org/jshttp/content-type
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/content-type
+[downloads-image]: https://img.shields.io/npm/dm/content-type.svg
+[downloads-url]: https://npmjs.org/package/content-type
diff --git a/node_modules/content-type/index.js b/node_modules/content-type/index.js
new file mode 100644
index 0000000..6ce03f2
--- /dev/null
+++ b/node_modules/content-type/index.js
@@ -0,0 +1,222 @@
+/*!
+ * content-type
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
+ *
+ * parameter = token "=" ( token / quoted-string )
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+ * / DIGIT / ALPHA
+ * ; any VCHAR, except delimiters
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
+ * obs-text = %x80-FF
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ */
+var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g
+var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/
+var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
+ *
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ * obs-text = %x80-FF
+ */
+var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
+ */
+var QUOTE_REGEXP = /([\\"])/g
+
+/**
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
+ *
+ * media-type = type "/" subtype
+ * type = token
+ * subtype = token
+ */
+var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @public
+ */
+
+function format (obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || !TYPE_REGEXP.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ var string = type
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!TOKEN_REGEXP.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @public
+ */
+
+function parse (string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ // support req/res-like objects as argument
+ var header = typeof string === 'object'
+ ? getcontenttype(string)
+ : string
+
+ if (typeof header !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = header.indexOf(';')
+ var type = index !== -1
+ ? header.substr(0, index).trim()
+ : header.trim()
+
+ if (!TYPE_REGEXP.test(type)) {
+ throw new TypeError('invalid media type')
+ }
+
+ var obj = new ContentType(type.toLowerCase())
+
+ // parse parameters
+ if (index !== -1) {
+ var key
+ var match
+ var value
+
+ PARAM_REGEXP.lastIndex = index
+
+ while ((match = PARAM_REGEXP.exec(header))) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(QESC_REGEXP, '$1')
+ }
+
+ obj.parameters[key] = value
+ }
+
+ if (index !== header.length) {
+ throw new TypeError('invalid parameter format')
+ }
+ }
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @private
+ */
+
+function getcontenttype (obj) {
+ var header
+
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ header = obj.getHeader('content-type')
+ } else if (typeof obj.headers === 'object') {
+ // req-like
+ header = obj.headers && obj.headers['content-type']
+ }
+
+ if (typeof header !== 'string') {
+ throw new TypeError('content-type header is missing from object')
+ }
+
+ return header
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function qstring (val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (TOKEN_REGEXP.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !TEXT_REGEXP.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
+}
+
+/**
+ * Class to represent a content type.
+ * @private
+ */
+function ContentType (type) {
+ this.parameters = Object.create(null)
+ this.type = type
+}
diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json
new file mode 100644
index 0000000..ae2bc38
--- /dev/null
+++ b/node_modules/content-type/package.json
@@ -0,0 +1,76 @@
+{
+ "_from": "content-type@~1.0.4",
+ "_id": "content-type@1.0.4",
+ "_inBundle": false,
+ "_integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "_location": "/content-type",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "content-type@~1.0.4",
+ "name": "content-type",
+ "escapedName": "content-type",
+ "rawSpec": "~1.0.4",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.4"
+ },
+ "_requiredBy": [
+ "/body-parser",
+ "/express"
+ ],
+ "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "_shasum": "e138cc75e040c727b1966fe5e5f8c9aee256fe3b",
+ "_spec": "content-type@~1.0.4",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "bugs": {
+ "url": "https://github.com/jshttp/content-type/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Create and parse HTTP Content-Type header",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "eslint-config-standard": "10.2.1",
+ "eslint-plugin-import": "2.7.0",
+ "eslint-plugin-node": "5.1.1",
+ "eslint-plugin-promise": "3.5.0",
+ "eslint-plugin-standard": "3.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "~1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/jshttp/content-type#readme",
+ "keywords": [
+ "content-type",
+ "http",
+ "req",
+ "res",
+ "rfc7231"
+ ],
+ "license": "MIT",
+ "name": "content-type",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/content-type.git"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "version": "1.0.4"
+}
diff --git a/node_modules/cookie-signature/.npmignore b/node_modules/cookie-signature/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/node_modules/cookie-signature/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/node_modules/cookie-signature/History.md b/node_modules/cookie-signature/History.md
new file mode 100644
index 0000000..78513cc
--- /dev/null
+++ b/node_modules/cookie-signature/History.md
@@ -0,0 +1,38 @@
+1.0.6 / 2015-02-03
+==================
+
+* use `npm test` instead of `make test` to run tests
+* clearer assertion messages when checking input
+
+
+1.0.5 / 2014-09-05
+==================
+
+* add license to package.json
+
+1.0.4 / 2014-06-25
+==================
+
+ * corrected avoidance of timing attacks (thanks @tenbits!)
+
+1.0.3 / 2014-01-28
+==================
+
+ * [incorrect] fix for timing attacks
+
+1.0.2 / 2014-01-28
+==================
+
+ * fix missing repository warning
+ * fix typo in test
+
+1.0.1 / 2013-04-15
+==================
+
+ * Revert "Changed underlying HMAC algo. to sha512."
+ * Revert "Fix for timing attacks on MAC verification."
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/cookie-signature/Readme.md b/node_modules/cookie-signature/Readme.md
new file mode 100644
index 0000000..2559e84
--- /dev/null
+++ b/node_modules/cookie-signature/Readme.md
@@ -0,0 +1,42 @@
+
+# cookie-signature
+
+ Sign and unsign cookies.
+
+## Example
+
+```js
+var cookie = require('cookie-signature');
+
+var val = cookie.sign('hello', 'tobiiscool');
+val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
+
+var val = cookie.sign('hello', 'tobiiscool');
+cookie.unsign(val, 'tobiiscool').should.equal('hello');
+cookie.unsign(val, 'luna').should.be.false;
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 LearnBoost <tj@learnboost.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/cookie-signature/index.js b/node_modules/cookie-signature/index.js
new file mode 100644
index 0000000..b8c9463
--- /dev/null
+++ b/node_modules/cookie-signature/index.js
@@ -0,0 +1,51 @@
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto');
+
+/**
+ * Sign the given `val` with `secret`.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String}
+ * @api private
+ */
+
+exports.sign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ return val + '.' + crypto
+ .createHmac('sha256', secret)
+ .update(val)
+ .digest('base64')
+ .replace(/\=+$/, '');
+};
+
+/**
+ * Unsign and decode the given `val` with `secret`,
+ * returning `false` if the signature is invalid.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String|Boolean}
+ * @api private
+ */
+
+exports.unsign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ var str = val.slice(0, val.lastIndexOf('.'))
+ , mac = exports.sign(str, secret);
+
+ return sha1(mac) == sha1(val) ? str : false;
+};
+
+/**
+ * Private
+ */
+
+function sha1(str){
+ return crypto.createHash('sha1').update(str).digest('hex');
+}
diff --git a/node_modules/cookie-signature/package.json b/node_modules/cookie-signature/package.json
new file mode 100644
index 0000000..9c341c6
--- /dev/null
+++ b/node_modules/cookie-signature/package.json
@@ -0,0 +1,57 @@
+{
+ "_from": "cookie-signature@1.0.6",
+ "_id": "cookie-signature@1.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
+ "_location": "/cookie-signature",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "cookie-signature@1.0.6",
+ "name": "cookie-signature",
+ "escapedName": "cookie-signature",
+ "rawSpec": "1.0.6",
+ "saveSpec": null,
+ "fetchSpec": "1.0.6"
+ },
+ "_requiredBy": [
+ "/express"
+ ],
+ "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c",
+ "_spec": "cookie-signature@1.0.6",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@learnboost.com"
+ },
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-cookie-signature/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Sign and unsign cookies",
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "homepage": "https://github.com/visionmedia/node-cookie-signature#readme",
+ "keywords": [
+ "cookie",
+ "sign",
+ "unsign"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "name": "cookie-signature",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/visionmedia/node-cookie-signature.git"
+ },
+ "scripts": {
+ "test": "mocha --require should --reporter spec"
+ },
+ "version": "1.0.6"
+}
diff --git a/node_modules/cookie/HISTORY.md b/node_modules/cookie/HISTORY.md
new file mode 100644
index 0000000..5bd6485
--- /dev/null
+++ b/node_modules/cookie/HISTORY.md
@@ -0,0 +1,118 @@
+0.3.1 / 2016-05-26
+==================
+
+ * Fix `sameSite: true` to work with draft-7 clients
+ - `true` now sends `SameSite=Strict` instead of `SameSite`
+
+0.3.0 / 2016-05-26
+==================
+
+ * Add `sameSite` option
+ - Replaces `firstPartyOnly` option, never implemented by browsers
+ * Improve error message when `encode` is not a function
+ * Improve error message when `expires` is not a `Date`
+
+0.2.4 / 2016-05-20
+==================
+
+ * perf: enable strict mode
+ * perf: use for loop in parse
+ * perf: use string concatination for serialization
+
+0.2.3 / 2015-10-25
+==================
+
+ * Fix cookie `Max-Age` to never be a floating point number
+
+0.2.2 / 2015-09-17
+==================
+
+ * Fix regression when setting empty cookie value
+ - Ease the new restriction, which is just basic header-level validation
+ * Fix typo in invalid value errors
+
+0.2.1 / 2015-09-17
+==================
+
+ * Throw on invalid values provided to `serialize`
+ - Ensures the resulting string is a valid HTTP header value
+
+0.2.0 / 2015-08-13
+==================
+
+ * Add `firstPartyOnly` option
+ * Throw better error for invalid argument to parse
+ * perf: hoist regular expression
+
+0.1.5 / 2015-09-17
+==================
+
+ * Fix regression when setting empty cookie value
+ - Ease the new restriction, which is just basic header-level validation
+ * Fix typo in invalid value errors
+
+0.1.4 / 2015-09-17
+==================
+
+ * Throw better error for invalid argument to parse
+ * Throw on invalid values provided to `serialize`
+ - Ensures the resulting string is a valid HTTP header value
+
+0.1.3 / 2015-05-19
+==================
+
+ * Reduce the scope of try-catch deopt
+ * Remove argument reassignments
+
+0.1.2 / 2014-04-16
+==================
+
+ * Remove unnecessary files from npm package
+
+0.1.1 / 2014-02-23
+==================
+
+ * Fix bad parse when cookie value contained a comma
+ * Fix support for `maxAge` of `0`
+
+0.1.0 / 2013-05-01
+==================
+
+ * Add `decode` option
+ * Add `encode` option
+
+0.0.6 / 2013-04-08
+==================
+
+ * Ignore cookie parts missing `=`
+
+0.0.5 / 2012-10-29
+==================
+
+ * Return raw cookie value if value unescape errors
+
+0.0.4 / 2012-06-21
+==================
+
+ * Use encode/decodeURIComponent for cookie encoding/decoding
+ - Improve server/client interoperability
+
+0.0.3 / 2012-06-06
+==================
+
+ * Only escape special characters per the cookie RFC
+
+0.0.2 / 2012-06-01
+==================
+
+ * Fix `maxAge` option to not throw error
+
+0.0.1 / 2012-05-28
+==================
+
+ * Add more tests
+
+0.0.0 / 2012-05-28
+==================
+
+ * Initial release
diff --git a/node_modules/cookie/LICENSE b/node_modules/cookie/LICENSE
new file mode 100644
index 0000000..058b6b4
--- /dev/null
+++ b/node_modules/cookie/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 Roman Shtylman
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/cookie/README.md b/node_modules/cookie/README.md
new file mode 100644
index 0000000..db0d078
--- /dev/null
+++ b/node_modules/cookie/README.md
@@ -0,0 +1,220 @@
+# cookie
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Basic HTTP cookie parser and serializer for HTTP servers.
+
+## Installation
+
+```sh
+$ npm install cookie
+```
+
+## API
+
+```js
+var cookie = require('cookie');
+```
+
+### cookie.parse(str, options)
+
+Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs.
+The `str` argument is the string representing a `Cookie` header value and `options` is an
+optional object containing additional parsing options.
+
+```js
+var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2');
+// { foo: 'bar', equation: 'E=mc^2' }
+```
+
+#### Options
+
+`cookie.parse` accepts these properties in the options object.
+
+##### decode
+
+Specifies a function that will be used to decode a cookie's value. Since the value of a cookie
+has a limited character set (and must be a simple string), this function can be used to decode
+a previously-encoded cookie value into a JavaScript string or other object.
+
+The default function is the global `decodeURIComponent`, which will decode any URL-encoded
+sequences into their byte representations.
+
+**note** if an error is thrown from this function, the original, non-decoded cookie value will
+be returned as the cookie's value.
+
+### cookie.serialize(name, value, options)
+
+Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the
+name for the cookie, the `value` argument is the value to set the cookie to, and the `options`
+argument is an optional object containing additional serialization options.
+
+```js
+var setCookie = cookie.serialize('foo', 'bar');
+// foo=bar
+```
+
+#### Options
+
+`cookie.serialize` accepts these properties in the options object.
+
+##### domain
+
+Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6266-5.2.3]. By default, no
+domain is set, and most clients will consider the cookie to apply to only the current domain.
+
+##### encode
+
+Specifies a function that will be used to encode a cookie's value. Since value of a cookie
+has a limited character set (and must be a simple string), this function can be used to encode
+a value into a string suited for a cookie's value.
+
+The default function is the global `ecodeURIComponent`, which will encode a JavaScript string
+into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range.
+
+##### expires
+
+Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6266-5.2.1].
+By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and
+will delete it on a condition like exiting a web browser application.
+
+**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and
+`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this,
+so if both are set, they should point to the same date and time.
+
+##### httpOnly
+
+Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6266-5.2.6]. When truthy,
+the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set.
+
+**note** be careful when setting this to `true`, as compliant clients will not allow client-side
+JavaScript to see the cookie in `document.cookie`.
+
+##### maxAge
+
+Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6266-5.2.2].
+The given number will be converted to an integer by rounding down. By default, no maximum age is set.
+
+**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and
+`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this,
+so if both are set, they should point to the same date and time.
+
+##### path
+
+Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6266-5.2.4]. By default, the path
+is considered the ["default path"][rfc-6266-5.1.4]. By default, no maximum age is set, and most
+clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting
+a web browser application.
+
+##### sameSite
+
+Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][draft-west-first-party-cookies-07].
+
+ - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
+ - `false` will not set the `SameSite` attribute.
+ - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
+ - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
+
+More information about the different enforcement levels can be found in the specification
+https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1.1
+
+**note** This is an attribute that has not yet been fully standardized, and may change in the future.
+This also means many clients may ignore this attribute until they understand it.
+
+##### secure
+
+Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6266-5.2.5]. When truthy,
+the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
+
+**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to
+the server in the future if the browser does not have an HTTPS connection.
+
+## Example
+
+The following example uses this module in conjunction with the Node.js core HTTP server
+to prompt a user for their name and display it back on future visits.
+
+```js
+var cookie = require('cookie');
+var escapeHtml = require('escape-html');
+var http = require('http');
+var url = require('url');
+
+function onRequest(req, res) {
+ // Parse the query string
+ var query = url.parse(req.url, true, true).query;
+
+ if (query && query.name) {
+ // Set a new cookie with the name
+ res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), {
+ httpOnly: true,
+ maxAge: 60 * 60 * 24 * 7 // 1 week
+ }));
+
+ // Redirect back after setting cookie
+ res.statusCode = 302;
+ res.setHeader('Location', req.headers.referer || '/');
+ res.end();
+ return;
+ }
+
+ // Parse the cookies on the request
+ var cookies = cookie.parse(req.headers.cookie || '');
+
+ // Get the visitor name set in the cookie
+ var name = cookies.name;
+
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8');
+
+ if (name) {
+ res.write('Welcome back, ' + escapeHtml(name) + '!
');
+ } else {
+ res.write('Hello, new visitor!
');
+ }
+
+ res.write(' values
+ *
+ * @param {string} str
+ * @param {object} [options]
+ * @return {object}
+ * @public
+ */
+
+function parse(str, options) {
+ if (typeof str !== 'string') {
+ throw new TypeError('argument str must be a string');
+ }
+
+ var obj = {}
+ var opt = options || {};
+ var pairs = str.split(pairSplitRegExp);
+ var dec = opt.decode || decode;
+
+ for (var i = 0; i < pairs.length; i++) {
+ var pair = pairs[i];
+ var eq_idx = pair.indexOf('=');
+
+ // skip things that don't look like key=value
+ if (eq_idx < 0) {
+ continue;
+ }
+
+ var key = pair.substr(0, eq_idx).trim()
+ var val = pair.substr(++eq_idx, pair.length).trim();
+
+ // quoted values
+ if ('"' == val[0]) {
+ val = val.slice(1, -1);
+ }
+
+ // only assign once
+ if (undefined == obj[key]) {
+ obj[key] = tryDecode(val, dec);
+ }
+ }
+
+ return obj;
+}
+
+/**
+ * Serialize data into a cookie header.
+ *
+ * Serialize the a name value pair into a cookie string suitable for
+ * http headers. An optional options object specified cookie parameters.
+ *
+ * serialize('foo', 'bar', { httpOnly: true })
+ * => "foo=bar; httpOnly"
+ *
+ * @param {string} name
+ * @param {string} val
+ * @param {object} [options]
+ * @return {string}
+ * @public
+ */
+
+function serialize(name, val, options) {
+ var opt = options || {};
+ var enc = opt.encode || encode;
+
+ if (typeof enc !== 'function') {
+ throw new TypeError('option encode is invalid');
+ }
+
+ if (!fieldContentRegExp.test(name)) {
+ throw new TypeError('argument name is invalid');
+ }
+
+ var value = enc(val);
+
+ if (value && !fieldContentRegExp.test(value)) {
+ throw new TypeError('argument val is invalid');
+ }
+
+ var str = name + '=' + value;
+
+ if (null != opt.maxAge) {
+ var maxAge = opt.maxAge - 0;
+ if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
+ str += '; Max-Age=' + Math.floor(maxAge);
+ }
+
+ if (opt.domain) {
+ if (!fieldContentRegExp.test(opt.domain)) {
+ throw new TypeError('option domain is invalid');
+ }
+
+ str += '; Domain=' + opt.domain;
+ }
+
+ if (opt.path) {
+ if (!fieldContentRegExp.test(opt.path)) {
+ throw new TypeError('option path is invalid');
+ }
+
+ str += '; Path=' + opt.path;
+ }
+
+ if (opt.expires) {
+ if (typeof opt.expires.toUTCString !== 'function') {
+ throw new TypeError('option expires is invalid');
+ }
+
+ str += '; Expires=' + opt.expires.toUTCString();
+ }
+
+ if (opt.httpOnly) {
+ str += '; HttpOnly';
+ }
+
+ if (opt.secure) {
+ str += '; Secure';
+ }
+
+ if (opt.sameSite) {
+ var sameSite = typeof opt.sameSite === 'string'
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
+
+ switch (sameSite) {
+ case true:
+ str += '; SameSite=Strict';
+ break;
+ case 'lax':
+ str += '; SameSite=Lax';
+ break;
+ case 'strict':
+ str += '; SameSite=Strict';
+ break;
+ default:
+ throw new TypeError('option sameSite is invalid');
+ }
+ }
+
+ return str;
+}
+
+/**
+ * Try decoding a string using a decoding function.
+ *
+ * @param {string} str
+ * @param {function} decode
+ * @private
+ */
+
+function tryDecode(str, decode) {
+ try {
+ return decode(str);
+ } catch (e) {
+ return str;
+ }
+}
diff --git a/node_modules/cookie/package.json b/node_modules/cookie/package.json
new file mode 100644
index 0000000..330d009
--- /dev/null
+++ b/node_modules/cookie/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "cookie@0.3.1",
+ "_id": "cookie@0.3.1",
+ "_inBundle": false,
+ "_integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=",
+ "_location": "/cookie",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "cookie@0.3.1",
+ "name": "cookie",
+ "escapedName": "cookie",
+ "rawSpec": "0.3.1",
+ "saveSpec": null,
+ "fetchSpec": "0.3.1"
+ },
+ "_requiredBy": [
+ "/express"
+ ],
+ "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
+ "_shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb",
+ "_spec": "cookie@0.3.1",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "author": {
+ "name": "Roman Shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/jshttp/cookie/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "HTTP server cookie parsing and serialization",
+ "devDependencies": {
+ "istanbul": "0.4.3",
+ "mocha": "1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/jshttp/cookie#readme",
+ "keywords": [
+ "cookie",
+ "cookies"
+ ],
+ "license": "MIT",
+ "name": "cookie",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/cookie.git"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "version": "0.3.1"
+}
diff --git a/node_modules/deep-equal/.travis.yml b/node_modules/deep-equal/.travis.yml
new file mode 100644
index 0000000..4af02b3
--- /dev/null
+++ b/node_modules/deep-equal/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - '0.8'
+ - '0.10'
+ - '0.12'
+ - 'iojs'
+before_install:
+ - npm install -g npm@latest
diff --git a/node_modules/deep-equal/LICENSE b/node_modules/deep-equal/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/deep-equal/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/deep-equal/example/cmp.js b/node_modules/deep-equal/example/cmp.js
new file mode 100644
index 0000000..67014b8
--- /dev/null
+++ b/node_modules/deep-equal/example/cmp.js
@@ -0,0 +1,11 @@
+var equal = require('../');
+console.dir([
+ equal(
+ { a : [ 2, 3 ], b : [ 4 ] },
+ { a : [ 2, 3 ], b : [ 4 ] }
+ ),
+ equal(
+ { x : 5, y : [6] },
+ { x : 5, y : 6 }
+ )
+]);
diff --git a/node_modules/deep-equal/index.js b/node_modules/deep-equal/index.js
new file mode 100644
index 0000000..0772f8c
--- /dev/null
+++ b/node_modules/deep-equal/index.js
@@ -0,0 +1,94 @@
+var pSlice = Array.prototype.slice;
+var objectKeys = require('./lib/keys.js');
+var isArguments = require('./lib/is_arguments.js');
+
+var deepEqual = module.exports = function (actual, expected, opts) {
+ if (!opts) opts = {};
+ // 7.1. All identical values are equivalent, as determined by ===.
+ if (actual === expected) {
+ return true;
+
+ } else if (actual instanceof Date && expected instanceof Date) {
+ return actual.getTime() === expected.getTime();
+
+ // 7.3. Other pairs that do not both pass typeof value == 'object',
+ // equivalence is determined by ==.
+ } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
+ return opts.strict ? actual === expected : actual == expected;
+
+ // 7.4. For all other Object pairs, including Array objects, equivalence is
+ // determined by having the same number of owned properties (as verified
+ // with Object.prototype.hasOwnProperty.call), the same set of keys
+ // (although not necessarily the same order), equivalent values for every
+ // corresponding key, and an identical 'prototype' property. Note: this
+ // accounts for both named and indexed properties on Arrays.
+ } else {
+ return objEquiv(actual, expected, opts);
+ }
+}
+
+function isUndefinedOrNull(value) {
+ return value === null || value === undefined;
+}
+
+function isBuffer (x) {
+ if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
+ if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
+ return false;
+ }
+ if (x.length > 0 && typeof x[0] !== 'number') return false;
+ return true;
+}
+
+function objEquiv(a, b, opts) {
+ var i, key;
+ if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
+ return false;
+ // an identical 'prototype' property.
+ if (a.prototype !== b.prototype) return false;
+ //~~~I've managed to break Object.keys through screwy arguments passing.
+ // Converting to array solves the problem.
+ if (isArguments(a)) {
+ if (!isArguments(b)) {
+ return false;
+ }
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return deepEqual(a, b, opts);
+ }
+ if (isBuffer(a)) {
+ if (!isBuffer(b)) {
+ return false;
+ }
+ if (a.length !== b.length) return false;
+ for (i = 0; i < a.length; i++) {
+ if (a[i] !== b[i]) return false;
+ }
+ return true;
+ }
+ try {
+ var ka = objectKeys(a),
+ kb = objectKeys(b);
+ } catch (e) {//happens when one is a string literal and the other isn't
+ return false;
+ }
+ // having the same number of owned properties (keys incorporates
+ // hasOwnProperty)
+ if (ka.length != kb.length)
+ return false;
+ //the same set of keys (although not necessarily the same order),
+ ka.sort();
+ kb.sort();
+ //~~~cheap key test
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] != kb[i])
+ return false;
+ }
+ //equivalent values for every corresponding key, and
+ //~~~possibly expensive deep test
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!deepEqual(a[key], b[key], opts)) return false;
+ }
+ return typeof a === typeof b;
+}
diff --git a/node_modules/deep-equal/lib/is_arguments.js b/node_modules/deep-equal/lib/is_arguments.js
new file mode 100644
index 0000000..1ff150f
--- /dev/null
+++ b/node_modules/deep-equal/lib/is_arguments.js
@@ -0,0 +1,20 @@
+var supportsArgumentsClass = (function(){
+ return Object.prototype.toString.call(arguments)
+})() == '[object Arguments]';
+
+exports = module.exports = supportsArgumentsClass ? supported : unsupported;
+
+exports.supported = supported;
+function supported(object) {
+ return Object.prototype.toString.call(object) == '[object Arguments]';
+};
+
+exports.unsupported = unsupported;
+function unsupported(object){
+ return object &&
+ typeof object == 'object' &&
+ typeof object.length == 'number' &&
+ Object.prototype.hasOwnProperty.call(object, 'callee') &&
+ !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
+ false;
+};
diff --git a/node_modules/deep-equal/lib/keys.js b/node_modules/deep-equal/lib/keys.js
new file mode 100644
index 0000000..13af263
--- /dev/null
+++ b/node_modules/deep-equal/lib/keys.js
@@ -0,0 +1,9 @@
+exports = module.exports = typeof Object.keys === 'function'
+ ? Object.keys : shim;
+
+exports.shim = shim;
+function shim (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
diff --git a/node_modules/deep-equal/package.json b/node_modules/deep-equal/package.json
new file mode 100644
index 0000000..1692bd2
--- /dev/null
+++ b/node_modules/deep-equal/package.json
@@ -0,0 +1,87 @@
+{
+ "_from": "deep-equal@^1.0.1",
+ "_id": "deep-equal@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
+ "_location": "/deep-equal",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "deep-equal@^1.0.1",
+ "name": "deep-equal",
+ "escapedName": "deep-equal",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/bonjour"
+ ],
+ "_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+ "_shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5",
+ "_spec": "deep-equal@^1.0.1",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/bonjour",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-deep-equal/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "node's assert.deepEqual algorithm",
+ "devDependencies": {
+ "tape": "^3.5.0"
+ },
+ "directories": {
+ "lib": ".",
+ "example": "example",
+ "test": "test"
+ },
+ "homepage": "https://github.com/substack/node-deep-equal#readme",
+ "keywords": [
+ "equality",
+ "equal",
+ "compare"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "deep-equal",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/substack/node-deep-equal.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": {
+ "ie": [
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "ff": [
+ 3.5,
+ 10,
+ 15
+ ],
+ "chrome": [
+ 10,
+ 22
+ ],
+ "safari": [
+ 5.1
+ ],
+ "opera": [
+ 12
+ ]
+ }
+ },
+ "version": "1.0.1"
+}
diff --git a/node_modules/deep-equal/readme.markdown b/node_modules/deep-equal/readme.markdown
new file mode 100644
index 0000000..f489c2a
--- /dev/null
+++ b/node_modules/deep-equal/readme.markdown
@@ -0,0 +1,61 @@
+# deep-equal
+
+Node's `assert.deepEqual() algorithm` as a standalone module.
+
+This module is around [5 times faster](https://gist.github.com/2790507)
+than wrapping `assert.deepEqual()` in a `try/catch`.
+
+[](https://ci.testling.com/substack/node-deep-equal)
+
+[](https://travis-ci.org/substack/node-deep-equal)
+
+# example
+
+``` js
+var equal = require('deep-equal');
+console.dir([
+ equal(
+ { a : [ 2, 3 ], b : [ 4 ] },
+ { a : [ 2, 3 ], b : [ 4 ] }
+ ),
+ equal(
+ { x : 5, y : [6] },
+ { x : 5, y : 6 }
+ )
+]);
+```
+
+# methods
+
+``` js
+var deepEqual = require('deep-equal')
+```
+
+## deepEqual(a, b, opts)
+
+Compare objects `a` and `b`, returning whether they are equal according to a
+recursive equality algorithm.
+
+If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes.
+The default is to use coercive equality (`==`) because that's how
+`assert.deepEqual()` works by default.
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install deep-equal
+```
+
+# test
+
+With [npm](http://npmjs.org) do:
+
+```
+npm test
+```
+
+# license
+
+MIT. Derived largely from node's assert module.
diff --git a/node_modules/deep-equal/test/cmp.js b/node_modules/deep-equal/test/cmp.js
new file mode 100644
index 0000000..2aab5f9
--- /dev/null
+++ b/node_modules/deep-equal/test/cmp.js
@@ -0,0 +1,95 @@
+var test = require('tape');
+var equal = require('../');
+var isArguments = require('../lib/is_arguments.js');
+var objectKeys = require('../lib/keys.js');
+
+test('equal', function (t) {
+ t.ok(equal(
+ { a : [ 2, 3 ], b : [ 4 ] },
+ { a : [ 2, 3 ], b : [ 4 ] }
+ ));
+ t.end();
+});
+
+test('not equal', function (t) {
+ t.notOk(equal(
+ { x : 5, y : [6] },
+ { x : 5, y : 6 }
+ ));
+ t.end();
+});
+
+test('nested nulls', function (t) {
+ t.ok(equal([ null, null, null ], [ null, null, null ]));
+ t.end();
+});
+
+test('strict equal', function (t) {
+ t.notOk(equal(
+ [ { a: 3 }, { b: 4 } ],
+ [ { a: '3' }, { b: '4' } ],
+ { strict: true }
+ ));
+ t.end();
+});
+
+test('non-objects', function (t) {
+ t.ok(equal(3, 3));
+ t.ok(equal('beep', 'beep'));
+ t.ok(equal('3', 3));
+ t.notOk(equal('3', 3, { strict: true }));
+ t.notOk(equal('3', [3]));
+ t.end();
+});
+
+test('arguments class', function (t) {
+ t.ok(equal(
+ (function(){return arguments})(1,2,3),
+ (function(){return arguments})(1,2,3),
+ "compares arguments"
+ ));
+ t.notOk(equal(
+ (function(){return arguments})(1,2,3),
+ [1,2,3],
+ "differenciates array and arguments"
+ ));
+ t.end();
+});
+
+test('test the arguments shim', function (t) {
+ t.ok(isArguments.supported((function(){return arguments})()));
+ t.notOk(isArguments.supported([1,2,3]));
+
+ t.ok(isArguments.unsupported((function(){return arguments})()));
+ t.notOk(isArguments.unsupported([1,2,3]));
+
+ t.end();
+});
+
+test('test the keys shim', function (t) {
+ t.deepEqual(objectKeys.shim({ a: 1, b : 2 }), [ 'a', 'b' ]);
+ t.end();
+});
+
+test('dates', function (t) {
+ var d0 = new Date(1387585278000);
+ var d1 = new Date('Fri Dec 20 2013 16:21:18 GMT-0800 (PST)');
+ t.ok(equal(d0, d1));
+ t.end();
+});
+
+test('buffers', function (t) {
+ t.ok(equal(Buffer('xyz'), Buffer('xyz')));
+ t.end();
+});
+
+test('booleans and arrays', function (t) {
+ t.notOk(equal(true, []));
+ t.end();
+})
+
+test('null == undefined', function (t) {
+ t.ok(equal(null, undefined))
+ t.notOk(equal(null, undefined, { strict: true }))
+ t.end()
+})
diff --git a/node_modules/default-gateway/LICENSE b/node_modules/default-gateway/LICENSE
new file mode 100644
index 0000000..9669c20
--- /dev/null
+++ b/node_modules/default-gateway/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) silverwind
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/default-gateway/README.md b/node_modules/default-gateway/README.md
new file mode 100644
index 0000000..e7497a2
--- /dev/null
+++ b/node_modules/default-gateway/README.md
@@ -0,0 +1,50 @@
+# default-gateway
+[](https://www.npmjs.org/package/default-gateway) [](https://www.npmjs.org/package/default-gateway) [](https://travis-ci.org/silverwind/default-gateway)
+
+> Get the default network gateway, cross-platform.
+
+Obtains the machine's default gateway through `exec` calls to OS routing interfaces. On Linux and Android, the `ip` command must be available (usually provided by the `iproute2` package).
+
+## Installation
+
+```
+$ npm install default-gateway
+```
+
+## Example
+
+```js
+const defaultGateway = require('default-gateway');
+
+defaultGateway.v4().then(result => {
+ // result = {gateway: '1.2.3.4', interface: 'en1'}
+});
+
+defaultGateway.v6().then(result => {
+ // result = {gateway: '2001:db8::1', interface: 'en2'}
+});
+
+const result = defaultGateway.v4.sync();
+// result = {gateway: '1.2.3.4', interface: 'en1'}
+
+const result = defaultGateway.v6.sync();
+// result = {gateway: '2001:db8::1', interface: 'en2'}
+```
+
+## API
+### defaultGateway.v4()
+### defaultGateway.v6()
+### defaultGateway.v4.sync()
+### defaultGateway.v6.sync()
+
+Returns: `result` *Object*
+ - `gateway`: The IP address of the default gateway.
+ - `interface`: The name of the interface. On Windows, this is the network adapter name.
+
+The `.v{4,6}()` methods return a Promise while the `.v{4,6}.sync()` variants will return the result synchronously.
+
+The `gateway` property will always be defined on success, while `interface` can be `null` if it cannot be determined. All methods reject/throw when the gateway cannot be determined or the `exec` call failed.
+
+## License
+
+© [silverwind](https://github.com/silverwind), distributed under BSD licence
diff --git a/node_modules/default-gateway/android.js b/node_modules/default-gateway/android.js
new file mode 100644
index 0000000..6d0ac1a
--- /dev/null
+++ b/node_modules/default-gateway/android.js
@@ -0,0 +1,46 @@
+"use strict";
+
+const net = require("net");
+const execa = require("execa");
+
+const args = {
+ v4: ["-4", "r"],
+ v6: ["-6", "r"],
+};
+
+const parse = stdout => {
+ let result;
+
+ (stdout || "").trim().split("\n").some(line => {
+ const results = /default via (.+?) dev (.+?)( |$)/.exec(line) || [];
+ const gateway = results[1];
+ const iface = results[2];
+ if (gateway && net.isIP(gateway)) {
+ result = {gateway: gateway, interface: (iface ? iface : null)};
+ return true;
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const promise = family => {
+ return execa.stdout("ip", args[family]).then(stdout => {
+ return parse(stdout);
+ });
+};
+
+const sync = family => {
+ const result = execa.sync("ip", args[family]);
+ return parse(result.stdout);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/default-gateway/darwin.js b/node_modules/default-gateway/darwin.js
new file mode 100644
index 0000000..e7a190e
--- /dev/null
+++ b/node_modules/default-gateway/darwin.js
@@ -0,0 +1,48 @@
+"use strict";
+
+const net = require("net");
+const execa = require("execa");
+const dests = ["default", "0.0.0.0", "0.0.0.0/0", "::", "::/0"];
+
+const args = {
+ v4: ["-rn", "-f", "inet"],
+ v6: ["-rn", "-f", "inet6"],
+};
+
+const parse = (stdout, family) => {
+ let result;
+
+ (stdout || "").trim().split("\n").some(line => {
+ const results = line.split(/ +/) || [];
+ const target = results[0];
+ const gateway = results[1];
+ const iface = results[family === "v4" ? 5 : 3];
+ if (dests.indexOf(target) !== -1 && gateway && net.isIP(gateway)) {
+ result = {gateway: gateway, interface: (iface ? iface : null)};
+ return true;
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const promise = family => {
+ return execa.stdout("netstat", args[family]).then(stdout => {
+ return parse(stdout, family);
+ });
+};
+
+const sync = family => {
+ const result = execa.sync("netstat", args[family]);
+ return parse(result.stdout, family);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/default-gateway/freebsd.js b/node_modules/default-gateway/freebsd.js
new file mode 100644
index 0000000..77c626f
--- /dev/null
+++ b/node_modules/default-gateway/freebsd.js
@@ -0,0 +1,48 @@
+"use strict";
+
+const net = require("net");
+const execa = require("execa");
+const dests = ["default", "0.0.0.0", "0.0.0.0/0", "::", "::/0"];
+
+const args = {
+ v4: ["-rn", "-f", "inet"],
+ v6: ["-rn", "-f", "inet6"],
+};
+
+const parse = stdout => {
+ let result;
+
+ (stdout || "").trim().split("\n").some(line => {
+ const results = line.split(/ +/) || [];
+ const target = results[0];
+ const gateway = results[1];
+ const iface = results[3];
+ if (dests.indexOf(target) !== -1 && gateway && net.isIP(gateway)) {
+ result = {gateway: gateway, interface: (iface ? iface : null)};
+ return true;
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const promise = family => {
+ return execa.stdout("netstat", args[family]).then(stdout => {
+ return parse(stdout);
+ });
+};
+
+const sync = family => {
+ const result = execa.sync("netstat", args[family]);
+ return parse(result.stdout);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/default-gateway/index.js b/node_modules/default-gateway/index.js
new file mode 100644
index 0000000..76da2b4
--- /dev/null
+++ b/node_modules/default-gateway/index.js
@@ -0,0 +1,25 @@
+"use strict";
+
+const platform = require("os").platform();
+
+if ([
+ "android",
+ "darwin",
+ "freebsd",
+ "linux",
+ "openbsd",
+ "sunos",
+ "win32"
+].indexOf(platform) !== -1) {
+ const families = require(`./${platform}`);
+ module.exports.v4 = () => families.v4();
+ module.exports.v6 = () => families.v6();
+ module.exports.v4.sync = () => families.v4.sync();
+ module.exports.v6.sync = () => families.v6.sync();
+} else {
+ const noop = () => { throw new Error(`Unsupported Platform: ${platform}`); };
+ module.exports.v4 = noop;
+ module.exports.v6 = noop;
+ module.exports.v4.sync = noop;
+ module.exports.v6.sync = noop;
+}
diff --git a/node_modules/default-gateway/linux.js b/node_modules/default-gateway/linux.js
new file mode 100644
index 0000000..ed564ab
--- /dev/null
+++ b/node_modules/default-gateway/linux.js
@@ -0,0 +1,58 @@
+"use strict";
+
+const net = require("net");
+const os = require("os");
+const execa = require("execa");
+
+const args = {
+ v4: ["-4", "r"],
+ v6: ["-6", "r"],
+};
+
+const parse = (stdout, family) => {
+ let result;
+
+ (stdout || "").trim().split("\n").some(line => {
+ const results = /default( via .+?)?( dev .+?)( |$)/.exec(line) || [];
+ const gateway = (results[1] || "").substring(5);
+ const iface = (results[2] || "").substring(5);
+ if (gateway && net.isIP(gateway)) { // default via 1.2.3.4 dev en0
+ result = {gateway: gateway, interface: (iface ? iface : null)};
+ return true;
+ } else if (iface && !gateway) { // default via dev en0
+ const interfaces = os.networkInterfaces();
+ const addresses = interfaces[iface];
+ if (!addresses || !addresses.length) return;
+
+ addresses.some(addr => {
+ if (addr.family.substring(2) === family && net.isIP(addr.address)) {
+ result = {gateway: addr.address, interface: (iface ? iface : null)};
+ return true;
+ }
+ });
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const promise = family => {
+ return execa.stdout("ip", args[family]).then(stdout => {
+ return parse(stdout, family);
+ });
+};
+
+const sync = family => {
+ const result = execa.sync("ip", args[family]);
+ return parse(result.stdout, family);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/default-gateway/node_modules/execa/index.js b/node_modules/default-gateway/node_modules/execa/index.js
new file mode 100644
index 0000000..06f3969
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/execa/index.js
@@ -0,0 +1,366 @@
+'use strict';
+const path = require('path');
+const childProcess = require('child_process');
+const util = require('util');
+const crossSpawn = require('cross-spawn');
+const stripEof = require('strip-eof');
+const npmRunPath = require('npm-run-path');
+const isStream = require('is-stream');
+const _getStream = require('get-stream');
+const pFinally = require('p-finally');
+const onExit = require('signal-exit');
+const errname = require('./lib/errname');
+const stdio = require('./lib/stdio');
+
+const TEN_MEGABYTES = 1000 * 1000 * 10;
+
+function handleArgs(cmd, args, opts) {
+ let parsed;
+
+ opts = Object.assign({
+ extendEnv: true,
+ env: {}
+ }, opts);
+
+ if (opts.extendEnv) {
+ opts.env = Object.assign({}, process.env, opts.env);
+ }
+
+ if (opts.__winShell === true) {
+ delete opts.__winShell;
+ parsed = {
+ command: cmd,
+ args,
+ options: opts,
+ file: cmd,
+ original: {
+ cmd,
+ args
+ }
+ };
+ } else {
+ parsed = crossSpawn._parse(cmd, args, opts);
+ }
+
+ opts = Object.assign({
+ maxBuffer: TEN_MEGABYTES,
+ stripEof: true,
+ preferLocal: true,
+ localDir: parsed.options.cwd || process.cwd(),
+ encoding: 'utf8',
+ reject: true,
+ cleanup: true
+ }, parsed.options);
+
+ opts.stdio = stdio(opts);
+
+ if (opts.preferLocal) {
+ opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir}));
+ }
+
+ if (opts.detached) {
+ // #115
+ opts.cleanup = false;
+ }
+
+ if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') {
+ // #116
+ parsed.args.unshift('/q');
+ }
+
+ return {
+ cmd: parsed.command,
+ args: parsed.args,
+ opts,
+ parsed
+ };
+}
+
+function handleInput(spawned, opts) {
+ const input = opts.input;
+
+ if (input === null || input === undefined) {
+ return;
+ }
+
+ if (isStream(input)) {
+ input.pipe(spawned.stdin);
+ } else {
+ spawned.stdin.end(input);
+ }
+}
+
+function handleOutput(opts, val) {
+ if (val && opts.stripEof) {
+ val = stripEof(val);
+ }
+
+ return val;
+}
+
+function handleShell(fn, cmd, opts) {
+ let file = '/bin/sh';
+ let args = ['-c', cmd];
+
+ opts = Object.assign({}, opts);
+
+ if (process.platform === 'win32') {
+ opts.__winShell = true;
+ file = process.env.comspec || 'cmd.exe';
+ args = ['/s', '/c', `"${cmd}"`];
+ opts.windowsVerbatimArguments = true;
+ }
+
+ if (opts.shell) {
+ file = opts.shell;
+ delete opts.shell;
+ }
+
+ return fn(file, args, opts);
+}
+
+function getStream(process, stream, encoding, maxBuffer) {
+ if (!process[stream]) {
+ return null;
+ }
+
+ let ret;
+
+ if (encoding) {
+ ret = _getStream(process[stream], {
+ encoding,
+ maxBuffer
+ });
+ } else {
+ ret = _getStream.buffer(process[stream], {maxBuffer});
+ }
+
+ return ret.catch(err => {
+ err.stream = stream;
+ err.message = `${stream} ${err.message}`;
+ throw err;
+ });
+}
+
+function makeError(result, options) {
+ const stdout = result.stdout;
+ const stderr = result.stderr;
+
+ let err = result.error;
+ const code = result.code;
+ const signal = result.signal;
+
+ const parsed = options.parsed;
+ const joinedCmd = options.joinedCmd;
+ const timedOut = options.timedOut || false;
+
+ if (!err) {
+ let output = '';
+
+ if (Array.isArray(parsed.opts.stdio)) {
+ if (parsed.opts.stdio[2] !== 'inherit') {
+ output += output.length > 0 ? stderr : `\n${stderr}`;
+ }
+
+ if (parsed.opts.stdio[1] !== 'inherit') {
+ output += `\n${stdout}`;
+ }
+ } else if (parsed.opts.stdio !== 'inherit') {
+ output = `\n${stderr}${stdout}`;
+ }
+
+ err = new Error(`Command failed: ${joinedCmd}${output}`);
+ err.code = code < 0 ? errname(code) : code;
+ }
+
+ err.stdout = stdout;
+ err.stderr = stderr;
+ err.failed = true;
+ err.signal = signal || null;
+ err.cmd = joinedCmd;
+ err.timedOut = timedOut;
+
+ return err;
+}
+
+function joinCmd(cmd, args) {
+ let joinedCmd = cmd;
+
+ if (Array.isArray(args) && args.length > 0) {
+ joinedCmd += ' ' + args.join(' ');
+ }
+
+ return joinedCmd;
+}
+
+module.exports = (cmd, args, opts) => {
+ const parsed = handleArgs(cmd, args, opts);
+ const encoding = parsed.opts.encoding;
+ const maxBuffer = parsed.opts.maxBuffer;
+ const joinedCmd = joinCmd(cmd, args);
+
+ let spawned;
+ try {
+ spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts);
+ } catch (err) {
+ return Promise.reject(err);
+ }
+
+ let removeExitHandler;
+ if (parsed.opts.cleanup) {
+ removeExitHandler = onExit(() => {
+ spawned.kill();
+ });
+ }
+
+ let timeoutId = null;
+ let timedOut = false;
+
+ const cleanup = () => {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ timeoutId = null;
+ }
+
+ if (removeExitHandler) {
+ removeExitHandler();
+ }
+ };
+
+ if (parsed.opts.timeout > 0) {
+ timeoutId = setTimeout(() => {
+ timeoutId = null;
+ timedOut = true;
+ spawned.kill(parsed.opts.killSignal);
+ }, parsed.opts.timeout);
+ }
+
+ const processDone = new Promise(resolve => {
+ spawned.on('exit', (code, signal) => {
+ cleanup();
+ resolve({code, signal});
+ });
+
+ spawned.on('error', err => {
+ cleanup();
+ resolve({error: err});
+ });
+
+ if (spawned.stdin) {
+ spawned.stdin.on('error', err => {
+ cleanup();
+ resolve({error: err});
+ });
+ }
+ });
+
+ function destroy() {
+ if (spawned.stdout) {
+ spawned.stdout.destroy();
+ }
+
+ if (spawned.stderr) {
+ spawned.stderr.destroy();
+ }
+ }
+
+ const handlePromise = () => pFinally(Promise.all([
+ processDone,
+ getStream(spawned, 'stdout', encoding, maxBuffer),
+ getStream(spawned, 'stderr', encoding, maxBuffer)
+ ]).then(arr => {
+ const result = arr[0];
+ result.stdout = arr[1];
+ result.stderr = arr[2];
+
+ if (result.error || result.code !== 0 || result.signal !== null) {
+ const err = makeError(result, {
+ joinedCmd,
+ parsed,
+ timedOut
+ });
+
+ // TODO: missing some timeout logic for killed
+ // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203
+ // err.killed = spawned.killed || killed;
+ err.killed = err.killed || spawned.killed;
+
+ if (!parsed.opts.reject) {
+ return err;
+ }
+
+ throw err;
+ }
+
+ return {
+ stdout: handleOutput(parsed.opts, result.stdout),
+ stderr: handleOutput(parsed.opts, result.stderr),
+ code: 0,
+ failed: false,
+ killed: false,
+ signal: null,
+ cmd: joinedCmd,
+ timedOut: false
+ };
+ }), destroy);
+
+ crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
+
+ handleInput(spawned, parsed.opts);
+
+ spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected);
+ spawned.catch = onrejected => handlePromise().catch(onrejected);
+
+ return spawned;
+};
+
+module.exports.stdout = function () {
+ // TODO: set `stderr: 'ignore'` when that option is implemented
+ return module.exports.apply(null, arguments).then(x => x.stdout);
+};
+
+module.exports.stderr = function () {
+ // TODO: set `stdout: 'ignore'` when that option is implemented
+ return module.exports.apply(null, arguments).then(x => x.stderr);
+};
+
+module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts);
+
+module.exports.sync = (cmd, args, opts) => {
+ const parsed = handleArgs(cmd, args, opts);
+ const joinedCmd = joinCmd(cmd, args);
+
+ if (isStream(parsed.opts.input)) {
+ throw new TypeError('The `input` option cannot be a stream in sync mode');
+ }
+
+ const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);
+ result.code = result.status;
+
+ if (result.error || result.status !== 0 || result.signal !== null) {
+ const err = makeError(result, {
+ joinedCmd,
+ parsed
+ });
+
+ if (!parsed.opts.reject) {
+ return err;
+ }
+
+ throw err;
+ }
+
+ return {
+ stdout: handleOutput(parsed.opts, result.stdout),
+ stderr: handleOutput(parsed.opts, result.stderr),
+ code: 0,
+ failed: false,
+ signal: null,
+ cmd: joinedCmd,
+ timedOut: false
+ };
+};
+
+module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts);
+
+module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.');
diff --git a/node_modules/default-gateway/node_modules/execa/lib/errname.js b/node_modules/default-gateway/node_modules/execa/lib/errname.js
new file mode 100644
index 0000000..5395e2e
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/execa/lib/errname.js
@@ -0,0 +1,39 @@
+'use strict';
+// Older verions of Node might not have `util.getSystemErrorName()`.
+// In that case, fall back to a deprecated internal.
+const util = require('util');
+
+let uv;
+
+if (typeof util.getSystemErrorName === 'function') {
+ module.exports = util.getSystemErrorName;
+} else {
+ try {
+ uv = process.binding('uv');
+
+ if (typeof uv.errname !== 'function') {
+ throw new TypeError('uv.errname is not a function');
+ }
+ } catch (err) {
+ console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err);
+ uv = null;
+ }
+
+ module.exports = code => errname(uv, code);
+}
+
+// Used for testing the fallback behavior
+module.exports.__test__ = errname;
+
+function errname(uv, code) {
+ if (uv) {
+ return uv.errname(code);
+ }
+
+ if (!(code < 0)) {
+ throw new Error('err >= 0');
+ }
+
+ return `Unknown system error ${code}`;
+}
+
diff --git a/node_modules/default-gateway/node_modules/execa/lib/stdio.js b/node_modules/default-gateway/node_modules/execa/lib/stdio.js
new file mode 100644
index 0000000..a82d468
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/execa/lib/stdio.js
@@ -0,0 +1,41 @@
+'use strict';
+const alias = ['stdin', 'stdout', 'stderr'];
+
+const hasAlias = opts => alias.some(x => Boolean(opts[x]));
+
+module.exports = opts => {
+ if (!opts) {
+ return null;
+ }
+
+ if (opts.stdio && hasAlias(opts)) {
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
+ }
+
+ if (typeof opts.stdio === 'string') {
+ return opts.stdio;
+ }
+
+ const stdio = opts.stdio || [];
+
+ if (!Array.isArray(stdio)) {
+ throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
+ }
+
+ const result = [];
+ const len = Math.max(stdio.length, alias.length);
+
+ for (let i = 0; i < len; i++) {
+ let value = null;
+
+ if (stdio[i] !== undefined) {
+ value = stdio[i];
+ } else if (opts[alias[i]] !== undefined) {
+ value = opts[alias[i]];
+ }
+
+ result[i] = value;
+ }
+
+ return result;
+};
diff --git a/node_modules/default-gateway/node_modules/execa/license b/node_modules/default-gateway/node_modules/execa/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/execa/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/default-gateway/node_modules/execa/package.json b/node_modules/default-gateway/node_modules/execa/package.json
new file mode 100644
index 0000000..3a62f5d
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/execa/package.json
@@ -0,0 +1,108 @@
+{
+ "_from": "execa@^0.10.0",
+ "_id": "execa@0.10.0",
+ "_inBundle": false,
+ "_integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==",
+ "_location": "/default-gateway/execa",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "execa@^0.10.0",
+ "name": "execa",
+ "escapedName": "execa",
+ "rawSpec": "^0.10.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.10.0"
+ },
+ "_requiredBy": [
+ "/default-gateway"
+ ],
+ "_resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz",
+ "_shasum": "ff456a8f53f90f8eccc71a96d11bdfc7f082cb50",
+ "_spec": "execa@^0.10.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/default-gateway",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/execa/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "cross-spawn": "^6.0.0",
+ "get-stream": "^3.0.0",
+ "is-stream": "^1.1.0",
+ "npm-run-path": "^2.0.0",
+ "p-finally": "^1.0.0",
+ "signal-exit": "^3.0.0",
+ "strip-eof": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "A better `child_process`",
+ "devDependencies": {
+ "ava": "*",
+ "cat-names": "^1.0.2",
+ "coveralls": "^2.11.9",
+ "delay": "^2.0.0",
+ "is-running": "^2.0.0",
+ "nyc": "^11.0.2",
+ "tempfile": "^2.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/sindresorhus/execa#readme",
+ "keywords": [
+ "exec",
+ "child",
+ "process",
+ "execute",
+ "fork",
+ "execfile",
+ "spawn",
+ "file",
+ "shell",
+ "bin",
+ "binary",
+ "binaries",
+ "npm",
+ "path",
+ "local"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "James Talmage",
+ "email": "james@talmage.io",
+ "url": "github.com/jamestalmage"
+ }
+ ],
+ "name": "execa",
+ "nyc": {
+ "reporter": [
+ "text",
+ "lcov"
+ ],
+ "exclude": [
+ "**/fixtures/**",
+ "**/test.js",
+ "**/test/**"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/execa.git"
+ },
+ "scripts": {
+ "test": "xo && nyc ava"
+ },
+ "version": "0.10.0"
+}
diff --git a/node_modules/default-gateway/node_modules/execa/readme.md b/node_modules/default-gateway/node_modules/execa/readme.md
new file mode 100644
index 0000000..110c016
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/execa/readme.md
@@ -0,0 +1,304 @@
+# execa [](https://travis-ci.org/sindresorhus/execa) [](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [](https://coveralls.io/github/sindresorhus/execa?branch=master)
+
+> A better [`child_process`](https://nodejs.org/api/child_process.html)
+
+
+## Why
+
+- Promise interface.
+- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`.
+- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform.
+- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why)
+- Higher max buffer. 10 MB instead of 200 KB.
+- [Executes locally installed binaries by name.](#preferlocal)
+- [Cleans up spawned processes when the parent process dies.](#cleanup)
+
+
+## Install
+
+```
+$ npm install --save execa
+```
+
+
+## Usage
+
+```js
+const execa = require('execa');
+
+execa('echo', ['unicorns']).then(result => {
+ console.log(result.stdout);
+ //=> 'unicorns'
+});
+
+// pipe the child process stdout to the current stdout
+execa('echo', ['unicorns']).stdout.pipe(process.stdout);
+
+execa.shell('echo unicorns').then(result => {
+ console.log(result.stdout);
+ //=> 'unicorns'
+});
+
+// example of catching an error
+execa.shell('exit 3').catch(error => {
+ console.log(error);
+ /*
+ {
+ message: 'Command failed: /bin/sh -c exit 3'
+ killed: false,
+ code: 3,
+ signal: null,
+ cmd: '/bin/sh -c exit 3',
+ stdout: '',
+ stderr: '',
+ timedOut: false
+ }
+ */
+});
+
+// example of catching an error with a sync method
+try {
+ execa.shellSync('exit 3');
+} catch (err) {
+ console.log(err);
+ /*
+ {
+ message: 'Command failed: /bin/sh -c exit 3'
+ code: 3,
+ signal: null,
+ cmd: '/bin/sh -c exit 3',
+ stdout: '',
+ stderr: '',
+ timedOut: false
+ }
+ */
+}
+```
+
+
+## API
+
+### execa(file, [arguments], [options])
+
+Execute a file.
+
+Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
+
+Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
+
+### execa.stdout(file, [arguments], [options])
+
+Same as `execa()`, but returns only `stdout`.
+
+### execa.stderr(file, [arguments], [options])
+
+Same as `execa()`, but returns only `stderr`.
+
+### execa.shell(command, [options])
+
+Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer.
+
+Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess).
+
+The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties.
+
+### execa.sync(file, [arguments], [options])
+
+Execute a file synchronously.
+
+Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
+
+This method throws an `Error` if the command fails.
+
+### execa.shellSync(file, [options])
+
+Execute a command synchronously through the system shell.
+
+Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
+
+### options
+
+Type: `Object`
+
+#### cwd
+
+Type: `string`
+Default: `process.cwd()`
+
+Current working directory of the child process.
+
+#### env
+
+Type: `Object`
+Default: `process.env`
+
+Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this.
+
+#### extendEnv
+
+Type: `boolean`
+Default: `true`
+
+Set to `false` if you don't want to extend the environment variables when providing the `env` property.
+
+#### argv0
+
+Type: `string`
+
+Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified.
+
+#### stdio
+
+Type: `Array` `string`
+Default: `pipe`
+
+Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration.
+
+#### detached
+
+Type: `boolean`
+
+Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached).
+
+#### uid
+
+Type: `number`
+
+Sets the user identity of the process.
+
+#### gid
+
+Type: `number`
+
+Sets the group identity of the process.
+
+#### shell
+
+Type: `boolean` `string`
+Default: `false`
+
+If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.
+
+#### stripEof
+
+Type: `boolean`
+Default: `true`
+
+[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output.
+
+#### preferLocal
+
+Type: `boolean`
+Default: `true`
+
+Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`.
+
+#### localDir
+
+Type: `string`
+Default: `process.cwd()`
+
+Preferred path to find locally installed binaries in (use with `preferLocal`).
+
+#### input
+
+Type: `string` `Buffer` `stream.Readable`
+
+Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods.
+
+#### reject
+
+Type: `boolean`
+Default: `true`
+
+Setting this to `false` resolves the promise with the error instead of rejecting it.
+
+#### cleanup
+
+Type: `boolean`
+Default: `true`
+
+Keep track of the spawned process and `kill` it when the parent process exits.
+
+#### encoding
+
+Type: `string`
+Default: `utf8`
+
+Specify the character encoding used to decode the `stdout` and `stderr` output.
+
+#### timeout
+
+Type: `number`
+Default: `0`
+
+If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds.
+
+#### maxBuffer
+
+Type: `number`
+Default: `10000000` (10MB)
+
+Largest amount of data in bytes allowed on `stdout` or `stderr`.
+
+#### killSignal
+
+Type: `string` `number`
+Default: `SIGTERM`
+
+Signal value to be used when the spawned process will be killed.
+
+#### stdin
+
+Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe`
+
+Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
+
+#### stdout
+
+Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe`
+
+Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
+
+#### stderr
+
+Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe`
+
+Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
+
+#### windowsVerbatimArguments
+
+Type: `boolean`
+Default: `false`
+
+If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`.
+
+
+## Tips
+
+### Save and pipe output from a child process
+
+Let's say you want to show the output of a child process in real-time while also saving it to a variable.
+
+```js
+const execa = require('execa');
+const getStream = require('get-stream');
+
+const stream = execa('echo', ['foo']).stdout;
+
+stream.pipe(process.stdout);
+
+getStream(stream).then(value => {
+ console.log('child output:', value);
+});
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/default-gateway/node_modules/get-stream/buffer-stream.js b/node_modules/default-gateway/node_modules/get-stream/buffer-stream.js
new file mode 100644
index 0000000..ae45d3d
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/get-stream/buffer-stream.js
@@ -0,0 +1,51 @@
+'use strict';
+const PassThrough = require('stream').PassThrough;
+
+module.exports = opts => {
+ opts = Object.assign({}, opts);
+
+ const array = opts.array;
+ let encoding = opts.encoding;
+ const buffer = encoding === 'buffer';
+ let objectMode = false;
+
+ if (array) {
+ objectMode = !(encoding || buffer);
+ } else {
+ encoding = encoding || 'utf8';
+ }
+
+ if (buffer) {
+ encoding = null;
+ }
+
+ let len = 0;
+ const ret = [];
+ const stream = new PassThrough({objectMode});
+
+ if (encoding) {
+ stream.setEncoding(encoding);
+ }
+
+ stream.on('data', chunk => {
+ ret.push(chunk);
+
+ if (objectMode) {
+ len = ret.length;
+ } else {
+ len += chunk.length;
+ }
+ });
+
+ stream.getBufferedValue = () => {
+ if (array) {
+ return ret;
+ }
+
+ return buffer ? Buffer.concat(ret, len) : ret.join('');
+ };
+
+ stream.getBufferedLength = () => len;
+
+ return stream;
+};
diff --git a/node_modules/default-gateway/node_modules/get-stream/index.js b/node_modules/default-gateway/node_modules/get-stream/index.js
new file mode 100644
index 0000000..2dc5ee9
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/get-stream/index.js
@@ -0,0 +1,51 @@
+'use strict';
+const bufferStream = require('./buffer-stream');
+
+function getStream(inputStream, opts) {
+ if (!inputStream) {
+ return Promise.reject(new Error('Expected a stream'));
+ }
+
+ opts = Object.assign({maxBuffer: Infinity}, opts);
+
+ const maxBuffer = opts.maxBuffer;
+ let stream;
+ let clean;
+
+ const p = new Promise((resolve, reject) => {
+ const error = err => {
+ if (err) { // null check
+ err.bufferedData = stream.getBufferedValue();
+ }
+
+ reject(err);
+ };
+
+ stream = bufferStream(opts);
+ inputStream.once('error', error);
+ inputStream.pipe(stream);
+
+ stream.on('data', () => {
+ if (stream.getBufferedLength() > maxBuffer) {
+ reject(new Error('maxBuffer exceeded'));
+ }
+ });
+ stream.once('error', error);
+ stream.on('end', resolve);
+
+ clean = () => {
+ // some streams doesn't implement the `stream.Readable` interface correctly
+ if (inputStream.unpipe) {
+ inputStream.unpipe(stream);
+ }
+ };
+ });
+
+ p.then(clean, clean);
+
+ return p.then(() => stream.getBufferedValue());
+}
+
+module.exports = getStream;
+module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'}));
+module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true}));
diff --git a/node_modules/default-gateway/node_modules/get-stream/license b/node_modules/default-gateway/node_modules/get-stream/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/get-stream/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/default-gateway/node_modules/get-stream/package.json b/node_modules/default-gateway/node_modules/get-stream/package.json
new file mode 100644
index 0000000..bab7676
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/get-stream/package.json
@@ -0,0 +1,80 @@
+{
+ "_from": "get-stream@^3.0.0",
+ "_id": "get-stream@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+ "_location": "/default-gateway/get-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "get-stream@^3.0.0",
+ "name": "get-stream",
+ "escapedName": "get-stream",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/default-gateway/execa"
+ ],
+ "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14",
+ "_spec": "get-stream@^3.0.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/default-gateway/node_modules/execa",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/get-stream/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Get a stream as a string, buffer, or array",
+ "devDependencies": {
+ "ava": "*",
+ "into-stream": "^3.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "buffer-stream.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/get-stream#readme",
+ "keywords": [
+ "get",
+ "stream",
+ "promise",
+ "concat",
+ "string",
+ "str",
+ "text",
+ "buffer",
+ "read",
+ "data",
+ "consume",
+ "readable",
+ "readablestream",
+ "array",
+ "object",
+ "obj"
+ ],
+ "license": "MIT",
+ "name": "get-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/get-stream.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/default-gateway/node_modules/get-stream/readme.md b/node_modules/default-gateway/node_modules/get-stream/readme.md
new file mode 100644
index 0000000..73b188f
--- /dev/null
+++ b/node_modules/default-gateway/node_modules/get-stream/readme.md
@@ -0,0 +1,117 @@
+# get-stream [](https://travis-ci.org/sindresorhus/get-stream)
+
+> Get a stream as a string, buffer, or array
+
+
+## Install
+
+```
+$ npm install --save get-stream
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const getStream = require('get-stream');
+const stream = fs.createReadStream('unicorn.txt');
+
+getStream(stream).then(str => {
+ console.log(str);
+ /*
+ ,,))))))));,
+ __)))))))))))))),
+ \|/ -\(((((''''((((((((.
+ -*-==//////(('' . `)))))),
+ /|\ ))| o ;-. '((((( ,(,
+ ( `| / ) ;))))' ,_))^;(~
+ | | | ,))((((_ _____------~~~-. %,;(;(>';'~
+ o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~
+ ; ''''```` `: `:::|\,__,%% );`'; ~
+ | _ ) / `:|`----' `-'
+ ______/\/~ | / /
+ /~;;.____/;;' / ___--,-( `;;;/
+ / // _;______;'------~~~~~ /;;/\ /
+ // | | / ; \;;,\
+ (<_ | ; /',/-----' _>
+ \_| ||_ //~;~~~~~~~~~
+ `\_| (,~~
+ \~\
+ ~~
+ */
+});
+```
+
+
+## API
+
+The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
+
+### getStream(stream, [options])
+
+Get the `stream` as a string.
+
+#### options
+
+##### encoding
+
+Type: `string`
+Default: `utf8`
+
+[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
+
+##### maxBuffer
+
+Type: `number`
+Default: `Infinity`
+
+Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected.
+
+### getStream.buffer(stream, [options])
+
+Get the `stream` as a buffer.
+
+It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
+
+### getStream.array(stream, [options])
+
+Get the `stream` as an array of values.
+
+It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen:
+
+- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes).
+
+- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
+
+- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
+
+
+## Errors
+
+If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
+
+```js
+getStream(streamThatErrorsAtTheEnd('unicorn'))
+ .catch(err => {
+ console.log(err.bufferedData);
+ //=> 'unicorn'
+ });
+```
+
+
+## FAQ
+
+### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
+
+This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
+
+
+## Related
+
+- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/default-gateway/openbsd.js b/node_modules/default-gateway/openbsd.js
new file mode 100644
index 0000000..e03bca5
--- /dev/null
+++ b/node_modules/default-gateway/openbsd.js
@@ -0,0 +1,48 @@
+"use strict";
+
+const net = require("net");
+const execa = require("execa");
+const dests = ["default", "0.0.0.0", "0.0.0.0/0", "::", "::/0"];
+
+const args = {
+ v4: ["-rn", "-f", "inet"],
+ v6: ["-rn", "-f", "inet6"],
+};
+
+const parse = stdout => {
+ let result;
+
+ (stdout || "").trim().split("\n").some(line => {
+ const results = line.split(/ +/) || [];
+ const target = results[0];
+ const gateway = results[1];
+ const iface = results[7];
+ if (dests.indexOf(target) !== -1 && gateway && net.isIP(gateway)) {
+ result = {gateway: gateway, interface: (iface ? iface : null)};
+ return true;
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const promise = family => {
+ return execa.stdout("netstat", args[family]).then(stdout => {
+ return parse(stdout);
+ });
+};
+
+const sync = family => {
+ const result = execa.sync("netstat", args[family]);
+ return parse(result.stdout);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/default-gateway/package.json b/node_modules/default-gateway/package.json
new file mode 100644
index 0000000..e5a3563
--- /dev/null
+++ b/node_modules/default-gateway/package.json
@@ -0,0 +1,92 @@
+{
+ "_from": "default-gateway@^2.6.0",
+ "_id": "default-gateway@2.7.2",
+ "_inBundle": false,
+ "_integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==",
+ "_location": "/default-gateway",
+ "_phantomChildren": {
+ "cross-spawn": "6.0.5",
+ "is-stream": "1.1.0",
+ "npm-run-path": "2.0.2",
+ "p-finally": "1.0.0",
+ "signal-exit": "3.0.2",
+ "strip-eof": "1.0.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "default-gateway@^2.6.0",
+ "name": "default-gateway",
+ "escapedName": "default-gateway",
+ "rawSpec": "^2.6.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.6.0"
+ },
+ "_requiredBy": [
+ "/internal-ip"
+ ],
+ "_resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz",
+ "_shasum": "b7ef339e5e024b045467af403d50348db4642d0f",
+ "_spec": "default-gateway@^2.6.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/internal-ip",
+ "author": {
+ "name": "silverwind",
+ "email": "me@silverwind.io"
+ },
+ "bugs": {
+ "url": "https://github.com/silverwind/default-gateway/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "execa": "^0.10.0",
+ "ip-regex": "^2.1.0"
+ },
+ "deprecated": false,
+ "description": "Get the default network gateway, cross-platform.",
+ "devDependencies": {
+ "eslint": "^4.19.1",
+ "eslint-config-silverwind": "^1.0.42",
+ "updates": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "android.js",
+ "darwin.js",
+ "freebsd.js",
+ "linux.js",
+ "openbsd.js",
+ "sunos.js",
+ "win32.js"
+ ],
+ "homepage": "https://github.com/silverwind/default-gateway#readme",
+ "keywords": [
+ "default gateway",
+ "network",
+ "default",
+ "gateway",
+ "routing",
+ "route"
+ ],
+ "license": "BSD-2-Clause",
+ "name": "default-gateway",
+ "os": [
+ "android",
+ "darwin",
+ "freebsd",
+ "linux",
+ "openbsd",
+ "sunos",
+ "win32"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/silverwind/default-gateway.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "2.7.2"
+}
diff --git a/node_modules/default-gateway/sunos.js b/node_modules/default-gateway/sunos.js
new file mode 100644
index 0000000..f1d0ab7
--- /dev/null
+++ b/node_modules/default-gateway/sunos.js
@@ -0,0 +1,48 @@
+"use strict";
+
+const net = require("net");
+const execa = require("execa");
+const dests = ["default", "0.0.0.0", "0.0.0.0/0", "::", "::/0"];
+
+const args = {
+ v4: ["-rn", "-f", "inet"],
+ v6: ["-rn", "-f", "inet6"],
+};
+
+const parse = stdout => {
+ let result;
+
+ (stdout || "").trim().split("\n").some(line => {
+ const results = line.split(/ +/) || [];
+ const target = results[0];
+ const gateway = results[1];
+ const iface = results[5];
+ if (dests.indexOf(target) !== -1 && gateway && net.isIP(gateway)) {
+ result = {gateway: gateway, interface: (iface ? iface : null)};
+ return true;
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const promise = family => {
+ return execa.stdout("netstat", args[family]).then(stdout => {
+ return parse(stdout);
+ });
+};
+
+const sync = family => {
+ const result = execa.sync("netstat", args[family]);
+ return parse(result.stdout);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/default-gateway/win32.js b/node_modules/default-gateway/win32.js
new file mode 100644
index 0000000..9172dd5
--- /dev/null
+++ b/node_modules/default-gateway/win32.js
@@ -0,0 +1,67 @@
+"use strict";
+
+const execa = require("execa");
+const ipRegex = require("ip-regex");
+
+const gwArgs = "path Win32_NetworkAdapterConfiguration where IPEnabled=true get DefaultIPGateway,Index /format:table".split(" ");
+const ifArgs = "path Win32_NetworkAdapter get Index,NetConnectionID /format:table".split(" ");
+
+const parse = (gwTable, ifTable, family) => {
+ let gateway, gwid, result;
+
+ (gwTable || "").trim().split("\n").splice(1).some(line => {
+ const results = line.trim().split(/} +/) || [];
+ const gw = results[0];
+ const id = results[1];
+ gateway = (ipRegex[family]().exec((gw || "").trim()) || [])[0];
+ if (gateway) {
+ gwid = id;
+ return true;
+ }
+ });
+
+ (ifTable || "").trim().split("\n").splice(1).some(line => {
+ const i = line.indexOf(" ");
+ const id = line.substr(0, i).trim();
+ const name = line.substr(i + 1).trim();
+ if (id === gwid) {
+ result = {gateway: gateway, interface: name ? name : null};
+ return true;
+ }
+ });
+
+ if (!result) {
+ throw new Error("Unable to determine default gateway");
+ }
+
+ return result;
+};
+
+const spawnOpts = {
+ windowsHide: true,
+};
+
+const promise = family => {
+ return Promise.all([
+ execa.stdout("wmic", gwArgs, spawnOpts),
+ execa.stdout("wmic", ifArgs, spawnOpts),
+ ]).then(results => {
+ const gwTable = results[0];
+ const ifTable = results[1];
+
+ return parse(gwTable, ifTable, family);
+ });
+};
+
+const sync = family => {
+ const gwTable = execa.sync("wmic", gwArgs, spawnOpts).stdout;
+ const ifTable = execa.sync("wmic", ifArgs, spawnOpts).stdout;
+
+ return parse(gwTable, ifTable, family);
+};
+
+module.exports.v4 = () => promise("v4");
+module.exports.v6 = () => promise("v6");
+
+module.exports.v4.sync = () => sync("v4");
+module.exports.v6.sync = () => sync("v6");
diff --git a/node_modules/del/index.js b/node_modules/del/index.js
new file mode 100644
index 0000000..3b602af
--- /dev/null
+++ b/node_modules/del/index.js
@@ -0,0 +1,70 @@
+'use strict';
+const path = require('path');
+const globby = require('globby');
+const isPathCwd = require('is-path-cwd');
+const isPathInCwd = require('is-path-in-cwd');
+const pify = require('pify');
+const rimraf = require('rimraf');
+const pMap = require('p-map');
+
+const rimrafP = pify(rimraf);
+
+function safeCheck(file) {
+ if (isPathCwd(file)) {
+ throw new Error('Cannot delete the current working directory. Can be overriden with the `force` option.');
+ }
+
+ if (!isPathInCwd(file)) {
+ throw new Error('Cannot delete files/folders outside the current working directory. Can be overriden with the `force` option.');
+ }
+}
+
+module.exports = (patterns, opts) => {
+ opts = Object.assign({}, opts);
+
+ const force = opts.force;
+ delete opts.force;
+
+ const dryRun = opts.dryRun;
+ delete opts.dryRun;
+
+ const mapper = file => {
+ if (!force) {
+ safeCheck(file);
+ }
+
+ file = path.resolve(opts.cwd || '', file);
+
+ if (dryRun) {
+ return file;
+ }
+
+ return rimrafP(file, {glob: false}).then(() => file);
+ };
+
+ return globby(patterns, opts).then(files => pMap(files, mapper, opts));
+};
+
+module.exports.sync = (patterns, opts) => {
+ opts = Object.assign({}, opts);
+
+ const force = opts.force;
+ delete opts.force;
+
+ const dryRun = opts.dryRun;
+ delete opts.dryRun;
+
+ return globby.sync(patterns, opts).map(file => {
+ if (!force) {
+ safeCheck(file);
+ }
+
+ file = path.resolve(opts.cwd || '', file);
+
+ if (!dryRun) {
+ rimraf.sync(file, {glob: false});
+ }
+
+ return file;
+ });
+};
diff --git a/node_modules/del/license b/node_modules/del/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/del/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/del/package.json b/node_modules/del/package.json
new file mode 100644
index 0000000..827001f
--- /dev/null
+++ b/node_modules/del/package.json
@@ -0,0 +1,93 @@
+{
+ "_from": "del@^3.0.0",
+ "_id": "del@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=",
+ "_location": "/del",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "del@^3.0.0",
+ "name": "del",
+ "escapedName": "del",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/webpack-dev-server"
+ ],
+ "_resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz",
+ "_shasum": "53ecf699ffcbcb39637691ab13baf160819766e5",
+ "_spec": "del@^3.0.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/webpack-dev-server",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/del/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "globby": "^6.1.0",
+ "is-path-cwd": "^1.0.0",
+ "is-path-in-cwd": "^1.0.0",
+ "p-map": "^1.1.1",
+ "pify": "^3.0.0",
+ "rimraf": "^2.2.8"
+ },
+ "deprecated": false,
+ "description": "Delete files and folders",
+ "devDependencies": {
+ "ava": "*",
+ "make-dir": "^1.0.0",
+ "tempy": "^0.1.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/del#readme",
+ "keywords": [
+ "delete",
+ "files",
+ "folders",
+ "directories",
+ "del",
+ "remove",
+ "destroy",
+ "trash",
+ "unlink",
+ "clean",
+ "cleaning",
+ "cleanup",
+ "rm",
+ "rmrf",
+ "rimraf",
+ "rmdir",
+ "glob",
+ "gulpfriendly",
+ "file",
+ "folder",
+ "directory",
+ "dir",
+ "fs",
+ "filesystem"
+ ],
+ "license": "MIT",
+ "name": "del",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/del.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/del/readme.md b/node_modules/del/readme.md
new file mode 100644
index 0000000..664aa0f
--- /dev/null
+++ b/node_modules/del/readme.md
@@ -0,0 +1,121 @@
+# del [](https://travis-ci.org/sindresorhus/del) [](https://github.com/sindresorhus/xo)
+
+> Delete files and folders using [globs](https://github.com/isaacs/minimatch#usage)
+
+Similar to [rimraf](https://github.com/isaacs/rimraf), but with a Promise API and support for multiple files and globbing. It also protects you against deleting the current working directory and above.
+
+---
+
+🐶
+Support this project and improve your JavaScript skills with this great ES6 course by Wes Bos.
Try his free JavaScript 30 course for a taste of what to expect. You might also like his React and Sublime course.
+
+---
+
+
+## Install
+
+```
+$ npm install --save del
+```
+
+
+## Usage
+
+```js
+const del = require('del');
+
+del(['tmp/*.js', '!tmp/unicorn.js']).then(paths => {
+ console.log('Deleted files and folders:\n', paths.join('\n'));
+});
+```
+
+
+## Beware
+
+The glob pattern `**` matches all children and *the parent*.
+
+So this won't work:
+
+```js
+del.sync(['public/assets/**', '!public/assets/goat.png']);
+```
+
+You have to explicitly ignore the parent directories too:
+
+```js
+del.sync(['public/assets/**', '!public/assets', '!public/assets/goat.png']);
+```
+
+Suggestions on how to improve this welcome!
+
+
+## API
+
+### del(patterns, [options])
+
+Returns a promise for an array of deleted paths.
+
+### del.sync(patterns, [options])
+
+Returns an array of deleted paths.
+
+#### patterns
+
+Type: `string` `Array`
+
+See supported minimatch [patterns](https://github.com/isaacs/minimatch#usage).
+
+- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js)
+- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
+
+#### options
+
+Type: `Object`
+
+See the [`glob` options](https://github.com/isaacs/node-glob#options).
+
+##### force
+
+Type: `boolean`
+Default: `false`
+
+Allow deleting the current working directory and outside.
+
+##### dryRun
+
+Type: `boolean`
+Default: `false`
+
+See what would be deleted.
+
+```js
+const del = require('del');
+
+del(['tmp/*.js'], {dryRun: true}).then(paths => {
+ console.log('Files and folders that would be deleted:\n', paths.join('\n'));
+});
+```
+
+##### concurrency
+
+Type: `number`
+Default: `Infinity`
+Minimum: `1`
+
+Concurrency limit.
+
+
+## CLI
+
+See [del-cli](https://github.com/sindresorhus/del-cli) for a CLI for this module and [trash-cli](https://github.com/sindresorhus/trash-cli) for a safe version that is suitable for running by hand.
+
+
+## Related
+
+- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed
+- [globby](https://github.com/sindresorhus/globby) - User-friendly glob matching
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/depd/History.md b/node_modules/depd/History.md
new file mode 100644
index 0000000..507ecb8
--- /dev/null
+++ b/node_modules/depd/History.md
@@ -0,0 +1,96 @@
+1.1.2 / 2018-01-11
+==================
+
+ * perf: remove argument reassignment
+ * Support Node.js 0.6 to 9.x
+
+1.1.1 / 2017-07-27
+==================
+
+ * Remove unnecessary `Buffer` loading
+ * Support Node.js 0.6 to 8.x
+
+1.1.0 / 2015-09-14
+==================
+
+ * Enable strict mode in more places
+ * Support io.js 3.x
+ * Support io.js 2.x
+ * Support web browser loading
+ - Requires bundler like Browserify or webpack
+
+1.0.1 / 2015-04-07
+==================
+
+ * Fix `TypeError`s when under `'use strict'` code
+ * Fix useless type name on auto-generated messages
+ * Support io.js 1.x
+ * Support Node.js 0.12
+
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/node_modules/depd/LICENSE b/node_modules/depd/LICENSE
new file mode 100644
index 0000000..84441fb
--- /dev/null
+++ b/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/depd/Readme.md b/node_modules/depd/Readme.md
new file mode 100644
index 0000000..7790670
--- /dev/null
+++ b/node_modules/depd/Readme.md
@@ -0,0 +1,280 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+This module is installed directly using `npm`:
+
+```sh
+$ npm install depd
+```
+
+This module can also be bundled with systems like
+[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/),
+though by default this module will alter it's API to no longer display or
+track deprecations.
+
+## API
+
+
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object. ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+▼ ▼ ▼ ▼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+▲ ▲ ▲ ▲
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+▲ ▲ ▲ ▲ ▲
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction () {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg
+[node-url]: https://nodejs.org/en/download/
diff --git a/node_modules/depd/index.js b/node_modules/depd/index.js
new file mode 100644
index 0000000..d758d3c
--- /dev/null
+++ b/node_modules/depd/index.js
@@ -0,0 +1,522 @@
+/*!
+ * depd
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var eventListenerCount = require('./lib/compat').eventListenerCount
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace (str, namespace) {
+ var vals = str.split(/[ ,]+/)
+ var ns = String(namespace).toLowerCase()
+
+ for (var i = 0; i < vals.length; i++) {
+ var val = vals[i]
+
+ // namespace contained
+ if (val && (val === '*' || val.toLowerCase() === ns)) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor (obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter () { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter (val) { return (value = val) }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString (arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString (stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd (namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate (message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored (namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced (namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log (message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var depSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ depSite = site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = depSite.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ depSite = callSiteLocation(stack[i])
+ callSite = depSite
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? depSite.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ var msg = message
+ if (!msg) {
+ msg = callSite === depSite || !callSite.name
+ ? defaultMessage(depSite)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, msg, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var output = format.call(this, msg, caller, stack.slice(i))
+ process.stderr.write(output + '\n', 'utf8')
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation (callSite) {
+ var file = callSite.getFileName() || ''
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage (site) {
+ var callSite = site.callSite
+ var funcName = site.name
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = ''
+ }
+
+ var context = callSite.getThis()
+ var typeName = context && callSite.getTypeName()
+
+ // ignore useless type name
+ if (typeName === 'Object') {
+ typeName = undefined
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = context.name || typeName
+ }
+
+ return typeName && callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain (msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp +
+ ' ' + this._namespace +
+ ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor (msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan
+ ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow
+ ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation (callSite) {
+ return relative(basePath, callSite[0]) +
+ ':' + callSite[1] +
+ ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack () {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace (obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction (fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this // eslint-disable-line no-unused-vars
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ // eslint-disable-next-line no-eval
+ var deprecatedfn = eval('(function (' + args + ') {\n' +
+ '"use strict"\n' +
+ 'log.call(deprecate, message, site)\n' +
+ 'return fn.apply(this, arguments)\n' +
+ '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty (obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter () {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter () {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError (namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return (stackString = createStackString.call(this, stack))
+ },
+ set: function setter (val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/node_modules/depd/lib/browser/index.js b/node_modules/depd/lib/browser/index.js
new file mode 100644
index 0000000..6be45cc
--- /dev/null
+++ b/node_modules/depd/lib/browser/index.js
@@ -0,0 +1,77 @@
+/*!
+ * depd
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = depd
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd (namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ function deprecate (message) {
+ // no-op in browser
+ }
+
+ deprecate._file = undefined
+ deprecate._ignored = true
+ deprecate._namespace = namespace
+ deprecate._traced = false
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ *
+ * This is a no-op version of the wrapper, which does nothing but call
+ * validation.
+ */
+
+function wrapfunction (fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ return fn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ *
+ * This is a no-op version of the wrapper, which does nothing but call
+ * validation.
+ */
+
+function wrapproperty (obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+}
diff --git a/node_modules/depd/lib/compat/callsite-tostring.js b/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..73186dc
--- /dev/null
+++ b/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,103 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation (callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString (callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName (obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/node_modules/depd/lib/compat/event-listener-count.js b/node_modules/depd/lib/compat/event-listener-count.js
new file mode 100644
index 0000000..3a8925d
--- /dev/null
+++ b/node_modules/depd/lib/compat/event-listener-count.js
@@ -0,0 +1,22 @@
+/*!
+ * depd
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = eventListenerCount
+
+/**
+ * Get the count of listeners on an event emitter of a specific type.
+ */
+
+function eventListenerCount (emitter, type) {
+ return emitter.listeners(type).length
+}
diff --git a/node_modules/depd/lib/compat/index.js b/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..955b333
--- /dev/null
+++ b/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,79 @@
+/*!
+ * depd
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var EventEmitter = require('events').EventEmitter
+
+/**
+ * Module exports.
+ * @public
+ */
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString () {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace (obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () {
+ return EventEmitter.listenerCount || require('./event-listener-count')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty (obj, prop, getter) {
+ function get () {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString (obj) {
+ return obj.toString()
+}
diff --git a/node_modules/depd/package.json b/node_modules/depd/package.json
new file mode 100644
index 0000000..82cf49f
--- /dev/null
+++ b/node_modules/depd/package.json
@@ -0,0 +1,79 @@
+{
+ "_from": "depd@~1.1.2",
+ "_id": "depd@1.1.2",
+ "_inBundle": false,
+ "_integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+ "_location": "/depd",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "depd@~1.1.2",
+ "name": "depd",
+ "escapedName": "depd",
+ "rawSpec": "~1.1.2",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.2"
+ },
+ "_requiredBy": [
+ "/body-parser",
+ "/express",
+ "/http-errors",
+ "/send"
+ ],
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "_shasum": "9bcd52e14c097763e749b274c4346ed2e560b5a9",
+ "_spec": "depd@~1.1.2",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "browser": "lib/browser/index.js",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Deprecate all the things",
+ "devDependencies": {
+ "beautify-benchmark": "0.2.4",
+ "benchmark": "2.1.4",
+ "eslint": "3.19.0",
+ "eslint-config-standard": "7.1.0",
+ "eslint-plugin-markdown": "1.0.0-beta.7",
+ "eslint-plugin-promise": "3.6.0",
+ "eslint-plugin-standard": "3.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "~1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "homepage": "https://github.com/dougwilson/nodejs-depd#readme",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "license": "MIT",
+ "name": "depd",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/dougwilson/nodejs-depd.git"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
+ },
+ "version": "1.1.2"
+}
diff --git a/node_modules/destroy/LICENSE b/node_modules/destroy/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/node_modules/destroy/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/destroy/README.md b/node_modules/destroy/README.md
new file mode 100644
index 0000000..6474bc3
--- /dev/null
+++ b/node_modules/destroy/README.md
@@ -0,0 +1,60 @@
+# Destroy
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Destroy a stream.
+
+This module is meant to ensure a stream gets destroyed, handling different APIs
+and Node.js bugs.
+
+## API
+
+```js
+var destroy = require('destroy')
+```
+
+### destroy(stream)
+
+Destroy the given stream. In most cases, this is identical to a simple
+`stream.destroy()` call. The rules are as follows for a given stream:
+
+ 1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()`
+ and add a listener to the `open` event to call `stream.close()` if it is
+ fired. This is for a Node.js bug that will leak a file descriptor if
+ `.destroy()` is called before `open`.
+ 2. If the `stream` is not an instance of `Stream`, then nothing happens.
+ 3. If the `stream` has a `.destroy()` method, then call it.
+
+The function returns the `stream` passed in as the argument.
+
+## Example
+
+```js
+var destroy = require('destroy')
+
+var fs = require('fs')
+var stream = fs.createReadStream('package.json')
+
+// ... and later
+destroy(stream)
+```
+
+[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/destroy
+[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
+[github-url]: https://github.com/stream-utils/destroy/tags
+[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/destroy
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
+[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/destroy
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/node_modules/destroy/index.js b/node_modules/destroy/index.js
new file mode 100644
index 0000000..6da2d26
--- /dev/null
+++ b/node_modules/destroy/index.js
@@ -0,0 +1,75 @@
+/*!
+ * destroy
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var ReadStream = require('fs').ReadStream
+var Stream = require('stream')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = destroy
+
+/**
+ * Destroy a stream.
+ *
+ * @param {object} stream
+ * @public
+ */
+
+function destroy(stream) {
+ if (stream instanceof ReadStream) {
+ return destroyReadStream(stream)
+ }
+
+ if (!(stream instanceof Stream)) {
+ return stream
+ }
+
+ if (typeof stream.destroy === 'function') {
+ stream.destroy()
+ }
+
+ return stream
+}
+
+/**
+ * Destroy a ReadStream.
+ *
+ * @param {object} stream
+ * @private
+ */
+
+function destroyReadStream(stream) {
+ stream.destroy()
+
+ if (typeof stream.close === 'function') {
+ // node.js core bug work-around
+ stream.on('open', onOpenClose)
+ }
+
+ return stream
+}
+
+/**
+ * On open handler to close stream.
+ * @private
+ */
+
+function onOpenClose() {
+ if (typeof this.fd === 'number') {
+ // actually close down the fd
+ this.close()
+ }
+}
diff --git a/node_modules/destroy/package.json b/node_modules/destroy/package.json
new file mode 100644
index 0000000..e648cd9
--- /dev/null
+++ b/node_modules/destroy/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "destroy@~1.0.4",
+ "_id": "destroy@1.0.4",
+ "_inBundle": false,
+ "_integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
+ "_location": "/destroy",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "destroy@~1.0.4",
+ "name": "destroy",
+ "escapedName": "destroy",
+ "rawSpec": "~1.0.4",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.4"
+ },
+ "_requiredBy": [
+ "/send"
+ ],
+ "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+ "_shasum": "978857442c44749e4206613e37946205826abd80",
+ "_spec": "destroy@~1.0.4",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/send",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "bugs": {
+ "url": "https://github.com/stream-utils/destroy/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "destroy a stream if possible",
+ "devDependencies": {
+ "istanbul": "0.4.2",
+ "mocha": "2.3.4"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/stream-utils/destroy#readme",
+ "keywords": [
+ "stream",
+ "streams",
+ "destroy",
+ "cleanup",
+ "leak",
+ "fd"
+ ],
+ "license": "MIT",
+ "name": "destroy",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stream-utils/destroy.git"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "version": "1.0.4"
+}
diff --git a/node_modules/detect-node/LICENSE b/node_modules/detect-node/LICENSE
new file mode 100644
index 0000000..3113356
--- /dev/null
+++ b/node_modules/detect-node/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Ilya Kantor
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/detect-node/Readme.md b/node_modules/detect-node/Readme.md
new file mode 100644
index 0000000..73c57b9
--- /dev/null
+++ b/node_modules/detect-node/Readme.md
@@ -0,0 +1,30 @@
+### Install
+
+```shell
+npm install --save detect-node
+```
+
+### Usage:
+
+```js
+var isNode = require('detect-node');
+
+if (isNode) {
+ console.log("Running under Node.JS");
+} else {
+ alert("Hello from browser (or whatever not-a-node env)");
+}
+```
+
+The check is performed as:
+```js
+module.exports = false;
+
+// Only Node.JS has a process variable that is of [[Class]] process
+try {
+ module.exports = Object.prototype.toString.call(global.process) === '[object process]'
+} catch(e) {}
+
+```
+
+Thanks to Ingvar Stepanyan for the initial idea. This check is both **the most reliable I could find** and it does not use `process` env directly, which would cause browserify to include it into the build.
diff --git a/node_modules/detect-node/browser.js b/node_modules/detect-node/browser.js
new file mode 100644
index 0000000..4172696
--- /dev/null
+++ b/node_modules/detect-node/browser.js
@@ -0,0 +1,2 @@
+module.exports = false;
+
diff --git a/node_modules/detect-node/index.js b/node_modules/detect-node/index.js
new file mode 100644
index 0000000..229949e
--- /dev/null
+++ b/node_modules/detect-node/index.js
@@ -0,0 +1,2 @@
+// Only Node.JS has a process variable that is of [[Class]] process
+module.exports = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
diff --git a/node_modules/detect-node/package.json b/node_modules/detect-node/package.json
new file mode 100644
index 0000000..e4c3d1c
--- /dev/null
+++ b/node_modules/detect-node/package.json
@@ -0,0 +1,51 @@
+{
+ "_from": "detect-node@^2.0.4",
+ "_id": "detect-node@2.0.4",
+ "_inBundle": false,
+ "_integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
+ "_location": "/detect-node",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "detect-node@^2.0.4",
+ "name": "detect-node",
+ "escapedName": "detect-node",
+ "rawSpec": "^2.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.4"
+ },
+ "_requiredBy": [
+ "/spdy-transport"
+ ],
+ "_resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
+ "_shasum": "014ee8f8f669c5c58023da64b8179c083a28c46c",
+ "_spec": "detect-node@^2.0.4",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/spdy-transport",
+ "author": {
+ "name": "Ilya Kantor"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/iliakan/detect-node/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Detect Node.JS (as opposite to browser environment) (reliable)",
+ "homepage": "https://github.com/iliakan/detect-node",
+ "keywords": [
+ "detect",
+ "node"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "detect-node",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iliakan/detect-node.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.0.4"
+}
diff --git a/node_modules/dns-equal/.npmignore b/node_modules/dns-equal/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/dns-equal/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/dns-equal/.travis.yml b/node_modules/dns-equal/.travis.yml
new file mode 100644
index 0000000..92a6e6b
--- /dev/null
+++ b/node_modules/dns-equal/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+- '5'
+- '4'
+- '0.12'
+- '0.10'
diff --git a/node_modules/dns-equal/LICENSE b/node_modules/dns-equal/LICENSE
new file mode 100644
index 0000000..95f61da
--- /dev/null
+++ b/node_modules/dns-equal/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Thomas Watson Steen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/dns-equal/README.md b/node_modules/dns-equal/README.md
new file mode 100644
index 0000000..43ad782
--- /dev/null
+++ b/node_modules/dns-equal/README.md
@@ -0,0 +1,30 @@
+# dns-equal
+
+Compare DNS record strings for equality. Enforces [RFC
+1035](https://tools.ietf.org/html/rfc1035) domain comparison.
+
+[](https://travis-ci.org/watson/dns-equal)
+[](https://github.com/feross/standard)
+
+## Installation
+
+```
+npm install dns-equal --save
+```
+
+## Usage
+
+```js
+var dnsEqual = require('dns-equal')
+
+var domain1 = 'Example.COM'
+var domain2 = 'example.com'
+
+if (dnsEqual(domain1, domain2)) {
+ console.log('The two domains are the same')
+}
+```
+
+## License
+
+MIT
diff --git a/node_modules/dns-equal/index.js b/node_modules/dns-equal/index.js
new file mode 100644
index 0000000..6c3f48b
--- /dev/null
+++ b/node_modules/dns-equal/index.js
@@ -0,0 +1,13 @@
+'use strict'
+
+var r = /[A-Z]/g
+
+module.exports = function (a, b) {
+ a = a.replace(r, replacer)
+ b = b.replace(r, replacer)
+ return a === b
+}
+
+function replacer (m) {
+ return m.toLowerCase()
+}
diff --git a/node_modules/dns-equal/package.json b/node_modules/dns-equal/package.json
new file mode 100644
index 0000000..33d6a83
--- /dev/null
+++ b/node_modules/dns-equal/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "dns-equal@^1.0.0",
+ "_id": "dns-equal@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=",
+ "_location": "/dns-equal",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "dns-equal@^1.0.0",
+ "name": "dns-equal",
+ "escapedName": "dns-equal",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/bonjour"
+ ],
+ "_resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "_shasum": "b39e7f1da6eb0a75ba9c17324b34753c47e0654d",
+ "_spec": "dns-equal@^1.0.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/bonjour",
+ "author": {
+ "name": "Thomas Watson Steen",
+ "email": "w@tson.dk",
+ "url": "https://twitter.com/wa7son"
+ },
+ "bugs": {
+ "url": "https://github.com/watson/dns-equal/issues"
+ },
+ "bundleDependencies": false,
+ "coordinates": [
+ 56.010004025953165,
+ 11.961870541375674
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Compare DNS record strings for equality",
+ "devDependencies": {
+ "standard": "^5.4.1"
+ },
+ "homepage": "https://github.com/watson/dns-equal#readme",
+ "keywords": [
+ "dns",
+ "compare",
+ "comparing",
+ "equal",
+ "equality",
+ "match",
+ "downcase",
+ "lowercase",
+ "case-insensitive"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "dns-equal",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/watson/dns-equal.git"
+ },
+ "scripts": {
+ "test": "standard && node test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/node_modules/dns-equal/test.js b/node_modules/dns-equal/test.js
new file mode 100644
index 0000000..fc77440
--- /dev/null
+++ b/node_modules/dns-equal/test.js
@@ -0,0 +1,11 @@
+'use strict'
+
+var assert = require('assert')
+var dnsEqual = require('./')
+
+assert.strictEqual(dnsEqual('Foo', 'foo'), true)
+assert.strictEqual(dnsEqual('FooÆØÅ', 'fooÆØÅ'), true)
+
+assert.strictEqual(dnsEqual('foo', 'bar'), false)
+assert.strictEqual(dnsEqual('FooÆØÅ', 'fooæøå'), false)
+assert.strictEqual(dnsEqual('café', 'cafe'), false)
diff --git a/node_modules/dns-packet/LICENSE b/node_modules/dns-packet/LICENSE
new file mode 100644
index 0000000..bae9da7
--- /dev/null
+++ b/node_modules/dns-packet/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/dns-packet/README.md b/node_modules/dns-packet/README.md
new file mode 100644
index 0000000..9bd4782
--- /dev/null
+++ b/node_modules/dns-packet/README.md
@@ -0,0 +1,231 @@
+# dns-packet
+
+An [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compliant module for encoding / decoding DNS packets.
+Lifted out of [multicast-dns](https://github.com/mafintosh/multicast-dns) as a separate module.
+
+```
+npm install dns-packet
+```
+
+[](https://travis-ci.org/mafintosh/dns-packet)
+
+## Usage
+
+``` js
+var packet = require('dns-packet')
+var dgram = require('dgram')
+
+var socket = dgram.createSocket('udp4')
+
+var buf = packet.encode({
+ type: 'query',
+ id: 1,
+ flags: packet.RECURSION_DESIRED,
+ questions: [{
+ type: 'A',
+ name: 'google.com'
+ }]
+})
+
+socket.on('message', function (message) {
+ console.log(packet.decode(message)) // prints out a response from google dns
+})
+
+socket.send(buf, 0, buf.length, 53, '8.8.8.8')
+```
+
+## API
+
+#### `var buf = packets.encode(packet, [buf], [offset])`
+
+Encodes a DNS packet into a buffer.
+
+#### `var packet = packets.decode(buf, [offset])`
+
+Decode a DNS packet from a buffer
+
+#### `var len = packets.encodingLength(packet)`
+
+Returns how many bytes are needed to encode the DNS packet
+
+## Packets
+
+Packets look like this
+
+``` js
+{
+ type: 'query|response',
+ id: optionalIdNumber,
+ flags: optionalBitFlags,
+ questions: [...],
+ answers: [...],
+ additionals: [...],
+ authorities: [...]
+}
+```
+
+The bit flags available are
+
+``` js
+packet.RECURSION_DESIRED
+packet.RECURSION_AVAILABLE
+packet.TRUNCATED_RESPONSE
+packet.AUTHORITATIVE_ANSWER
+packet.AUTHENTIC_DATA
+packet.CHECKING_DISABLED
+```
+
+To use more than one flag bitwise-or them together
+
+``` js
+var flags = packet.RECURSION_DESIRED | packet.RECURSION_AVAILABLE
+```
+
+And to check for a flag use bitwise-and
+
+``` js
+var isRecursive = message.flags & packet.RECURSION_DESIRED
+```
+
+A question looks like this
+
+``` js
+{
+ type: 'A', // or SRV, AAAA, etc
+ name: 'google.com' // which record are you looking for
+}
+```
+
+And an answers, additional, or authority looks like this
+
+``` js
+{
+ type: 'A', // or SRV, AAAA, etc
+ name: 'google.com', // which name is this record for
+ ttl: optionalTimeToLiveInSeconds,
+ (record specific data, see below)
+}
+```
+
+Currently the different available records are
+
+#### `A`
+
+``` js
+{
+ data: 'IPv4 address' // fx 127.0.0.1
+}
+```
+
+#### `AAAA`
+
+``` js
+{
+ data: 'IPv6 address' // fx fe80::1
+}
+```
+
+#### `TXT`
+
+``` js
+{
+ data: Buffer('some text')
+}
+```
+
+#### `NS`
+
+``` js
+{
+ data: nameServer
+}
+```
+
+#### `NULL`
+
+``` js
+{
+ data: Buffer('any binary data')
+}
+```
+
+#### `SOA`
+
+``` js
+{
+ data:
+ {
+ mname: domainName,
+ rname: mailbox,
+ serial: zoneSerial,
+ refresh: refreshInterval,
+ retry: retryInterval,
+ expire: expireInterval,
+ minimum: minimumTTL
+ }
+}
+```
+
+#### `SRV`
+
+``` js
+{
+ data: {
+ port: servicePort,
+ target: serviceHostName,
+ priority: optionalServicePriority,
+ weight: optionalServiceWeight
+ }
+}
+```
+
+#### `HINFO`
+
+``` js
+{
+ data: {
+ cpu: 'cpu info',
+ os: 'os info'
+ }
+}
+```
+
+#### `PTR`
+
+``` js
+{
+ data: 'points.to.another.record'
+}
+```
+
+#### `CNAME`
+
+``` js
+{
+ data: 'cname.to.another.record'
+}
+```
+
+#### `DNAME`
+
+``` js
+{
+ data: 'dname.to.another.record'
+}
+```
+
+#### `CAA`
+
+``` js
+{
+ flags: 128, // octet
+ tag: 'issue|issuewild|iodef',
+ value: 'ca.example.net'
+}
+```
+
+If you need another one, open an issue and we'll try to add it.
+
+## License
+
+MIT
diff --git a/node_modules/dns-packet/index.js b/node_modules/dns-packet/index.js
new file mode 100644
index 0000000..997466e
--- /dev/null
+++ b/node_modules/dns-packet/index.js
@@ -0,0 +1,763 @@
+var types = require('./types')
+var rcodes = require('./rcodes')
+var opcodes = require('./opcodes')
+var ip = require('ip')
+var Buffer = require('safe-buffer').Buffer
+
+var QUERY_FLAG = 0
+var RESPONSE_FLAG = 1 << 15
+var FLUSH_MASK = 1 << 15
+var NOT_FLUSH_MASK = ~FLUSH_MASK
+var QU_MASK = 1 << 15
+var NOT_QU_MASK = ~QU_MASK
+
+var name = exports.txt = exports.name = {}
+
+name.encode = function (str, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(name.encodingLength(str))
+ if (!offset) offset = 0
+ var oldOffset = offset
+
+ // strip leading and trailing .
+ var n = str.replace(/^\.|\.$/gm, '')
+ if (n.length) {
+ var list = n.split('.')
+
+ for (var i = 0; i < list.length; i++) {
+ var len = buf.write(list[i], offset + 1)
+ buf[offset] = len
+ offset += len + 1
+ }
+ }
+
+ buf[offset++] = 0
+
+ name.encode.bytes = offset - oldOffset
+ return buf
+}
+
+name.encode.bytes = 0
+
+name.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var list = []
+ var oldOffset = offset
+ var len = buf[offset++]
+
+ if (len === 0) {
+ name.decode.bytes = 1
+ return '.'
+ }
+ if (len >= 0xc0) {
+ var res = name.decode(buf, buf.readUInt16BE(offset - 1) - 0xc000)
+ name.decode.bytes = 2
+ return res
+ }
+
+ while (len) {
+ if (len >= 0xc0) {
+ list.push(name.decode(buf, buf.readUInt16BE(offset - 1) - 0xc000))
+ offset++
+ break
+ }
+
+ list.push(buf.toString('utf-8', offset, offset + len))
+ offset += len
+ len = buf[offset++]
+ }
+
+ name.decode.bytes = offset - oldOffset
+ return list.join('.')
+}
+
+name.decode.bytes = 0
+
+name.encodingLength = function (n) {
+ return Buffer.byteLength(n) + 2
+}
+
+var string = {}
+
+string.encode = function (s, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(string.encodingLength(s))
+ if (!offset) offset = 0
+
+ var len = buf.write(s, offset + 1)
+ buf[offset] = len
+ string.encode.bytes = len + 1
+ return buf
+}
+
+string.encode.bytes = 0
+
+string.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var len = buf[offset]
+ var s = buf.toString('utf-8', offset + 1, offset + 1 + len)
+ string.decode.bytes = len + 1
+ return s
+}
+
+string.decode.bytes = 0
+
+string.encodingLength = function (s) {
+ return Buffer.byteLength(s) + 1
+}
+
+var header = {}
+
+header.encode = function (h, buf, offset) {
+ if (!buf) buf = header.encodingLength(h)
+ if (!offset) offset = 0
+
+ var flags = (h.flags || 0) & 32767
+ var type = h.type === 'response' ? RESPONSE_FLAG : QUERY_FLAG
+
+ buf.writeUInt16BE(h.id || 0, offset)
+ buf.writeUInt16BE(flags | type, offset + 2)
+ buf.writeUInt16BE(h.questions.length, offset + 4)
+ buf.writeUInt16BE(h.answers.length, offset + 6)
+ buf.writeUInt16BE(h.authorities.length, offset + 8)
+ buf.writeUInt16BE(h.additionals.length, offset + 10)
+
+ return buf
+}
+
+header.encode.bytes = 12
+
+header.decode = function (buf, offset) {
+ if (!offset) offset = 0
+ if (buf.length < 12) throw new Error('Header must be 12 bytes')
+ var flags = buf.readUInt16BE(offset + 2)
+
+ return {
+ id: buf.readUInt16BE(offset),
+ type: flags & RESPONSE_FLAG ? 'response' : 'query',
+ flags: flags & 32767,
+ flag_qr: ((flags >> 15) & 0x1) === 1,
+ opcode: opcodes.toString((flags >> 11) & 0xf),
+ flag_auth: ((flags >> 10) & 0x1) === 1,
+ flag_trunc: ((flags >> 9) & 0x1) === 1,
+ flag_rd: ((flags >> 8) & 0x1) === 1,
+ flag_ra: ((flags >> 7) & 0x1) === 1,
+ flag_z: ((flags >> 6) & 0x1) === 1,
+ flag_ad: ((flags >> 5) & 0x1) === 1,
+ flag_cd: ((flags >> 4) & 0x1) === 1,
+ rcode: rcodes.toString(flags & 0xf),
+ questions: new Array(buf.readUInt16BE(offset + 4)),
+ answers: new Array(buf.readUInt16BE(offset + 6)),
+ authorities: new Array(buf.readUInt16BE(offset + 8)),
+ additionals: new Array(buf.readUInt16BE(offset + 10))
+ }
+}
+
+header.decode.bytes = 12
+
+header.encodingLength = function () {
+ return 12
+}
+
+var runknown = exports.unknown = {}
+
+runknown.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(runknown.encodingLength(data))
+ if (!offset) offset = 0
+
+ buf.writeUInt16BE(data.length, offset)
+ data.copy(buf, offset + 2)
+
+ runknown.encode.bytes = data.length + 2
+ return buf
+}
+
+runknown.encode.bytes = 0
+
+runknown.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var len = buf.readUInt16BE(offset)
+ var data = buf.slice(offset + 2, offset + 2 + len)
+ runknown.decode.bytes = len + 2
+ return data
+}
+
+runknown.decode.bytes = 0
+
+runknown.encodingLength = function (data) {
+ return data.length + 2
+}
+
+var rns = exports.ns = {}
+
+rns.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(rns.encodingLength(data))
+ if (!offset) offset = 0
+
+ name.encode(data, buf, offset + 2)
+ buf.writeUInt16BE(name.encode.bytes, offset)
+ rns.encode.bytes = name.encode.bytes + 2
+ return buf
+}
+
+rns.encode.bytes = 0
+
+rns.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var len = buf.readUInt16BE(offset)
+ var dd = name.decode(buf, offset + 2)
+
+ rns.decode.bytes = len + 2
+ return dd
+}
+
+rns.decode.bytes = 0
+
+rns.encodingLength = function (data) {
+ return name.encodingLength(data) + 2
+}
+
+var rsoa = exports.soa = {}
+
+rsoa.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(rsoa.encodingLength(data))
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+ offset += 2
+ name.encode(data.mname, buf, offset)
+ offset += name.encode.bytes
+ name.encode(data.rname, buf, offset)
+ offset += name.encode.bytes
+ buf.writeUInt32BE(data.serial || 0, offset)
+ offset += 4
+ buf.writeUInt32BE(data.refresh || 0, offset)
+ offset += 4
+ buf.writeUInt32BE(data.retry || 0, offset)
+ offset += 4
+ buf.writeUInt32BE(data.expire || 0, offset)
+ offset += 4
+ buf.writeUInt32BE(data.minimum || 0, offset)
+ offset += 4
+
+ buf.writeUInt16BE(offset - oldOffset - 2, oldOffset)
+ rsoa.encode.bytes = offset - oldOffset
+ return buf
+}
+
+rsoa.encode.bytes = 0
+
+rsoa.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+
+ var data = {}
+ offset += 2
+ data.mname = name.decode(buf, offset)
+ offset += name.decode.bytes
+ data.rname = name.decode(buf, offset)
+ offset += name.decode.bytes
+ data.serial = buf.readUInt32BE(offset)
+ offset += 4
+ data.refresh = buf.readUInt32BE(offset)
+ offset += 4
+ data.retry = buf.readUInt32BE(offset)
+ offset += 4
+ data.expire = buf.readUInt32BE(offset)
+ offset += 4
+ data.minimum = buf.readUInt32BE(offset)
+ offset += 4
+
+ rsoa.decode.bytes = offset - oldOffset
+ return data
+}
+
+rsoa.decode.bytes = 0
+
+rsoa.encodingLength = function (data) {
+ return 22 + name.encodingLength(data.mname) + name.encodingLength(data.rname)
+}
+
+var rtxt = exports.txt = exports.null = {}
+var rnull = rtxt
+
+rtxt.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(rtxt.encodingLength(data))
+ if (!offset) offset = 0
+
+ if (typeof data === 'string') data = Buffer.from(data)
+ if (!data) data = Buffer.allocUnsafe(0)
+
+ var oldOffset = offset
+ offset += 2
+
+ var len = data.length
+ data.copy(buf, offset, 0, len)
+ offset += len
+
+ buf.writeUInt16BE(offset - oldOffset - 2, oldOffset)
+ rtxt.encode.bytes = offset - oldOffset
+ return buf
+}
+
+rtxt.encode.bytes = 0
+
+rtxt.decode = function (buf, offset) {
+ if (!offset) offset = 0
+ var oldOffset = offset
+ var len = buf.readUInt16BE(offset)
+
+ offset += 2
+
+ var data = buf.slice(offset, offset + len)
+ offset += len
+
+ rtxt.decode.bytes = offset - oldOffset
+ return data
+}
+
+rtxt.decode.bytes = 0
+
+rtxt.encodingLength = function (data) {
+ if (!data) return 2
+ return (Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data)) + 2
+}
+
+var rhinfo = exports.hinfo = {}
+
+rhinfo.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(rhinfo.encodingLength(data))
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+ offset += 2
+ string.encode(data.cpu, buf, offset)
+ offset += string.encode.bytes
+ string.encode(data.os, buf, offset)
+ offset += string.encode.bytes
+ buf.writeUInt16BE(offset - oldOffset - 2, oldOffset)
+ rhinfo.encode.bytes = offset - oldOffset
+ return buf
+}
+
+rhinfo.encode.bytes = 0
+
+rhinfo.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+
+ var data = {}
+ offset += 2
+ data.cpu = string.decode(buf, offset)
+ offset += string.decode.bytes
+ data.os = string.decode(buf, offset)
+ offset += string.decode.bytes
+ rhinfo.decode.bytes = offset - oldOffset
+ return data
+}
+
+rhinfo.decode.bytes = 0
+
+rhinfo.encodingLength = function (data) {
+ return string.encodingLength(data.cpu) + string.encodingLength(data.os) + 2
+}
+
+var rptr = exports.ptr = {}
+var rcname = exports.cname = rptr
+var rdname = exports.dname = rptr
+
+rptr.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(rptr.encodingLength(data))
+ if (!offset) offset = 0
+
+ name.encode(data, buf, offset + 2)
+ buf.writeUInt16BE(name.encode.bytes, offset)
+ rptr.encode.bytes = name.encode.bytes + 2
+ return buf
+}
+
+rptr.encode.bytes = 0
+
+rptr.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var data = name.decode(buf, offset + 2)
+ rptr.decode.bytes = name.decode.bytes + 2
+ return data
+}
+
+rptr.decode.bytes = 0
+
+rptr.encodingLength = function (data) {
+ return name.encodingLength(data) + 2
+}
+
+var rsrv = exports.srv = {}
+
+rsrv.encode = function (data, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(rsrv.encodingLength(data))
+ if (!offset) offset = 0
+
+ buf.writeUInt16BE(data.priority || 0, offset + 2)
+ buf.writeUInt16BE(data.weight || 0, offset + 4)
+ buf.writeUInt16BE(data.port || 0, offset + 6)
+ name.encode(data.target, buf, offset + 8)
+
+ var len = name.encode.bytes + 6
+ buf.writeUInt16BE(len, offset)
+
+ rsrv.encode.bytes = len + 2
+ return buf
+}
+
+rsrv.encode.bytes = 0
+
+rsrv.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var len = buf.readUInt16BE(offset)
+
+ var data = {}
+ data.priority = buf.readUInt16BE(offset + 2)
+ data.weight = buf.readUInt16BE(offset + 4)
+ data.port = buf.readUInt16BE(offset + 6)
+ data.target = name.decode(buf, offset + 8)
+
+ rsrv.decode.bytes = len + 2
+ return data
+}
+
+rsrv.decode.bytes = 0
+
+rsrv.encodingLength = function (data) {
+ return 8 + name.encodingLength(data.target)
+}
+
+var rcaa = exports.caa = {}
+
+rcaa.ISSUER_CRITICAL = 1 << 7
+
+rcaa.encode = function (data, buf, offset) {
+ var len = rcaa.encodingLength(data)
+
+ if (!buf) buf = Buffer.allocUnsafe(rcaa.encodingLength(data))
+ if (!offset) offset = 0
+
+ if (data.issuerCritical) {
+ data.flags = rcaa.ISSUER_CRITICAL
+ }
+
+ buf.writeUInt16BE(len - 2, offset)
+ offset += 2
+ buf.writeUInt8(data.flags || 0, offset)
+ offset += 1
+ string.encode(data.tag, buf, offset)
+ offset += string.encode.bytes
+ buf.write(data.value, offset)
+ offset += Buffer.byteLength(data.value)
+
+ rcaa.encode.bytes = len
+ return buf
+}
+
+rcaa.encode.bytes = 0
+
+rcaa.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var len = buf.readUInt16BE(offset)
+ offset += 2
+
+ var oldOffset = offset
+ var data = {}
+ data.flags = buf.readUInt8(offset)
+ offset += 1
+ data.tag = string.decode(buf, offset)
+ offset += string.decode.bytes
+ data.value = buf.toString('utf-8', offset, oldOffset + len)
+
+ data.issuerCritical = !!(data.flags & rcaa.ISSUER_CRITICAL)
+
+ rcaa.decode.bytes = len + 2
+
+ return data
+}
+
+rcaa.decode.bytes = 0
+
+rcaa.encodingLength = function (data) {
+ return string.encodingLength(data.tag) + string.encodingLength(data.value) + 2
+}
+
+var ra = exports.a = {}
+
+ra.encode = function (host, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(ra.encodingLength(host))
+ if (!offset) offset = 0
+
+ buf.writeUInt16BE(4, offset)
+ offset += 2
+ ip.toBuffer(host, buf, offset)
+ ra.encode.bytes = 6
+ return buf
+}
+
+ra.encode.bytes = 0
+
+ra.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ offset += 2
+ var host = ip.toString(buf, offset, 4)
+ ra.decode.bytes = 6
+ return host
+}
+
+ra.decode.bytes = 0
+
+ra.encodingLength = function () {
+ return 6
+}
+
+var raaaa = exports.aaaa = {}
+
+raaaa.encode = function (host, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(raaaa.encodingLength(host))
+ if (!offset) offset = 0
+
+ buf.writeUInt16BE(16, offset)
+ offset += 2
+ ip.toBuffer(host, buf, offset)
+ raaaa.encode.bytes = 18
+ return buf
+}
+
+raaaa.encode.bytes = 0
+
+raaaa.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ offset += 2
+ var host = ip.toString(buf, offset, 16)
+ raaaa.decode.bytes = 18
+ return host
+}
+
+raaaa.decode.bytes = 0
+
+raaaa.encodingLength = function () {
+ return 18
+}
+
+var renc = exports.record = function (type) {
+ switch (type.toUpperCase()) {
+ case 'A': return ra
+ case 'PTR': return rptr
+ case 'CNAME': return rcname
+ case 'DNAME': return rdname
+ case 'TXT': return rtxt
+ case 'NULL': return rnull
+ case 'AAAA': return raaaa
+ case 'SRV': return rsrv
+ case 'HINFO': return rhinfo
+ case 'CAA': return rcaa
+ case 'NS': return rns
+ case 'SOA': return rsoa
+ }
+ return runknown
+}
+
+var answer = exports.answer = {}
+
+answer.encode = function (a, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(answer.encodingLength(a))
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+
+ name.encode(a.name, buf, offset)
+ offset += name.encode.bytes
+
+ buf.writeUInt16BE(types.toType(a.type), offset)
+
+ var klass = a.class === undefined ? 1 : a.class
+ if (a.flush) klass |= FLUSH_MASK // the 1st bit of the class is the flush bit
+ buf.writeUInt16BE(klass, offset + 2)
+
+ buf.writeUInt32BE(a.ttl || 0, offset + 4)
+
+ var enc = renc(a.type)
+ enc.encode(a.data, buf, offset + 8)
+ offset += 8 + enc.encode.bytes
+
+ answer.encode.bytes = offset - oldOffset
+ return buf
+}
+
+answer.encode.bytes = 0
+
+answer.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var a = {}
+ var oldOffset = offset
+
+ a.name = name.decode(buf, offset)
+ offset += name.decode.bytes
+ a.type = types.toString(buf.readUInt16BE(offset))
+ a.class = buf.readUInt16BE(offset + 2)
+ a.ttl = buf.readUInt32BE(offset + 4)
+
+ a.flush = !!(a.class & FLUSH_MASK)
+ if (a.flush) a.class &= NOT_FLUSH_MASK
+
+ var enc = renc(a.type)
+ a.data = enc.decode(buf, offset + 8)
+ offset += 8 + enc.decode.bytes
+
+ answer.decode.bytes = offset - oldOffset
+ return a
+}
+
+answer.decode.bytes = 0
+
+answer.encodingLength = function (a) {
+ return name.encodingLength(a.name) + 8 + renc(a.type).encodingLength(a.data)
+}
+
+var question = exports.question = {}
+
+question.encode = function (q, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(question.encodingLength(q))
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+
+ name.encode(q.name, buf, offset)
+ offset += name.encode.bytes
+
+ buf.writeUInt16BE(types.toType(q.type), offset)
+ offset += 2
+
+ buf.writeUInt16BE(q.class === undefined ? 1 : q.class, offset)
+ offset += 2
+
+ question.encode.bytes = offset - oldOffset
+ return q
+}
+
+question.encode.bytes = 0
+
+question.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+ var q = {}
+
+ q.name = name.decode(buf, offset)
+ offset += name.decode.bytes
+
+ q.type = types.toString(buf.readUInt16BE(offset))
+ offset += 2
+
+ q.class = buf.readUInt16BE(offset)
+ offset += 2
+
+ var qu = !!(q.class & QU_MASK)
+ if (qu) q.class &= NOT_QU_MASK
+
+ question.decode.bytes = offset - oldOffset
+ return q
+}
+
+question.decode.bytes = 0
+
+question.encodingLength = function (q) {
+ return name.encodingLength(q.name) + 4
+}
+
+exports.AUTHORITATIVE_ANSWER = 1 << 10
+exports.TRUNCATED_RESPONSE = 1 << 9
+exports.RECURSION_DESIRED = 1 << 8
+exports.RECURSION_AVAILABLE = 1 << 7
+exports.AUTHENTIC_DATA = 1 << 5
+exports.CHECKING_DISABLED = 1 << 4
+
+exports.encode = function (result, buf, offset) {
+ if (!buf) buf = Buffer.allocUnsafe(exports.encodingLength(result))
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+
+ if (!result.questions) result.questions = []
+ if (!result.answers) result.answers = []
+ if (!result.authorities) result.authorities = []
+ if (!result.additionals) result.additionals = []
+
+ header.encode(result, buf, offset)
+ offset += header.encode.bytes
+
+ offset = encodeList(result.questions, question, buf, offset)
+ offset = encodeList(result.answers, answer, buf, offset)
+ offset = encodeList(result.authorities, answer, buf, offset)
+ offset = encodeList(result.additionals, answer, buf, offset)
+
+ exports.encode.bytes = offset - oldOffset
+
+ return buf
+}
+
+exports.encode.bytes = 0
+
+exports.decode = function (buf, offset) {
+ if (!offset) offset = 0
+
+ var oldOffset = offset
+ var result = header.decode(buf, offset)
+ offset += header.decode.bytes
+
+ offset = decodeList(result.questions, question, buf, offset)
+ offset = decodeList(result.answers, answer, buf, offset)
+ offset = decodeList(result.authorities, answer, buf, offset)
+ offset = decodeList(result.additionals, answer, buf, offset)
+
+ exports.decode.bytes = offset - oldOffset
+
+ return result
+}
+
+exports.decode.bytes = 0
+
+exports.encodingLength = function (result) {
+ return header.encodingLength(result) +
+ encodingLengthList(result.questions || [], question) +
+ encodingLengthList(result.answers || [], answer) +
+ encodingLengthList(result.authorities || [], answer) +
+ encodingLengthList(result.additionals || [], answer)
+}
+
+function encodingLengthList (list, enc) {
+ var len = 0
+ for (var i = 0; i < list.length; i++) len += enc.encodingLength(list[i])
+ return len
+}
+
+function encodeList (list, enc, buf, offset) {
+ for (var i = 0; i < list.length; i++) {
+ enc.encode(list[i], buf, offset)
+ offset += enc.encode.bytes
+ }
+ return offset
+}
+
+function decodeList (list, enc, buf, offset) {
+ for (var i = 0; i < list.length; i++) {
+ list[i] = enc.decode(buf, offset)
+ offset += enc.decode.bytes
+ }
+ return offset
+}
diff --git a/node_modules/dns-packet/opcodes.js b/node_modules/dns-packet/opcodes.js
new file mode 100644
index 0000000..6b42db3
--- /dev/null
+++ b/node_modules/dns-packet/opcodes.js
@@ -0,0 +1,48 @@
+/*
+ * Traditional DNS header OPCODEs (4-bits) defined by IANA in
+ * https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5
+ */
+
+exports.toString = function (opcode) {
+ switch (opcode) {
+ case 0: return 'QUERY'
+ case 1: return 'IQUERY'
+ case 2: return 'STATUS'
+ case 3: return 'OPCODE_3'
+ case 4: return 'NOTIFY'
+ case 5: return 'UPDATE'
+ case 6: return 'OPCODE_6'
+ case 7: return 'OPCODE_7'
+ case 8: return 'OPCODE_8'
+ case 9: return 'OPCODE_9'
+ case 10: return 'OPCODE_10'
+ case 11: return 'OPCODE_11'
+ case 12: return 'OPCODE_12'
+ case 13: return 'OPCODE_13'
+ case 14: return 'OPCODE_14'
+ case 15: return 'OPCODE_15'
+ }
+ return 'OPCODE_' + opcode
+}
+
+exports.toOpcode = function (code) {
+ switch (code.toUpperCase()) {
+ case 'QUERY': return 0
+ case 'IQUERY': return 1
+ case 'STATUS': return 2
+ case 'OPCODE_3': return 3
+ case 'NOTIFY': return 4
+ case 'UPDATE': return 5
+ case 'OPCODE_6': return 6
+ case 'OPCODE_7': return 7
+ case 'OPCODE_8': return 8
+ case 'OPCODE_9': return 9
+ case 'OPCODE_10': return 10
+ case 'OPCODE_11': return 11
+ case 'OPCODE_12': return 12
+ case 'OPCODE_13': return 13
+ case 'OPCODE_14': return 14
+ case 'OPCODE_15': return 15
+ }
+ return 0
+}
diff --git a/node_modules/dns-packet/package.json b/node_modules/dns-packet/package.json
new file mode 100644
index 0000000..e87c7e8
--- /dev/null
+++ b/node_modules/dns-packet/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "dns-packet@^1.3.1",
+ "_id": "dns-packet@1.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
+ "_location": "/dns-packet",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "dns-packet@^1.3.1",
+ "name": "dns-packet",
+ "escapedName": "dns-packet",
+ "rawSpec": "^1.3.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.1"
+ },
+ "_requiredBy": [
+ "/multicast-dns"
+ ],
+ "_resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
+ "_shasum": "12aa426981075be500b910eedcd0b47dd7deda5a",
+ "_spec": "dns-packet@^1.3.1",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/multicast-dns",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/dns-packet/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ip": "^1.1.0",
+ "safe-buffer": "^5.0.1"
+ },
+ "deprecated": false,
+ "description": "An abstract-encoding compliant module for encoding / decoding DNS packets",
+ "devDependencies": {
+ "eslint": "^4.15.0",
+ "standard": "^6.0.5",
+ "tape": "^4.4.0"
+ },
+ "files": [
+ "index.js",
+ "types.js",
+ "rcodes.js",
+ "opcodes.js"
+ ],
+ "homepage": "https://github.com/mafintosh/dns-packet",
+ "keywords": [
+ "dns",
+ "packet",
+ "encodings",
+ "encoding",
+ "encoder",
+ "abstract-encoding"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "dns-packet",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/dns-packet.git"
+ },
+ "scripts": {
+ "test": "standard && eslint --color *.js && tape test.js"
+ },
+ "version": "1.3.1"
+}
diff --git a/node_modules/dns-packet/rcodes.js b/node_modules/dns-packet/rcodes.js
new file mode 100644
index 0000000..492b2f3
--- /dev/null
+++ b/node_modules/dns-packet/rcodes.js
@@ -0,0 +1,48 @@
+/*
+ * Traditional DNS header RCODEs (4-bits) defined by IANA in
+ * https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml
+ */
+
+exports.toString = function (rcode) {
+ switch (rcode) {
+ case 0: return 'NOERROR'
+ case 1: return 'FORMERR'
+ case 2: return 'SERVFAIL'
+ case 3: return 'NXDOMAIN'
+ case 4: return 'NOTIMP'
+ case 5: return 'REFUSED'
+ case 6: return 'YXDOMAIN'
+ case 7: return 'YXRRSET'
+ case 8: return 'NXRRSET'
+ case 9: return 'NOTAUTH'
+ case 10: return 'NOTZONE'
+ case 11: return 'RCODE_11'
+ case 12: return 'RCODE_12'
+ case 13: return 'RCODE_13'
+ case 14: return 'RCODE_14'
+ case 15: return 'RCODE_15'
+ }
+ return 'RCODE_' + rcode
+}
+
+exports.toRcode = function (code) {
+ switch (code.toUpperCase()) {
+ case 'NOERROR': return 0
+ case 'FORMERR': return 1
+ case 'SERVFAIL': return 2
+ case 'NXDOMAIN': return 3
+ case 'NOTIMP': return 4
+ case 'REFUSED': return 5
+ case 'YXDOMAIN': return 6
+ case 'YXRRSET': return 7
+ case 'NXRRSET': return 8
+ case 'NOTAUTH': return 9
+ case 'NOTZONE': return 10
+ case 'RCODE_11': return 11
+ case 'RCODE_12': return 12
+ case 'RCODE_13': return 13
+ case 'RCODE_14': return 14
+ case 'RCODE_15': return 15
+ }
+ return 0
+}
diff --git a/node_modules/dns-packet/types.js b/node_modules/dns-packet/types.js
new file mode 100644
index 0000000..7a29d00
--- /dev/null
+++ b/node_modules/dns-packet/types.js
@@ -0,0 +1,100 @@
+exports.toString = function (type) {
+ switch (type) {
+ case 1: return 'A'
+ case 10: return 'NULL'
+ case 28: return 'AAAA'
+ case 18: return 'AFSDB'
+ case 42: return 'APL'
+ case 257: return 'CAA'
+ case 60: return 'CDNSKEY'
+ case 59: return 'CDS'
+ case 37: return 'CERT'
+ case 5: return 'CNAME'
+ case 49: return 'DHCID'
+ case 32769: return 'DLV'
+ case 39: return 'DNAME'
+ case 48: return 'DNSKEY'
+ case 43: return 'DS'
+ case 55: return 'HIP'
+ case 13: return 'HINFO'
+ case 45: return 'IPSECKEY'
+ case 25: return 'KEY'
+ case 36: return 'KX'
+ case 29: return 'LOC'
+ case 15: return 'MX'
+ case 35: return 'NAPTR'
+ case 2: return 'NS'
+ case 47: return 'NSEC'
+ case 50: return 'NSEC3'
+ case 51: return 'NSEC3PARAM'
+ case 12: return 'PTR'
+ case 46: return 'RRSIG'
+ case 17: return 'RP'
+ case 24: return 'SIG'
+ case 6: return 'SOA'
+ case 99: return 'SPF'
+ case 33: return 'SRV'
+ case 44: return 'SSHFP'
+ case 32768: return 'TA'
+ case 249: return 'TKEY'
+ case 52: return 'TLSA'
+ case 250: return 'TSIG'
+ case 16: return 'TXT'
+ case 252: return 'AXFR'
+ case 251: return 'IXFR'
+ case 41: return 'OPT'
+ case 255: return 'ANY'
+ }
+ return 'UNKNOWN_' + type
+}
+
+exports.toType = function (name) {
+ switch (name.toUpperCase()) {
+ case 'A': return 1
+ case 'NULL': return 10
+ case 'AAAA': return 28
+ case 'AFSDB': return 18
+ case 'APL': return 42
+ case 'CAA': return 257
+ case 'CDNSKEY': return 60
+ case 'CDS': return 59
+ case 'CERT': return 37
+ case 'CNAME': return 5
+ case 'DHCID': return 49
+ case 'DLV': return 32769
+ case 'DNAME': return 39
+ case 'DNSKEY': return 48
+ case 'DS': return 43
+ case 'HIP': return 55
+ case 'HINFO': return 13
+ case 'IPSECKEY': return 45
+ case 'KEY': return 25
+ case 'KX': return 36
+ case 'LOC': return 29
+ case 'MX': return 15
+ case 'NAPTR': return 35
+ case 'NS': return 2
+ case 'NSEC': return 47
+ case 'NSEC3': return 50
+ case 'NSEC3PARAM': return 51
+ case 'PTR': return 12
+ case 'RRSIG': return 46
+ case 'RP': return 17
+ case 'SIG': return 24
+ case 'SOA': return 6
+ case 'SPF': return 99
+ case 'SRV': return 33
+ case 'SSHFP': return 44
+ case 'TA': return 32768
+ case 'TKEY': return 249
+ case 'TLSA': return 52
+ case 'TSIG': return 250
+ case 'TXT': return 16
+ case 'AXFR': return 252
+ case 'IXFR': return 251
+ case 'OPT': return 41
+ case 'ANY': return 255
+ case '*': return 255
+ }
+ return 0
+}
diff --git a/node_modules/dns-txt/.npmignore b/node_modules/dns-txt/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/dns-txt/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/dns-txt/.travis.yml b/node_modules/dns-txt/.travis.yml
new file mode 100644
index 0000000..06fbd6e
--- /dev/null
+++ b/node_modules/dns-txt/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+- '5'
+- '4'
+- '0.12'
+- '0.10'
+- '0.8'
+before_install:
+- 'if [ "${TRAVIS_NODE_VERSION}" == "0.8" ]; then npm install -g npm@2.12.1; fi'
diff --git a/node_modules/dns-txt/LICENSE b/node_modules/dns-txt/LICENSE
new file mode 100644
index 0000000..7cdc145
--- /dev/null
+++ b/node_modules/dns-txt/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Thomas Watson Steen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/dns-txt/README.md b/node_modules/dns-txt/README.md
new file mode 100644
index 0000000..46c6b83
--- /dev/null
+++ b/node_modules/dns-txt/README.md
@@ -0,0 +1,91 @@
+# dns-txt
+
+Encode or decode the RDATA field in multicast DNS TXT records. For use
+with DNS-Based Service Discovery. For details see [RFC
+6763](https://tools.ietf.org/html/rfc6763).
+
+[](https://travis-ci.org/watson/dns-txt)
+[](https://github.com/feross/standard)
+[](https://github.com/mafintosh/abstract-encoding)
+
+## Installation
+
+```
+npm install dns-txt
+```
+
+## Usage
+
+```js
+var txt = require('dns-txt')()
+
+var obj = {
+ foo: 1,
+ bar: 2
+}
+
+var enc = txt.encode(obj) //
+
+txt.decode(enc) // { foo: '1', bar: '2' }
+```
+
+## API
+
+The encoder and decoder conforms to [RFC 6763](https://tools.ietf.org/html/rfc6763).
+
+### Initialize
+
+The module exposes a constructor function which can be called with an
+optional options object:
+
+```js
+var txt = require('dns-txt')({ binary: true })
+```
+
+The options are:
+
+- `binary` - If set to `true` all values will be returned as `Buffer`
+ objects. The default behavior is to turn all values into strings. But
+ according to the RFC the values can be any binary data. If you expect
+ binary data, use this option.
+
+#### `txt.encode(obj, [buffer], [offset])`
+
+Takes a key/value object and returns a buffer with the encoded TXT
+record. If a buffer is passed as the second argument the object should
+be encoded into that buffer. Otherwise a new buffer should be allocated
+If an offset is passed as the third argument the object should be
+encoded at that byte offset. The byte offset defaults to `0`.
+
+This module does not actively validate the key/value pairs, but keep the
+following in rules in mind:
+
+- To be RFC compliant, each key should conform with the rules as
+ specified in [section
+ 6.4](https://tools.ietf.org/html/rfc6763#section-6.4).
+
+- To be RFC compliant, each value should conform with the rules as
+ specified in [section
+ 6.5](https://tools.ietf.org/html/rfc6763#section-6.5).
+
+After encoding `txt.encode.bytes` is set to the amount of bytes used to
+encode the object.
+
+#### `txt.decode(buffer, [offset], [length])`
+
+Takes a buffer and returns a decoded key/value object. If an offset is
+passed as the second argument the object should be decoded from that
+byte offset. The byte offset defaults to `0`. Note that all keys will be
+lowercased and all values will be Buffer objects.
+
+After decoding `txt.decode.bytes` is set to the amount of bytes used to
+decode the object.
+
+#### `txt.encodingLength(obj)`
+
+Takes a single key/value object and returns the number of bytes that the given
+object would require if encoded.
+
+## License
+
+MIT
diff --git a/node_modules/dns-txt/index.js b/node_modules/dns-txt/index.js
new file mode 100644
index 0000000..16af6d1
--- /dev/null
+++ b/node_modules/dns-txt/index.js
@@ -0,0 +1,94 @@
+'use strict'
+
+var bindexOf = require('buffer-indexof')
+
+var equalSign = new Buffer('=')
+
+module.exports = function (opts) {
+ var binary = opts ? opts.binary : false
+ var that = {}
+
+ that.encode = function (data, buf, offset) {
+ if (!data) data = {}
+ if (!offset) offset = 0
+ if (!buf) buf = new Buffer(that.encodingLength(data) + offset)
+
+ var oldOffset = offset
+ var keys = Object.keys(data)
+
+ if (keys.length === 0) {
+ buf[offset] = 0
+ offset++
+ }
+
+ keys.forEach(function (key) {
+ var val = data[key]
+ var oldOffset = offset
+ offset++
+
+ if (val === true) {
+ offset += buf.write(key, offset)
+ } else if (Buffer.isBuffer(val)) {
+ offset += buf.write(key + '=', offset)
+ var len = val.length
+ val.copy(buf, offset, 0, len)
+ offset += len
+ } else {
+ offset += buf.write(key + '=' + val, offset)
+ }
+
+ buf[oldOffset] = offset - oldOffset - 1
+ })
+
+ that.encode.bytes = offset - oldOffset
+ return buf
+ }
+
+ that.decode = function (buf, offset, len) {
+ if (!offset) offset = 0
+ if (!Number.isFinite(len)) len = buf.length
+ var data = {}
+ var oldOffset = offset
+
+ while (offset < len) {
+ var b = decodeBlock(buf, offset)
+ var i = bindexOf(b, equalSign)
+ offset += decodeBlock.bytes
+
+ if (b.length === 0) continue // ignore: most likely a single zero byte
+ if (i === -1) data[b.toString().toLowerCase()] = true
+ else if (i === 0) continue // ignore: invalid key-length
+ else {
+ var key = b.slice(0, i).toString().toLowerCase()
+ if (key in data) continue // ignore: overwriting not allowed
+ data[key] = binary ? b.slice(i + 1) : b.slice(i + 1).toString()
+ }
+ }
+
+ that.decode.bytes = offset - oldOffset
+ return data
+ }
+
+ that.encodingLength = function (data) {
+ if (!data) return 1 // 1 byte (single empty byte)
+ var keys = Object.keys(data)
+ if (keys.length === 0) return 1 // 1 byte (single empty byte)
+ return keys.reduce(function (total, key) {
+ var val = data[key]
+ total += Buffer.byteLength(key) + 1 // +1 byte to store field length
+ if (Buffer.isBuffer(val)) total += val.length + 1 // +1 byte to fit equal sign
+ else if (val !== true) total += Buffer.byteLength(String(val)) + 1 // +1 byte to fit equal sign
+ return total
+ }, 0)
+ }
+
+ return that
+}
+
+function decodeBlock (buf, offset) {
+ var len = buf[offset]
+ var to = offset + 1 + len
+ var b = buf.slice(offset + 1, to > buf.length ? buf.length : to)
+ decodeBlock.bytes = len + 1
+ return b
+}
diff --git a/node_modules/dns-txt/package.json b/node_modules/dns-txt/package.json
new file mode 100644
index 0000000..01a67f0
--- /dev/null
+++ b/node_modules/dns-txt/package.json
@@ -0,0 +1,79 @@
+{
+ "_from": "dns-txt@^2.0.2",
+ "_id": "dns-txt@2.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=",
+ "_location": "/dns-txt",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "dns-txt@^2.0.2",
+ "name": "dns-txt",
+ "escapedName": "dns-txt",
+ "rawSpec": "^2.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.2"
+ },
+ "_requiredBy": [
+ "/bonjour"
+ ],
+ "_resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz",
+ "_shasum": "b91d806f5d27188e4ab3e7d107d881a1cc4642b6",
+ "_spec": "dns-txt@^2.0.2",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/bonjour",
+ "author": {
+ "name": "Thomas Watson Steen",
+ "email": "w@tson.dk",
+ "url": "https://twitter.com/wa7son"
+ },
+ "bugs": {
+ "url": "https://github.com/watson/dns-txt/issues"
+ },
+ "bundleDependencies": false,
+ "coordinates": [
+ 55.6465696,
+ 12.5491067
+ ],
+ "dependencies": {
+ "buffer-indexof": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Encode/decode DNS-SD TXT record RDATA fields",
+ "devDependencies": {
+ "standard": "^5.3.1",
+ "tape": "^4.2.2"
+ },
+ "homepage": "https://github.com/watson/dns-txt",
+ "keywords": [
+ "rfc6763",
+ "6763",
+ "rfc6762",
+ "6762",
+ "dns",
+ "mdns",
+ "multicast",
+ "txt",
+ "rdata",
+ "dns-sd",
+ "encode",
+ "decode",
+ "parse",
+ "encoder",
+ "decoder",
+ "parser",
+ "service",
+ "discovery"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "dns-txt",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/watson/dns-txt.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "2.0.2"
+}
diff --git a/node_modules/dns-txt/test.js b/node_modules/dns-txt/test.js
new file mode 100644
index 0000000..77fa53c
--- /dev/null
+++ b/node_modules/dns-txt/test.js
@@ -0,0 +1,160 @@
+'use strict'
+
+var test = require('tape')
+var txtStr = require('./')()
+var txtBin = require('./')({ binary: true })
+
+var obj = {
+ String: 'foo',
+ number: 42,
+ empty: '',
+ null: null,
+ bool: true,
+ buffer: new Buffer('bar')
+}
+
+test('encodingLength', function (t) {
+ var len = txtBin.encodingLength(obj)
+ t.equal(len, 54)
+ t.end()
+})
+
+test('encode', function (t) {
+ var buf = txtBin.encode(obj)
+ var expected = new Buffer('0a' + '537472696e67' + '3d' + '666f6f' +
+ '09' + '6e756d626572' + '3d' + '3432' +
+ '06' + '656d707479' + '3d' +
+ '09' + '6e756c6c' + '3d' + '6e756c6c' +
+ '04' + '626f6f6c' +
+ '0a' + '627566666572' + '3d' + '626172', 'hex')
+ t.deepEqual(buf, expected)
+ t.equal(txtBin.encode.bytes, expected.length)
+ t.end()
+})
+
+test('encode - empty', function (t) {
+ var buf = txtBin.encode({})
+ var expected = new Buffer('00', 'hex')
+ t.deepEqual(buf, expected)
+ t.equal(txtBin.encode.bytes, expected.length)
+ t.end()
+})
+
+test('encode - undefined', function (t) {
+ var buf = txtBin.encode()
+ var expected = new Buffer('00', 'hex')
+ t.deepEqual(buf, expected)
+ t.equal(txtBin.encode.bytes, expected.length)
+ t.end()
+})
+
+test('encode - with buffer', function (t) {
+ var buf = new Buffer(3)
+ buf.fill(255)
+ txtBin.encode({}, buf)
+ var expected = new Buffer('00ffff', 'hex')
+ t.deepEqual(buf, expected)
+ t.equal(txtBin.encode.bytes, 1)
+ t.end()
+})
+
+test('encode - with buffer and offset', function (t) {
+ var buf = new Buffer(3)
+ buf.fill(255)
+ txtBin.encode({}, buf, 1)
+ var expected = new Buffer('ff00ff', 'hex')
+ t.deepEqual(buf, expected)
+ t.equal(txtBin.encode.bytes, 1)
+ t.end()
+})
+
+test('decode', function (t) {
+ var encoded = txtBin.encode(obj)
+ var result = txtBin.decode(encoded)
+ var expected = {
+ string: new Buffer('foo'),
+ number: new Buffer('42'),
+ empty: new Buffer(0),
+ null: new Buffer('null'),
+ bool: true,
+ buffer: new Buffer('bar')
+ }
+ t.deepEqual(result, expected)
+ t.equal(txtBin.decode.bytes, encoded.length)
+ t.end()
+})
+
+test('decode - strings', function (t) {
+ var encoded = txtStr.encode(obj)
+ var result = txtStr.decode(encoded)
+ var expected = {
+ string: 'foo',
+ number: '42',
+ empty: '',
+ null: 'null',
+ bool: true,
+ buffer: 'bar'
+ }
+ t.deepEqual(result, expected)
+ t.equal(txtStr.decode.bytes, encoded.length)
+ t.end()
+})
+
+test('decode - duplicate', function (t) {
+ var orig = {
+ Foo: 'bar',
+ foo: 'ignore this'
+ }
+ var expected = {
+ foo: new Buffer('bar')
+ }
+ var encoded = txtBin.encode(orig)
+ var result = txtBin.decode(encoded)
+ t.deepEqual(result, expected)
+ t.equal(txtBin.decode.bytes, encoded.length)
+ t.end()
+})
+
+test('decode - single zero bype', function (t) {
+ var encoded = new Buffer('00', 'hex')
+ var result = txtBin.decode(encoded)
+ t.deepEqual(result, {})
+ t.equal(txtBin.decode.bytes, encoded.length)
+ t.end()
+})
+
+test('decode - with offset', function (t) {
+ var encoded = new Buffer('012300', 'hex')
+ var result = txtBin.decode(encoded, 2)
+ t.deepEqual(result, {})
+ t.equal(txtBin.decode.bytes, 1)
+ t.end()
+})
+
+test('decode - exactly 256 bytes', function (t) {
+ var expected = { foo: '' }
+ var maxLength = Object.keys(expected).reduce(function (total, key) {
+ return total - key.length - 1 // - 1 for the equal sign used to separate the key and the value
+ }, 255)
+
+ for (var n = 0; n < maxLength; n++) {
+ expected.foo += 'x'
+ }
+
+ // the max case:
+ var encoded = txtStr.encode(expected)
+ t.equal(txtStr.encode.bytes, 256)
+ var result = txtStr.decode(encoded)
+ t.deepEqual(result, expected)
+ t.equal(txtStr.decode.bytes, encoded.length)
+
+ // go beound the max:
+ expected.foo += 'x'
+ encoded = txtStr.encode(expected)
+ t.equal(txtStr.encode.bytes, 257)
+ result = txtStr.decode(encoded)
+ t.notDeepEqual(result, expected)
+ t.ok(txtStr.decode.bytes > encoded.length)
+
+ t.end()
+})
diff --git a/node_modules/duplexify/.travis.yml b/node_modules/duplexify/.travis.yml
index ecd4193..cb6e182 100644
--- a/node_modules/duplexify/.travis.yml
+++ b/node_modules/duplexify/.travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - "0.10"
- - "0.12"
- "4"
- "6"
+ - "8"
+ - "10"
diff --git a/node_modules/duplexify/package.json b/node_modules/duplexify/package.json
index b7f7cbe..393bb22 100644
--- a/node_modules/duplexify/package.json
+++ b/node_modules/duplexify/package.json
@@ -1,8 +1,8 @@
{
"_from": "duplexify@^3.4.2",
- "_id": "duplexify@3.6.1",
+ "_id": "duplexify@3.7.1",
"_inBundle": false,
- "_integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==",
+ "_integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
"_location": "/duplexify",
"_phantomChildren": {},
"_requested": {
@@ -19,8 +19,8 @@
"/mississippi",
"/pumpify"
],
- "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz",
- "_shasum": "b1a7a29c4abfd639585efaecce80d666b1e34125",
+ "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
+ "_shasum": "2a4df5317f6ccfd91f86d6fd25d8d8a103b88309",
"_spec": "duplexify@^3.4.2",
"_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/mississippi",
"author": {
@@ -63,5 +63,5 @@
"scripts": {
"test": "tape test.js"
},
- "version": "3.6.1"
+ "version": "3.7.1"
}
diff --git a/node_modules/ee-first/LICENSE b/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/ee-first/README.md b/node_modules/ee-first/README.md
new file mode 100644
index 0000000..cbd2478
--- /dev/null
+++ b/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/node_modules/ee-first/index.js b/node_modules/ee-first/index.js
new file mode 100644
index 0000000..501287c
--- /dev/null
+++ b/node_modules/ee-first/index.js
@@ -0,0 +1,95 @@
+/*!
+ * ee-first
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = first
+
+/**
+ * Get the first event in a set of event emitters and event pairs.
+ *
+ * @param {array} stuff
+ * @param {function} done
+ * @public
+ */
+
+function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+/**
+ * Create the event listener.
+ * @private
+ */
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/node_modules/ee-first/package.json b/node_modules/ee-first/package.json
new file mode 100644
index 0000000..4e04397
--- /dev/null
+++ b/node_modules/ee-first/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "ee-first@1.1.1",
+ "_id": "ee-first@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
+ "_location": "/ee-first",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ee-first@1.1.1",
+ "name": "ee-first",
+ "escapedName": "ee-first",
+ "rawSpec": "1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "1.1.1"
+ },
+ "_requiredBy": [
+ "/on-finished"
+ ],
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "_shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d",
+ "_spec": "ee-first@1.1.1",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/on-finished",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "return the first event in a set of ee/event pairs",
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/jonathanong/ee-first#readme",
+ "license": "MIT",
+ "name": "ee-first",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonathanong/ee-first.git"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "version": "1.1.1"
+}
diff --git a/node_modules/encodeurl/HISTORY.md b/node_modules/encodeurl/HISTORY.md
new file mode 100644
index 0000000..41313b2
--- /dev/null
+++ b/node_modules/encodeurl/HISTORY.md
@@ -0,0 +1,14 @@
+1.0.2 / 2018-01-21
+==================
+
+ * Fix encoding `%` as last character
+
+1.0.1 / 2016-06-09
+==================
+
+ * Fix encoding unpaired surrogates at start/end of string
+
+1.0.0 / 2016-06-08
+==================
+
+ * Initial release
diff --git a/node_modules/encodeurl/LICENSE b/node_modules/encodeurl/LICENSE
new file mode 100644
index 0000000..8812229
--- /dev/null
+++ b/node_modules/encodeurl/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/encodeurl/README.md b/node_modules/encodeurl/README.md
new file mode 100644
index 0000000..127c5a0
--- /dev/null
+++ b/node_modules/encodeurl/README.md
@@ -0,0 +1,128 @@
+# encodeurl
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Encode a URL to a percent-encoded form, excluding already-encoded sequences
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install encodeurl
+```
+
+## API
+
+```js
+var encodeUrl = require('encodeurl')
+```
+
+### encodeUrl(url)
+
+Encode a URL to a percent-encoded form, excluding already-encoded sequences.
+
+This function will take an already-encoded URL and encode all the non-URL
+code points (as UTF-8 byte sequences). This function will not encode the
+"%" character unless it is not part of a valid sequence (`%20` will be
+left as-is, but `%foo` will be encoded as `%25foo`).
+
+This encode is meant to be "safe" and does not throw errors. It will try as
+hard as it can to properly encode the given URL, including replacing any raw,
+unpaired surrogate pairs with the Unicode replacement character prior to
+encoding.
+
+This function is _similar_ to the intrinsic function `encodeURI`, except it
+will not encode the `%` character if that is part of a valid sequence, will
+not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired
+surrogate pairs with the Unicode replacement character (instead of throwing).
+
+## Examples
+
+### Encode a URL containing user-controled data
+
+```js
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+
+http.createServer(function onRequest (req, res) {
+ // get encoded form of inbound url
+ var url = encodeUrl(req.url)
+
+ // create html message
+ var body = 'Location ' + escapeHtml(url) + ' not found
'
+
+ // send a 404
+ res.statusCode = 404
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
+ res.end(body, 'utf-8')
+})
+```
+
+### Encode a URL for use in a header field
+
+```js
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+var url = require('url')
+
+http.createServer(function onRequest (req, res) {
+ // parse inbound url
+ var href = url.parse(req)
+
+ // set new host for redirect
+ href.host = 'localhost'
+ href.protocol = 'https:'
+ href.slashes = true
+
+ // create location header
+ var location = encodeUrl(url.format(href))
+
+ // create html message
+ var body = 'Redirecting to new site: ' + escapeHtml(location) + '
'
+
+ // send a 301
+ res.statusCode = 301
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
+ res.setHeader('Location', location)
+ res.end(body, 'utf-8')
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+$ npm run lint
+```
+
+## References
+
+- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986]
+- [WHATWG URL Living Standard][whatwg-url]
+
+[rfc-3986]: https://tools.ietf.org/html/rfc3986
+[whatwg-url]: https://url.spec.whatwg.org/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/encodeurl.svg
+[npm-url]: https://npmjs.org/package/encodeurl
+[node-version-image]: https://img.shields.io/node/v/encodeurl.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg
+[travis-url]: https://travis-ci.org/pillarjs/encodeurl
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg
+[downloads-url]: https://npmjs.org/package/encodeurl
diff --git a/node_modules/encodeurl/index.js b/node_modules/encodeurl/index.js
new file mode 100644
index 0000000..fc4906c
--- /dev/null
+++ b/node_modules/encodeurl/index.js
@@ -0,0 +1,60 @@
+/*!
+ * encodeurl
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = encodeUrl
+
+/**
+ * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
+ * and including invalid escape sequences.
+ * @private
+ */
+
+var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g
+
+/**
+ * RegExp to match unmatched surrogate pair.
+ * @private
+ */
+
+var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
+
+/**
+ * String to replace unmatched surrogate pair with.
+ * @private
+ */
+
+var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
+
+/**
+ * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
+ *
+ * This function will take an already-encoded URL and encode all the non-URL
+ * code points. This function will not encode the "%" character unless it is
+ * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
+ * be encoded as `%25foo`).
+ *
+ * This encode is meant to be "safe" and does not throw errors. It will try as
+ * hard as it can to properly encode the given URL, including replacing any raw,
+ * unpaired surrogate pairs with the Unicode replacement character prior to
+ * encoding.
+ *
+ * @param {string} url
+ * @return {string}
+ * @public
+ */
+
+function encodeUrl (url) {
+ return String(url)
+ .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
+ .replace(ENCODE_CHARS_REGEXP, encodeURI)
+}
diff --git a/node_modules/encodeurl/package.json b/node_modules/encodeurl/package.json
new file mode 100644
index 0000000..444f5dd
--- /dev/null
+++ b/node_modules/encodeurl/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "encodeurl@~1.0.2",
+ "_id": "encodeurl@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "_location": "/encodeurl",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "encodeurl@~1.0.2",
+ "name": "encodeurl",
+ "escapedName": "encodeurl",
+ "rawSpec": "~1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.2"
+ },
+ "_requiredBy": [
+ "/express",
+ "/finalhandler",
+ "/send",
+ "/serve-static"
+ ],
+ "_resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "_shasum": "ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59",
+ "_spec": "encodeurl@~1.0.2",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "bugs": {
+ "url": "https://github.com/pillarjs/encodeurl/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "eslint-config-standard": "10.2.1",
+ "eslint-plugin-import": "2.8.0",
+ "eslint-plugin-node": "5.2.1",
+ "eslint-plugin-promise": "3.6.0",
+ "eslint-plugin-standard": "3.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "2.5.3"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/pillarjs/encodeurl#readme",
+ "keywords": [
+ "encode",
+ "encodeurl",
+ "url"
+ ],
+ "license": "MIT",
+ "name": "encodeurl",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/pillarjs/encodeurl.git"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "version": "1.0.2"
+}
diff --git a/node_modules/escape-html/LICENSE b/node_modules/escape-html/LICENSE
new file mode 100644
index 0000000..2e70de9
--- /dev/null
+++ b/node_modules/escape-html/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2012-2013 TJ Holowaychuk
+Copyright (c) 2015 Andreas Lubbe
+Copyright (c) 2015 Tiancheng "Timothy" Gu
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/escape-html/Readme.md b/node_modules/escape-html/Readme.md
new file mode 100644
index 0000000..653d9ea
--- /dev/null
+++ b/node_modules/escape-html/Readme.md
@@ -0,0 +1,43 @@
+
+# escape-html
+
+ Escape string for use in HTML
+
+## Example
+
+```js
+var escape = require('escape-html');
+var html = escape('foo & bar');
+// -> foo & bar
+```
+
+## Benchmark
+
+```
+$ npm run-script bench
+
+> escape-html@1.0.3 bench nodejs-escape-html
+> node benchmark/index.js
+
+
+ http_parser@1.0
+ node@0.10.33
+ v8@3.14.5.9
+ ares@1.9.0-DEV
+ uv@0.10.29
+ zlib@1.2.3
+ modules@11
+ openssl@1.0.1j
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled)
+ single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled)
+ many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled)
+```
+
+## License
+
+ MIT
\ No newline at end of file
diff --git a/node_modules/escape-html/index.js b/node_modules/escape-html/index.js
new file mode 100644
index 0000000..bf9e226
--- /dev/null
+++ b/node_modules/escape-html/index.js
@@ -0,0 +1,78 @@
+/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var matchHtmlRegExp = /["'&<>]/;
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = escapeHtml;
+
+/**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} string The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
+
+function escapeHtml(string) {
+ var str = '' + string;
+ var match = matchHtmlRegExp.exec(str);
+
+ if (!match) {
+ return str;
+ }
+
+ var escape;
+ var html = '';
+ var index = 0;
+ var lastIndex = 0;
+
+ for (index = match.index; index < str.length; index++) {
+ switch (str.charCodeAt(index)) {
+ case 34: // "
+ escape = '"';
+ break;
+ case 38: // &
+ escape = '&';
+ break;
+ case 39: // '
+ escape = ''';
+ break;
+ case 60: // <
+ escape = '<';
+ break;
+ case 62: // >
+ escape = '>';
+ break;
+ default:
+ continue;
+ }
+
+ if (lastIndex !== index) {
+ html += str.substring(lastIndex, index);
+ }
+
+ lastIndex = index + 1;
+ html += escape;
+ }
+
+ return lastIndex !== index
+ ? html + str.substring(lastIndex, index)
+ : html;
+}
diff --git a/node_modules/escape-html/package.json b/node_modules/escape-html/package.json
new file mode 100644
index 0000000..720ca68
--- /dev/null
+++ b/node_modules/escape-html/package.json
@@ -0,0 +1,60 @@
+{
+ "_from": "escape-html@~1.0.3",
+ "_id": "escape-html@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
+ "_location": "/escape-html",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "escape-html@~1.0.3",
+ "name": "escape-html",
+ "escapedName": "escape-html",
+ "rawSpec": "~1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.3"
+ },
+ "_requiredBy": [
+ "/express",
+ "/finalhandler",
+ "/send",
+ "/serve-index",
+ "/serve-static"
+ ],
+ "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "_shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988",
+ "_spec": "escape-html@~1.0.3",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "bugs": {
+ "url": "https://github.com/component/escape-html/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Escape string for use in HTML",
+ "devDependencies": {
+ "beautify-benchmark": "0.2.4",
+ "benchmark": "1.0.0"
+ },
+ "files": [
+ "LICENSE",
+ "Readme.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/component/escape-html#readme",
+ "keywords": [
+ "escape",
+ "html",
+ "utility"
+ ],
+ "license": "MIT",
+ "name": "escape-html",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/component/escape-html.git"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js"
+ },
+ "version": "1.0.3"
+}
diff --git a/node_modules/etag/HISTORY.md b/node_modules/etag/HISTORY.md
new file mode 100644
index 0000000..222b293
--- /dev/null
+++ b/node_modules/etag/HISTORY.md
@@ -0,0 +1,83 @@
+1.8.1 / 2017-09-12
+==================
+
+ * perf: replace regular expression with substring
+
+1.8.0 / 2017-02-18
+==================
+
+ * Use SHA1 instead of MD5 for ETag hashing
+ - Improves performance for larger entities
+ - Works with FIPS 140-2 OpenSSL configuration
+
+1.7.0 / 2015-06-08
+==================
+
+ * Always include entity length in ETags for hash length extensions
+ * Generate non-Stats ETags using MD5 only (no longer CRC32)
+ * Improve stat performance by removing hashing
+ * Remove base64 padding in ETags to shorten
+ * Use MD5 instead of MD4 in weak ETags over 1KB
+
+1.6.0 / 2015-05-10
+==================
+
+ * Improve support for JXcore
+ * Remove requirement of `atime` in the stats object
+ * Support "fake" stats objects in environments without `fs`
+
+1.5.1 / 2014-11-19
+==================
+
+ * deps: crc@3.2.1
+ - Minor fixes
+
+1.5.0 / 2014-10-14
+==================
+
+ * Improve string performance
+ * Slightly improve speed for weak ETags over 1KB
+
+1.4.0 / 2014-09-21
+==================
+
+ * Support "fake" stats objects
+ * Support Node.js 0.6
+
+1.3.1 / 2014-09-14
+==================
+
+ * Use the (new and improved) `crc` for crc32
+
+1.3.0 / 2014-08-29
+==================
+
+ * Default strings to strong ETags
+ * Improve speed for weak ETags over 1KB
+
+1.2.1 / 2014-08-29
+==================
+
+ * Use the (much faster) `buffer-crc32` for crc32
+
+1.2.0 / 2014-08-24
+==================
+
+ * Add support for file stat objects
+
+1.1.0 / 2014-08-24
+==================
+
+ * Add fast-path for empty entity
+ * Add weak ETag generation
+ * Shrink size of generated ETags
+
+1.0.1 / 2014-08-24
+==================
+
+ * Fix behavior of string containing Unicode
+
+1.0.0 / 2014-05-18
+==================
+
+ * Initial release
diff --git a/node_modules/etag/LICENSE b/node_modules/etag/LICENSE
new file mode 100644
index 0000000..cab251c
--- /dev/null
+++ b/node_modules/etag/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2016 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/etag/README.md b/node_modules/etag/README.md
new file mode 100644
index 0000000..09c2169
--- /dev/null
+++ b/node_modules/etag/README.md
@@ -0,0 +1,159 @@
+# etag
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create simple HTTP ETags
+
+This module generates HTTP ETags (as defined in RFC 7232) for use in
+HTTP responses.
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install etag
+```
+
+## API
+
+
+
+```js
+var etag = require('etag')
+```
+
+### etag(entity, [options])
+
+Generate a strong ETag for the given entity. This should be the complete
+body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
+default, a strong ETag is generated except for `fs.Stats`, which will
+generate a weak ETag (this can be overwritten by `options.weak`).
+
+
+
+```js
+res.setHeader('ETag', etag(body))
+```
+
+#### Options
+
+`etag` accepts these properties in the options object.
+
+##### weak
+
+Specifies if the generated ETag will include the weak validator mark (that
+is, the leading `W/`). The actual entity tag is the same. The default value
+is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> etag@1.8.1 bench nodejs-etag
+> node benchmark/index.js
+
+ http_parser@2.7.0
+ node@6.11.1
+ v8@5.1.281.103
+ uv@1.11.0
+ zlib@1.2.11
+ ares@1.10.1-DEV
+ icu@58.2
+ modules@48
+ openssl@1.0.2k
+
+> node benchmark/body0-100b.js
+
+ 100B body
+
+ 4 tests completed.
+
+ buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled)
+ buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled)
+ string - strong x 259,955 ops/sec ±1.19% (185 runs sampled)
+ string - weak x 264,356 ops/sec ±1.09% (184 runs sampled)
+
+> node benchmark/body1-1kb.js
+
+ 1KB body
+
+ 4 tests completed.
+
+ buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled)
+ buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled)
+ string - strong x 144,272 ops/sec ±0.96% (188 runs sampled)
+ string - weak x 145,380 ops/sec ±1.43% (187 runs sampled)
+
+> node benchmark/body2-5kb.js
+
+ 5KB body
+
+ 4 tests completed.
+
+ buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled)
+ buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled)
+ string - strong x 48,850 ops/sec ±0.56% (186 runs sampled)
+ string - weak x 49,380 ops/sec ±0.56% (190 runs sampled)
+
+> node benchmark/body3-10kb.js
+
+ 10KB body
+
+ 4 tests completed.
+
+ buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled)
+ buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled)
+ string - strong x 27,345 ops/sec ±0.43% (188 runs sampled)
+ string - weak x 27,496 ops/sec ±0.45% (190 runs sampled)
+
+> node benchmark/body4-100kb.js
+
+ 100KB body
+
+ 4 tests completed.
+
+ buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled)
+ buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled)
+ string - strong x 3,068 ops/sec ±0.34% (190 runs sampled)
+ string - weak x 3,096 ops/sec ±0.35% (190 runs sampled)
+
+> node benchmark/stats.js
+
+ stat
+
+ 4 tests completed.
+
+ real - strong x 871,642 ops/sec ±0.34% (189 runs sampled)
+ real - weak x 867,613 ops/sec ±0.39% (190 runs sampled)
+ fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled)
+ fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/etag.svg
+[npm-url]: https://npmjs.org/package/etag
+[node-version-image]: https://img.shields.io/node/v/etag.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
+[travis-url]: https://travis-ci.org/jshttp/etag
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/etag.svg
+[downloads-url]: https://npmjs.org/package/etag
diff --git a/node_modules/etag/index.js b/node_modules/etag/index.js
new file mode 100644
index 0000000..2a585c9
--- /dev/null
+++ b/node_modules/etag/index.js
@@ -0,0 +1,131 @@
+/*!
+ * etag
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = etag
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var crypto = require('crypto')
+var Stats = require('fs').Stats
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var toString = Object.prototype.toString
+
+/**
+ * Generate an entity tag.
+ *
+ * @param {Buffer|string} entity
+ * @return {string}
+ * @private
+ */
+
+function entitytag (entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'
+ }
+
+ // compute hash of entity
+ var hash = crypto
+ .createHash('sha1')
+ .update(entity, 'utf8')
+ .digest('base64')
+ .substring(0, 27)
+
+ // compute length of entity
+ var len = typeof entity === 'string'
+ ? Buffer.byteLength(entity, 'utf8')
+ : entity.length
+
+ return '"' + len.toString(16) + '-' + hash + '"'
+}
+
+/**
+ * Create a simple ETag.
+ *
+ * @param {string|Buffer|Stats} entity
+ * @param {object} [options]
+ * @param {boolean} [options.weak]
+ * @return {String}
+ * @public
+ */
+
+function etag (entity, options) {
+ if (entity == null) {
+ throw new TypeError('argument entity is required')
+ }
+
+ // support fs.Stats object
+ var isStats = isstats(entity)
+ var weak = options && typeof options.weak === 'boolean'
+ ? options.weak
+ : isStats
+
+ // validate argument
+ if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
+ throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
+ }
+
+ // generate entity tag
+ var tag = isStats
+ ? stattag(entity)
+ : entitytag(entity)
+
+ return weak
+ ? 'W/' + tag
+ : tag
+}
+
+/**
+ * Determine if object is a Stats object.
+ *
+ * @param {object} obj
+ * @return {boolean}
+ * @api private
+ */
+
+function isstats (obj) {
+ // genuine fs.Stats
+ if (typeof Stats === 'function' && obj instanceof Stats) {
+ return true
+ }
+
+ // quack quack
+ return obj && typeof obj === 'object' &&
+ 'ctime' in obj && toString.call(obj.ctime) === '[object Date]' &&
+ 'mtime' in obj && toString.call(obj.mtime) === '[object Date]' &&
+ 'ino' in obj && typeof obj.ino === 'number' &&
+ 'size' in obj && typeof obj.size === 'number'
+}
+
+/**
+ * Generate a tag for a stat.
+ *
+ * @param {object} stat
+ * @return {string}
+ * @private
+ */
+
+function stattag (stat) {
+ var mtime = stat.mtime.getTime().toString(16)
+ var size = stat.size.toString(16)
+
+ return '"' + size + '-' + mtime + '"'
+}
diff --git a/node_modules/etag/package.json b/node_modules/etag/package.json
new file mode 100644
index 0000000..40d4972
--- /dev/null
+++ b/node_modules/etag/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "etag@~1.8.1",
+ "_id": "etag@1.8.1",
+ "_inBundle": false,
+ "_integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+ "_location": "/etag",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "etag@~1.8.1",
+ "name": "etag",
+ "escapedName": "etag",
+ "rawSpec": "~1.8.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.8.1"
+ },
+ "_requiredBy": [
+ "/express",
+ "/send"
+ ],
+ "_resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "_shasum": "41ae2eeb65efa62268aebfea83ac7d79299b0887",
+ "_spec": "etag@~1.8.1",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/express",
+ "bugs": {
+ "url": "https://github.com/jshttp/etag/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "David Björklund",
+ "email": "david.bjorklund@gmail.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "Create simple HTTP ETags",
+ "devDependencies": {
+ "beautify-benchmark": "0.2.4",
+ "benchmark": "2.1.4",
+ "eslint": "3.19.0",
+ "eslint-config-standard": "10.2.1",
+ "eslint-plugin-import": "2.7.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "5.1.1",
+ "eslint-plugin-promise": "3.5.0",
+ "eslint-plugin-standard": "3.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "safe-buffer": "5.1.1",
+ "seedrandom": "2.4.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/jshttp/etag#readme",
+ "keywords": [
+ "etag",
+ "http",
+ "res"
+ ],
+ "license": "MIT",
+ "name": "etag",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/etag.git"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "version": "1.8.1"
+}
diff --git a/node_modules/eventemitter3/LICENSE b/node_modules/eventemitter3/LICENSE
new file mode 100644
index 0000000..abcbd54
--- /dev/null
+++ b/node_modules/eventemitter3/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Arnout Kazemier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/eventemitter3/README.md b/node_modules/eventemitter3/README.md
new file mode 100644
index 0000000..d7159c6
--- /dev/null
+++ b/node_modules/eventemitter3/README.md
@@ -0,0 +1,92 @@
+# EventEmitter3
+
+[](https://www.npmjs.com/package/eventemitter3)[](https://travis-ci.org/primus/eventemitter3)[](https://david-dm.org/primus/eventemitter3)[](https://coveralls.io/r/primus/eventemitter3?branch=master)[](https://webchat.freenode.net/?channels=primus)
+
+[](https://saucelabs.com/u/eventemitter3)
+
+EventEmitter3 is a high performance EventEmitter. It has been micro-optimized
+for various of code paths making this, one of, if not the fastest EventEmitter
+available for Node.js and browsers. The module is API compatible with the
+EventEmitter that ships by default with Node.js but there are some slight
+differences:
+
+- Domain support has been removed.
+- We do not `throw` an error when you emit an `error` event and nobody is
+ listening.
+- The `newListener` and `removeListener` events have been removed as they
+ are useful only in some uncommon use-cases.
+- The `setMaxListeners`, `getMaxListeners`, `prependListener` and
+ `preperndOnceListener` methods are not available.
+- Support for custom context for events so there is no need to use `fn.bind`.
+- The `removeListener` method removes all matching listeners, not only the
+ first.
+
+It's a drop in replacement for existing EventEmitters, but just faster. Free
+performance, who wouldn't want that? The EventEmitter is written in EcmaScript 3
+so it will work in the oldest browsers and node versions that you need to
+support.
+
+## Installation
+
+```bash
+$ npm install --save eventemitter3
+```
+
+## CDN
+
+Recommended CDN:
+
+```text
+https://unpkg.com/eventemitter3@latest/umd/eventemitter3.min.js
+```
+
+## Usage
+
+After installation the only thing you need to do is require the module:
+
+```js
+var EventEmitter = require('eventemitter3');
+```
+
+And you're ready to create your own EventEmitter instances. For the API
+documentation, please follow the official Node.js documentation:
+
+http://nodejs.org/api/events.html
+
+### Contextual emits
+
+We've upgraded the API of the `EventEmitter.on`, `EventEmitter.once` and
+`EventEmitter.removeListener` to accept an extra argument which is the `context`
+or `this` value that should be set for the emitted events. This means you no
+longer have the overhead of an event that required `fn.bind` in order to get a
+custom `this` value.
+
+```js
+var EE = new EventEmitter()
+ , context = { foo: 'bar' };
+
+function emitted() {
+ console.log(this === context); // true
+}
+
+EE.once('event-name', emitted, context);
+EE.on('another-event', emitted, context);
+EE.removeListener('another-event', emitted, context);
+```
+
+### Tests and benchmarks
+
+This module is well tested. You can run:
+
+- `npm test` to run the tests under Node.js.
+- `npm run test-browser` to run the tests in real browsers via Sauce Labs.
+
+We also have a set of benchmarks to compare EventEmitter3 with some available
+alternatives. To run the benchmarks run `npm run benchmark`.
+
+Tests and benchmarks are not included in the npm package. If you want to play
+with them you have to clone the GitHub repository.
+
+## License
+
+[MIT](LICENSE)
diff --git a/node_modules/eventemitter3/index.d.ts b/node_modules/eventemitter3/index.d.ts
new file mode 100644
index 0000000..2f86f20
--- /dev/null
+++ b/node_modules/eventemitter3/index.d.ts
@@ -0,0 +1,64 @@
+/**
+ * Minimal `EventEmitter` interface that is molded against the Node.js
+ * `EventEmitter` interface.
+ */
+declare class EventEmitter {
+ static prefixed: string | boolean;
+
+ /**
+ * Return an array listing the events for which the emitter has registered
+ * listeners.
+ */
+ eventNames(): Array;
+
+ /**
+ * Return the listeners registered for a given event.
+ */
+ listeners(event: EventTypes): Array;
+
+ /**
+ * Return the number of listeners listening to a given event.
+ */
+ listenerCount(event: EventTypes): number;
+
+ /**
+ * Calls each of the listeners registered for a given event.
+ */
+ emit(event: EventTypes, ...args: Array): boolean;
+
+ /**
+ * Add a listener for a given event.
+ */
+ on(event: EventTypes, fn: EventEmitter.ListenerFn, context?: any): this;
+ addListener(event: EventTypes, fn: EventEmitter.ListenerFn, context?: any): this;
+
+ /**
+ * Add a one-time listener for a given event.
+ */
+ once(event: EventTypes, fn: EventEmitter.ListenerFn, context?: any): this;
+
+ /**
+ * Remove the listeners of a given event.
+ */
+ removeListener(event: EventTypes, fn?: EventEmitter.ListenerFn, context?: any, once?: boolean): this;
+ off(event: EventTypes, fn?: EventEmitter.ListenerFn, context?: any, once?: boolean): this;
+
+ /**
+ * Remove all listeners, or those of the specified event.
+ */
+ removeAllListeners(event?: EventTypes): this;
+}
+
+declare namespace EventEmitter {
+ export interface ListenerFn {
+ (...args: Array): void;
+ }
+
+ export interface EventEmitterStatic {
+ new(): EventEmitter;
+ }
+
+ export const EventEmitter: EventEmitterStatic;
+}
+
+export = EventEmitter;
diff --git a/node_modules/eventemitter3/index.js b/node_modules/eventemitter3/index.js
new file mode 100644
index 0000000..6ea485c
--- /dev/null
+++ b/node_modules/eventemitter3/index.js
@@ -0,0 +1,336 @@
+'use strict';
+
+var has = Object.prototype.hasOwnProperty
+ , prefix = '~';
+
+/**
+ * Constructor to create a storage for our `EE` objects.
+ * An `Events` instance is a plain object whose properties are event names.
+ *
+ * @constructor
+ * @private
+ */
+function Events() {}
+
+//
+// We try to not inherit from `Object.prototype`. In some engines creating an
+// instance in this way is faster than calling `Object.create(null)` directly.
+// If `Object.create(null)` is not supported we prefix the event names with a
+// character to make sure that the built-in object properties are not
+// overridden or used as an attack vector.
+//
+if (Object.create) {
+ Events.prototype = Object.create(null);
+
+ //
+ // This hack is needed because the `__proto__` property is still inherited in
+ // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
+ //
+ if (!new Events().__proto__) prefix = false;
+}
+
+/**
+ * Representation of a single event listener.
+ *
+ * @param {Function} fn The listener function.
+ * @param {*} context The context to invoke the listener with.
+ * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
+ * @constructor
+ * @private
+ */
+function EE(fn, context, once) {
+ this.fn = fn;
+ this.context = context;
+ this.once = once || false;
+}
+
+/**
+ * Add a listener for a given event.
+ *
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} context The context to invoke the listener with.
+ * @param {Boolean} once Specify if the listener is a one-time listener.
+ * @returns {EventEmitter}
+ * @private
+ */
+function addListener(emitter, event, fn, context, once) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('The listener must be a function');
+ }
+
+ var listener = new EE(fn, context || emitter, once)
+ , evt = prefix ? prefix + event : event;
+
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
+ else emitter._events[evt] = [emitter._events[evt], listener];
+
+ return emitter;
+}
+
+/**
+ * Clear event by name.
+ *
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+ * @param {(String|Symbol)} evt The Event name.
+ * @private
+ */
+function clearEvent(emitter, evt) {
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
+ else delete emitter._events[evt];
+}
+
+/**
+ * Minimal `EventEmitter` interface that is molded against the Node.js
+ * `EventEmitter` interface.
+ *
+ * @constructor
+ * @public
+ */
+function EventEmitter() {
+ this._events = new Events();
+ this._eventsCount = 0;
+}
+
+/**
+ * Return an array listing the events for which the emitter has registered
+ * listeners.
+ *
+ * @returns {Array}
+ * @public
+ */
+EventEmitter.prototype.eventNames = function eventNames() {
+ var names = []
+ , events
+ , name;
+
+ if (this._eventsCount === 0) return names;
+
+ for (name in (events = this._events)) {
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
+ }
+
+ if (Object.getOwnPropertySymbols) {
+ return names.concat(Object.getOwnPropertySymbols(events));
+ }
+
+ return names;
+};
+
+/**
+ * Return the listeners registered for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Array} The registered listeners.
+ * @public
+ */
+EventEmitter.prototype.listeners = function listeners(event) {
+ var evt = prefix ? prefix + event : event
+ , handlers = this._events[evt];
+
+ if (!handlers) return [];
+ if (handlers.fn) return [handlers.fn];
+
+ for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
+ ee[i] = handlers[i].fn;
+ }
+
+ return ee;
+};
+
+/**
+ * Return the number of listeners listening to a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Number} The number of listeners.
+ * @public
+ */
+EventEmitter.prototype.listenerCount = function listenerCount(event) {
+ var evt = prefix ? prefix + event : event
+ , listeners = this._events[evt];
+
+ if (!listeners) return 0;
+ if (listeners.fn) return 1;
+ return listeners.length;
+};
+
+/**
+ * Calls each of the listeners registered for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Boolean} `true` if the event had listeners, else `false`.
+ * @public
+ */
+EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
+ var evt = prefix ? prefix + event : event;
+
+ if (!this._events[evt]) return false;
+
+ var listeners = this._events[evt]
+ , len = arguments.length
+ , args
+ , i;
+
+ if (listeners.fn) {
+ if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
+
+ switch (len) {
+ case 1: return listeners.fn.call(listeners.context), true;
+ case 2: return listeners.fn.call(listeners.context, a1), true;
+ case 3: return listeners.fn.call(listeners.context, a1, a2), true;
+ case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
+ case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
+ case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
+ }
+
+ for (i = 1, args = new Array(len -1); i < len; i++) {
+ args[i - 1] = arguments[i];
+ }
+
+ listeners.fn.apply(listeners.context, args);
+ } else {
+ var length = listeners.length
+ , j;
+
+ for (i = 0; i < length; i++) {
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
+
+ switch (len) {
+ case 1: listeners[i].fn.call(listeners[i].context); break;
+ case 2: listeners[i].fn.call(listeners[i].context, a1); break;
+ case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
+ case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
+ default:
+ if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
+ args[j - 1] = arguments[j];
+ }
+
+ listeners[i].fn.apply(listeners[i].context, args);
+ }
+ }
+ }
+
+ return true;
+};
+
+/**
+ * Add a listener for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} [context=this] The context to invoke the listener with.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.on = function on(event, fn, context) {
+ return addListener(this, event, fn, context, false);
+};
+
+/**
+ * Add a one-time listener for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} [context=this] The context to invoke the listener with.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.once = function once(event, fn, context) {
+ return addListener(this, event, fn, context, true);
+};
+
+/**
+ * Remove the listeners of a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn Only remove the listeners that match this function.
+ * @param {*} context Only remove the listeners that have this context.
+ * @param {Boolean} once Only remove one-time listeners.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
+ var evt = prefix ? prefix + event : event;
+
+ if (!this._events[evt]) return this;
+ if (!fn) {
+ clearEvent(this, evt);
+ return this;
+ }
+
+ var listeners = this._events[evt];
+
+ if (listeners.fn) {
+ if (
+ listeners.fn === fn &&
+ (!once || listeners.once) &&
+ (!context || listeners.context === context)
+ ) {
+ clearEvent(this, evt);
+ }
+ } else {
+ for (var i = 0, events = [], length = listeners.length; i < length; i++) {
+ if (
+ listeners[i].fn !== fn ||
+ (once && !listeners[i].once) ||
+ (context && listeners[i].context !== context)
+ ) {
+ events.push(listeners[i]);
+ }
+ }
+
+ //
+ // Reset the array, or remove it completely if we have no more listeners.
+ //
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
+ else clearEvent(this, evt);
+ }
+
+ return this;
+};
+
+/**
+ * Remove all listeners, or those of the specified event.
+ *
+ * @param {(String|Symbol)} [event] The event name.
+ * @returns {EventEmitter} `this`.
+ * @public
+ */
+EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
+ var evt;
+
+ if (event) {
+ evt = prefix ? prefix + event : event;
+ if (this._events[evt]) clearEvent(this, evt);
+ } else {
+ this._events = new Events();
+ this._eventsCount = 0;
+ }
+
+ return this;
+};
+
+//
+// Alias methods names because people roll like that.
+//
+EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
+EventEmitter.prototype.addListener = EventEmitter.prototype.on;
+
+//
+// Expose the prefix.
+//
+EventEmitter.prefixed = prefix;
+
+//
+// Allow `EventEmitter` to be imported as module namespace.
+//
+EventEmitter.EventEmitter = EventEmitter;
+
+//
+// Expose the module.
+//
+if ('undefined' !== typeof module) {
+ module.exports = EventEmitter;
+}
diff --git a/node_modules/eventemitter3/package.json b/node_modules/eventemitter3/package.json
new file mode 100644
index 0000000..28bd5ea
--- /dev/null
+++ b/node_modules/eventemitter3/package.json
@@ -0,0 +1,84 @@
+{
+ "_from": "eventemitter3@^3.0.0",
+ "_id": "eventemitter3@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==",
+ "_location": "/eventemitter3",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "eventemitter3@^3.0.0",
+ "name": "eventemitter3",
+ "escapedName": "eventemitter3",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/http-proxy"
+ ],
+ "_resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
+ "_shasum": "090b4d6cdbd645ed10bf750d4b5407942d7ba163",
+ "_spec": "eventemitter3@^3.0.0",
+ "_where": "/Users/pedrohernandez/webdev/fibonacci-react-redux/node_modules/http-proxy",
+ "author": {
+ "name": "Arnout Kazemier"
+ },
+ "bugs": {
+ "url": "https://github.com/primus/eventemitter3/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.",
+ "devDependencies": {
+ "assume": "~1.5.0",
+ "browserify": "~16.2.0",
+ "mocha": "~5.1.0",
+ "nyc": "~11.7.1",
+ "pre-commit": "~1.2.0",
+ "sauce-browsers": "~1.2.0",
+ "sauce-test": "~1.3.3",
+ "uglify-js": "~3.3.0"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "umd"
+ ],
+ "homepage": "https://github.com/primus/eventemitter3#readme",
+ "keywords": [
+ "EventEmitter",
+ "EventEmitter2",
+ "EventEmitter3",
+ "Events",
+ "addEventListener",
+ "addListener",
+ "emit",
+ "emits",
+ "emitter",
+ "event",
+ "once",
+ "pub/sub",
+ "publish",
+ "reactor",
+ "subscribe"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "eventemitter3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/primus/eventemitter3.git"
+ },
+ "scripts": {
+ "benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;",
+ "browserify": "rm -rf umd && mkdir umd && browserify index.js -s EventEmitter3 -o umd/eventemitter3.js",
+ "minify": "uglifyjs umd/eventemitter3.js --source-map -cm -o umd/eventemitter3.min.js",
+ "prepublishOnly": "npm run browserify && npm run minify",
+ "test": "nyc --reporter=html --reporter=text mocha test/test.js",
+ "test-browser": "node test/browser.js"
+ },
+ "typings": "index.d.ts",
+ "version": "3.1.0"
+}
diff --git a/node_modules/eventemitter3/umd/eventemitter3.js b/node_modules/eventemitter3/umd/eventemitter3.js
new file mode 100644
index 0000000..888fcb8
--- /dev/null
+++ b/node_modules/eventemitter3/umd/eventemitter3.js
@@ -0,0 +1,340 @@
+(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.EventEmitter3 = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i
+```
+
+Now you will have two global constructors:
+
+```javascript
+window.EventSourcePolyfill
+window.EventSource // Unchanged if browser has defined it. Otherwise, same as window.EventSourcePolyfill
+```
+
+If you're using [webpack](https://webpack.github.io/) or [browserify](http://browserify.org/)
+you can of course build your own. (The `example/eventsource-polyfill.js` is built with webpack).
+
+## Extensions to the W3C API
+
+### Setting HTTP request headers
+
+You can define custom HTTP headers for the initial HTTP request. This can be useful for e.g. sending cookies
+or to specify an initial `Last-Event-ID` value.
+
+HTTP headers are defined by assigning a `headers` attribute to the optional `eventSourceInitDict` argument:
+
+```javascript
+var eventSourceInitDict = {headers: {'Cookie': 'test=test'}};
+var es = new EventSource(url, eventSourceInitDict);
+```
+
+### Allow unauthorized HTTPS requests
+
+By default, https requests that cannot be authorized will cause the connection to fail and an exception
+to be emitted. You can override this behaviour, along with other https options:
+
+```javascript
+var eventSourceInitDict = {https: {rejectUnauthorized: false}};
+var es = new EventSource(url, eventSourceInitDict);
+```
+
+Note that for Node.js < v0.10.x this option has no effect - unauthorized HTTPS requests are *always* allowed.
+
+### HTTP status code on error events
+
+Unauthorized and redirect error status codes (for example 401, 403, 301, 307) are available in the `status` property in the error event.
+
+```javascript
+es.onerror = function (err) {
+ if (err) {
+ if (err.status === 401 || err.status === 403) {
+ console.log('not authorized');
+ }
+ }
+};
+```
+
+### HTTP/HTTPS proxy
+
+You can define a `proxy` option for the HTTP request to be used. This is typically useful if you are behind a corporate firewall.
+
+```javascript
+var es = new EventSource(url, {proxy: 'http://your.proxy.com'});
+```
+
+
+## License
+
+MIT-licensed. See LICENSE
diff --git a/node_modules/eventsource/example/eventsource-polyfill.js b/node_modules/eventsource/example/eventsource-polyfill.js
new file mode 100644
index 0000000..865f4ee
--- /dev/null
+++ b/node_modules/eventsource/example/eventsource-polyfill.js
@@ -0,0 +1,10088 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 21);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+ return this;
+})();
+
+try {
+ // This works if eval is allowed (see CSP)
+ g = g || Function("return this")() || (1,eval)("this");
+} catch(e) {
+ // This works if the window reference is available
+ if(typeof window === "object")
+ g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+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 (name) { return [] }
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+/* eslint-disable no-proto */
+
+
+
+var base64 = __webpack_require__(23)
+var ieee754 = __webpack_require__(24)
+var isArray = __webpack_require__(25)
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Due to various browser bugs, sometimes the Object implementation will be used even
+ * when the browser supports typed arrays.
+ *
+ * Note:
+ *
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ * incorrect length in some situations.
+
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+ * get the Object implementation, which is slower but behaves correctly.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
+ ? global.TYPED_ARRAY_SUPPORT
+ : typedArraySupport()
+
+/*
+ * Export kMaxLength after typed array support is determined.
+ */
+exports.kMaxLength = kMaxLength()
+
+function typedArraySupport () {
+ try {
+ var arr = new Uint8Array(1)
+ arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+ return arr.foo() === 42 && // typed array instances can be augmented
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
+ arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
+ } catch (e) {
+ return false
+ }
+}
+
+function kMaxLength () {
+ return Buffer.TYPED_ARRAY_SUPPORT
+ ? 0x7fffffff
+ : 0x3fffffff
+}
+
+function createBuffer (that, length) {
+ if (kMaxLength() < length) {
+ throw new RangeError('Invalid typed array length')
+ }
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = new Uint8Array(length)
+ that.__proto__ = Buffer.prototype
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ if (that === null) {
+ that = new Buffer(length)
+ }
+ that.length = length
+ }
+
+ return that
+}
+
+/**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+function Buffer (arg, encodingOrOffset, length) {
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+ return new Buffer(arg, encodingOrOffset, length)
+ }
+
+ // Common case.
+ if (typeof arg === 'number') {
+ if (typeof encodingOrOffset === 'string') {
+ throw new Error(
+ 'If encoding is specified then the first argument must be a string'
+ )
+ }
+ return allocUnsafe(this, arg)
+ }
+ return from(this, arg, encodingOrOffset, length)
+}
+
+Buffer.poolSize = 8192 // not used by this implementation
+
+// TODO: Legacy, not needed anymore. Remove in next major version.
+Buffer._augment = function (arr) {
+ arr.__proto__ = Buffer.prototype
+ return arr
+}
+
+function from (that, value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number')
+ }
+
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ return fromArrayBuffer(that, value, encodingOrOffset, length)
+ }
+
+ if (typeof value === 'string') {
+ return fromString(that, value, encodingOrOffset)
+ }
+
+ return fromObject(that, value)
+}
+
+/**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+Buffer.from = function (value, encodingOrOffset, length) {
+ return from(null, value, encodingOrOffset, length)
+}
+
+if (Buffer.TYPED_ARRAY_SUPPORT) {
+ Buffer.prototype.__proto__ = Uint8Array.prototype
+ Buffer.__proto__ = Uint8Array
+ if (typeof Symbol !== 'undefined' && Symbol.species &&
+ Buffer[Symbol.species] === Buffer) {
+ // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+ Object.defineProperty(Buffer, Symbol.species, {
+ value: null,
+ configurable: true
+ })
+ }
+}
+
+function assertSize (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be a number')
+ } else if (size < 0) {
+ throw new RangeError('"size" argument must not be negative')
+ }
+}
+
+function alloc (that, size, fill, encoding) {
+ assertSize(size)
+ if (size <= 0) {
+ return createBuffer(that, size)
+ }
+ if (fill !== undefined) {
+ // Only pay attention to encoding if it's a string. This
+ // prevents accidentally sending in a number that would
+ // be interpretted as a start offset.
+ return typeof encoding === 'string'
+ ? createBuffer(that, size).fill(fill, encoding)
+ : createBuffer(that, size).fill(fill)
+ }
+ return createBuffer(that, size)
+}
+
+/**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+Buffer.alloc = function (size, fill, encoding) {
+ return alloc(null, size, fill, encoding)
+}
+
+function allocUnsafe (that, size) {
+ assertSize(size)
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < size; ++i) {
+ that[i] = 0
+ }
+ }
+ return that
+}
+
+/**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+Buffer.allocUnsafe = function (size) {
+ return allocUnsafe(null, size)
+}
+/**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+Buffer.allocUnsafeSlow = function (size) {
+ return allocUnsafe(null, size)
+}
+
+function fromString (that, string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8'
+ }
+
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('"encoding" must be a valid string encoding')
+ }
+
+ var length = byteLength(string, encoding) | 0
+ that = createBuffer(that, length)
+
+ var actual = that.write(string, encoding)
+
+ if (actual !== length) {
+ // Writing a hex string, for example, that contains invalid characters will
+ // cause everything after the first invalid character to be ignored. (e.g.
+ // 'abxxcd' will be treated as 'ab')
+ that = that.slice(0, actual)
+ }
+
+ return that
+}
+
+function fromArrayLike (that, array) {
+ var length = array.length < 0 ? 0 : checked(array.length) | 0
+ that = createBuffer(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+function fromArrayBuffer (that, array, byteOffset, length) {
+ array.byteLength // this throws if `array` is not a valid ArrayBuffer
+
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
+ throw new RangeError('\'offset\' is out of bounds')
+ }
+
+ if (array.byteLength < byteOffset + (length || 0)) {
+ throw new RangeError('\'length\' is out of bounds')
+ }
+
+ if (byteOffset === undefined && length === undefined) {
+ array = new Uint8Array(array)
+ } else if (length === undefined) {
+ array = new Uint8Array(array, byteOffset)
+ } else {
+ array = new Uint8Array(array, byteOffset, length)
+ }
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = array
+ that.__proto__ = Buffer.prototype
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ that = fromArrayLike(that, array)
+ }
+ return that
+}
+
+function fromObject (that, obj) {
+ if (Buffer.isBuffer(obj)) {
+ var len = checked(obj.length) | 0
+ that = createBuffer(that, len)
+
+ if (that.length === 0) {
+ return that
+ }
+
+ obj.copy(that, 0, 0, len)
+ return that
+ }
+
+ if (obj) {
+ if ((typeof ArrayBuffer !== 'undefined' &&
+ obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
+ if (typeof obj.length !== 'number' || isnan(obj.length)) {
+ return createBuffer(that, 0)
+ }
+ return fromArrayLike(that, obj)
+ }
+
+ if (obj.type === 'Buffer' && isArray(obj.data)) {
+ return fromArrayLike(that, obj.data)
+ }
+ }
+
+ throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
+}
+
+function checked (length) {
+ // Note: cannot use `length < kMaxLength()` here because that fails when
+ // length is NaN (which is otherwise coerced to zero.)
+ if (length >= kMaxLength()) {
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+ 'size: 0x' + kMaxLength().toString(16) + ' bytes')
+ }
+ return length | 0
+}
+
+function SlowBuffer (length) {
+ if (+length != length) { // eslint-disable-line eqeqeq
+ length = 0
+ }
+ return Buffer.alloc(+length)
+}
+
+Buffer.isBuffer = function isBuffer (b) {
+ return !!(b != null && b._isBuffer)
+}
+
+Buffer.compare = function compare (a, b) {
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ throw new TypeError('Arguments must be Buffers')
+ }
+
+ if (a === b) return 0
+
+ var x = a.length
+ var y = b.length
+
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+ if (a[i] !== b[i]) {
+ x = a[i]
+ y = b[i]
+ break
+ }
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+}
+
+Buffer.isEncoding = function isEncoding (encoding) {
+ switch (String(encoding).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 true
+ default:
+ return false
+ }
+}
+
+Buffer.concat = function concat (list, length) {
+ if (!isArray(list)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+
+ if (list.length === 0) {
+ return Buffer.alloc(0)
+ }
+
+ var i
+ if (length === undefined) {
+ length = 0
+ for (i = 0; i < list.length; ++i) {
+ length += list[i].length
+ }
+ }
+
+ var buffer = Buffer.allocUnsafe(length)
+ var pos = 0
+ for (i = 0; i < list.length; ++i) {
+ var buf = list[i]
+ if (!Buffer.isBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+ buf.copy(buffer, pos)
+ pos += buf.length
+ }
+ return buffer
+}
+
+function byteLength (string, encoding) {
+ if (Buffer.isBuffer(string)) {
+ return string.length
+ }
+ if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
+ (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+ return string.byteLength
+ }
+ if (typeof string !== 'string') {
+ string = '' + string
+ }
+
+ var len = string.length
+ if (len === 0) return 0
+
+ // Use a for loop to avoid recursion
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ return len
+ case 'utf8':
+ case 'utf-8':
+ case undefined:
+ return utf8ToBytes(string).length
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return len * 2
+ case 'hex':
+ return len >>> 1
+ case 'base64':
+ return base64ToBytes(string).length
+ default:
+ if (loweredCase) return utf8ToBytes(string).length // assume utf8
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+Buffer.byteLength = byteLength
+
+function slowToString (encoding, start, end) {
+ var loweredCase = false
+
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+ // property of a typed array.
+
+ // This behaves neither like String nor Uint8Array in that we set start/end
+ // to their upper/lower bounds if the value passed is out of range.
+ // undefined is handled specially as per ECMA-262 6th Edition,
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+ if (start === undefined || start < 0) {
+ start = 0
+ }
+ // Return early if start > this.length. Done here to prevent potential uint32
+ // coercion fail below.
+ if (start > this.length) {
+ return ''
+ }
+
+ if (end === undefined || end > this.length) {
+ end = this.length
+ }
+
+ if (end <= 0) {
+ return ''
+ }
+
+ // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+ end >>>= 0
+ start >>>= 0
+
+ if (end <= start) {
+ return ''
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end)
+
+ case 'ascii':
+ return asciiSlice(this, start, end)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Slice(this, start, end)
+
+ case 'base64':
+ return base64Slice(this, start, end)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = (encoding + '').toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+// Buffer instances.
+Buffer.prototype._isBuffer = true
+
+function swap (b, n, m) {
+ var i = b[n]
+ b[n] = b[m]
+ b[m] = i
+}
+
+Buffer.prototype.swap16 = function swap16 () {
+ var len = this.length
+ if (len % 2 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
+ }
+ for (var i = 0; i < len; i += 2) {
+ swap(this, i, i + 1)
+ }
+ return this
+}
+
+Buffer.prototype.swap32 = function swap32 () {
+ var len = this.length
+ if (len % 4 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
+ }
+ for (var i = 0; i < len; i += 4) {
+ swap(this, i, i + 3)
+ swap(this, i + 1, i + 2)
+ }
+ return this
+}
+
+Buffer.prototype.swap64 = function swap64 () {
+ var len = this.length
+ if (len % 8 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
+ }
+ for (var i = 0; i < len; i += 8) {
+ swap(this, i, i + 7)
+ swap(this, i + 1, i + 6)
+ swap(this, i + 2, i + 5)
+ swap(this, i + 3, i + 4)
+ }
+ return this
+}
+
+Buffer.prototype.toString = function toString () {
+ var length = this.length | 0
+ if (length === 0) return ''
+ if (arguments.length === 0) return utf8Slice(this, 0, length)
+ return slowToString.apply(this, arguments)
+}
+
+Buffer.prototype.equals = function equals (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return true
+ return Buffer.compare(this, b) === 0
+}
+
+Buffer.prototype.inspect = function inspect () {
+ var str = ''
+ var max = exports.INSPECT_MAX_BYTES
+ if (this.length > 0) {
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
+ if (this.length > max) str += ' ... '
+ }
+ return ''
+}
+
+Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+ if (!Buffer.isBuffer(target)) {
+ throw new TypeError('Argument must be a Buffer')
+ }
+
+ if (start === undefined) {
+ start = 0
+ }
+ if (end === undefined) {
+ end = target ? target.length : 0
+ }
+ if (thisStart === undefined) {
+ thisStart = 0
+ }
+ if (thisEnd === undefined) {
+ thisEnd = this.length
+ }
+
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+ throw new RangeError('out of range index')
+ }
+
+ if (thisStart >= thisEnd && start >= end) {
+ return 0
+ }
+ if (thisStart >= thisEnd) {
+ return -1
+ }
+ if (start >= end) {
+ return 1
+ }
+
+ start >>>= 0
+ end >>>= 0
+ thisStart >>>= 0
+ thisEnd >>>= 0
+
+ if (this === target) return 0
+
+ var x = thisEnd - thisStart
+ var y = end - start
+ var len = Math.min(x, y)
+
+ var thisCopy = this.slice(thisStart, thisEnd)
+ var targetCopy = target.slice(start, end)
+
+ for (var i = 0; i < len; ++i) {
+ if (thisCopy[i] !== targetCopy[i]) {
+ x = thisCopy[i]
+ y = targetCopy[i]
+ break
+ }
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+}
+
+// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+//
+// Arguments:
+// - buffer - a Buffer to search
+// - val - a string, Buffer, or number
+// - byteOffset - an index into `buffer`; will be clamped to an int32
+// - encoding - an optional encoding, relevant is val is a string
+// - dir - true for indexOf, false for lastIndexOf
+function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+ // Empty buffer means no match
+ if (buffer.length === 0) return -1
+
+ // Normalize byteOffset
+ if (typeof byteOffset === 'string') {
+ encoding = byteOffset
+ byteOffset = 0
+ } else if (byteOffset > 0x7fffffff) {
+ byteOffset = 0x7fffffff
+ } else if (byteOffset < -0x80000000) {
+ byteOffset = -0x80000000
+ }
+ byteOffset = +byteOffset // Coerce to Number.
+ if (isNaN(byteOffset)) {
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+ byteOffset = dir ? 0 : (buffer.length - 1)
+ }
+
+ // Normalize byteOffset: negative offsets start from the end of the buffer
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+ if (byteOffset >= buffer.length) {
+ if (dir) return -1
+ else byteOffset = buffer.length - 1
+ } else if (byteOffset < 0) {
+ if (dir) byteOffset = 0
+ else return -1
+ }
+
+ // Normalize val
+ if (typeof val === 'string') {
+ val = Buffer.from(val, encoding)
+ }
+
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
+ if (Buffer.isBuffer(val)) {
+ // Special case: looking for empty string/buffer always fails
+ if (val.length === 0) {
+ return -1
+ }
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+ } else if (typeof val === 'number') {
+ val = val & 0xFF // Search for a byte value [0-255]
+ if (Buffer.TYPED_ARRAY_SUPPORT &&
+ typeof Uint8Array.prototype.indexOf === 'function') {
+ if (dir) {
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
+ } else {
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
+ }
+ }
+ return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
+ }
+
+ throw new TypeError('val must be string, number or Buffer')
+}
+
+function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
+ var indexSize = 1
+ var arrLength = arr.length
+ var valLength = val.length
+
+ if (encoding !== undefined) {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'ucs2' || encoding === 'ucs-2' ||
+ encoding === 'utf16le' || encoding === 'utf-16le') {
+ if (arr.length < 2 || val.length < 2) {
+ return -1
+ }
+ indexSize = 2
+ arrLength /= 2
+ valLength /= 2
+ byteOffset /= 2
+ }
+ }
+
+ function read (buf, i) {
+ if (indexSize === 1) {
+ return buf[i]
+ } else {
+ return buf.readUInt16BE(i * indexSize)
+ }
+ }
+
+ var i
+ if (dir) {
+ var foundIndex = -1
+ for (i = byteOffset; i < arrLength; i++) {
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ if (foundIndex === -1) foundIndex = i
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+ } else {
+ if (foundIndex !== -1) i -= i - foundIndex
+ foundIndex = -1
+ }
+ }
+ } else {
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+ for (i = byteOffset; i >= 0; i--) {
+ var found = true
+ for (var j = 0; j < valLength; j++) {
+ if (read(arr, i + j) !== read(val, j)) {
+ found = false
+ break
+ }
+ }
+ if (found) return i
+ }
+ }
+
+ return -1
+}
+
+Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+ return this.indexOf(val, byteOffset, encoding) !== -1
+}
+
+Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+}
+
+Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
+}
+
+function hexWrite (buf, string, offset, length) {
+ offset = Number(offset) || 0
+ var remaining = buf.length - offset
+ if (!length) {
+ length = remaining
+ } else {
+ length = Number(length)
+ if (length > remaining) {
+ length = remaining
+ }
+ }
+
+ // must be an even number of digits
+ var strLen = string.length
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
+
+ if (length > strLen / 2) {
+ length = strLen / 2
+ }
+ for (var i = 0; i < length; ++i) {
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
+ if (isNaN(parsed)) return i
+ buf[offset + i] = parsed
+ }
+ return i
+}
+
+function utf8Write (buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function latin1Write (buf, string, offset, length) {
+ return asciiWrite(buf, string, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8'
+ length = this.length
+ offset = 0
+ // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset
+ length = this.length
+ offset = 0
+ // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset | 0
+ if (isFinite(length)) {
+ length = length | 0
+ if (encoding === undefined) encoding = 'utf8'
+ } else {
+ encoding = length
+ length = undefined
+ }
+ // legacy write(string, encoding, offset, length) - remove in v0.13
+ } else {
+ throw new Error(
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+ )
+ }
+
+ var remaining = this.length - offset
+ if (length === undefined || length > remaining) length = remaining
+
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+ throw new RangeError('Attempt to write outside buffer bounds')
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length)
+
+ case 'ascii':
+ return asciiWrite(this, string, offset, length)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Write(this, string, offset, length)
+
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ }
+}
+
+function base64Slice (buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return base64.fromByteArray(buf)
+ } else {
+ return base64.fromByteArray(buf.slice(start, end))
+ }
+}
+
+function utf8Slice (buf, start, end) {
+ end = Math.min(buf.length, end)
+ var res = []
+
+ var i = start
+ while (i < end) {
+ var firstByte = buf[i]
+ var codePoint = null
+ var bytesPerSequence = (firstByte > 0xEF) ? 4
+ : (firstByte > 0xDF) ? 3
+ : (firstByte > 0xBF) ? 2
+ : 1
+
+ if (i + bytesPerSequence <= end) {
+ var secondByte, thirdByte, fourthByte, tempCodePoint
+
+ switch (bytesPerSequence) {
+ case 1:
+ if (firstByte < 0x80) {
+ codePoint = firstByte
+ }
+ break
+ case 2:
+ secondByte = buf[i + 1]
+ if ((secondByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
+ if (tempCodePoint > 0x7F) {
+ codePoint = tempCodePoint
+ }
+ }
+ break
+ case 3:
+ secondByte = buf[i + 1]
+ thirdByte = buf[i + 2]
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+ codePoint = tempCodePoint
+ }
+ }
+ break
+ case 4:
+ secondByte = buf[i + 1]
+ thirdByte = buf[i + 2]
+ fourthByte = buf[i + 3]
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+ codePoint = tempCodePoint
+ }
+ }
+ }
+ }
+
+ if (codePoint === null) {
+ // we did not generate a valid codePoint so insert a
+ // replacement char (U+FFFD) and advance only 1 byte
+ codePoint = 0xFFFD
+ bytesPerSequence = 1
+ } else if (codePoint > 0xFFFF) {
+ // encode to utf16 (surrogate pair dance)
+ codePoint -= 0x10000
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800)
+ codePoint = 0xDC00 | codePoint & 0x3FF
+ }
+
+ res.push(codePoint)
+ i += bytesPerSequence
+ }
+
+ return decodeCodePointsArray(res)
+}
+
+// Based on http://stackoverflow.com/a/22747272/680742, the browser with
+// the lowest limit is Chrome, with 0x10000 args.
+// We go 1 magnitude less, for safety
+var MAX_ARGUMENTS_LENGTH = 0x1000
+
+function decodeCodePointsArray (codePoints) {
+ var len = codePoints.length
+ if (len <= MAX_ARGUMENTS_LENGTH) {
+ return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
+ }
+
+ // Decode in chunks to avoid "call stack size exceeded".
+ var res = ''
+ var i = 0
+ while (i < len) {
+ res += String.fromCharCode.apply(
+ String,
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
+ )
+ }
+ return res
+}
+
+function asciiSlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i] & 0x7F)
+ }
+ return ret
+}
+
+function latin1Slice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i])
+ }
+ return ret
+}
+
+function hexSlice (buf, start, end) {
+ var len = buf.length
+
+ if (!start || start < 0) start = 0
+ if (!end || end < 0 || end > len) end = len
+
+ var out = ''
+ for (var i = start; i < end; ++i) {
+ out += toHex(buf[i])
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; i += 2) {
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
+ }
+ return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+ var len = this.length
+ start = ~~start
+ end = end === undefined ? len : ~~end
+
+ if (start < 0) {
+ start += len
+ if (start < 0) start = 0
+ } else if (start > len) {
+ start = len
+ }
+
+ if (end < 0) {
+ end += len
+ if (end < 0) end = 0
+ } else if (end > len) {
+ end = len
+ }
+
+ if (end < start) end = start
+
+ var newBuf
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ newBuf = this.subarray(start, end)
+ newBuf.__proto__ = Buffer.prototype
+ } else {
+ var sliceLen = end - start
+ newBuf = new Buffer(sliceLen, undefined)
+ for (var i = 0; i < sliceLen; ++i) {
+ newBuf[i] = this[i + start]
+ }
+ }
+
+ return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length)
+ }
+
+ var val = this[offset + --byteLength]
+ var mul = 1
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return ((this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16)) +
+ (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] * 0x1000000) +
+ ((this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ this[offset + 3])
+}
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var i = byteLength
+ var mul = 1
+ var val = this[offset + --i]
+ while (i > 0 && (mul *= 0x100)) {
+ val += this[offset + --i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ if (!(this[offset] & 0x80)) return (this[offset])
+ return ((0xff - this[offset] + 1) * -1)
+}
+
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset] | (this[offset + 1] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset + 1] | (this[offset] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16) |
+ (this[offset + 3] << 24)
+}
+
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] << 24) |
+ (this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ (this[offset + 3])
+}
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+}
+
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ var mul = 1
+ var i = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ this[offset] = (value & 0xff)
+ return offset + 1
+}
+
+function objectWriteUInt16 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+ buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
+ (littleEndian ? i : 1 - i) * 8
+ }
+}
+
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+}
+
+function objectWriteUInt32 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffffffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+ buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
+ }
+}
+
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset + 3] = (value >>> 24)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 1] = (value >>> 8)
+ this[offset] = (value & 0xff)
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = 0
+ var mul = 1
+ var sub = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+ sub = 1
+ }
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ var sub = 0
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+ sub = 1
+ }
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ if (value < 0) value = 0xff + value + 1
+ this[offset] = (value & 0xff)
+ return offset + 1
+}
+
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 3] = (value >>> 24)
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (value < 0) value = 0xffffffff + value + 1
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+}
+
+function checkIEEE754 (buf, value, offset, ext, max, min) {
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+ if (offset < 0) throw new RangeError('Index out of range')
+}
+
+function writeFloat (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
+ return offset + 4
+}
+
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, false, noAssert)
+}
+
+function writeDouble (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
+ return offset + 8
+}
+
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, false, noAssert)
+}
+
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (!start) start = 0
+ if (!end && end !== 0) end = this.length
+ if (targetStart >= target.length) targetStart = target.length
+ if (!targetStart) targetStart = 0
+ if (end > 0 && end < start) end = start
+
+ // Copy 0 bytes; we're done
+ if (end === start) return 0
+ if (target.length === 0 || this.length === 0) return 0
+
+ // Fatal error conditions
+ if (targetStart < 0) {
+ throw new RangeError('targetStart out of bounds')
+ }
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+ // Are we oob?
+ if (end > this.length) end = this.length
+ if (target.length - targetStart < end - start) {
+ end = target.length - targetStart + start
+ }
+
+ var len = end - start
+ var i
+
+ if (this === target && start < targetStart && targetStart < end) {
+ // descending copy from end
+ for (i = len - 1; i >= 0; --i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+ // ascending copy from start
+ for (i = 0; i < len; ++i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else {
+ Uint8Array.prototype.set.call(
+ target,
+ this.subarray(start, start + len),
+ targetStart
+ )
+ }
+
+ return len
+}
+
+// Usage:
+// buffer.fill(number[, offset[, end]])
+// buffer.fill(buffer[, offset[, end]])
+// buffer.fill(string[, offset[, end]][, encoding])
+Buffer.prototype.fill = function fill (val, start, end, encoding) {
+ // Handle string cases:
+ if (typeof val === 'string') {
+ if (typeof start === 'string') {
+ encoding = start
+ start = 0
+ end = this.length
+ } else if (typeof end === 'string') {
+ encoding = end
+ end = this.length
+ }
+ if (val.length === 1) {
+ var code = val.charCodeAt(0)
+ if (code < 256) {
+ val = code
+ }
+ }
+ if (encoding !== undefined && typeof encoding !== 'string') {
+ throw new TypeError('encoding must be a string')
+ }
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+ } else if (typeof val === 'number') {
+ val = val & 255
+ }
+
+ // Invalid ranges are not set to a default, so can range check early.
+ if (start < 0 || this.length < start || this.length < end) {
+ throw new RangeError('Out of range index')
+ }
+
+ if (end <= start) {
+ return this
+ }
+
+ start = start >>> 0
+ end = end === undefined ? this.length : end >>> 0
+
+ if (!val) val = 0
+
+ var i
+ if (typeof val === 'number') {
+ for (i = start; i < end; ++i) {
+ this[i] = val
+ }
+ } else {
+ var bytes = Buffer.isBuffer(val)
+ ? val
+ : utf8ToBytes(new Buffer(val, encoding).toString())
+ var len = bytes.length
+ for (i = 0; i < end - start; ++i) {
+ this[i + start] = bytes[i % len]
+ }
+ }
+
+ return this
+}
+
+// HELPER FUNCTIONS
+// ================
+
+var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
+
+function base64clean (str) {
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = stringtrim(str).replace(INVALID_BASE64_RE, '')
+ // Node converts strings with length < 2 to ''
+ if (str.length < 2) return ''
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '='
+ }
+ return str
+}
+
+function stringtrim (str) {
+ if (str.trim) return str.trim()
+ return str.replace(/^\s+|\s+$/g, '')
+}
+
+function toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+}
+
+function utf8ToBytes (string, units) {
+ units = units || Infinity
+ var codePoint
+ var length = string.length
+ var leadSurrogate = null
+ var bytes = []
+
+ for (var i = 0; i < length; ++i) {
+ codePoint = string.charCodeAt(i)
+
+ // is surrogate component
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
+ // last char was a lead
+ if (!leadSurrogate) {
+ // no lead yet
+ if (codePoint > 0xDBFF) {
+ // unexpected trail
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else if (i + 1 === length) {
+ // unpaired lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ }
+
+ // valid lead
+ leadSurrogate = codePoint
+
+ continue
+ }
+
+ // 2 leads in a row
+ if (codePoint < 0xDC00) {
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = codePoint
+ continue
+ }
+
+ // valid surrogate pair
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
+ } else if (leadSurrogate) {
+ // valid bmp char, but last char was a lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ }
+
+ leadSurrogate = null
+
+ // encode utf8
+ if (codePoint < 0x80) {
+ if ((units -= 1) < 0) break
+ bytes.push(codePoint)
+ } else if (codePoint < 0x800) {
+ if ((units -= 2) < 0) break
+ bytes.push(
+ codePoint >> 0x6 | 0xC0,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x10000) {
+ if ((units -= 3) < 0) break
+ bytes.push(
+ codePoint >> 0xC | 0xE0,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x110000) {
+ if ((units -= 4) < 0) break
+ bytes.push(
+ codePoint >> 0x12 | 0xF0,
+ codePoint >> 0xC & 0x3F | 0x80,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else {
+ throw new Error('Invalid code point')
+ }
+ }
+
+ return bytes
+}
+
+function asciiToBytes (str) {
+ var byteArray = []
+ for (var i = 0; i < str.length; ++i) {
+ // Node's code seems to be doing this and not & 0x7F..
+ byteArray.push(str.charCodeAt(i) & 0xFF)
+ }
+ return byteArray
+}
+
+function utf16leToBytes (str, units) {
+ var c, hi, lo
+ var byteArray = []
+ for (var i = 0; i < str.length; ++i) {
+ if ((units -= 2) < 0) break
+
+ c = str.charCodeAt(i)
+ hi = c >> 8
+ lo = c % 256
+ byteArray.push(lo)
+ byteArray.push(hi)
+ }
+
+ return byteArray
+}
+
+function base64ToBytes (str) {
+ return base64.toByteArray(base64clean(str))
+}
+
+function blitBuffer (src, dst, offset, length) {
+ for (var i = 0; i < length; ++i) {
+ if ((i + offset >= dst.length) || (i >= src.length)) break
+ dst[i + offset] = src[i]
+ }
+ return i
+}
+
+function isnan (val) {
+ return val !== val // eslint-disable-line no-self-compare
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+
+
+/**/
+
+var pna = __webpack_require__(6);
+/**/
+
+/**/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/**/
+
+module.exports = Duplex;
+
+/**/
+var util = __webpack_require__(4);
+util.inherits = __webpack_require__(5);
+/**/
+
+var Readable = __webpack_require__(15);
+var Writable = __webpack_require__(18);
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+};
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
+ }
+ return objectToString(arg) === '[object Array]';
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = Buffer.isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2).Buffer))
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {
+
+if (!process.version ||
+ process.version.indexOf('v0.') === 0 ||
+ process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
+ module.exports = { nextTick: nextTick };
+} else {
+ module.exports = process
+}
+
+function nextTick(fn, arg1, arg2, arg3) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('"callback" argument must be a function');
+ }
+ var len = arguments.length;
+ var args, i;
+ switch (len) {
+ case 0:
+ case 1:
+ return process.nextTick(fn);
+ case 2:
+ return process.nextTick(function afterTickOne() {
+ fn.call(null, arg1);
+ });
+ case 3:
+ return process.nextTick(function afterTickTwo() {
+ fn.call(null, arg1, arg2);
+ });
+ case 4:
+ return process.nextTick(function afterTickThree() {
+ fn.call(null, arg1, arg2, arg3);
+ });
+ default:
+ args = new Array(len - 1);
+ i = 0;
+ while (i < args.length) {
+ args[i++] = arguments[i];
+ }
+ return process.nextTick(function afterTick() {
+ fn.apply(null, args);
+ });
+ }
+}
+
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+var punycode = __webpack_require__(30);
+var util = __webpack_require__(32);
+
+exports.parse = urlParse;
+exports.resolve = urlResolve;
+exports.resolveObject = urlResolveObject;
+exports.format = urlFormat;
+
+exports.Url = Url;
+
+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;
+}
+
+// Reference: RFC 3986, RFC 1808, RFC 2396
+
+// define these here so at least they only have to be
+// compiled once on the first module load.
+var protocolPattern = /^([a-z0-9.+-]+:)/i,
+ portPattern = /:[0-9]*$/,
+
+ // Special case for a simple path URL
+ simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
+
+ // RFC 2396: characters reserved for delimiting URLs.
+ // We actually just auto-escape these.
+ delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
+
+ // RFC 2396: characters not allowed for various reasons.
+ unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
+
+ // Allowed by RFCs, but cause of XSS attacks. Always escape these.
+ autoEscape = ['\''].concat(unwise),
+ // Characters that are never ever allowed in a hostname.
+ // Note that any invalid chars are also handled, but these
+ // are the ones that are *expected* to be seen, so we fast-path
+ // them.
+ nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
+ hostEndingChars = ['/', '?', '#'],
+ hostnameMaxLen = 255,
+ hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
+ hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
+ // protocols that can allow "unsafe" and "unwise" chars.
+ unsafeProtocol = {
+ 'javascript': true,
+ 'javascript:': true
+ },
+ // protocols that never have a hostname.
+ hostlessProtocol = {
+ 'javascript': true,
+ 'javascript:': true
+ },
+ // protocols that always contain a // bit.
+ slashedProtocol = {
+ 'http': true,
+ 'https': true,
+ 'ftp': true,
+ 'gopher': true,
+ 'file': true,
+ 'http:': true,
+ 'https:': true,
+ 'ftp:': true,
+ 'gopher:': true,
+ 'file:': true
+ },
+ querystring = __webpack_require__(33);
+
+function urlParse(url, parseQueryString, slashesDenoteHost) {
+ if (url && util.isObject(url) && url instanceof Url) return url;
+
+ var u = new Url;
+ u.parse(url, parseQueryString, slashesDenoteHost);
+ return u;
+}
+
+Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
+ if (!util.isString(url)) {
+ throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
+ }
+
+ // Copy chrome, IE, opera backslash-handling behavior.
+ // Back slashes before the query string get converted to forward slashes
+ // See: https://code.google.com/p/chromium/issues/detail?id=25916
+ var queryIndex = url.indexOf('?'),
+ splitter =
+ (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
+ uSplit = url.split(splitter),
+ slashRegex = /\\/g;
+ uSplit[0] = uSplit[0].replace(slashRegex, '/');
+ url = uSplit.join(splitter);
+
+ var rest = url;
+
+ // trim before proceeding.
+ // This is to support parse stuff like " http://foo.com \n"
+ rest = rest.trim();
+
+ if (!slashesDenoteHost && url.split('#').length === 1) {
+ // Try fast path regexp
+ var simplePath = simplePathPattern.exec(rest);
+ if (simplePath) {
+ this.path = rest;
+ this.href = rest;
+ this.pathname = simplePath[1];
+ if (simplePath[2]) {
+ this.search = simplePath[2];
+ if (parseQueryString) {
+ this.query = querystring.parse(this.search.substr(1));
+ } else {
+ this.query = this.search.substr(1);
+ }
+ } else if (parseQueryString) {
+ this.search = '';
+ this.query = {};
+ }
+ return this;
+ }
+ }
+
+ var proto = protocolPattern.exec(rest);
+ if (proto) {
+ proto = proto[0];
+ var lowerProto = proto.toLowerCase();
+ this.protocol = lowerProto;
+ rest = rest.substr(proto.length);
+ }
+
+ // figure out if it's got a host
+ // user@server is *always* interpreted as a hostname, and url
+ // resolution will treat //foo/bar as host=foo,path=bar because that's
+ // how the browser resolves relative URLs.
+ if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
+ var slashes = rest.substr(0, 2) === '//';
+ if (slashes && !(proto && hostlessProtocol[proto])) {
+ rest = rest.substr(2);
+ this.slashes = true;
+ }
+ }
+
+ if (!hostlessProtocol[proto] &&
+ (slashes || (proto && !slashedProtocol[proto]))) {
+
+ // there's a hostname.
+ // the first instance of /, ?, ;, or # ends the host.
+ //
+ // If there is an @ in the hostname, then non-host chars *are* allowed
+ // to the left of the last @ sign, unless some host-ending character
+ // comes *before* the @-sign.
+ // URLs are obnoxious.
+ //
+ // ex:
+ // http://a@b@c/ => user:a@b host:c
+ // http://a@b?@c => user:a host:c path:/?@c
+
+ // v0.12 TODO(isaacs): This is not quite how Chrome does things.
+ // Review our test case against browsers more comprehensively.
+
+ // find the first instance of any hostEndingChars
+ var hostEnd = -1;
+ for (var i = 0; i < hostEndingChars.length; i++) {
+ var hec = rest.indexOf(hostEndingChars[i]);
+ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+ hostEnd = hec;
+ }
+
+ // at this point, either we have an explicit point where the
+ // auth portion cannot go past, or the last @ char is the decider.
+ var auth, atSign;
+ if (hostEnd === -1) {
+ // atSign can be anywhere.
+ atSign = rest.lastIndexOf('@');
+ } else {
+ // atSign must be in auth portion.
+ // http://a@b/c@d => host:b auth:a path:/c@d
+ atSign = rest.lastIndexOf('@', hostEnd);
+ }
+
+ // Now we have a portion which is definitely the auth.
+ // Pull that off.
+ if (atSign !== -1) {
+ auth = rest.slice(0, atSign);
+ rest = rest.slice(atSign + 1);
+ this.auth = decodeURIComponent(auth);
+ }
+
+ // the host is the remaining to the left of the first non-host char
+ hostEnd = -1;
+ for (var i = 0; i < nonHostChars.length; i++) {
+ var hec = rest.indexOf(nonHostChars[i]);
+ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+ hostEnd = hec;
+ }
+ // if we still have not hit it, then the entire thing is a host.
+ if (hostEnd === -1)
+ hostEnd = rest.length;
+
+ this.host = rest.slice(0, hostEnd);
+ rest = rest.slice(hostEnd);
+
+ // pull out port.
+ this.parseHost();
+
+ // we've indicated that there is a hostname,
+ // so even if it's empty, it has to be present.
+ this.hostname = this.hostname || '';
+
+ // if hostname begins with [ and ends with ]
+ // assume that it's an IPv6 address.
+ var ipv6Hostname = this.hostname[0] === '[' &&
+ this.hostname[this.hostname.length - 1] === ']';
+
+ // validate a little.
+ if (!ipv6Hostname) {
+ var hostparts = this.hostname.split(/\./);
+ for (var i = 0, l = hostparts.length; i < l; i++) {
+ var part = hostparts[i];
+ if (!part) continue;
+ if (!part.match(hostnamePartPattern)) {
+ var newpart = '';
+ for (var j = 0, k = part.length; j < k; j++) {
+ if (part.charCodeAt(j) > 127) {
+ // we replace non-ASCII char with a temporary placeholder
+ // we need this to make sure size of hostname is not
+ // broken by replacing non-ASCII by nothing
+ newpart += 'x';
+ } else {
+ newpart += part[j];
+ }
+ }
+ // we test again with ASCII char only
+ if (!newpart.match(hostnamePartPattern)) {
+ var validParts = hostparts.slice(0, i);
+ var notHost = hostparts.slice(i + 1);
+ var bit = part.match(hostnamePartStart);
+ if (bit) {
+ validParts.push(bit[1]);
+ notHost.unshift(bit[2]);
+ }
+ if (notHost.length) {
+ rest = '/' + notHost.join('.') + rest;
+ }
+ this.hostname = validParts.join('.');
+ break;
+ }
+ }
+ }
+ }
+
+ if (this.hostname.length > hostnameMaxLen) {
+ this.hostname = '';
+ } else {
+ // hostnames are always lower case.
+ this.hostname = this.hostname.toLowerCase();
+ }
+
+ if (!ipv6Hostname) {
+ // IDNA Support: Returns a punycoded representation of "domain".
+ // It only converts parts of the domain name that
+ // have non-ASCII characters, i.e. it doesn't matter if
+ // you call it with a domain that already is ASCII-only.
+ this.hostname = punycode.toASCII(this.hostname);
+ }
+
+ var p = this.port ? ':' + this.port : '';
+ var h = this.hostname || '';
+ this.host = h + p;
+ this.href += this.host;
+
+ // strip [ and ] from the hostname
+ // the host field still retains them, though
+ if (ipv6Hostname) {
+ this.hostname = this.hostname.substr(1, this.hostname.length - 2);
+ if (rest[0] !== '/') {
+ rest = '/' + rest;
+ }
+ }
+ }
+
+ // now rest is set to the post-host stuff.
+ // chop off any delim chars.
+ if (!unsafeProtocol[lowerProto]) {
+
+ // First, make 100% sure that any "autoEscape" chars get
+ // escaped, even if encodeURIComponent doesn't think they
+ // need to be.
+ for (var i = 0, l = autoEscape.length; i < l; i++) {
+ var ae = autoEscape[i];
+ if (rest.indexOf(ae) === -1)
+ continue;
+ var esc = encodeURIComponent(ae);
+ if (esc === ae) {
+ esc = escape(ae);
+ }
+ rest = rest.split(ae).join(esc);
+ }
+ }
+
+
+ // chop off from the tail first.
+ var hash = rest.indexOf('#');
+ if (hash !== -1) {
+ // got a fragment string.
+ this.hash = rest.substr(hash);
+ rest = rest.slice(0, hash);
+ }
+ var qm = rest.indexOf('?');
+ if (qm !== -1) {
+ this.search = rest.substr(qm);
+ this.query = rest.substr(qm + 1);
+ if (parseQueryString) {
+ this.query = querystring.parse(this.query);
+ }
+ rest = rest.slice(0, qm);
+ } else if (parseQueryString) {
+ // no query string, but parseQueryString still requested
+ this.search = '';
+ this.query = {};
+ }
+ if (rest) this.pathname = rest;
+ if (slashedProtocol[lowerProto] &&
+ this.hostname && !this.pathname) {
+ this.pathname = '/';
+ }
+
+ //to support http.request
+ if (this.pathname || this.search) {
+ var p = this.pathname || '';
+ var s = this.search || '';
+ this.path = p + s;
+ }
+
+ // finally, reconstruct the href based on what has been validated.
+ this.href = this.format();
+ return this;
+};
+
+// format a parsed object into a url string
+function urlFormat(obj) {
+ // ensure it's an object, and not a string url.
+ // If it's an obj, this is a no-op.
+ // this way, you can call url_format() on strings
+ // to clean up potentially wonky urls.
+ if (util.isString(obj)) obj = urlParse(obj);
+ if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
+ return obj.format();
+}
+
+Url.prototype.format = function() {
+ var auth = this.auth || '';
+ if (auth) {
+ auth = encodeURIComponent(auth);
+ auth = auth.replace(/%3A/i, ':');
+ auth += '@';
+ }
+
+ var protocol = this.protocol || '',
+ pathname = this.pathname || '',
+ hash = this.hash || '',
+ host = false,
+ query = '';
+
+ if (this.host) {
+ host = auth + this.host;
+ } else if (this.hostname) {
+ host = auth + (this.hostname.indexOf(':') === -1 ?
+ this.hostname :
+ '[' + this.hostname + ']');
+ if (this.port) {
+ host += ':' + this.port;
+ }
+ }
+
+ if (this.query &&
+ util.isObject(this.query) &&
+ Object.keys(this.query).length) {
+ query = querystring.stringify(this.query);
+ }
+
+ var search = this.search || (query && ('?' + query)) || '';
+
+ if (protocol && protocol.substr(-1) !== ':') protocol += ':';
+
+ // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
+ // unless they had them to begin with.
+ if (this.slashes ||
+ (!protocol || slashedProtocol[protocol]) && host !== false) {
+ host = '//' + (host || '');
+ if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
+ } else if (!host) {
+ host = '';
+ }
+
+ if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
+ if (search && search.charAt(0) !== '?') search = '?' + search;
+
+ pathname = pathname.replace(/[?#]/g, function(match) {
+ return encodeURIComponent(match);
+ });
+ search = search.replace('#', '%23');
+
+ return protocol + host + pathname + search + hash;
+};
+
+function urlResolve(source, relative) {
+ return urlParse(source, false, true).resolve(relative);
+}
+
+Url.prototype.resolve = function(relative) {
+ return this.resolveObject(urlParse(relative, false, true)).format();
+};
+
+function urlResolveObject(source, relative) {
+ if (!source) return relative;
+ return urlParse(source, false, true).resolveObject(relative);
+}
+
+Url.prototype.resolveObject = function(relative) {
+ if (util.isString(relative)) {
+ var rel = new Url();
+ rel.parse(relative, false, true);
+ relative = rel;
+ }
+
+ var result = new Url();
+ var tkeys = Object.keys(this);
+ for (var tk = 0; tk < tkeys.length; tk++) {
+ var tkey = tkeys[tk];
+ result[tkey] = this[tkey];
+ }
+
+ // hash is always overridden, no matter what.
+ // even href="" will remove it.
+ result.hash = relative.hash;
+
+ // if the relative url is empty, then there's nothing left to do here.
+ if (relative.href === '') {
+ result.href = result.format();
+ return result;
+ }
+
+ // hrefs like //foo/bar always cut to the protocol.
+ if (relative.slashes && !relative.protocol) {
+ // take everything except the protocol from relative
+ var rkeys = Object.keys(relative);
+ for (var rk = 0; rk < rkeys.length; rk++) {
+ var rkey = rkeys[rk];
+ if (rkey !== 'protocol')
+ result[rkey] = relative[rkey];
+ }
+
+ //urlParse appends trailing / to urls like http://www.example.com
+ if (slashedProtocol[result.protocol] &&
+ result.hostname && !result.pathname) {
+ result.path = result.pathname = '/';
+ }
+
+ result.href = result.format();
+ return result;
+ }
+
+ if (relative.protocol && relative.protocol !== result.protocol) {
+ // if it's a known url protocol, then changing
+ // the protocol does weird things
+ // first, if it's not file:, then we MUST have a host,
+ // and if there was a path
+ // to begin with, then we MUST have a path.
+ // if it is file:, then the host is dropped,
+ // because that's known to be hostless.
+ // anything else is assumed to be absolute.
+ if (!slashedProtocol[relative.protocol]) {
+ var keys = Object.keys(relative);
+ for (var v = 0; v < keys.length; v++) {
+ var k = keys[v];
+ result[k] = relative[k];
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ result.protocol = relative.protocol;
+ if (!relative.host && !hostlessProtocol[relative.protocol]) {
+ var relPath = (relative.pathname || '').split('/');
+ while (relPath.length && !(relative.host = relPath.shift()));
+ if (!relative.host) relative.host = '';
+ if (!relative.hostname) relative.hostname = '';
+ if (relPath[0] !== '') relPath.unshift('');
+ if (relPath.length < 2) relPath.unshift('');
+ result.pathname = relPath.join('/');
+ } else {
+ result.pathname = relative.pathname;
+ }
+ result.search = relative.search;
+ result.query = relative.query;
+ result.host = relative.host || '';
+ result.auth = relative.auth;
+ result.hostname = relative.hostname || relative.host;
+ result.port = relative.port;
+ // to support http.request
+ if (result.pathname || result.search) {
+ var p = result.pathname || '';
+ var s = result.search || '';
+ result.path = p + s;
+ }
+ result.slashes = result.slashes || relative.slashes;
+ result.href = result.format();
+ return result;
+ }
+
+ var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
+ isRelAbs = (
+ relative.host ||
+ relative.pathname && relative.pathname.charAt(0) === '/'
+ ),
+ mustEndAbs = (isRelAbs || isSourceAbs ||
+ (result.host && relative.pathname)),
+ removeAllDots = mustEndAbs,
+ srcPath = result.pathname && result.pathname.split('/') || [],
+ relPath = relative.pathname && relative.pathname.split('/') || [],
+ psychotic = result.protocol && !slashedProtocol[result.protocol];
+
+ // if the url is a non-slashed url, then relative
+ // links like ../.. should be able
+ // to crawl up to the hostname, as well. This is strange.
+ // result.protocol has already been set by now.
+ // Later on, put the first path part into the host field.
+ if (psychotic) {
+ result.hostname = '';
+ result.port = null;
+ if (result.host) {
+ if (srcPath[0] === '') srcPath[0] = result.host;
+ else srcPath.unshift(result.host);
+ }
+ result.host = '';
+ if (relative.protocol) {
+ relative.hostname = null;
+ relative.port = null;
+ if (relative.host) {
+ if (relPath[0] === '') relPath[0] = relative.host;
+ else relPath.unshift(relative.host);
+ }
+ relative.host = null;
+ }
+ mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
+ }
+
+ if (isRelAbs) {
+ // it's absolute.
+ result.host = (relative.host || relative.host === '') ?
+ relative.host : result.host;
+ result.hostname = (relative.hostname || relative.hostname === '') ?
+ relative.hostname : result.hostname;
+ result.search = relative.search;
+ result.query = relative.query;
+ srcPath = relPath;
+ // fall through to the dot-handling below.
+ } else if (relPath.length) {
+ // it's relative
+ // throw away the existing file, and take the new path instead.
+ if (!srcPath) srcPath = [];
+ srcPath.pop();
+ srcPath = srcPath.concat(relPath);
+ result.search = relative.search;
+ result.query = relative.query;
+ } else if (!util.isNullOrUndefined(relative.search)) {
+ // just pull out the search.
+ // like href='?foo'.
+ // Put this after the other two cases because it simplifies the booleans
+ if (psychotic) {
+ result.hostname = result.host = srcPath.shift();
+ //occationaly the auth can get stuck only in host
+ //this especially happens in cases like
+ //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+ var authInHost = result.host && result.host.indexOf('@') > 0 ?
+ result.host.split('@') : false;
+ if (authInHost) {
+ result.auth = authInHost.shift();
+ result.host = result.hostname = authInHost.shift();
+ }
+ }
+ result.search = relative.search;
+ result.query = relative.query;
+ //to support http.request
+ if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+ result.path = (result.pathname ? result.pathname : '') +
+ (result.search ? result.search : '');
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ if (!srcPath.length) {
+ // no path at all. easy.
+ // we've already handled the other stuff above.
+ result.pathname = null;
+ //to support http.request
+ if (result.search) {
+ result.path = '/' + result.search;
+ } else {
+ result.path = null;
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ // if a url ENDs in . or .., then it must get a trailing slash.
+ // however, if it ends in anything else non-slashy,
+ // then it must NOT get a trailing slash.
+ var last = srcPath.slice(-1)[0];
+ var hasTrailingSlash = (
+ (result.host || relative.host || srcPath.length > 1) &&
+ (last === '.' || last === '..') || last === '');
+
+ // strip single dots, resolve double dots to parent dir
+ // if the path tries to go above the root, `up` ends up > 0
+ var up = 0;
+ for (var i = srcPath.length; i >= 0; i--) {
+ last = srcPath[i];
+ if (last === '.') {
+ srcPath.splice(i, 1);
+ } else if (last === '..') {
+ srcPath.splice(i, 1);
+ up++;
+ } else if (up) {
+ srcPath.splice(i, 1);
+ up--;
+ }
+ }
+
+ // if the path is allowed to go above the root, restore leading ..s
+ if (!mustEndAbs && !removeAllDots) {
+ for (; up--; up) {
+ srcPath.unshift('..');
+ }
+ }
+
+ if (mustEndAbs && srcPath[0] !== '' &&
+ (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
+ srcPath.unshift('');
+ }
+
+ if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
+ srcPath.push('');
+ }
+
+ var isAbsolute = srcPath[0] === '' ||
+ (srcPath[0] && srcPath[0].charAt(0) === '/');
+
+ // put the host back
+ if (psychotic) {
+ result.hostname = result.host = isAbsolute ? '' :
+ srcPath.length ? srcPath.shift() : '';
+ //occationaly the auth can get stuck only in host
+ //this especially happens in cases like
+ //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+ var authInHost = result.host && result.host.indexOf('@') > 0 ?
+ result.host.split('@') : false;
+ if (authInHost) {
+ result.auth = authInHost.shift();
+ result.host = result.hostname = authInHost.shift();
+ }
+ }
+
+ mustEndAbs = mustEndAbs || (result.host && srcPath.length);
+
+ if (mustEndAbs && !isAbsolute) {
+ srcPath.unshift('');
+ }
+
+ if (!srcPath.length) {
+ result.pathname = null;
+ result.path = null;
+ } else {
+ result.pathname = srcPath.join('/');
+ }
+
+ //to support request.http
+ if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+ result.path = (result.pathname ? result.pathname : '') +
+ (result.search ? result.search : '');
+ }
+ result.auth = relative.auth || result.auth;
+ result.slashes = result.slashes || relative.slashes;
+ result.href = result.format();
+ return result;
+};
+
+Url.prototype.parseHost = function() {
+ var host = this.host;
+ var port = portPattern.exec(host);
+ if (port) {
+ port = port[0];
+ if (port !== ':') {
+ this.port = port.substr(1);
+ }
+ host = host.substr(0, host.length - port.length);
+ }
+ if (host) this.hostname = host;
+};
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+
+// Backwards-compat with node 0.10.x
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+
+// By default EventEmitters will print a warning if more than 10 listeners are
+// added to it. This is a useful default which helps finding memory leaks.
+EventEmitter.defaultMaxListeners = 10;
+
+// Obviously not all Emitters should be limited to 10. This function allows
+// that to be increased. Set to zero for unlimited.
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ } else {
+ // At least give some kind of context to the user
+ var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
+ err.context = er;
+ throw err;
+ }
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ args = Array.prototype.slice.call(arguments, 1);
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ args = Array.prototype.slice.call(arguments, 1);
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+
+ // To avoid recursion in the case that type === "newListener"! Before
+ // adding it to the listeners, first emit "newListener".
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ else
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+
+ // Check for listener leak
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ // not supported in IE 10
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+
+// emits a 'removeListener' event iff the listener was removed
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+
+ // not listening for removeListener, no need to emit
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+
+ // emit removeListener for all listeners on all events
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else if (listeners) {
+ // LIFO order
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.prototype.listenerCount = function(type) {
+ if (this._events) {
+ var evlistener = this._events[type];
+
+ if (isFunction(evlistener))
+ return 1;
+ else if (evlistener)
+ return evlistener.length;
+ }
+ return 0;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ return emitter.listenerCount(type);
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* eslint-disable node/no-deprecated-api */
+var buffer = __webpack_require__(2)
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {var ClientRequest = __webpack_require__(37)
+var response = __webpack_require__(13)
+var extend = __webpack_require__(48)
+var statusCodes = __webpack_require__(49)
+var url = __webpack_require__(7)
+
+var http = exports
+
+http.request = function (opts, cb) {
+ if (typeof opts === 'string')
+ opts = url.parse(opts)
+ else
+ opts = extend(opts)
+
+ // Normally, the page is loaded from http or https, so not specifying a protocol
+ // will result in a (valid) protocol-relative url. However, this won't work if
+ // the protocol is something else, like 'file:'
+ var defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''
+
+ var protocol = opts.protocol || defaultProtocol
+ var host = opts.hostname || opts.host
+ var port = opts.port
+ var path = opts.path || '/'
+
+ // Necessary for IPv6 addresses
+ if (host && host.indexOf(':') !== -1)
+ host = '[' + host + ']'
+
+ // This may be a relative url. The browser should always be able to interpret it correctly.
+ opts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path
+ opts.method = (opts.method || 'GET').toUpperCase()
+ opts.headers = opts.headers || {}
+
+ // Also valid opts.auth, opts.mode
+
+ var req = new ClientRequest(opts)
+ if (cb)
+ req.on('response', cb)
+ return req
+}
+
+http.get = function get (opts, cb) {
+ var req = http.request(opts, cb)
+ req.end()
+ return req
+}
+
+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'
+]
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)
+
+exports.writableStream = isFunction(global.WritableStream)
+
+exports.abortController = isFunction(global.AbortController)
+
+exports.blobConstructor = false
+try {
+ new Blob([new ArrayBuffer(1)])
+ exports.blobConstructor = true
+} catch (e) {}
+
+// The xhr request to example.com may violate some restrictive CSP configurations,
+// so if we're running in a browser that supports `fetch`, avoid calling getXHR()
+// and assume support for certain features below.
+var xhr
+function getXHR () {
+ // Cache the xhr value
+ if (xhr !== undefined) return xhr
+
+ if (global.XMLHttpRequest) {
+ xhr = new global.XMLHttpRequest()
+ // If XDomainRequest is available (ie only, where xhr might not work
+ // cross domain), use the page location. Otherwise use example.com
+ // Note: this doesn't actually make an http request.
+ try {
+ xhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')
+ } catch(e) {
+ xhr = null
+ }
+ } else {
+ // Service workers don't have XHR
+ xhr = null
+ }
+ return xhr
+}
+
+function checkTypeSupport (type) {
+ var xhr = getXHR()
+ if (!xhr) return false
+ try {
+ xhr.responseType = type
+ return xhr.responseType === type
+ } catch (e) {}
+ return false
+}
+
+// For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'.
+// Safari 7.1 appears to have fixed this bug.
+var haveArrayBuffer = typeof global.ArrayBuffer !== 'undefined'
+var haveSlice = haveArrayBuffer && isFunction(global.ArrayBuffer.prototype.slice)
+
+// If fetch is supported, then arraybuffer will be supported too. Skip calling
+// checkTypeSupport(), since that calls getXHR().
+exports.arraybuffer = exports.fetch || (haveArrayBuffer && checkTypeSupport('arraybuffer'))
+
+// These next two tests unavoidably show warnings in Chrome. Since fetch will always
+// be used if it's available, just return false for these to avoid the warnings.
+exports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream')
+exports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer &&
+ checkTypeSupport('moz-chunked-arraybuffer')
+
+// If fetch is supported, then overrideMimeType will be supported too. Skip calling
+// getXHR().
+exports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)
+
+exports.vbArray = isFunction(global.VBArray)
+
+function isFunction (value) {
+ return typeof value === 'function'
+}
+
+xhr = null // Help gc
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports) {
+
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(process, Buffer, global) {var capability = __webpack_require__(11)
+var inherits = __webpack_require__(12)
+var stream = __webpack_require__(14)
+
+var rStates = exports.readyStates = {
+ UNSENT: 0,
+ OPENED: 1,
+ HEADERS_RECEIVED: 2,
+ LOADING: 3,
+ DONE: 4
+}
+
+var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, fetchTimer) {
+ var self = this
+ stream.Readable.call(self)
+
+ self._mode = mode
+ self.headers = {}
+ self.rawHeaders = []
+ self.trailers = {}
+ self.rawTrailers = []
+
+ // Fake the 'close' event, but only once 'end' fires
+ self.on('end', function () {
+ // The nextTick is necessary to prevent the 'request' module from causing an infinite loop
+ process.nextTick(function () {
+ self.emit('close')
+ })
+ })
+
+ if (mode === 'fetch') {
+ self._fetchResponse = response
+
+ self.url = response.url
+ self.statusCode = response.status
+ self.statusMessage = response.statusText
+
+ response.headers.forEach(function (header, key){
+ self.headers[key.toLowerCase()] = header
+ self.rawHeaders.push(key, header)
+ })
+
+ if (capability.writableStream) {
+ var writable = new WritableStream({
+ write: function (chunk) {
+ return new Promise(function (resolve, reject) {
+ if (self._destroyed) {
+ reject()
+ } else if(self.push(new Buffer(chunk))) {
+ resolve()
+ } else {
+ self._resumeFetch = resolve
+ }
+ })
+ },
+ close: function () {
+ global.clearTimeout(fetchTimer)
+ if (!self._destroyed)
+ self.push(null)
+ },
+ abort: function (err) {
+ if (!self._destroyed)
+ self.emit('error', err)
+ }
+ })
+
+ try {
+ response.body.pipeTo(writable).catch(function (err) {
+ global.clearTimeout(fetchTimer)
+ if (!self._destroyed)
+ self.emit('error', err)
+ })
+ return
+ } catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this
+ }
+ // fallback for when writableStream or pipeTo aren't available
+ var reader = response.body.getReader()
+ function read () {
+ reader.read().then(function (result) {
+ if (self._destroyed)
+ return
+ if (result.done) {
+ global.clearTimeout(fetchTimer)
+ self.push(null)
+ return
+ }
+ self.push(new Buffer(result.value))
+ read()
+ }).catch(function (err) {
+ global.clearTimeout(fetchTimer)
+ if (!self._destroyed)
+ self.emit('error', err)
+ })
+ }
+ read()
+ } else {
+ self._xhr = xhr
+ self._pos = 0
+
+ self.url = xhr.responseURL
+ self.statusCode = xhr.status
+ self.statusMessage = xhr.statusText
+ var headers = xhr.getAllResponseHeaders().split(/\r?\n/)
+ headers.forEach(function (header) {
+ var matches = header.match(/^([^:]+):\s*(.*)/)
+ if (matches) {
+ var key = matches[1].toLowerCase()
+ if (key === 'set-cookie') {
+ if (self.headers[key] === undefined) {
+ self.headers[key] = []
+ }
+ self.headers[key].push(matches[2])
+ } else if (self.headers[key] !== undefined) {
+ self.headers[key] += ', ' + matches[2]
+ } else {
+ self.headers[key] = matches[2]
+ }
+ self.rawHeaders.push(matches[1], matches[2])
+ }
+ })
+
+ self._charset = 'x-user-defined'
+ if (!capability.overrideMimeType) {
+ var mimeType = self.rawHeaders['mime-type']
+ if (mimeType) {
+ var charsetMatch = mimeType.match(/;\s*charset=([^;])(;|$)/)
+ if (charsetMatch) {
+ self._charset = charsetMatch[1].toLowerCase()
+ }
+ }
+ if (!self._charset)
+ self._charset = 'utf-8' // best guess
+ }
+ }
+}
+
+inherits(IncomingMessage, stream.Readable)
+
+IncomingMessage.prototype._read = function () {
+ var self = this
+
+ var resolve = self._resumeFetch
+ if (resolve) {
+ self._resumeFetch = null
+ resolve()
+ }
+}
+
+IncomingMessage.prototype._onXHRProgress = function () {
+ var self = this
+
+ var xhr = self._xhr
+
+ var response = null
+ switch (self._mode) {
+ case 'text:vbarray': // For IE9
+ if (xhr.readyState !== rStates.DONE)
+ break
+ try {
+ // This fails in IE8
+ response = new global.VBArray(xhr.responseBody).toArray()
+ } catch (e) {}
+ if (response !== null) {
+ self.push(new Buffer(response))
+ break
+ }
+ // Falls through in IE8
+ case 'text':
+ try { // This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4
+ response = xhr.responseText
+ } catch (e) {
+ self._mode = 'text:vbarray'
+ break
+ }
+ if (response.length > self._pos) {
+ var newData = response.substr(self._pos)
+ if (self._charset === 'x-user-defined') {
+ var buffer = new Buffer(newData.length)
+ for (var i = 0; i < newData.length; i++)
+ buffer[i] = newData.charCodeAt(i) & 0xff
+
+ self.push(buffer)
+ } else {
+ self.push(newData, self._charset)
+ }
+ self._pos = response.length
+ }
+ break
+ case 'arraybuffer':
+ if (xhr.readyState !== rStates.DONE || !xhr.response)
+ break
+ response = xhr.response
+ self.push(new Buffer(new Uint8Array(response)))
+ break
+ case 'moz-chunked-arraybuffer': // take whole
+ response = xhr.response
+ if (xhr.readyState !== rStates.LOADING || !response)
+ break
+ self.push(new Buffer(new Uint8Array(response)))
+ break
+ case 'ms-stream':
+ response = xhr.response
+ if (xhr.readyState !== rStates.LOADING)
+ break
+ var reader = new global.MSStreamReader()
+ reader.onprogress = function () {
+ if (reader.result.byteLength > self._pos) {
+ self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))))
+ self._pos = reader.result.byteLength
+ }
+ }
+ reader.onload = function () {
+ self.push(null)
+ }
+ // reader.onerror = ??? // TODO: this
+ reader.readAsArrayBuffer(response)
+ break
+ }
+
+ // The ms-stream case handles end separately in reader.onload()
+ if (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {
+ self.push(null)
+ }
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(2).Buffer, __webpack_require__(0)))
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+exports = module.exports = __webpack_require__(15);
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = __webpack_require__(18);
+exports.Duplex = __webpack_require__(3);
+exports.Transform = __webpack_require__(20);
+exports.PassThrough = __webpack_require__(46);
+
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+/**/
+
+var pna = __webpack_require__(6);
+/**/
+
+module.exports = Readable;
+
+/**/
+var isArray = __webpack_require__(38);
+/**/
+
+/**/
+var Duplex;
+/**/
+
+Readable.ReadableState = ReadableState;
+
+/**/
+var EE = __webpack_require__(8).EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/**/
+
+/**/
+var Stream = __webpack_require__(16);
+/**/
+
+/**/
+
+var Buffer = __webpack_require__(9).Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/**/
+
+/**/
+var util = __webpack_require__(4);
+util.inherits = __webpack_require__(5);
+/**/
+
+/**/
+var debugUtil = __webpack_require__(39);
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/**/
+
+var BufferList = __webpack_require__(40);
+var destroyImpl = __webpack_require__(17);
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || __webpack_require__(3);
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = __webpack_require__(19).StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || __webpack_require__(3);
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = __webpack_require__(19).StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(8).EventEmitter;
+
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**/
+
+var pna = __webpack_require__(6);
+/**/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+};
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+
+
+/**/
+
+var pna = __webpack_require__(6);
+/**/
+
+module.exports = Writable;
+
+/* */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* */
+
+/**/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/**/
+
+/**/
+var Duplex;
+/**/
+
+Writable.WritableState = WritableState;
+
+/**/
+var util = __webpack_require__(4);
+util.inherits = __webpack_require__(5);
+/**/
+
+/**/
+var internalUtil = {
+ deprecate: __webpack_require__(44)
+};
+/**/
+
+/**/
+var Stream = __webpack_require__(16);
+/**/
+
+/**/
+
+var Buffer = __webpack_require__(9).Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/**/
+
+var destroyImpl = __webpack_require__(17);
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || __webpack_require__(3);
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || __webpack_require__(3);
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /**/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /**/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+};
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(42).setImmediate, __webpack_require__(0)))
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+/**/
+
+var Buffer = __webpack_require__(45).Buffer;
+/**/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.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 true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ 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 enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+}
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+
+
+module.exports = Transform;
+
+var Duplex = __webpack_require__(3);
+
+/**/
+var util = __webpack_require__(4);
+util.inherits = __webpack_require__(5);
+/**/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+}
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var EventSource = __webpack_require__(22)
+
+if (typeof window === 'object') {
+ window.EventSourcePolyfill = EventSource
+ if (!window.EventSource) window.EventSource = EventSource
+ module.exports = window.EventSource
+} else {
+ module.exports = EventSource
+}
+
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(process, Buffer) {var original = __webpack_require__(26)
+var parse = __webpack_require__(7).parse
+var events = __webpack_require__(8)
+var https = __webpack_require__(36)
+var http = __webpack_require__(10)
+var util = __webpack_require__(50)
+
+var httpsOptions = [
+ 'pfx', 'key', 'passphrase', 'cert', 'ca', 'ciphers',
+ 'rejectUnauthorized', 'secureProtocol', 'servername'
+]
+
+var bom = [239, 187, 191]
+var colon = 58
+var space = 32
+var lineFeed = 10
+var carriageReturn = 13
+
+function hasBom (buf) {
+ return bom.every(function (charCode, index) {
+ return buf[index] === charCode
+ })
+}
+
+/**
+ * Creates a new EventSource object
+ *
+ * @param {String} url the URL to which to connect
+ * @param {Object} [eventSourceInitDict] extra init params. See README for details.
+ * @api public
+ **/
+function EventSource (url, eventSourceInitDict) {
+ var readyState = EventSource.CONNECTING
+ Object.defineProperty(this, 'readyState', {
+ get: function () {
+ return readyState
+ }
+ })
+
+ Object.defineProperty(this, 'url', {
+ get: function () {
+ return url
+ }
+ })
+
+ var self = this
+ self.reconnectInterval = 1000
+
+ function onConnectionClosed () {
+ if (readyState === EventSource.CLOSED) return
+ readyState = EventSource.CONNECTING
+ _emit('error', new Event('error'))
+
+ // The url may have been changed by a temporary
+ // redirect. If that's the case, revert it now.
+ if (reconnectUrl) {
+ url = reconnectUrl
+ reconnectUrl = null
+ }
+ setTimeout(function () {
+ if (readyState !== EventSource.CONNECTING) {
+ return
+ }
+ connect()
+ }, self.reconnectInterval)
+ }
+
+ var req
+ var lastEventId = ''
+ if (eventSourceInitDict && eventSourceInitDict.headers && eventSourceInitDict.headers['Last-Event-ID']) {
+ lastEventId = eventSourceInitDict.headers['Last-Event-ID']
+ delete eventSourceInitDict.headers['Last-Event-ID']
+ }
+
+ var discardTrailingNewline = false
+ var data = ''
+ var eventName = ''
+
+ var reconnectUrl = null
+
+ function connect () {
+ var options = parse(url)
+ var isSecure = options.protocol === 'https:'
+ options.headers = { 'Cache-Control': 'no-cache', 'Accept': 'text/event-stream' }
+ if (lastEventId) options.headers['Last-Event-ID'] = lastEventId
+ if (eventSourceInitDict && eventSourceInitDict.headers) {
+ for (var i in eventSourceInitDict.headers) {
+ var header = eventSourceInitDict.headers[i]
+ if (header) {
+ options.headers[i] = header
+ }
+ }
+ }
+
+ // Legacy: this should be specified as `eventSourceInitDict.https.rejectUnauthorized`,
+ // but for now exists as a backwards-compatibility layer
+ options.rejectUnauthorized = !(eventSourceInitDict && !eventSourceInitDict.rejectUnauthorized)
+
+ // If specify http proxy, make the request to sent to the proxy server,
+ // and include the original url in path and Host headers
+ var useProxy = eventSourceInitDict && eventSourceInitDict.proxy
+ if (useProxy) {
+ var proxy = parse(eventSourceInitDict.proxy)
+ isSecure = proxy.protocol === 'https:'
+
+ options.protocol = isSecure ? 'https:' : 'http:'
+ options.path = url
+ options.headers.Host = options.host
+ options.hostname = proxy.hostname
+ options.host = proxy.host
+ options.port = proxy.port
+ }
+
+ // If https options are specified, merge them into the request options
+ if (eventSourceInitDict && eventSourceInitDict.https) {
+ for (var optName in eventSourceInitDict.https) {
+ if (httpsOptions.indexOf(optName) === -1) {
+ continue
+ }
+
+ var option = eventSourceInitDict.https[optName]
+ if (option !== undefined) {
+ options[optName] = option
+ }
+ }
+ }
+
+ // Pass this on to the XHR
+ if (eventSourceInitDict && eventSourceInitDict.withCredentials !== undefined) {
+ options.withCredentials = eventSourceInitDict.withCredentials
+ }
+
+ req = (isSecure ? https : http).request(options, function (res) {
+ // Handle HTTP errors
+ if (res.statusCode === 500 || res.statusCode === 502 || res.statusCode === 503 || res.statusCode === 504) {
+ _emit('error', new Event('error', {status: res.statusCode}))
+ onConnectionClosed()
+ return
+ }
+
+ // Handle HTTP redirects
+ if (res.statusCode === 301 || res.statusCode === 307) {
+ if (!res.headers.location) {
+ // Server sent redirect response without Location header.
+ _emit('error', new Event('error', {status: res.statusCode}))
+ return
+ }
+ if (res.statusCode === 307) reconnectUrl = url
+ url = res.headers.location
+ process.nextTick(connect)
+ return
+ }
+
+ if (res.statusCode !== 200) {
+ _emit('error', new Event('error', {status: res.statusCode}))
+ return self.close()
+ }
+
+ readyState = EventSource.OPEN
+ res.on('close', function () {
+ res.removeAllListeners('close')
+ res.removeAllListeners('end')
+ onConnectionClosed()
+ })
+
+ res.on('end', function () {
+ res.removeAllListeners('close')
+ res.removeAllListeners('end')
+ onConnectionClosed()
+ })
+ _emit('open', new Event('open'))
+
+ // text/event-stream parser adapted from webkit's
+ // Source/WebCore/page/EventSource.cpp
+ var isFirst = true
+ var buf
+ res.on('data', function (chunk) {
+ buf = buf ? Buffer.concat([buf, chunk]) : chunk
+ if (isFirst && hasBom(buf)) {
+ buf = buf.slice(bom.length)
+ }
+
+ isFirst = false
+ var pos = 0
+ var length = buf.length
+
+ while (pos < length) {
+ if (discardTrailingNewline) {
+ if (buf[pos] === lineFeed) {
+ ++pos
+ }
+ discardTrailingNewline = false
+ }
+
+ var lineLength = -1
+ var fieldLength = -1
+ var c
+
+ for (var i = pos; lineLength < 0 && i < length; ++i) {
+ c = buf[i]
+ if (c === colon) {
+ if (fieldLength < 0) {
+ fieldLength = i - pos
+ }
+ } else if (c === carriageReturn) {
+ discardTrailingNewline = true
+ lineLength = i - pos
+ } else if (c === lineFeed) {
+ lineLength = i - pos
+ }
+ }
+
+ if (lineLength < 0) {
+ break
+ }
+
+ parseEventStreamLine(buf, pos, fieldLength, lineLength)
+
+ pos += lineLength + 1
+ }
+
+ if (pos === length) {
+ buf = void 0
+ } else if (pos > 0) {
+ buf = buf.slice(pos)
+ }
+ })
+ })
+
+ req.on('error', onConnectionClosed)
+ if (req.setNoDelay) req.setNoDelay(true)
+ req.end()
+ }
+
+ connect()
+
+ function _emit () {
+ if (self.listeners(arguments[0]).length > 0) {
+ self.emit.apply(self, arguments)
+ }
+ }
+
+ this._close = function () {
+ if (readyState === EventSource.CLOSED) return
+ readyState = EventSource.CLOSED
+ if (req.abort) req.abort()
+ if (req.xhr && req.xhr.abort) req.xhr.abort()
+ }
+
+ function parseEventStreamLine (buf, pos, fieldLength, lineLength) {
+ if (lineLength === 0) {
+ if (data.length > 0) {
+ var type = eventName || 'message'
+ _emit(type, new MessageEvent(type, {
+ data: data.slice(0, -1), // remove trailing newline
+ lastEventId: lastEventId,
+ origin: original(url)
+ }))
+ data = ''
+ }
+ eventName = void 0
+ } else if (fieldLength > 0) {
+ var noValue = fieldLength < 0
+ var step = 0
+ var field = buf.slice(pos, pos + (noValue ? lineLength : fieldLength)).toString()
+
+ if (noValue) {
+ step = lineLength
+ } else if (buf[pos + fieldLength + 1] !== space) {
+ step = fieldLength + 1
+ } else {
+ step = fieldLength + 2
+ }
+ pos += step
+
+ var valueLength = lineLength - step
+ var value = buf.slice(pos, pos + valueLength).toString()
+
+ if (field === 'data') {
+ data += value + '\n'
+ } else if (field === 'event') {
+ eventName = value
+ } else if (field === 'id') {
+ lastEventId = value
+ } else if (field === 'retry') {
+ var retry = parseInt(value, 10)
+ if (!Number.isNaN(retry)) {
+ self.reconnectInterval = retry
+ }
+ }
+ }
+ }
+}
+
+module.exports = EventSource
+
+util.inherits(EventSource, events.EventEmitter)
+EventSource.prototype.constructor = EventSource; // make stacktraces readable
+
+['open', 'error', 'message'].forEach(function (method) {
+ Object.defineProperty(EventSource.prototype, 'on' + method, {
+ /**
+ * Returns the current listener
+ *
+ * @return {Mixed} the set function or undefined
+ * @api private
+ */
+ get: function get () {
+ var listener = this.listeners(method)[0]
+ return listener ? (listener._listener ? listener._listener : listener) : undefined
+ },
+
+ /**
+ * Start listening for events
+ *
+ * @param {Function} listener the listener
+ * @return {Mixed} the set function or undefined
+ * @api private
+ */
+ set: function set (listener) {
+ this.removeAllListeners(method)
+ this.addEventListener(method, listener)
+ }
+ })
+})
+
+/**
+ * Ready states
+ */
+Object.defineProperty(EventSource, 'CONNECTING', {enumerable: true, value: 0})
+Object.defineProperty(EventSource, 'OPEN', {enumerable: true, value: 1})
+Object.defineProperty(EventSource, 'CLOSED', {enumerable: true, value: 2})
+
+EventSource.prototype.CONNECTING = 0
+EventSource.prototype.OPEN = 1
+EventSource.prototype.CLOSED = 2
+
+/**
+ * Closes the connection, if one is made, and sets the readyState attribute to 2 (closed)
+ *
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/close
+ * @api public
+ */
+EventSource.prototype.close = function () {
+ this._close()
+}
+
+/**
+ * Emulates the W3C Browser based WebSocket interface using addEventListener.
+ *
+ * @param {String} type A string representing the event type to listen out for
+ * @param {Function} listener callback
+ * @see https://developer.mozilla.org/en/DOM/element.addEventListener
+ * @see http://dev.w3.org/html5/websockets/#the-websocket-interface
+ * @api public
+ */
+EventSource.prototype.addEventListener = function addEventListener (type, listener) {
+ if (typeof listener === 'function') {
+ // store a reference so we can return the original function again
+ listener._listener = listener
+ this.on(type, listener)
+ }
+}
+
+/**
+ * Emulates the W3C Browser based WebSocket interface using removeEventListener.
+ *
+ * @param {String} type A string representing the event type to remove
+ * @param {Function} listener callback
+ * @see https://developer.mozilla.org/en/DOM/element.removeEventListener
+ * @see http://dev.w3.org/html5/websockets/#the-websocket-interface
+ * @api public
+ */
+EventSource.prototype.removeEventListener = function removeEventListener (type, listener) {
+ if (typeof listener === 'function') {
+ listener._listener = undefined
+ this.removeListener(type, listener)
+ }
+}
+
+/**
+ * W3C Event
+ *
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#interface-Event
+ * @api private
+ */
+function Event (type, optionalProperties) {
+ Object.defineProperty(this, 'type', { writable: false, value: type, enumerable: true })
+ if (optionalProperties) {
+ for (var f in optionalProperties) {
+ if (optionalProperties.hasOwnProperty(f)) {
+ Object.defineProperty(this, f, { writable: false, value: optionalProperties[f], enumerable: true })
+ }
+ }
+ }
+}
+
+/**
+ * W3C MessageEvent
+ *
+ * @see http://www.w3.org/TR/webmessaging/#event-definitions
+ * @api private
+ */
+function MessageEvent (type, eventInitDict) {
+ Object.defineProperty(this, 'type', { writable: false, value: type, enumerable: true })
+ for (var f in eventInitDict) {
+ if (eventInitDict.hasOwnProperty(f)) {
+ Object.defineProperty(this, f, { writable: false, value: eventInitDict[f], enumerable: true })
+ }
+ }
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(2).Buffer))
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+ var len = b64.length
+
+ if (len % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
+ }
+
+ // Trim off extra bytes after placeholder bytes are found
+ // See: https://github.com/beatgammit/base64-js/issues/42
+ var validLen = b64.indexOf('=')
+ if (validLen === -1) validLen = len
+
+ var placeHoldersLen = validLen === len
+ ? 0
+ : 4 - (validLen % 4)
+
+ return [validLen, placeHoldersLen]
+}
+
+// base64 is 4/3 + up to two characters of the original data
+function byteLength (b64) {
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function _byteLength (b64, validLen, placeHoldersLen) {
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function toByteArray (b64) {
+ var tmp
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
+
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
+
+ var curByte = 0
+
+ // if there are placeholders, only get up to the last complete 4 chars
+ var len = placeHoldersLen > 0
+ ? validLen - 4
+ : validLen
+
+ for (var i = 0; i < len; i += 4) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 18) |
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
+ revLookup[b64.charCodeAt(i + 3)]
+ arr[curByte++] = (tmp >> 16) & 0xFF
+ arr[curByte++] = (tmp >> 8) & 0xFF
+ arr[curByte++] = tmp & 0xFF
+ }
+
+ if (placeHoldersLen === 2) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 2) |
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[curByte++] = tmp & 0xFF
+ }
+
+ if (placeHoldersLen === 1) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 10) |
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
+ arr[curByte++] = (tmp >> 8) & 0xFF
+ arr[curByte++] = tmp & 0xFF
+ }
+
+ return arr
+}
+
+function tripletToBase64 (num) {
+ return lookup[num >> 18 & 0x3F] +
+ lookup[num >> 12 & 0x3F] +
+ lookup[num >> 6 & 0x3F] +
+ lookup[num & 0x3F]
+}
+
+function encodeChunk (uint8, start, end) {
+ var tmp
+ var output = []
+ for (var i = start; i < end; i += 3) {
+ tmp =
+ ((uint8[i] << 16) & 0xFF0000) +
+ ((uint8[i + 1] << 8) & 0xFF00) +
+ (uint8[i + 2] & 0xFF)
+ output.push(tripletToBase64(tmp))
+ }
+ return output.join('')
+}
+
+function fromByteArray (uint8) {
+ var tmp
+ var len = uint8.length
+ var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+ var parts = []
+ var maxChunkLength = 16383 // must be multiple of 3
+
+ // go through the array every three bytes, we'll deal with trailing stuff later
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+ parts.push(encodeChunk(
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
+ ))
+ }
+
+ // pad the end with zeros, but make sure to not forget the extra bytes
+ if (extraBytes === 1) {
+ tmp = uint8[len - 1]
+ parts.push(
+ lookup[tmp >> 2] +
+ lookup[(tmp << 4) & 0x3F] +
+ '=='
+ )
+ } else if (extraBytes === 2) {
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+ parts.push(
+ lookup[tmp >> 10] +
+ lookup[(tmp >> 4) & 0x3F] +
+ lookup[(tmp << 2) & 0x3F] +
+ '='
+ )
+ }
+
+ return parts.join('')
+}
+
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports) {
+
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = ((value * c) - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
+
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports) {
+
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
+
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var parse = __webpack_require__(27);
+
+/**
+ * Transform an URL to a valid origin value.
+ *
+ * @param {String|Object} url URL to transform to it's origin.
+ * @returns {String} The origin.
+ * @api public
+ */
+function origin(url) {
+ if ('string' === typeof url) url = parse(url);
+
+ //
+ // 6.2. ASCII Serialization of an Origin
+ // http://tools.ietf.org/html/rfc6454#section-6.2
+ //
+ if (!url.protocol || !url.hostname) return 'null';
+
+ //
+ // 4. Origin of a URI
+ // http://tools.ietf.org/html/rfc6454#section-4
+ //
+ // States that url.scheme, host should be converted to lower case. This also
+ // makes it easier to match origins as everything is just lower case.
+ //
+ return (url.protocol +'//'+ url.host).toLowerCase();
+}
+
+/**
+ * Check if the origins are the same.
+ *
+ * @param {String} a URL or origin of a.
+ * @param {String} b URL or origin of b.
+ * @returns {Boolean}
+ * @api public
+ */
+origin.same = function same(a, b) {
+ return origin(a) === origin(b);
+};
+
+//
+// Expose the origin
+//
+module.exports = origin;
+
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {
+
+var required = __webpack_require__(28)
+ , qs = __webpack_require__(29)
+ , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i
+ , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//;
+
+/**
+ * These are the parse rules for the URL parser, it informs the parser
+ * about:
+ *
+ * 0. The char it Needs to parse, if it's a string it should be done using
+ * indexOf, RegExp using exec and NaN means set as current value.
+ * 1. The property we should set when parsing this value.
+ * 2. Indication if it's backwards or forward parsing, when set as number it's
+ * the value of extra chars that should be split off.
+ * 3. Inherit from location if non existing in the parser.
+ * 4. `toLowerCase` the resulting value.
+ */
+var rules = [
+ ['#', 'hash'], // Extract from the back.
+ ['?', 'query'], // Extract from the back.
+ function sanitize(address) { // Sanitize what is left of the address
+ return address.replace('\\', '/');
+ },
+ ['/', 'pathname'], // Extract from the back.
+ ['@', 'auth', 1], // Extract from the front.
+ [NaN, 'host', undefined, 1, 1], // Set left over value.
+ [/:(\d+)$/, 'port', undefined, 1], // RegExp the back.
+ [NaN, 'hostname', undefined, 1, 1] // Set left over.
+];
+
+/**
+ * These properties should not be copied or inherited from. This is only needed
+ * for all non blob URL's as a blob URL does not include a hash, only the
+ * origin.
+ *
+ * @type {Object}
+ * @private
+ */
+var ignore = { hash: 1, query: 1 };
+
+/**
+ * The location object differs when your code is loaded through a normal page,
+ * Worker or through a worker using a blob. And with the blobble begins the
+ * trouble as the location object will contain the URL of the blob, not the
+ * location of the page where our code is loaded in. The actual origin is
+ * encoded in the `pathname` so we can thankfully generate a good "default"
+ * location from it so we can generate proper relative URL's again.
+ *
+ * @param {Object|String} loc Optional default location object.
+ * @returns {Object} lolcation object.
+ * @public
+ */
+function lolcation(loc) {
+ var location = global && global.location || {};
+ loc = loc || location;
+
+ var finaldestination = {}
+ , type = typeof loc
+ , key;
+
+ if ('blob:' === loc.protocol) {
+ finaldestination = new Url(unescape(loc.pathname), {});
+ } else if ('string' === type) {
+ finaldestination = new Url(loc, {});
+ for (key in ignore) delete finaldestination[key];
+ } else if ('object' === type) {
+ for (key in loc) {
+ if (key in ignore) continue;
+ finaldestination[key] = loc[key];
+ }
+
+ if (finaldestination.slashes === undefined) {
+ finaldestination.slashes = slashes.test(loc.href);
+ }
+ }
+
+ return finaldestination;
+}
+
+/**
+ * @typedef ProtocolExtract
+ * @type Object
+ * @property {String} protocol Protocol matched in the URL, in lowercase.
+ * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
+ * @property {String} rest Rest of the URL that is not part of the protocol.
+ */
+
+/**
+ * Extract protocol information from a URL with/without double slash ("//").
+ *
+ * @param {String} address URL we want to extract from.
+ * @return {ProtocolExtract} Extracted information.
+ * @private
+ */
+function extractProtocol(address) {
+ var match = protocolre.exec(address);
+
+ return {
+ protocol: match[1] ? match[1].toLowerCase() : '',
+ slashes: !!match[2],
+ rest: match[3]
+ };
+}
+
+/**
+ * Resolve a relative URL pathname against a base URL pathname.
+ *
+ * @param {String} relative Pathname of the relative URL.
+ * @param {String} base Pathname of the base URL.
+ * @return {String} Resolved pathname.
+ * @private
+ */
+function resolve(relative, base) {
+ var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))
+ , i = path.length
+ , last = path[i - 1]
+ , unshift = false
+ , up = 0;
+
+ while (i--) {
+ if (path[i] === '.') {
+ path.splice(i, 1);
+ } else if (path[i] === '..') {
+ path.splice(i, 1);
+ up++;
+ } else if (up) {
+ if (i === 0) unshift = true;
+ path.splice(i, 1);
+ up--;
+ }
+ }
+
+ if (unshift) path.unshift('');
+ if (last === '.' || last === '..') path.push('');
+
+ return path.join('/');
+}
+
+/**
+ * The actual URL instance. Instead of returning an object we've opted-in to
+ * create an actual constructor as it's much more memory efficient and
+ * faster and it pleases my OCD.
+ *
+ * It is worth noting that we should not use `URL` as class name to prevent
+ * clashes with the global URL instance that got introduced in browsers.
+ *
+ * @constructor
+ * @param {String} address URL we want to parse.
+ * @param {Object|String} location Location defaults for relative paths.
+ * @param {Boolean|Function} parser Parser for the query string.
+ * @private
+ */
+function Url(address, location, parser) {
+ if (!(this instanceof Url)) {
+ return new Url(address, location, parser);
+ }
+
+ var relative, extracted, parse, instruction, index, key
+ , instructions = rules.slice()
+ , type = typeof location
+ , url = this
+ , i = 0;
+
+ //
+ // The following if statements allows this module two have compatibility with
+ // 2 different API:
+ //
+ // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
+ // where the boolean indicates that the query string should also be parsed.
+ //
+ // 2. The `URL` interface of the browser which accepts a URL, object as
+ // arguments. The supplied object will be used as default values / fall-back
+ // for relative paths.
+ //
+ if ('object' !== type && 'string' !== type) {
+ parser = location;
+ location = null;
+ }
+
+ if (parser && 'function' !== typeof parser) parser = qs.parse;
+
+ location = lolcation(location);
+
+ //
+ // Extract protocol information before running the instructions.
+ //
+ extracted = extractProtocol(address || '');
+ relative = !extracted.protocol && !extracted.slashes;
+ url.slashes = extracted.slashes || relative && location.slashes;
+ url.protocol = extracted.protocol || location.protocol || '';
+ address = extracted.rest;
+
+ //
+ // When the authority component is absent the URL starts with a path
+ // component.
+ //
+ if (!extracted.slashes) instructions[3] = [/(.*)/, 'pathname'];
+
+ for (; i < instructions.length; i++) {
+ instruction = instructions[i];
+
+ if (typeof instruction === 'function') {
+ address = instruction(address);
+ continue;
+ }
+
+ parse = instruction[0];
+ key = instruction[1];
+
+ if (parse !== parse) {
+ url[key] = address;
+ } else if ('string' === typeof parse) {
+ if (~(index = address.indexOf(parse))) {
+ if ('number' === typeof instruction[2]) {
+ url[key] = address.slice(0, index);
+ address = address.slice(index + instruction[2]);
+ } else {
+ url[key] = address.slice(index);
+ address = address.slice(0, index);
+ }
+ }
+ } else if ((index = parse.exec(address))) {
+ url[key] = index[1];
+ address = address.slice(0, index.index);
+ }
+
+ url[key] = url[key] || (
+ relative && instruction[3] ? location[key] || '' : ''
+ );
+
+ //
+ // Hostname, host and protocol should be lowercased so they can be used to
+ // create a proper `origin`.
+ //
+ if (instruction[4]) url[key] = url[key].toLowerCase();
+ }
+
+ //
+ // Also parse the supplied query string in to an object. If we're supplied
+ // with a custom parser as function use that instead of the default build-in
+ // parser.
+ //
+ if (parser) url.query = parser(url.query);
+
+ //
+ // If the URL is relative, resolve the pathname against the base URL.
+ //
+ if (
+ relative
+ && location.slashes
+ && url.pathname.charAt(0) !== '/'
+ && (url.pathname !== '' || location.pathname !== '')
+ ) {
+ url.pathname = resolve(url.pathname, location.pathname);
+ }
+
+ //
+ // We should not add port numbers if they are already the default port number
+ // for a given protocol. As the host also contains the port number we're going
+ // override it with the hostname which contains no port number.
+ //
+ if (!required(url.port, url.protocol)) {
+ url.host = url.hostname;
+ url.port = '';
+ }
+
+ //
+ // Parse down the `auth` for the username and password.
+ //
+ url.username = url.password = '';
+ if (url.auth) {
+ instruction = url.auth.split(':');
+ url.username = instruction[0] || '';
+ url.password = instruction[1] || '';
+ }
+
+ url.origin = url.protocol && url.host && url.protocol !== 'file:'
+ ? url.protocol +'//'+ url.host
+ : 'null';
+
+ //
+ // The href is just the compiled result.
+ //
+ url.href = url.toString();
+}
+
+/**
+ * This is convenience method for changing properties in the URL instance to
+ * insure that they all propagate correctly.
+ *
+ * @param {String} part Property we need to adjust.
+ * @param {Mixed} value The newly assigned value.
+ * @param {Boolean|Function} fn When setting the query, it will be the function
+ * used to parse the query.
+ * When setting the protocol, double slash will be
+ * removed from the final url if it is true.
+ * @returns {URL} URL instance for chaining.
+ * @public
+ */
+function set(part, value, fn) {
+ var url = this;
+
+ switch (part) {
+ case 'query':
+ if ('string' === typeof value && value.length) {
+ value = (fn || qs.parse)(value);
+ }
+
+ url[part] = value;
+ break;
+
+ case 'port':
+ url[part] = value;
+
+ if (!required(value, url.protocol)) {
+ url.host = url.hostname;
+ url[part] = '';
+ } else if (value) {
+ url.host = url.hostname +':'+ value;
+ }
+
+ break;
+
+ case 'hostname':
+ url[part] = value;
+
+ if (url.port) value += ':'+ url.port;
+ url.host = value;
+ break;
+
+ case 'host':
+ url[part] = value;
+
+ if (/:\d+$/.test(value)) {
+ value = value.split(':');
+ url.port = value.pop();
+ url.hostname = value.join(':');
+ } else {
+ url.hostname = value;
+ url.port = '';
+ }
+
+ break;
+
+ case 'protocol':
+ url.protocol = value.toLowerCase();
+ url.slashes = !fn;
+ break;
+
+ case 'pathname':
+ case 'hash':
+ if (value) {
+ var char = part === 'pathname' ? '/' : '#';
+ url[part] = value.charAt(0) !== char ? char + value : value;
+ } else {
+ url[part] = value;
+ }
+ break;
+
+ default:
+ url[part] = value;
+ }
+
+ for (var i = 0; i < rules.length; i++) {
+ var ins = rules[i];
+
+ if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
+ }
+
+ url.origin = url.protocol && url.host && url.protocol !== 'file:'
+ ? url.protocol +'//'+ url.host
+ : 'null';
+
+ url.href = url.toString();
+
+ return url;
+}
+
+/**
+ * Transform the properties back in to a valid and full URL string.
+ *
+ * @param {Function} stringify Optional query stringify function.
+ * @returns {String} Compiled version of the URL.
+ * @public
+ */
+function toString(stringify) {
+ if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
+
+ var query
+ , url = this
+ , protocol = url.protocol;
+
+ if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
+
+ var result = protocol + (url.slashes ? '//' : '');
+
+ if (url.username) {
+ result += url.username;
+ if (url.password) result += ':'+ url.password;
+ result += '@';
+ }
+
+ result += url.host + url.pathname;
+
+ query = 'object' === typeof url.query ? stringify(url.query) : url.query;
+ if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;
+
+ if (url.hash) result += url.hash;
+
+ return result;
+}
+
+Url.prototype = { set: set, toString: toString };
+
+//
+// Expose the URL parser and some additional properties that might be useful for
+// others or testing.
+//
+Url.extractProtocol = extractProtocol;
+Url.location = lolcation;
+Url.qs = qs;
+
+module.exports = Url;
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Check if we're required to add a port number.
+ *
+ * @see https://url.spec.whatwg.org/#default-port
+ * @param {Number|String} port Port number we need to check
+ * @param {String} protocol Protocol we need to check against.
+ * @returns {Boolean} Is it a default port for the given protocol
+ * @api private
+ */
+module.exports = function required(port, protocol) {
+ protocol = protocol.split(':')[0];
+ port = +port;
+
+ if (!port) return false;
+
+ switch (protocol) {
+ case 'http':
+ case 'ws':
+ return port !== 80;
+
+ case 'https':
+ case 'wss':
+ return port !== 443;
+
+ case 'ftp':
+ return port !== 21;
+
+ case 'gopher':
+ return port !== 70;
+
+ case 'file':
+ return false;
+ }
+
+ return port !== 0;
+};
+
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var has = Object.prototype.hasOwnProperty;
+
+/**
+ * Decode a URI encoded string.
+ *
+ * @param {String} input The URI encoded string.
+ * @returns {String} The decoded string.
+ * @api private
+ */
+function decode(input) {
+ return decodeURIComponent(input.replace(/\+/g, ' '));
+}
+
+/**
+ * Simple query string parser.
+ *
+ * @param {String} query The query string that needs to be parsed.
+ * @returns {Object}
+ * @api public
+ */
+function querystring(query) {
+ var parser = /([^=?&]+)=?([^&]*)/g
+ , result = {}
+ , part;
+
+ while (part = parser.exec(query)) {
+ var key = decode(part[1])
+ , value = decode(part[2]);
+
+ //
+ // Prevent overriding of existing properties. This ensures that build-in
+ // methods like `toString` or __proto__ are not overriden by malicious
+ // querystrings.
+ //
+ if (key in result) continue;
+ result[key] = value;
+ }
+
+ return result;
+}
+
+/**
+ * Transform a query string to an object.
+ *
+ * @param {Object} obj Object that should be transformed.
+ * @param {String} prefix Optional prefix.
+ * @returns {String}
+ * @api public
+ */
+function querystringify(obj, prefix) {
+ prefix = prefix || '';
+
+ var pairs = [];
+
+ //
+ // Optionally prefix with a '?' if needed
+ //
+ if ('string' !== typeof prefix) prefix = '?';
+
+ for (var key in obj) {
+ if (has.call(obj, key)) {
+ pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(obj[key]));
+ }
+ }
+
+ return pairs.length ? prefix + pairs.join('&') : '';
+}
+
+//
+// Expose the module.
+//
+exports.stringify = querystringify;
+exports.parse = querystring;
+
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
+;(function(root) {
+
+ /** Detect free variables */
+ var freeExports = typeof exports == 'object' && exports &&
+ !exports.nodeType && exports;
+ var freeModule = typeof module == 'object' && module &&
+ !module.nodeType && module;
+ var freeGlobal = typeof global == 'object' && global;
+ if (
+ freeGlobal.global === freeGlobal ||
+ freeGlobal.window === freeGlobal ||
+ freeGlobal.self === freeGlobal
+ ) {
+ root = freeGlobal;
+ }
+
+ /**
+ * The `punycode` object.
+ * @name punycode
+ * @type Object
+ */
+ var punycode,
+
+ /** Highest positive signed 32-bit float value */
+ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+ /** Bootstring parameters */
+ base = 36,
+ tMin = 1,
+ tMax = 26,
+ skew = 38,
+ damp = 700,
+ initialBias = 72,
+ initialN = 128, // 0x80
+ delimiter = '-', // '\x2D'
+
+ /** Regular expressions */
+ regexPunycode = /^xn--/,
+ regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+ /** Error messages */
+ errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+ },
+
+ /** Convenience shortcuts */
+ baseMinusTMin = base - tMin,
+ floor = Math.floor,
+ stringFromCharCode = String.fromCharCode,
+
+ /** Temporary variable */
+ key;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+ function error(type) {
+ throw new RangeError(errors[type]);
+ }
+
+ /**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+ function map(array, fn) {
+ var length = array.length;
+ var result = [];
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+ }
+
+ /**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+ function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+ }
+
+ /**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+ function ucs2decode(string) {
+ var output = [],
+ counter = 0,
+ length = string.length,
+ value,
+ extra;
+ while (counter < length) {
+ value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // high surrogate, and there is a next character
+ extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // unmatched surrogate; only append this code unit, in case the next
+ // code unit is the high surrogate of a surrogate pair
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+ }
+
+ /**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+ function ucs2encode(array) {
+ return map(array, function(value) {
+ var output = '';
+ if (value > 0xFFFF) {
+ value -= 0x10000;
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+ value = 0xDC00 | value & 0x3FF;
+ }
+ output += stringFromCharCode(value);
+ return output;
+ }).join('');
+ }
+
+ /**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+ function basicToDigit(codePoint) {
+ if (codePoint - 48 < 10) {
+ return codePoint - 22;
+ }
+ if (codePoint - 65 < 26) {
+ return codePoint - 65;
+ }
+ if (codePoint - 97 < 26) {
+ return codePoint - 97;
+ }
+ return base;
+ }
+
+ /**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+ function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+ }
+
+ /**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+ function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+ }
+
+ /**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+ function decode(input) {
+ // Don't use UCS-2
+ var output = [],
+ inputLength = input.length,
+ out,
+ i = 0,
+ n = initialN,
+ bias = initialBias,
+ basic,
+ j,
+ index,
+ oldi,
+ w,
+ k,
+ digit,
+ t,
+ /** Cached calculation results */
+ baseMinusT;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output
+ output.splice(i++, 0, n);
+
+ }
+
+ return ucs2encode(output);
+ }
+
+ /**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+ function encode(input) {
+ var n,
+ delta,
+ handledCPCount,
+ basicLength,
+ bias,
+ j,
+ m,
+ q,
+ k,
+ t,
+ currentValue,
+ output = [],
+ /** `inputLength` will hold the number of code points in `input`. */
+ inputLength,
+ /** Cached calculation results */
+ handledCPCountPlusOne,
+ baseMinusT,
+ qMinusT;
+
+ // Convert the input in UCS-2 to Unicode
+ input = ucs2decode(input);
+
+ // Cache the length
+ inputLength = input.length;
+
+ // Initialize the state
+ n = initialN;
+ delta = 0;
+ bias = initialBias;
+
+ // Handle the basic code points
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ handledCPCount = basicLength = output.length;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string - if it is not empty - with a delimiter
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's state to ,
+ // but guard against overflow
+ handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer
+ for (q = delta, k = base; /* no condition */; k += base) {
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ qMinusT = q - t;
+ baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+ }
+
+ /**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+ function toUnicode(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+ }
+
+ /**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+ function toASCII(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Define the public API */
+ punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '1.4.1',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+ };
+
+ /** Expose `punycode` */
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ true
+ ) {
+ !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
+ return punycode;
+ }).call(exports, __webpack_require__, exports, module),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (freeExports && freeModule) {
+ if (module.exports == freeExports) {
+ // in Node.js, io.js, or RingoJS v0.8.0+
+ freeModule.exports = punycode;
+ } else {
+ // in Narwhal or RingoJS v0.7.0-
+ for (key in punycode) {
+ punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
+ }
+ }
+ } else {
+ // in Rhino or a web browser
+ root.punycode = punycode;
+ }
+
+}(this));
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31)(module), __webpack_require__(0)))
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports) {
+
+module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ if(!module.children) module.children = [];
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ get: function() {
+ return module.l;
+ }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ get: function() {
+ return module.i;
+ }
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+};
+
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+module.exports = {
+ isString: function(arg) {
+ return typeof(arg) === 'string';
+ },
+ isObject: function(arg) {
+ return typeof(arg) === 'object' && arg !== null;
+ },
+ isNull: function(arg) {
+ return arg === null;
+ },
+ isNullOrUndefined: function(arg) {
+ return arg == null;
+ }
+};
+
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.decode = exports.parse = __webpack_require__(34);
+exports.encode = exports.stringify = __webpack_require__(35);
+
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+// If obj.hasOwnProperty has been overridden, then calling
+// obj.hasOwnProperty(prop) will break.
+// See: https://github.com/joyent/node/issues/1707
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+module.exports = function(qs, sep, eq, options) {
+ sep = sep || '&';
+ eq = eq || '=';
+ var obj = {};
+
+ if (typeof qs !== 'string' || qs.length === 0) {
+ return obj;
+ }
+
+ var regexp = /\+/g;
+ qs = qs.split(sep);
+
+ var maxKeys = 1000;
+ if (options && typeof options.maxKeys === 'number') {
+ maxKeys = options.maxKeys;
+ }
+
+ var len = qs.length;
+ // maxKeys <= 0 means that we should not limit keys count
+ if (maxKeys > 0 && len > maxKeys) {
+ len = maxKeys;
+ }
+
+ for (var i = 0; i < len; ++i) {
+ var x = qs[i].replace(regexp, '%20'),
+ idx = x.indexOf(eq),
+ kstr, vstr, k, v;
+
+ if (idx >= 0) {
+ kstr = x.substr(0, idx);
+ vstr = x.substr(idx + 1);
+ } else {
+ kstr = x;
+ vstr = '';
+ }
+
+ k = decodeURIComponent(kstr);
+ v = decodeURIComponent(vstr);
+
+ if (!hasOwnProperty(obj, k)) {
+ obj[k] = v;
+ } else if (isArray(obj[k])) {
+ obj[k].push(v);
+ } else {
+ obj[k] = [obj[k], v];
+ }
+ }
+
+ return obj;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+var stringifyPrimitive = function(v) {
+ switch (typeof v) {
+ case 'string':
+ return v;
+
+ case 'boolean':
+ return v ? 'true' : 'false';
+
+ case 'number':
+ return isFinite(v) ? v : '';
+
+ default:
+ return '';
+ }
+};
+
+module.exports = function(obj, sep, eq, name) {
+ sep = sep || '&';
+ eq = eq || '=';
+ if (obj === null) {
+ obj = undefined;
+ }
+
+ if (typeof obj === 'object') {
+ return map(objectKeys(obj), function(k) {
+ var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+ if (isArray(obj[k])) {
+ return map(obj[k], function(v) {
+ return ks + encodeURIComponent(stringifyPrimitive(v));
+ }).join(sep);
+ } else {
+ return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ }
+ }).join(sep);
+
+ }
+
+ if (!name) return '';
+ return encodeURIComponent(stringifyPrimitive(name)) + eq +
+ encodeURIComponent(stringifyPrimitive(obj));
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+function map (xs, f) {
+ if (xs.map) return xs.map(f);
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ res.push(f(xs[i], i));
+ }
+ return res;
+}
+
+var objectKeys = Object.keys || function (obj) {
+ var res = [];
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
+ }
+ return res;
+};
+
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var http = __webpack_require__(10)
+var url = __webpack_require__(7)
+
+var https = module.exports
+
+for (var key in http) {
+ if (http.hasOwnProperty(key)) https[key] = http[key]
+}
+
+https.request = function (params, cb) {
+ params = validateParams(params)
+ return http.request.call(this, params, cb)
+}
+
+https.get = function (params, cb) {
+ params = validateParams(params)
+ return http.get.call(this, params, cb)
+}
+
+function validateParams (params) {
+ if (typeof params === 'string') {
+ params = url.parse(params)
+ }
+ if (!params.protocol) {
+ params.protocol = 'https:'
+ }
+ if (params.protocol !== 'https:') {
+ throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"')
+ }
+ return params
+}
+
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(Buffer, global, process) {var capability = __webpack_require__(11)
+var inherits = __webpack_require__(12)
+var response = __webpack_require__(13)
+var stream = __webpack_require__(14)
+var toArrayBuffer = __webpack_require__(47)
+
+var IncomingMessage = response.IncomingMessage
+var rStates = response.readyStates
+
+function decideMode (preferBinary, useFetch) {
+ if (capability.fetch && useFetch) {
+ return 'fetch'
+ } else if (capability.mozchunkedarraybuffer) {
+ return 'moz-chunked-arraybuffer'
+ } else if (capability.msstream) {
+ return 'ms-stream'
+ } else if (capability.arraybuffer && preferBinary) {
+ return 'arraybuffer'
+ } else if (capability.vbArray && preferBinary) {
+ return 'text:vbarray'
+ } else {
+ return 'text'
+ }
+}
+
+var ClientRequest = module.exports = function (opts) {
+ var self = this
+ stream.Writable.call(self)
+
+ self._opts = opts
+ self._body = []
+ self._headers = {}
+ if (opts.auth)
+ self.setHeader('Authorization', 'Basic ' + new Buffer(opts.auth).toString('base64'))
+ Object.keys(opts.headers).forEach(function (name) {
+ self.setHeader(name, opts.headers[name])
+ })
+
+ var preferBinary
+ var useFetch = true
+ if (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {
+ // If the use of XHR should be preferred. Not typically needed.
+ useFetch = false
+ preferBinary = true
+ } else if (opts.mode === 'prefer-streaming') {
+ // If streaming is a high priority but binary compatibility and
+ // the accuracy of the 'content-type' header aren't
+ preferBinary = false
+ } else if (opts.mode === 'allow-wrong-content-type') {
+ // If streaming is more important than preserving the 'content-type' header
+ preferBinary = !capability.overrideMimeType
+ } else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {
+ // Use binary if text streaming may corrupt data or the content-type header, or for speed
+ preferBinary = true
+ } else {
+ throw new Error('Invalid value for opts.mode')
+ }
+ self._mode = decideMode(preferBinary, useFetch)
+ self._fetchTimer = null
+
+ self.on('finish', function () {
+ self._onFinish()
+ })
+}
+
+inherits(ClientRequest, stream.Writable)
+
+ClientRequest.prototype.setHeader = function (name, value) {
+ var self = this
+ var lowerName = name.toLowerCase()
+ // This check is not necessary, but it prevents warnings from browsers about setting unsafe
+ // headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but
+ // http-browserify did it, so I will too.
+ if (unsafeHeaders.indexOf(lowerName) !== -1)
+ return
+
+ self._headers[lowerName] = {
+ name: name,
+ value: value
+ }
+}
+
+ClientRequest.prototype.getHeader = function (name) {
+ var header = this._headers[name.toLowerCase()]
+ if (header)
+ return header.value
+ return null
+}
+
+ClientRequest.prototype.removeHeader = function (name) {
+ var self = this
+ delete self._headers[name.toLowerCase()]
+}
+
+ClientRequest.prototype._onFinish = function () {
+ var self = this
+
+ if (self._destroyed)
+ return
+ var opts = self._opts
+
+ var headersObj = self._headers
+ var body = null
+ if (opts.method !== 'GET' && opts.method !== 'HEAD') {
+ if (capability.arraybuffer) {
+ body = toArrayBuffer(Buffer.concat(self._body))
+ } else if (capability.blobConstructor) {
+ body = new global.Blob(self._body.map(function (buffer) {
+ return toArrayBuffer(buffer)
+ }), {
+ type: (headersObj['content-type'] || {}).value || ''
+ })
+ } else {
+ // get utf8 string
+ body = Buffer.concat(self._body).toString()
+ }
+ }
+
+ // create flattened list of headers
+ var headersList = []
+ Object.keys(headersObj).forEach(function (keyName) {
+ var name = headersObj[keyName].name
+ var value = headersObj[keyName].value
+ if (Array.isArray(value)) {
+ value.forEach(function (v) {
+ headersList.push([name, v])
+ })
+ } else {
+ headersList.push([name, value])
+ }
+ })
+
+ if (self._mode === 'fetch') {
+ var signal = null
+ var fetchTimer = null
+ if (capability.abortController) {
+ var controller = new AbortController()
+ signal = controller.signal
+ self._fetchAbortController = controller
+
+ if ('requestTimeout' in opts && opts.requestTimeout !== 0) {
+ self._fetchTimer = global.setTimeout(function () {
+ self.emit('requestTimeout')
+ if (self._fetchAbortController)
+ self._fetchAbortController.abort()
+ }, opts.requestTimeout)
+ }
+ }
+
+ global.fetch(self._opts.url, {
+ method: self._opts.method,
+ headers: headersList,
+ body: body || undefined,
+ mode: 'cors',
+ credentials: opts.withCredentials ? 'include' : 'same-origin',
+ signal: signal
+ }).then(function (response) {
+ self._fetchResponse = response
+ self._connect()
+ }, function (reason) {
+ global.clearTimeout(self._fetchTimer)
+ if (!self._destroyed)
+ self.emit('error', reason)
+ })
+ } else {
+ var xhr = self._xhr = new global.XMLHttpRequest()
+ try {
+ xhr.open(self._opts.method, self._opts.url, true)
+ } catch (err) {
+ process.nextTick(function () {
+ self.emit('error', err)
+ })
+ return
+ }
+
+ // Can't set responseType on really old browsers
+ if ('responseType' in xhr)
+ xhr.responseType = self._mode.split(':')[0]
+
+ if ('withCredentials' in xhr)
+ xhr.withCredentials = !!opts.withCredentials
+
+ if (self._mode === 'text' && 'overrideMimeType' in xhr)
+ xhr.overrideMimeType('text/plain; charset=x-user-defined')
+
+ if ('requestTimeout' in opts) {
+ xhr.timeout = opts.requestTimeout
+ xhr.ontimeout = function () {
+ self.emit('requestTimeout')
+ }
+ }
+
+ headersList.forEach(function (header) {
+ xhr.setRequestHeader(header[0], header[1])
+ })
+
+ self._response = null
+ xhr.onreadystatechange = function () {
+ switch (xhr.readyState) {
+ case rStates.LOADING:
+ case rStates.DONE:
+ self._onXHRProgress()
+ break
+ }
+ }
+ // Necessary for streaming in Firefox, since xhr.response is ONLY defined
+ // in onprogress, not in onreadystatechange with xhr.readyState = 3
+ if (self._mode === 'moz-chunked-arraybuffer') {
+ xhr.onprogress = function () {
+ self._onXHRProgress()
+ }
+ }
+
+ xhr.onerror = function () {
+ if (self._destroyed)
+ return
+ self.emit('error', new Error('XHR error'))
+ }
+
+ try {
+ xhr.send(body)
+ } catch (err) {
+ process.nextTick(function () {
+ self.emit('error', err)
+ })
+ return
+ }
+ }
+}
+
+/**
+ * Checks if xhr.status is readable and non-zero, indicating no error.
+ * Even though the spec says it should be available in readyState 3,
+ * accessing it throws an exception in IE8
+ */
+function statusValid (xhr) {
+ try {
+ var status = xhr.status
+ return (status !== null && status !== 0)
+ } catch (e) {
+ return false
+ }
+}
+
+ClientRequest.prototype._onXHRProgress = function () {
+ var self = this
+
+ if (!statusValid(self._xhr) || self._destroyed)
+ return
+
+ if (!self._response)
+ self._connect()
+
+ self._response._onXHRProgress()
+}
+
+ClientRequest.prototype._connect = function () {
+ var self = this
+
+ if (self._destroyed)
+ return
+
+ self._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._fetchTimer)
+ self._response.on('error', function(err) {
+ self.emit('error', err)
+ })
+
+ self.emit('response', self._response)
+}
+
+ClientRequest.prototype._write = function (chunk, encoding, cb) {
+ var self = this
+
+ self._body.push(chunk)
+ cb()
+}
+
+ClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () {
+ var self = this
+ self._destroyed = true
+ global.clearTimeout(self._fetchTimer)
+ if (self._response)
+ self._response._destroyed = true
+ if (self._xhr)
+ self._xhr.abort()
+ else if (self._fetchAbortController)
+ self._fetchAbortController.abort()
+}
+
+ClientRequest.prototype.end = function (data, encoding, cb) {
+ var self = this
+ if (typeof data === 'function') {
+ cb = data
+ data = undefined
+ }
+
+ stream.Writable.prototype.end.call(self, data, encoding, cb)
+}
+
+ClientRequest.prototype.flushHeaders = function () {}
+ClientRequest.prototype.setTimeout = function () {}
+ClientRequest.prototype.setNoDelay = function () {}
+ClientRequest.prototype.setSocketKeepAlive = function () {}
+
+// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method
+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'
+]
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2).Buffer, __webpack_require__(0), __webpack_require__(1)))
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports) {
+
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
+
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports) {
+
+/* (ignored) */
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = __webpack_require__(9).Buffer;
+var util = __webpack_require__(41);
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+}
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports) {
+
+/* (ignored) */
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
+ (typeof self !== "undefined" && self) ||
+ window;
+var apply = Function.prototype.apply;
+
+// DOM APIs, for completeness
+
+exports.setTimeout = function() {
+ return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
+};
+exports.setInterval = function() {
+ return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
+};
+exports.clearTimeout =
+exports.clearInterval = function(timeout) {
+ if (timeout) {
+ timeout.close();
+ }
+};
+
+function Timeout(id, clearFn) {
+ this._id = id;
+ this._clearFn = clearFn;
+}
+Timeout.prototype.unref = Timeout.prototype.ref = function() {};
+Timeout.prototype.close = function() {
+ this._clearFn.call(scope, this._id);
+};
+
+// Does not start the time, just sets up the members needed.
+exports.enroll = function(item, msecs) {
+ clearTimeout(item._idleTimeoutId);
+ item._idleTimeout = msecs;
+};
+
+exports.unenroll = function(item) {
+ clearTimeout(item._idleTimeoutId);
+ item._idleTimeout = -1;
+};
+
+exports._unrefActive = exports.active = function(item) {
+ clearTimeout(item._idleTimeoutId);
+
+ var msecs = item._idleTimeout;
+ if (msecs >= 0) {
+ item._idleTimeoutId = setTimeout(function onTimeout() {
+ if (item._onTimeout)
+ item._onTimeout();
+ }, msecs);
+ }
+};
+
+// setimmediate attaches itself to the global object
+__webpack_require__(43);
+// On some exotic environments, it's not clear which object `setimmediate` was
+// able to install onto. Search each possibility in the same order as the
+// `setimmediate` library.
+exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
+ (typeof global !== "undefined" && global.setImmediate) ||
+ (this && this.setImmediate);
+exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
+ (typeof global !== "undefined" && global.clearImmediate) ||
+ (this && this.clearImmediate);
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 43 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
+ "use strict";
+
+ if (global.setImmediate) {
+ return;
+ }
+
+ var nextHandle = 1; // Spec says greater than zero
+ var tasksByHandle = {};
+ var currentlyRunningATask = false;
+ var doc = global.document;
+ var registerImmediate;
+
+ function setImmediate(callback) {
+ // Callback can either be a function or a string
+ if (typeof callback !== "function") {
+ callback = new Function("" + callback);
+ }
+ // Copy function arguments
+ var args = new Array(arguments.length - 1);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i + 1];
+ }
+ // Store and register the task
+ var task = { callback: callback, args: args };
+ tasksByHandle[nextHandle] = task;
+ registerImmediate(nextHandle);
+ return nextHandle++;
+ }
+
+ function clearImmediate(handle) {
+ delete tasksByHandle[handle];
+ }
+
+ function run(task) {
+ var callback = task.callback;
+ var args = task.args;
+ switch (args.length) {
+ case 0:
+ callback();
+ break;
+ case 1:
+ callback(args[0]);
+ break;
+ case 2:
+ callback(args[0], args[1]);
+ break;
+ case 3:
+ callback(args[0], args[1], args[2]);
+ break;
+ default:
+ callback.apply(undefined, args);
+ break;
+ }
+ }
+
+ function runIfPresent(handle) {
+ // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
+ // So if we're currently running a task, we'll need to delay this invocation.
+ if (currentlyRunningATask) {
+ // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
+ // "too much recursion" error.
+ setTimeout(runIfPresent, 0, handle);
+ } else {
+ var task = tasksByHandle[handle];
+ if (task) {
+ currentlyRunningATask = true;
+ try {
+ run(task);
+ } finally {
+ clearImmediate(handle);
+ currentlyRunningATask = false;
+ }
+ }
+ }
+ }
+
+ function installNextTickImplementation() {
+ registerImmediate = function(handle) {
+ process.nextTick(function () { runIfPresent(handle); });
+ };
+ }
+
+ function canUsePostMessage() {
+ // The test against `importScripts` prevents this implementation from being installed inside a web worker,
+ // where `global.postMessage` means something completely different and can't be used for this purpose.
+ if (global.postMessage && !global.importScripts) {
+ var postMessageIsAsynchronous = true;
+ var oldOnMessage = global.onmessage;
+ global.onmessage = function() {
+ postMessageIsAsynchronous = false;
+ };
+ global.postMessage("", "*");
+ global.onmessage = oldOnMessage;
+ return postMessageIsAsynchronous;
+ }
+ }
+
+ function installPostMessageImplementation() {
+ // Installs an event handler on `global` for the `message` event: see
+ // * https://developer.mozilla.org/en/DOM/window.postMessage
+ // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
+
+ var messagePrefix = "setImmediate$" + Math.random() + "$";
+ var onGlobalMessage = function(event) {
+ if (event.source === global &&
+ typeof event.data === "string" &&
+ event.data.indexOf(messagePrefix) === 0) {
+ runIfPresent(+event.data.slice(messagePrefix.length));
+ }
+ };
+
+ if (global.addEventListener) {
+ global.addEventListener("message", onGlobalMessage, false);
+ } else {
+ global.attachEvent("onmessage", onGlobalMessage);
+ }
+
+ registerImmediate = function(handle) {
+ global.postMessage(messagePrefix + handle, "*");
+ };
+ }
+
+ function installMessageChannelImplementation() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = function(event) {
+ var handle = event.data;
+ runIfPresent(handle);
+ };
+
+ registerImmediate = function(handle) {
+ channel.port2.postMessage(handle);
+ };
+ }
+
+ function installReadyStateChangeImplementation() {
+ var html = doc.documentElement;
+ registerImmediate = function(handle) {
+ // Create a
+
+
+