UNPKG

@pm2/js-api

Version:

PM2.io API Client for Javascript

1 lines 236 kB
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Keymetrics=e()}}(function(){return function(){return function e(t,n,o){function i(r,s){if(!n[r]){if(!t[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var p=n[r]={exports:{}};t[r][0].call(p.exports,function(e){return i(t[r][1][e]||e)},p,p.exports,e,t,n,o)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r<o.length;r++)i(o[r]);return i}}()({1:[function(e,t,n){(function(n){(function(){"use strict";var o=e("./package.json"),i={headers:{"X-JS-API-Version":o.version},services:{API:"https://api.keymetrics.io",OAUTH:"https://id.keymetrics.io"},OAUTH_AUTHORIZE_ENDPOINT:"/api/oauth/authorize",OAUTH_CLIENT_ID:"795984050",ENVIRONNEMENT:n&&n.versions&&n.versions.node?"node":"browser",VERSION:o.version,IS_DEBUG:"undefined"!=typeof window&&window.location.host.match(/km.(io|local)/)||void 0!==n&&"true"===n.env.DEBUG};t.exports=Object.assign({},i)}).call(this)}).call(this,e("_process"))},{"./package.json":39,_process:37}],2:[function(e,t,n){(function(e,o,i){(function(){!function(e,o){o("object"==typeof n&&void 0!==t?n:e.async=e.async||{})}(this,function(n){"use strict";function a(e,t){t|=0;for(var n=Math.max(e.length-t,0),o=Array(n),i=0;i<n;i++)o[i]=e[t+i];return o}var r=function(e){var t=a(arguments,1);return function(){var n=a(arguments);return e.apply(null,t.concat(n))}},s=function(e){return function(){var t=a(arguments),n=t.pop();e.call(this,t,n)}};function l(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var u="function"==typeof i&&i,p="object"==typeof e&&"function"==typeof e.nextTick;function c(e){setTimeout(e,0)}function d(e){return function(t){var n=a(arguments,1);e(function(){t.apply(null,n)})}}var f=d(u?i:p?e.nextTick:c);function m(e){return s(function(t,n){var o;try{o=e.apply(this,t)}catch(e){return n(e)}l(o)&&"function"==typeof o.then?o.then(function(e){y(n,null,e)},function(e){y(n,e.message?e:new Error(e))}):n(null,o)})}function y(e,t,n){try{e(t,n)}catch(e){f(h,e)}}function h(e){throw e}var v="function"==typeof Symbol;function b(e){return v&&"AsyncFunction"===e[Symbol.toStringTag]}function g(e){return b(e)?m(e):e}function k(e){return function(t){var n=a(arguments,1),o=s(function(n,o){var i=this;return e(t,function(e,t){g(e).apply(i,n.concat(t))},o)});return n.length?o.apply(this,n):o}}var w="object"==typeof o&&o&&o.Object===Object&&o,_="object"==typeof self&&self&&self.Object===Object&&self,T=w||_||Function("return this")(),j=T.Symbol,E=Object.prototype,A=E.hasOwnProperty,S=E.toString,O=j?j.toStringTag:void 0;var x=Object.prototype.toString;var C="[object Null]",P="[object Undefined]",L=j?j.toStringTag:void 0;function z(e){return null==e?void 0===e?P:C:L&&L in Object(e)?function(e){var t=A.call(e,O),n=e[O];try{e[O]=void 0;var o=!0}catch(e){}var i=S.call(e);return o&&(t?e[O]=n:delete e[O]),i}(e):function(e){return x.call(e)}(e)}var B="[object AsyncFunction]",D="[object Function]",F="[object GeneratorFunction]",I="[object Proxy]";var R=9007199254740991;function U(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=R}function N(e){return null!=e&&U(e.length)&&!function(e){if(!l(e))return!1;var t=z(e);return t==D||t==F||t==B||t==I}(e)}var q={};function M(){}function G(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}}var H="function"==typeof Symbol&&Symbol.iterator,W=function(e){return H&&e[H]&&e[H]()};function V(e){return null!=e&&"object"==typeof e}var J="[object Arguments]";function K(e){return V(e)&&z(e)==J}var $=Object.prototype,Q=$.hasOwnProperty,X=$.propertyIsEnumerable,Y=K(function(){return arguments}())?K:function(e){return V(e)&&Q.call(e,"callee")&&!X.call(e,"callee")},Z=Array.isArray;var ee="object"==typeof n&&n&&!n.nodeType&&n,te=ee&&"object"==typeof t&&t&&!t.nodeType&&t,ne=te&&te.exports===ee?T.Buffer:void 0,oe=(ne?ne.isBuffer:void 0)||function(){return!1},ie=9007199254740991,ae=/^(?:0|[1-9]\d*)$/;function re(e,t){var n=typeof e;return!!(t=null==t?ie:t)&&("number"==n||"symbol"!=n&&ae.test(e))&&e>-1&&e%1==0&&e<t}var se={};se["[object Float32Array]"]=se["[object Float64Array]"]=se["[object Int8Array]"]=se["[object Int16Array]"]=se["[object Int32Array]"]=se["[object Uint8Array]"]=se["[object Uint8ClampedArray]"]=se["[object Uint16Array]"]=se["[object Uint32Array]"]=!0,se["[object Arguments]"]=se["[object Array]"]=se["[object ArrayBuffer]"]=se["[object Boolean]"]=se["[object DataView]"]=se["[object Date]"]=se["[object Error]"]=se["[object Function]"]=se["[object Map]"]=se["[object Number]"]=se["[object Object]"]=se["[object RegExp]"]=se["[object Set]"]=se["[object String]"]=se["[object WeakMap]"]=!1;var le,ue="object"==typeof n&&n&&!n.nodeType&&n,pe=ue&&"object"==typeof t&&t&&!t.nodeType&&t,ce=pe&&pe.exports===ue&&w.process,de=function(){try{var e=pe&&pe.require&&pe.require("util").types;return e||ce&&ce.binding&&ce.binding("util")}catch(e){}}(),fe=de&&de.isTypedArray,me=fe?(le=fe,function(e){return le(e)}):function(e){return V(e)&&U(e.length)&&!!se[z(e)]},ye=Object.prototype.hasOwnProperty;function he(e,t){var n=Z(e),o=!n&&Y(e),i=!n&&!o&&oe(e),a=!n&&!o&&!i&&me(e),r=n||o||i||a,s=r?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],l=s.length;for(var u in e)!t&&!ye.call(e,u)||r&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||re(u,l))||s.push(u);return s}var ve=Object.prototype;var be=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ge=Object.prototype.hasOwnProperty;function ke(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||ve))return be(e);var t,n,o=[];for(var i in Object(e))ge.call(e,i)&&"constructor"!=i&&o.push(i);return o}function we(e){return N(e)?he(e):ke(e)}function _e(e){if(N(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,o,i,a=W(e);return a?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(a):(n=we(t=e),o=-1,i=n.length,function e(){var a=n[++o];return"__proto__"===a?e():o<i?{value:t[a],key:a}:null})}function Te(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}}function je(e){return function(t,n,o){if(o=G(o||M),e<=0||!t)return o(null);var i=_e(t),a=!1,r=0,s=!1;function l(e,t){if(r-=1,e)a=!0,o(e);else{if(t===q||a&&r<=0)return a=!0,o(null);s||u()}}function u(){for(s=!0;r<e&&!a;){var t=i();if(null===t)return a=!0,void(r<=0&&o(null));r+=1,n(t.value,t.key,Te(l))}s=!1}u()}}function Ee(e,t,n,o){je(t)(e,g(n),o)}function Ae(e,t){return function(n,o,i){return e(n,t,o,i)}}function Se(e,t,n){n=G(n||M);var o=0,i=0,a=e.length;function r(e,t){e?n(e):++i!==a&&t!==q||n(null)}for(0===a&&n(null);o<a;o++)t(e[o],o,Te(r))}var Oe=Ae(Ee,1/0),xe=function(e,t,n){(N(e)?Se:Oe)(e,g(t),n)};function Ce(e){return function(t,n,o){return e(xe,t,g(n),o)}}function Pe(e,t,n,o){o=o||M,t=t||[];var i=[],a=0,r=g(n);e(t,function(e,t,n){var o=a++;r(e,function(e,t){i[o]=t,n(e)})},function(e){o(e,i)})}var Le=Ce(Pe),ze=k(Le);function Be(e){return function(t,n,o,i){return e(je(n),t,g(o),i)}}var De=Be(Pe),Fe=Ae(De,1),Ie=k(Fe);function Re(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););return e}var Ue,Ne=function(e,t,n){for(var o=-1,i=Object(e),a=n(e),r=a.length;r--;){var s=a[Ue?r:++o];if(!1===t(i[s],s,i))break}return e};function qe(e,t){return e&&Ne(e,t,we)}function Me(e){return e!=e}function Ge(e,t,n){return t==t?function(e,t,n){for(var o=n-1,i=e.length;++o<i;)if(e[o]===t)return o;return-1}(e,t,n):function(e,t,n,o){for(var i=e.length,a=n+(o?1:-1);o?a--:++a<i;)if(t(e[a],a,e))return a;return-1}(e,Me,n)}var He=function(e,t,n){"function"==typeof t&&(n=t,t=null),n=G(n||M);var o=we(e).length;if(!o)return n(null);t||(t=o);var i={},r=0,s=!1,l=Object.create(null),u=[],p=[],c={};function d(e,t){u.push(function(){!function(e,t){if(s)return;var o=Te(function(t,o){if(r--,arguments.length>2&&(o=a(arguments,1)),t){var u={};qe(i,function(e,t){u[t]=e}),u[e]=o,s=!0,l=Object.create(null),n(t,u)}else i[e]=o,Re(l[e]||[],function(e){e()}),f()});r++;var u=g(t[t.length-1]);t.length>1?u(i,o):u(o)}(e,t)})}function f(){if(0===u.length&&0===r)return n(null,i);for(;u.length&&r<t;){u.shift()()}}function m(t){var n=[];return qe(e,function(e,o){Z(e)&&Ge(e,t,0)>=0&&n.push(o)}),n}qe(e,function(t,n){if(!Z(t))return d(n,[t]),void p.push(n);var o=t.slice(0,t.length-1),i=o.length;if(0===i)return d(n,t),void p.push(n);c[n]=i,Re(o,function(a){if(!e[a])throw new Error("async.auto task `"+n+"` has a non-existent dependency `"+a+"` in "+o.join(", "));!function(e,t){var n=l[e];n||(n=l[e]=[]);n.push(t)}(a,function(){0===--i&&d(n,t)})})}),function(){var e,t=0;for(;p.length;)e=p.pop(),t++,Re(m(e),function(e){0==--c[e]&&p.push(e)});if(t!==o)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),f()};function We(e,t){for(var n=-1,o=null==e?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var Ve="[object Symbol]";var Je=1/0,Ke=j?j.prototype:void 0,$e=Ke?Ke.toString:void 0;function Qe(e){if("string"==typeof e)return e;if(Z(e))return We(e,Qe)+"";if(function(e){return"symbol"==typeof e||V(e)&&z(e)==Ve}(e))return $e?$e.call(e):"";var t=e+"";return"0"==t&&1/e==-Je?"-0":t}function Xe(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:function(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++o<i;)a[o]=e[o+t];return a}(e,t,n)}var Ye=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Ze="[\\ud800-\\udfff]",et="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",tt="\\ud83c[\\udffb-\\udfff]",nt="[^\\ud800-\\udfff]",ot="(?:\\ud83c[\\udde6-\\uddff]){2}",it="[\\ud800-\\udbff][\\udc00-\\udfff]",at="(?:"+et+"|"+tt+")"+"?",rt="[\\ufe0e\\ufe0f]?"+at+("(?:\\u200d(?:"+[nt,ot,it].join("|")+")[\\ufe0e\\ufe0f]?"+at+")*"),st="(?:"+[nt+et+"?",et,ot,it,Ze].join("|")+")",lt=RegExp(tt+"(?="+tt+")|"+st+rt,"g");function ut(e){return function(e){return Ye.test(e)}(e)?function(e){return e.match(lt)||[]}(e):function(e){return e.split("")}(e)}var pt=/^\s+|\s+$/g;function ct(e,t,n){var o;if((e=null==(o=e)?"":Qe(o))&&(n||void 0===t))return e.replace(pt,"");if(!e||!(t=Qe(t)))return e;var i=ut(e),a=ut(t);return Xe(i,function(e,t){for(var n=-1,o=e.length;++n<o&&Ge(t,e[n],0)>-1;);return n}(i,a),function(e,t){for(var n=e.length;n--&&Ge(t,e[n],0)>-1;);return n}(i,a)+1).join("")}var dt=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,ft=/,/,mt=/(=.+)?(\s*)$/,yt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function ht(e,t){var n={};qe(e,function(e,t){var o,i,a=b(e),r=!a&&1===e.length||a&&0===e.length;if(Z(e))o=e.slice(0,-1),e=e[e.length-1],n[t]=o.concat(o.length>0?s:e);else if(r)n[t]=e;else{if(o=i=(i=(i=(i=(i=e).toString().replace(yt,"")).match(dt)[2].replace(" ",""))?i.split(ft):[]).map(function(e){return ct(e.replace(mt,""))}),0===e.length&&!a&&0===o.length)throw new Error("autoInject task functions require explicit parameters.");a||o.pop(),n[t]=o.concat(s)}function s(t,n){var i=We(o,function(e){return t[e]});i.push(n),g(e).apply(null,i)}}),He(n,t)}function vt(){this.head=this.tail=null,this.length=0}function bt(e,t){e.length=1,e.head=e.tail=t}function gt(e,t,n){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var o=g(e),i=0,a=[],r=!1;function s(e,t,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");if(p.started=!0,Z(e)||(e=[e]),0===e.length&&p.idle())return f(function(){p.drain()});for(var o=0,i=e.length;o<i;o++){var a={data:e[o],callback:n||M};t?p._tasks.unshift(a):p._tasks.push(a)}r||(r=!0,f(function(){r=!1,p.process()}))}function l(e){return function(t){i-=1;for(var n=0,o=e.length;n<o;n++){var r=e[n],s=Ge(a,r,0);0===s?a.shift():s>0&&a.splice(s,1),r.callback.apply(r,arguments),null!=t&&p.error(t,r.data)}i<=p.concurrency-p.buffer&&p.unsaturated(),p.idle()&&p.drain(),p.process()}}var u=!1,p={_tasks:new vt,concurrency:t,payload:n,saturated:M,unsaturated:M,buffer:t/4,empty:M,drain:M,error:M,started:!1,paused:!1,push:function(e,t){s(e,!1,t)},kill:function(){p.drain=M,p._tasks.empty()},unshift:function(e,t){s(e,!0,t)},remove:function(e){p._tasks.remove(e)},process:function(){if(!u){for(u=!0;!p.paused&&i<p.concurrency&&p._tasks.length;){var e=[],t=[],n=p._tasks.length;p.payload&&(n=Math.min(n,p.payload));for(var r=0;r<n;r++){var s=p._tasks.shift();e.push(s),a.push(s),t.push(s.data)}i+=1,0===p._tasks.length&&p.empty(),i===p.concurrency&&p.saturated();var c=Te(l(e));o(t,c)}u=!1}},length:function(){return p._tasks.length},running:function(){return i},workersList:function(){return a},idle:function(){return p._tasks.length+i===0},pause:function(){p.paused=!0},resume:function(){!1!==p.paused&&(p.paused=!1,f(p.process))}};return p}function kt(e,t){return gt(e,1,t)}vt.prototype.removeLink=function(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e},vt.prototype.empty=function(){for(;this.head;)this.shift();return this},vt.prototype.insertAfter=function(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1},vt.prototype.insertBefore=function(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1},vt.prototype.unshift=function(e){this.head?this.insertBefore(this.head,e):bt(this,e)},vt.prototype.push=function(e){this.tail?this.insertAfter(this.tail,e):bt(this,e)},vt.prototype.shift=function(){return this.head&&this.removeLink(this.head)},vt.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},vt.prototype.toArray=function(){for(var e=Array(this.length),t=this.head,n=0;n<this.length;n++)e[n]=t.data,t=t.next;return e},vt.prototype.remove=function(e){for(var t=this.head;t;){var n=t.next;e(t)&&this.removeLink(t),t=n}return this};var wt=Ae(Ee,1);function _t(e,t,n,o){o=G(o||M);var i=g(n);wt(e,function(e,n,o){i(t,e,function(e,n){t=n,o(e)})},function(e){o(e,t)})}function Tt(){var e=We(arguments,g);return function(){var t=a(arguments),n=this,o=t[t.length-1];"function"==typeof o?t.pop():o=M,_t(e,t,function(e,t,o){t.apply(n,e.concat(function(e){var t=a(arguments,1);o(e,t)}))},function(e,t){o.apply(n,[e].concat(t))})}}var jt=function(){return Tt.apply(null,a(arguments).reverse())},Et=Array.prototype.concat,At=function(e,t,n,o){o=o||M;var i=g(n);De(e,t,function(e,t){i(e,function(e){return e?t(e):t(null,a(arguments,1))})},function(e,t){for(var n=[],i=0;i<t.length;i++)t[i]&&(n=Et.apply(n,t[i]));return o(e,n)})},St=Ae(At,1/0),Ot=Ae(At,1),xt=function(){var e=a(arguments),t=[null].concat(e);return function(){return arguments[arguments.length-1].apply(this,t)}};function Ct(e){return e}function Pt(e,t){return function(n,o,i,a){a=a||M;var r,s=!1;n(o,function(n,o,a){i(n,function(o,i){o?a(o):e(i)&&!r?(s=!0,r=t(!0,n),a(null,q)):a()})},function(e){e?a(e):a(null,s?r:t(!1))})}}function Lt(e,t){return t}var zt=Ce(Pt(Ct,Lt)),Bt=Be(Pt(Ct,Lt)),Dt=Ae(Bt,1);function Ft(e){return function(t){var n=a(arguments,1);n.push(function(t){var n=a(arguments,1);"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&Re(n,function(t){console[e](t)}))}),g(t).apply(null,n)}}var It=Ft("dir");function Rt(e,t,n){n=Te(n||M);var o=g(e),i=g(t);function r(e){if(e)return n(e);var t=a(arguments,1);t.push(s),i.apply(this,t)}function s(e,t){return e?n(e):t?void o(r):n(null)}s(null,!0)}function Ut(e,t,n){n=Te(n||M);var o=g(e),i=function(e){if(e)return n(e);var r=a(arguments,1);if(t.apply(this,r))return o(i);n.apply(null,[null].concat(r))};o(i)}function Nt(e,t,n){Ut(e,function(){return!t.apply(this,arguments)},n)}function qt(e,t,n){n=Te(n||M);var o=g(t),i=g(e);function a(e){if(e)return n(e);i(r)}function r(e,t){return e?n(e):t?void o(a):n(null)}i(r)}function Mt(e){return function(t,n,o){return e(t,o)}}function Gt(e,t,n){xe(e,Mt(g(t)),n)}function Ht(e,t,n,o){je(t)(e,Mt(g(n)),o)}var Wt=Ae(Ht,1);function Vt(e){return b(e)?e:s(function(t,n){var o=!0;t.push(function(){var e=arguments;o?f(function(){n.apply(null,e)}):n.apply(null,e)}),e.apply(this,t),o=!1})}function Jt(e){return!e}var Kt=Ce(Pt(Jt,Jt)),$t=Be(Pt(Jt,Jt)),Qt=Ae($t,1);function Xt(e){return function(t){return null==t?void 0:t[e]}}function Yt(e,t,n,o){var i=new Array(t.length);e(t,function(e,t,o){n(e,function(e,n){i[t]=!!n,o(e)})},function(e){if(e)return o(e);for(var n=[],a=0;a<t.length;a++)i[a]&&n.push(t[a]);o(null,n)})}function Zt(e,t,n,o){var i=[];e(t,function(e,t,o){n(e,function(n,a){n?o(n):(a&&i.push({index:t,value:e}),o())})},function(e){e?o(e):o(null,We(i.sort(function(e,t){return e.index-t.index}),Xt("value")))})}function en(e,t,n,o){(N(t)?Yt:Zt)(e,t,g(n),o||M)}var tn=Ce(en),nn=Be(en),on=Ae(nn,1);function an(e,t){var n=Te(t||M),o=g(Vt(e));!function e(t){if(t)return n(t);o(e)}()}var rn=function(e,t,n,o){o=o||M;var i=g(n);De(e,t,function(e,t){i(e,function(n,o){return n?t(n):t(null,{key:o,val:e})})},function(e,t){for(var n={},i=Object.prototype.hasOwnProperty,a=0;a<t.length;a++)if(t[a]){var r=t[a].key,s=t[a].val;i.call(n,r)?n[r].push(s):n[r]=[s]}return o(e,n)})},sn=Ae(rn,1/0),ln=Ae(rn,1),un=Ft("log");function pn(e,t,n,o){o=G(o||M);var i={},a=g(n);Ee(e,t,function(e,t,n){a(e,t,function(e,o){if(e)return n(e);i[t]=o,n()})},function(e){o(e,i)})}var cn=Ae(pn,1/0),dn=Ae(pn,1);function fn(e,t){return t in e}function mn(e,t){var n=Object.create(null),o=Object.create(null);t=t||Ct;var i=g(e),r=s(function(e,r){var s=t.apply(null,e);fn(n,s)?f(function(){r.apply(null,n[s])}):fn(o,s)?o[s].push(r):(o[s]=[r],i.apply(null,e.concat(function(){var e=a(arguments);n[s]=e;var t=o[s];delete o[s];for(var i=0,r=t.length;i<r;i++)t[i].apply(null,e)})))});return r.memo=n,r.unmemoized=e,r}var yn=d(p?e.nextTick:u?i:c);function hn(e,t,n){n=n||M;var o=N(t)?[]:{};e(t,function(e,t,n){g(e)(function(e,i){arguments.length>2&&(i=a(arguments,1)),o[t]=i,n(e)})},function(e){n(e,o)})}function vn(e,t){hn(xe,e,t)}function bn(e,t,n){hn(je(t),e,n)}var gn=function(e,t){var n=g(e);return gt(function(e,t){n(e[0],t)},t,1)},kn=function(e,t){var n=gn(e,t);return n.push=function(e,t,o){if(null==o&&(o=M),"function"!=typeof o)throw new Error("task callback must be a function");if(n.started=!0,Z(e)||(e=[e]),0===e.length)return f(function(){n.drain()});t=t||0;for(var i=n._tasks.head;i&&t>=i.priority;)i=i.next;for(var a=0,r=e.length;a<r;a++){var s={data:e[a],priority:t,callback:o};i?n._tasks.insertBefore(i,s):n._tasks.push(s)}f(n.process)},delete n.unshift,n};function wn(e,t){if(t=G(t||M),!Z(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,o=e.length;n<o;n++)g(e[n])(t)}function _n(e,t,n,o){_t(a(e).reverse(),t,n,o)}function Tn(e){var t=g(e);return s(function(e,n){return e.push(function(e,t){var o;e?n(null,{error:e}):(o=arguments.length<=2?t:a(arguments,1),n(null,{value:o}))}),t.apply(this,e)})}function jn(e){var t;return Z(e)?t=We(e,Tn):(t={},qe(e,function(e,n){t[n]=Tn.call(this,e)})),t}function En(e,t,n,o){en(e,t,function(e,t){n(e,function(e,n){t(e,!n)})},o)}var An=Ce(En),Sn=Be(En),On=Ae(Sn,1);function xn(e){return function(){return e}}function Cn(e,t,n){var o=5,i=0,a={times:o,intervalFunc:xn(i)};if(arguments.length<3&&"function"==typeof e?(n=t||M,t=e):(!function(e,t){if("object"==typeof t)e.times=+t.times||o,e.intervalFunc="function"==typeof t.interval?t.interval:xn(+t.interval||i),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||o}}(a,e),n=n||M),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=g(t),s=1;!function e(){r(function(t){t&&s++<a.times&&("function"!=typeof a.errorFilter||a.errorFilter(t))?setTimeout(e,a.intervalFunc(s)):n.apply(null,arguments)})}()}var Pn=function(e,t){t||(t=e,e=null);var n=g(t);return s(function(t,o){function i(e){n.apply(null,t.concat(e))}e?Cn(e,i,o):Cn(i,o)})};function Ln(e,t){hn(wt,e,t)}var zn=Ce(Pt(Boolean,Ct)),Bn=Be(Pt(Boolean,Ct)),Dn=Ae(Bn,1);function Fn(e,t,n){var o=g(t);function i(e,t){var n=e.criteria,o=t.criteria;return n<o?-1:n>o?1:0}Le(e,function(e,t){o(e,function(n,o){if(n)return t(n);t(null,{value:e,criteria:o})})},function(e,t){if(e)return n(e);n(null,We(t.sort(i),Xt("value")))})}function In(e,t,n){var o=g(e);return s(function(i,a){var r,s=!1;i.push(function(){s||(a.apply(null,arguments),clearTimeout(r))}),r=setTimeout(function(){var t=e.name||"anonymous",o=new Error('Callback function "'+t+'" timed out.');o.code="ETIMEDOUT",n&&(o.info=n),s=!0,a(o)},t),o.apply(null,i)})}var Rn=Math.ceil,Un=Math.max;function Nn(e,t,n,o){var i=g(n);De(function(e,t,n,o){for(var i=-1,a=Un(Rn((t-e)/(n||1)),0),r=Array(a);a--;)r[o?a:++i]=e,e+=n;return r}(0,e,1),t,i,o)}var qn=Ae(Nn,1/0),Mn=Ae(Nn,1);function Gn(e,t,n,o){arguments.length<=3&&(o=n,n=t,t=Z(e)?[]:{}),o=G(o||M);var i=g(n);xe(e,function(e,n,o){i(t,e,n,o)},function(e){o(e,t)})}function Hn(e,t){var n,o=null;t=t||M,Wt(e,function(e,t){g(e)(function(e,i){n=arguments.length>2?a(arguments,1):i,o=e,t(!e)})},function(){t(o,n)})}function Wn(e){return function(){return(e.unmemoized||e).apply(null,arguments)}}function Vn(e,t,n){n=Te(n||M);var o=g(t);if(!e())return n(null);var i=function(t){if(t)return n(t);if(e())return o(i);var r=a(arguments,1);n.apply(null,[null].concat(r))};o(i)}function Jn(e,t,n){Vn(function(){return!e.apply(this,arguments)},t,n)}var Kn=function(e,t){if(t=G(t||M),!Z(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function o(t){var o=g(e[n++]);t.push(Te(i)),o.apply(null,t)}function i(i){if(i||n===e.length)return t.apply(null,arguments);o(a(arguments,1))}o([])},$n={apply:r,applyEach:ze,applyEachSeries:Ie,asyncify:m,auto:He,autoInject:ht,cargo:kt,compose:jt,concat:St,concatLimit:At,concatSeries:Ot,constant:xt,detect:zt,detectLimit:Bt,detectSeries:Dt,dir:It,doDuring:Rt,doUntil:Nt,doWhilst:Ut,during:qt,each:Gt,eachLimit:Ht,eachOf:xe,eachOfLimit:Ee,eachOfSeries:wt,eachSeries:Wt,ensureAsync:Vt,every:Kt,everyLimit:$t,everySeries:Qt,filter:tn,filterLimit:nn,filterSeries:on,forever:an,groupBy:sn,groupByLimit:rn,groupBySeries:ln,log:un,map:Le,mapLimit:De,mapSeries:Fe,mapValues:cn,mapValuesLimit:pn,mapValuesSeries:dn,memoize:mn,nextTick:yn,parallel:vn,parallelLimit:bn,priorityQueue:kn,queue:gn,race:wn,reduce:_t,reduceRight:_n,reflect:Tn,reflectAll:jn,reject:An,rejectLimit:Sn,rejectSeries:On,retry:Cn,retryable:Pn,seq:Tt,series:Ln,setImmediate:f,some:zn,someLimit:Bn,someSeries:Dn,sortBy:Fn,timeout:In,times:qn,timesLimit:Nn,timesSeries:Mn,transform:Gn,tryEach:Hn,unmemoize:Wn,until:Jn,waterfall:Kn,whilst:Vn,all:Kt,allLimit:$t,allSeries:Qt,any:zn,anyLimit:Bn,anySeries:Dn,find:zt,findLimit:Bt,findSeries:Dt,forEach:Gt,forEachSeries:Wt,forEachLimit:Ht,forEachOf:xe,forEachOfSeries:wt,forEachOfLimit:Ee,inject:_t,foldl:_t,foldr:_n,select:tn,selectLimit:nn,selectSeries:on,wrapSync:m};n.default=$n,n.apply=r,n.applyEach=ze,n.applyEachSeries=Ie,n.asyncify=m,n.auto=He,n.autoInject=ht,n.cargo=kt,n.compose=jt,n.concat=St,n.concatLimit=At,n.concatSeries=Ot,n.constant=xt,n.detect=zt,n.detectLimit=Bt,n.detectSeries=Dt,n.dir=It,n.doDuring=Rt,n.doUntil=Nt,n.doWhilst=Ut,n.during=qt,n.each=Gt,n.eachLimit=Ht,n.eachOf=xe,n.eachOfLimit=Ee,n.eachOfSeries=wt,n.eachSeries=Wt,n.ensureAsync=Vt,n.every=Kt,n.everyLimit=$t,n.everySeries=Qt,n.filter=tn,n.filterLimit=nn,n.filterSeries=on,n.forever=an,n.groupBy=sn,n.groupByLimit=rn,n.groupBySeries=ln,n.log=un,n.map=Le,n.mapLimit=De,n.mapSeries=Fe,n.mapValues=cn,n.mapValuesLimit=pn,n.mapValuesSeries=dn,n.memoize=mn,n.nextTick=yn,n.parallel=vn,n.parallelLimit=bn,n.priorityQueue=kn,n.queue=gn,n.race=wn,n.reduce=_t,n.reduceRight=_n,n.reflect=Tn,n.reflectAll=jn,n.reject=An,n.rejectLimit=Sn,n.rejectSeries=On,n.retry=Cn,n.retryable=Pn,n.seq=Tt,n.series=Ln,n.setImmediate=f,n.some=zn,n.someLimit=Bn,n.someSeries=Dn,n.sortBy=Fn,n.timeout=In,n.times=qn,n.timesLimit=Nn,n.timesSeries=Mn,n.transform=Gn,n.tryEach=Hn,n.unmemoize=Wn,n.until=Jn,n.waterfall=Kn,n.whilst=Vn,n.all=Kt,n.allLimit=$t,n.allSeries=Qt,n.any=zn,n.anyLimit=Bn,n.anySeries=Dn,n.find=zt,n.findLimit=Bt,n.findSeries=Dt,n.forEach=Gt,n.forEachSeries=Wt,n.forEachLimit=Ht,n.forEachOf=xe,n.forEachOfSeries=wt,n.forEachOfLimit=Ee,n.inject=_t,n.foldl=_t,n.foldr=_n,n.select=tn,n.selectLimit=nn,n.selectSeries=on,n.wrapSync=m,Object.defineProperty(n,"__esModule",{value:!0})})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{_process:37,timers:38}],3:[function(e,t,n){},{}],4:[function(e,t,n){(function(o){(function(){n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&"%c"===e&&(i=++o)}),e.splice(i,0,n)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG);return e},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(n);const{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":5,_process:37}],5:[function(e,t,n){t.exports=function(t){function n(e){let t,i,a,r=null;function s(...e){if(!s.enabled)return;const o=s,i=Number(new Date),a=i-(t||i);o.diff=a,o.prev=t,o.curr=i,t=i,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if("%%"===t)return"%";r++;const a=n.formatters[i];if("function"==typeof a){const n=e[r];t=a.call(o,n),e.splice(r,1),r--}return t}),n.formatArgs.call(o,e),(o.log||n.log).apply(o,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=o,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(i!==n.namespaces&&(i=n.namespaces,a=n.enabled(e)),a),set:e=>{r=e}}),"function"==typeof n.init&&n.init(s),s}function o(e,t){const o=n(this.namespace+(void 0===t?":":t)+e);return o.log=this.log,o}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(i),...n.skips.map(i).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.namespaces=e,n.names=[],n.skips=[];const o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length;for(t=0;t<i;t++)o[t]&&("-"===(e=o[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.slice(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,o;for(t=0,o=n.skips.length;t<o;t++)if(n.skips[t].test(e))return!1;for(t=0,o=n.names.length;t<o;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{n[e]=t[e]}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}},{ms:36}],6:[function(e,t,n){(function(e,o){(function(){!function(i){var a=Object.hasOwnProperty,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s="object"==typeof e&&"function"==typeof e.nextTick,l="function"==typeof Symbol,u="object"==typeof Reflect,p="function"==typeof o?o:setTimeout,c=l?u&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function d(){this._events={},this._conf&&f.call(this,this._conf)}function f(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==i&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(t,n){var o="(node) warning: possible EventEmitter memory leak detected. "+t+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(o+=" Event name: "+n+"."),void 0!==e&&e.emitWarning){var i=new Error(o);i.name="MaxListenersExceededWarning",i.emitter=this,i.count=t,e.emitWarning(i)}else console.error(o),console.trace&&console.trace()}var y=function(e,t,n){var o=arguments.length;switch(o){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var i=new Array(o);o--;)i[o]=arguments[o];return i}};function h(e,t){for(var n={},o=e.length,a=t?t.length:0,r=0;r<o;r++)n[e[r]]=r<a?t[r]:i;return n}function v(e,t,n){var o,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(o=n.on,i=n.off),t.addEventListener?(o=t.addEventListener,i=t.removeEventListener):t.addListener?(o=t.addListener,i=t.removeListener):t.on&&(o=t.on,i=t.off),!o&&!i)throw Error("target does not implement any known event API");if("function"!=typeof o)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=o,this._off=i;var a=e._observers;a?a.push(this):e._observers=[this]}function b(e,t,n,o){var r=Object.assign({},t);if(!e)return r;if("object"!=typeof e)throw TypeError("options must be an object");var s,l,u,p=Object.keys(e),c=p.length;function d(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var f=0;f<c;f++){if(s=p[f],!o&&!a.call(t,s))throw Error('Unknown "'+s+'" option');(l=e[s])!==i&&(u=n[s],r[s]=u?u(l,d):l)}return r}function g(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function k(e){var t="value must be type of "+e.join("|"),n=e.length,o=e[0],i=e[1];return 1===n?function(e,n){if(typeof e===o)return e;n(t)}:2===n?function(e,n){var a=typeof e;if(a===o||a===i)return e;n(t)}:function(o,i){for(var a=typeof o,r=n;r-- >0;)if(a===e[r])return o;i(t)}}Object.assign(v.prototype,{subscribe:function(e,t,n){var o=this,i=this._target,a=this._emitter,r=this._listeners,s=function(){var o=y.apply(null,arguments),r={data:o,name:t,original:e};n?!1!==n.call(i,r)&&a.emit.apply(a,[r.name].concat(o)):a.emit.apply(a,[t].concat(o))};if(r[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,a._newListener&&a._removeListener&&!o._onNewListener?(this._onNewListener=function(n){n===t&&null===r[e]&&(r[e]=s,o._on.call(i,e,s))},a.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!a.hasListeners(n)&&r[e]&&(r[e]=null,o._off.call(i,e,s))},r[e]=null,a.on("removeListener",this._onRemoveListener)):(r[e]=s,o._on.call(i,e,s))},unsubscribe:function(e){var t,n,o,i=this,a=this._listeners,r=this._emitter,s=this._off,l=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function u(){i._onNewListener&&(r.off("newListener",i._onNewListener),r.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=j.call(r,i);r._observers.splice(e,1)}if(e){if(!(t=a[e]))return;s.call(l,e,t),delete a[e],--this._listenersCount||u()}else{for(o=(n=c(a)).length;o-- >0;)e=n[o],s.call(l,e,a[e]);this._listeners={},this._listenersCount=0,u()}}});var w=k(["function"]),_=k(["object","function"]);function T(e,t,n){var o,i,a,r=0,s=new e(function(l,u,p){function c(){i&&(i=null),r&&(clearTimeout(r),r=0)}n=b(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}});var d=function(e){c(),l(e)},f=function(e){c(),u(e)};(o=!n.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof p)?t(d,f,p):(i=[function(e){f(e||Error("canceled"))}],t(d,f,function(e){if(a)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)}),a=!0),n.timeout>0&&(r=setTimeout(function(){var e=Error("timeout");e.code="ETIMEDOUT",r=0,s.cancel(e),u(e)},n.timeout))});return o||(s.cancel=function(e){if(i){for(var t=i.length,n=1;n<t;n++)i[n](e);i[0](e),i=null}}),s}function j(e){var t=this._observers;if(!t)return-1;for(var n=t.length,o=0;o<n;o++)if(t[o]._target===e)return o;return-1}function E(e,t,n,o,i){if(!n)return null;if(0===o){var a=typeof t;if("string"===a){var r,s,l=0,u=0,p=this.delimiter,d=p.length;if(-1!==(s=t.indexOf(p))){r=new Array(5);do{r[l++]=t.slice(u,s),u=s+d}while(-1!==(s=t.indexOf(p,u)));r[l++]=t.slice(u),t=r,i=l}else t=[t],i=1}else"object"===a?i=t.length:(t=[t],i=1)}var f,m,y,h,v,b,g,k=null,w=t[o],_=t[o+1];if(o===i)n._listeners&&("function"==typeof n._listeners?(e&&e.push(n._listeners),k=[n]):(e&&e.push.apply(e,n._listeners),k=[n]));else{if("*"===w){for(s=(b=c(n)).length;s-- >0;)"_listeners"!==(f=b[s])&&(g=E(e,t,n[f],o+1,i))&&(k?k.push.apply(k,g):k=g);return k}if("**"===w){for((v=o+1===i||o+2===i&&"*"===_)&&n._listeners&&(k=E(e,t,n,i,i)),s=(b=c(n)).length;s-- >0;)"_listeners"!==(f=b[s])&&("*"===f||"**"===f?(n[f]._listeners&&!v&&(g=E(e,t,n[f],i,i))&&(k?k.push.apply(k,g):k=g),g=E(e,t,n[f],o,i)):g=E(e,t,n[f],f===_?o+2:o,i),g&&(k?k.push.apply(k,g):k=g));return k}n[w]&&(k=E(e,t,n[w],o+1,i))}if((m=n["*"])&&E(e,t,m,o+1,i),y=n["**"])if(o<i)for(y._listeners&&E(e,t,y,i,i),s=(b=c(y)).length;s-- >0;)"_listeners"!==(f=b[s])&&(f===_?E(e,t,y[f],o+2,i):f===w?E(e,t,y[f],o+1,i):((h={})[f]=y[f],E(e,t,{"**":h},o+1,i)));else y._listeners?E(e,t,y,i,i):y["*"]&&y["*"]._listeners&&E(e,t,y["*"],i,i);return k}function A(e){for(var t,n,o,i=c(e),a=i.length;a-- >0;)(t=e[n=i[a]])&&(o=!0,"_listeners"===n||A(t)||delete e[n]);return o}function S(e,t,n){this.emitter=e,this.event=t,this.listener=n}function O(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,e)}S.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},O.EventEmitter2=O,O.prototype.listenTo=function(e,t,n){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function a(t){if("object"!=typeof t)throw TypeError("events must be an object");var i,a=n.reducers,r=j.call(o,e);i=-1===r?new v(o,e,n):o._observers[r];for(var s,l=c(t),u=l.length,p="function"==typeof a,d=0;d<u;d++)s=l[d],i.subscribe(s,t[s]||s,p?a:a&&a[s])}return n=b(n,{on:i,off:i,reducers:i},{on:w,off:w,reducers:_}),r(t)?a(h(t)):a("string"==typeof t?h(t.split(/\s+/)):t),this},O.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var o,i=n.length,a=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)o=n[i],e&&o._target!==e||(o.unsubscribe(t),a=!0);return a},O.prototype.delimiter=".",O.prototype.setMaxListeners=function(e){e!==i&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},O.prototype.getMaxListeners=function(){return this._maxListeners},O.prototype.event="",O.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},O.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},O.prototype._once=function(e,t,n,o){return this._many(e,1,t,n,o)},O.prototype.many=function(e,t,n,o){return this._many(e,t,n,!1,o)},O.prototype.prependMany=function(e,t,n,o){return this._many(e,t,n,!0,o)},O.prototype._many=function(e,t,n,o,i){var a=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function r(){return 0==--t&&a.off(e,r),n.apply(this,arguments)}return r._origin=n,this._on(e,r,o,i)},O.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var e,t,n,o,i,a,r=arguments[0],s=this.wildcard;if("newListener"===r&&!this._newListener&&!this._events.newListener)return!1;if(s&&(e=r,"newListener"!==r&&"removeListener"!==r&&"object"==typeof r)){if(n=r.length,l)for(o=0;o<n;o++)if("symbol"==typeof r[o]){a=!0;break}a||(r=r.join(this.delimiter))}var u,p=arguments.length;if(this._all&&this._all.length)for(o=0,n=(u=this._all.slice()).length;o<n;o++)switch(this.event=r,p){case 1:u[o].call(this,r);break;case 2:u[o].call(this,r,arguments[1]);break;case 3:u[o].call(this,r,arguments[1],arguments[2]);break;default:u[o].apply(this,arguments)}if(s)u=[],E.call(this,u,e,this.listenerTree,0,n);else{if("function"==typeof(u=this._events[r])){switch(this.event=r,p){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(p-1),i=1;i<p;i++)t[i-1]=arguments[i];u.apply(this,t)}return!0}u&&(u=u.slice())}if(u&&u.length){if(p>3)for(t=new Array(p-1),i=1;i<p;i++)t[i-1]=arguments[i];for(o=0,n=u.length;o<n;o++)switch(this.event=r,p){case 1:u[o].call(this);break;case 2:u[o].call(this,arguments[1]);break;case 3:u[o].call(this,arguments[1],arguments[2]);break;default:u[o].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===r)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},O.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var e,t,n,o,i,a,r=arguments[0],s=this.wildcard;if("newListener"===r&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(s&&(e=r,"newListener"!==r&&"removeListener"!==r&&"object"==typeof r)){if(o=r.length,l)for(i=0;i<o;i++)if("symbol"==typeof r[i]){t=!0;break}t||(r=r.join(this.delimiter))}var u,p=[],c=arguments.length;if(this._all)for(i=0,o=this._all.length;i<o;i++)switch(this.event=r,c){case 1:p.push(this._all[i].call(this,r));break;case 2:p.push(this._all[i].call(this,r,arguments[1]));break;case 3:p.push(this._all[i].call(this,r,arguments[1],arguments[2]));break;default:p.push(this._all[i].apply(this,arguments))}if(s?(u=[],E.call(this,u,e,this.listenerTree,0)):u=this._events[r],"function"==typeof u)switch(this.event=r,c){case 1:p.push(u.call(this));break;case 2:p.push(u.call(this,arguments[1]));break;case 3:p.push(u.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(c-1),a=1;a<c;a++)n[a-1]=arguments[a];p.push(u.apply(this,n))}else if(u&&u.length){if(u=u.slice(),c>3)for(n=new Array(c-1),a=1;a<c;a++)n[a-1]=arguments[a];for(i=0,o=u.length;i<o;i++)switch(this.event=r,c){case 1:p.push(u[i].call(this));break;case 2:p.push(u[i].call(this,arguments[1]));break;case 3:p.push(u[i].call(this,arguments[1],arguments[2]));break;default:p.push(u[i].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===r)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(p)},O.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},O.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},O.prototype.onAny=function(e){return this._onAny(e,!1)},O.prototype.prependAny=function(e){return this._onAny(e,!0)},O.prototype.addListener=O.prototype.on,O.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},O.prototype._on=function(t,n,o,a){if("function"==typeof t)return this._onAny(t,n),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");this._events||d.call(this);var r,l=this;return a!==i&&(r=function(t,n,o){if(!0===o)r=!0;else if(!1===o)a=!0;else{if(!o||"object"!=typeof o)throw TypeError("options should be an object or true");var a=o.async,r=o.promisify,l=o.nextTick,u=o.objectify}if(a||l||r){var c=n,d=n._origin||n;if(l&&!s)throw Error("process.nextTick is not supported");r===i&&(r="AsyncFunction"===n.constructor.name),(n=function(){var t=arguments,n=this,o=this.event;return r?l?Promise.resolve():new Promise(function(e){p(e)}).then(function(){return n.event=o,c.apply(n,t)}):(l?e.nextTick:p)(function(){n.event=o,c.apply(n,t)})})._async=!0,n._origin=d}return[n,u?new S(this,t,n):this]}.call(this,t,n,a),n=r[0],l=r[1]),this._newListener&&this.emit("newListener",t,n),this.wildcard?(function(e,t,n){var o,i,a=0,r=0,s=this.delimiter,l=s.length;if("string"==typeof e)if(-1!==(o=e.indexOf(s))){i=new Array(5);do{i[a++]=e.slice(r,o),r=o+l}while(-1!==(o=e.indexOf(s,r)));i[a++]=e.slice(r)}else i=[e],a=1;else i=e,a=e.length;if(a>1)for(o=0;o+1<a;o++)if("**"===i[o]&&"**"===i[o+1])return;var u,p=this.listenerTree;for(o=0;o<a;o++)if(p=p[u=i[o]]||(p[u]={}),o===a-1)return p._listeners?("function"==typeof p._listeners&&(p._listeners=[p._listeners]),n?p._listeners.unshift(t):p._listeners.push(t),!p._listeners.warned&&this._maxListeners>0&&p._listeners.length>this._maxListeners&&(p._listeners.warned=!0,m.call(this,p._listeners.length,u))):p._listeners=t,!0;return!0}.call(this,t,n,o),l):(this._events[t]?("function"==typeof this._events[t]&&(this._events[t]=[this._events[t]]),o?this._events[t].unshift(n):this._events[t].push(n),!this._events[t].warned&&this._maxListeners>0&&this._events[t].length>this._maxListeners&&(this._events[t].warned=!0,m.call(this,this._events[t].length,t))):this._events[t]=n,l)},O.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,o=[];if(this.wildcard){var i="string"==typeof e?e.split(this.delimiter):e.slice();if(!(o=E.call(this,null,i,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],o.push({_listeners:n})}for(var a=0;a<o.length;a++){var s=o[a];if(n=s._listeners,r(n)){for(var l=-1,u=0,p=n.length;u<p;u++)if(n[u]===t||n[u].listener&&n[u].listener===t||n[u]._origin&&n[u]._origin===t){l=u;break}if(l<0)continue;return this.wildcard?s._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&A(this.listenerTree),this},O.prototype.offAny=function(e){var t,n=0,o=0;if(e&&this._all&&this._all.length>0){for(n=0,o=(t=this._all).length;n<o;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,o=t.length;n<o;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},O.prototype.removeListener=O.prototype.off,O.prototype.removeAllListeners=function(e){if(e===i)return!this._events||d.call(this),this;if(this.wildcard){var t,n=E.call(this,null,e,this.listenerTree,0);if(!n)return this;for(t=0;t<n.length;t++)n[t]._listeners=null;this.listenerTree&&A(this.listenerTree)}else this._events&&(this._events[e]=null);return this},O.prototype.listeners=function(e){var t,n,o,a,r,s=this._events;if(e===i){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!s)return[];for(a=(t=c(s)).length,o=[];a-- >0;)"function"==typeof(n=s[t[a]])?o.push(n):o.push.apply(o,n);return o}if(this.wildcard){if(!(r=this.listenerTree))return[];var l=[],u="string"==typeof e?e.split(this.delimiter):e.slice();return E.call(this,l,u,r,0),l}return s&&(n=s[e])?"function"==typeof n?[n]:n:[]},O.prototype.eventNames=function(e){var t=this._events;return this.wildcard?function e(t,n,o,i){for(var a,r,s,l,u=c(t),p=u.length,d=t._listeners;p-- >0;)a=t[r=u[p]],s="_listeners"===r?o:o?o.concat(r):[r],l=i||"symbol"==typeof r,d&&n.push(l?s:s.join(this.delimiter)),"object"==typeof a&&e.call(this,a,n,s,l);return n}.call(this,this.listenerTree,[],null,e):t?c(t):[]},O.prototype.listenerCount=function(e){return this.listeners(e).length},O.prototype.hasListeners=function(e){if(this.wildcard){var t=[],n="string"==typeof e?e.split(this.delimiter):e.slice();return E.call(this,t,n,this.listenerTree,0),t.length>0}var o=this._events,a=this._all;return!!(a&&a.length||o&&(e===i?c(o).length:o[e]))},O.prototype.listenersAny=function(){return this._all?this._all:[]},O.prototype.waitFor=function(e,t){var n=this,o=typeof t;return"number"===o?t={timeout:t}:"function"===o&&(t={filter:t}),T((t=b(t,{timeout:0,filter:i,handleError:!1,Promise:Promise,overload:!1},{filter:w,Promise:g})).Promise,function(o,i,a){function r(){var a=t.filter;if(!a||a.apply(n,arguments))if(n.off(e,r),t.handleError){var s=arguments[0];s?i(s):o(y.apply(null,arguments).slice(1))}else o(y.apply(null,arguments))}a(function(){n.off(e,r)}),n._on(e,r,!1)},{timeout:t.timeout,overload:t.overload})};var x=O.prototype;Object.defineProperties(O,{defaultMaxListeners:{get:function(){return x._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");x._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return T((n=b(n,{Promise:Promise,timeout:0,overload:!1},{Promise:g})).Promise,function(n,o,i){var a;if("function"==typeof e.addEventListener)return a=function(){n(y.apply(null,arguments))},i(function(){e.removeEventListener(t,a)}),void e.addEventListener(t,a,{once:!0});var r,s=function(){r&&e.removeListener("error",r),n(y.apply(null,arguments))};"error"!==t&&(r=function(n){e.removeListener(t,s),o(n)},e.once("error",r)),i(function(){r&&e.removeListener("error",r),e.removeListener(t,s)}),e.once(t,s)},{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(x,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"object"==typeof n?t.exports=O:new Function("","return this")().EventEmitter2=O}()}).call(this)}).call(this,e("_process"),e("timers").setImmediate)},{_process:37,timers:38}],7:[function(e,t,n){t.exports=e("./lib/axios")},{"./lib/axios":9}],8:[function(e,t,n){"use strict";var o=e("./../utils"),i=e("./../core/settle"),a=e("./../helpers/cookies"),r=e("./../helpers/buildURL"),s=e("../core/buildFullPath"),l=e("./../helpers/parseHeaders"),u=e("./../helpers/isURLSameOrigin"),p=e("../core/createError");t.exports=function(e){return new Promise(function(t,n){var c=e.data,d=e.headers,f=e.responseType;o.isFormData(c)&&delete d["Content-Type"];var m=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(y+":"+h)}var v=s(e.baseURL,e.url);function b(){if(m){var o="getAllResponseHeaders"in m?l(m.getAllResponseHeaders()):null,a={data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:o,config:e,request:m};i(t,n,a),m=null}}if(m.open(e.method.toUpperCase(),r(v,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(b)},m.onabort=function(){m&&(n(p("Request aborted",e,"ECONNABORTED",m)),m=null)},m.onerror=function(){n(p("Network Error",e,null,m)),m=null},m.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(p(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",m)),m=null},o.isStandardBrowserEnv()){var g=(e.withCredentials||u(v))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}"setRequestHeader"in m&&o.forEach(d,function(e,t){void 0===c&&"content-type"===t.toLowerCase()?delete d[t]:m.setRequestHeader(t,e)}),o.isUndefined(e.withCre