glitch-javascript-sdk 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -3031,13 +3031,13 @@ Item.prototype.run = function () {
3031
3031
  this.fun.apply(null, this.array);
3032
3032
  };
3033
3033
  var title = 'browser';
3034
- var platform$1 = 'browser';
3035
- var browser = true;
3034
+ var platform$2 = 'browser';
3035
+ var browser$1 = true;
3036
3036
  var env = {};
3037
3037
  var argv = [];
3038
3038
  var version = ''; // empty string to avoid regexp issues
3039
3039
  var versions = {};
3040
- var release = {};
3040
+ var release$1 = {};
3041
3041
  var config = {};
3042
3042
 
3043
3043
  function noop$1() {}
@@ -3087,16 +3087,16 @@ function hrtime(previousTimestamp){
3087
3087
  }
3088
3088
 
3089
3089
  var startTime = new Date();
3090
- function uptime() {
3090
+ function uptime$1() {
3091
3091
  var currentTime = new Date();
3092
3092
  var dif = currentTime - startTime;
3093
3093
  return dif / 1000;
3094
3094
  }
3095
3095
 
3096
- var browser$1 = {
3096
+ var browser$1$1 = {
3097
3097
  nextTick: nextTick,
3098
3098
  title: title,
3099
- browser: browser,
3099
+ browser: browser$1,
3100
3100
  env: env,
3101
3101
  argv: argv,
3102
3102
  version: version,
@@ -3113,10 +3113,10 @@ var browser$1 = {
3113
3113
  chdir: chdir,
3114
3114
  umask: umask,
3115
3115
  hrtime: hrtime,
3116
- platform: platform$1,
3117
- release: release,
3116
+ platform: platform$2,
3117
+ release: release$1,
3118
3118
  config: config,
3119
- uptime: uptime
3119
+ uptime: uptime$1
3120
3120
  };
3121
3121
 
3122
3122
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -6236,7 +6236,7 @@ function IncomingMessage(xhr, response, mode) {
6236
6236
  // Fake the 'close' event, but only once 'end' fires
6237
6237
  self.on('end', function() {
6238
6238
  // The nextTick is necessary to prevent the 'request' module from causing an infinite loop
6239
- browser$1.nextTick(function() {
6239
+ browser$1$1.nextTick(function() {
6240
6240
  self.emit('close');
6241
6241
  });
6242
6242
  });
@@ -6572,7 +6572,7 @@ ClientRequest.prototype._onFinish = function() {
6572
6572
  try {
6573
6573
  xhr.open(self._opts.method, self._opts.url, true);
6574
6574
  } catch (err) {
6575
- browser$1.nextTick(function() {
6575
+ browser$1$1.nextTick(function() {
6576
6576
  self.emit('error', err);
6577
6577
  });
6578
6578
  return
@@ -6618,7 +6618,7 @@ ClientRequest.prototype._onFinish = function() {
6618
6618
  try {
6619
6619
  xhr.send(body);
6620
6620
  } catch (err) {
6621
- browser$1.nextTick(function() {
6621
+ browser$1$1.nextTick(function() {
6622
6622
  self.emit('error', err);
6623
6623
  });
6624
6624
  return
@@ -8181,7 +8181,7 @@ var _polyfillNode_https = /*#__PURE__*/Object.freeze({
8181
8181
 
8182
8182
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_https);
8183
8183
 
8184
- var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_url);
8184
+ var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_url);
8185
8185
 
8186
8186
  var _polyfillNode_fs = {};
8187
8187
 
@@ -8194,7 +8194,7 @@ var require$$6 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1);
8194
8194
 
8195
8195
  var mimeTypes = {};
8196
8196
 
8197
- var require$$0 = {
8197
+ var require$$0$2 = {
8198
8198
  "application/1d-interleaved-parityfec": {
8199
8199
  source: "iana"
8200
8200
  },
@@ -18908,7 +18908,7 @@ var require$$0 = {
18908
18908
  * Module exports.
18909
18909
  */
18910
18910
 
18911
- var mimeDb = require$$0;
18911
+ var mimeDb = require$$0$2;
18912
18912
 
18913
18913
  /*!
18914
18914
  * mime-types
@@ -19112,8 +19112,8 @@ function defer$1(fn)
19112
19112
  var nextTick = typeof setImmediate == 'function'
19113
19113
  ? setImmediate
19114
19114
  : (
19115
- typeof browser$1 == 'object' && typeof browser$1.nextTick == 'function'
19116
- ? browser$1.nextTick
19115
+ typeof browser$1$1 == 'object' && typeof browser$1$1.nextTick == 'function'
19116
+ ? browser$1$1.nextTick
19117
19117
  : null
19118
19118
  );
19119
19119
 
@@ -19501,7 +19501,7 @@ var util = text_min;
19501
19501
  var path = require$$2$1;
19502
19502
  var http$1 = require$$1;
19503
19503
  var https$1 = require$$2;
19504
- var parseUrl$1 = require$$0$1.parse;
19504
+ var parseUrl$1 = require$$0$3.parse;
19505
19505
  var fs = require$$6;
19506
19506
  var Stream = require$$3.Stream;
19507
19507
  var mime = mimeTypes;
@@ -19897,7 +19897,7 @@ FormData$1.prototype.getLength = function(cb) {
19897
19897
  }
19898
19898
 
19899
19899
  if (!this._valuesToMeasure.length) {
19900
- browser$1.nextTick(cb.bind(this, null, knownLength));
19900
+ browser$1$1.nextTick(cb.bind(this, null, knownLength));
19901
19901
  return;
19902
19902
  }
19903
19903
 
@@ -20399,7 +20399,7 @@ var transitionalDefaults = {
20399
20399
 
20400
20400
  var URLSearchParams = url$1.URLSearchParams;
20401
20401
 
20402
- var platform = {
20402
+ var platform$1 = {
20403
20403
  isNode: true,
20404
20404
  classes: {
20405
20405
  URLSearchParams,
@@ -20410,7 +20410,7 @@ var platform = {
20410
20410
  };
20411
20411
 
20412
20412
  function toURLEncodedForm(data, options) {
20413
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
20413
+ return toFormData(data, new platform$1.classes.URLSearchParams(), Object.assign({
20414
20414
  visitor: function(value, key, path, helpers) {
20415
20415
  if (utils.isBuffer(value)) {
20416
20416
  this.append(key, value.toString('base64'));
@@ -20637,8 +20637,8 @@ const defaults = {
20637
20637
  maxBodyLength: -1,
20638
20638
 
20639
20639
  env: {
20640
- FormData: platform.classes.FormData,
20641
- Blob: platform.classes.Blob
20640
+ FormData: platform$1.classes.FormData,
20641
+ Blob: platform$1.classes.Blob
20642
20642
  },
20643
20643
 
20644
20644
  validateStatus: function validateStatus(status) {
@@ -21120,7 +21120,7 @@ function buildFullPath(baseURL, requestedURL) {
21120
21120
  return requestedURL;
21121
21121
  }
21122
21122
 
21123
- var parseUrl = require$$0$1.parse;
21123
+ var parseUrl = require$$0$3.parse;
21124
21124
 
21125
21125
  var DEFAULT_PORTS = {
21126
21126
  ftp: 21,
@@ -21222,7 +21222,7 @@ function shouldProxy(hostname, port) {
21222
21222
  * @private
21223
21223
  */
21224
21224
  function getEnv(key) {
21225
- return browser$1.env[key.toLowerCase()] || browser$1.env[key.toUpperCase()] || '';
21225
+ return browser$1$1.env[key.toLowerCase()] || browser$1$1.env[key.toUpperCase()] || '';
21226
21226
  }
21227
21227
 
21228
21228
  var getProxyForUrl_1 = getProxyForUrl;
@@ -21710,13 +21710,1379 @@ var _polyfillNode_assert = /*#__PURE__*/Object.freeze({
21710
21710
 
21711
21711
  var require$$4 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_assert);
21712
21712
 
21713
+ var src = {exports: {}};
21714
+
21715
+ var browser = {exports: {}};
21716
+
21717
+ /**
21718
+ * Helpers.
21719
+ */
21720
+
21721
+ var ms;
21722
+ var hasRequiredMs;
21723
+
21724
+ function requireMs () {
21725
+ if (hasRequiredMs) return ms;
21726
+ hasRequiredMs = 1;
21727
+ var s = 1000;
21728
+ var m = s * 60;
21729
+ var h = m * 60;
21730
+ var d = h * 24;
21731
+ var w = d * 7;
21732
+ var y = d * 365.25;
21733
+
21734
+ /**
21735
+ * Parse or format the given `val`.
21736
+ *
21737
+ * Options:
21738
+ *
21739
+ * - `long` verbose formatting [false]
21740
+ *
21741
+ * @param {String|Number} val
21742
+ * @param {Object} [options]
21743
+ * @throws {Error} throw an error if val is not a non-empty string or a number
21744
+ * @return {String|Number}
21745
+ * @api public
21746
+ */
21747
+
21748
+ ms = function(val, options) {
21749
+ options = options || {};
21750
+ var type = typeof val;
21751
+ if (type === 'string' && val.length > 0) {
21752
+ return parse(val);
21753
+ } else if (type === 'number' && isFinite(val)) {
21754
+ return options.long ? fmtLong(val) : fmtShort(val);
21755
+ }
21756
+ throw new Error(
21757
+ 'val is not a non-empty string or a valid number. val=' +
21758
+ JSON.stringify(val)
21759
+ );
21760
+ };
21761
+
21762
+ /**
21763
+ * Parse the given `str` and return milliseconds.
21764
+ *
21765
+ * @param {String} str
21766
+ * @return {Number}
21767
+ * @api private
21768
+ */
21769
+
21770
+ function parse(str) {
21771
+ str = String(str);
21772
+ if (str.length > 100) {
21773
+ return;
21774
+ }
21775
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
21776
+ str
21777
+ );
21778
+ if (!match) {
21779
+ return;
21780
+ }
21781
+ var n = parseFloat(match[1]);
21782
+ var type = (match[2] || 'ms').toLowerCase();
21783
+ switch (type) {
21784
+ case 'years':
21785
+ case 'year':
21786
+ case 'yrs':
21787
+ case 'yr':
21788
+ case 'y':
21789
+ return n * y;
21790
+ case 'weeks':
21791
+ case 'week':
21792
+ case 'w':
21793
+ return n * w;
21794
+ case 'days':
21795
+ case 'day':
21796
+ case 'd':
21797
+ return n * d;
21798
+ case 'hours':
21799
+ case 'hour':
21800
+ case 'hrs':
21801
+ case 'hr':
21802
+ case 'h':
21803
+ return n * h;
21804
+ case 'minutes':
21805
+ case 'minute':
21806
+ case 'mins':
21807
+ case 'min':
21808
+ case 'm':
21809
+ return n * m;
21810
+ case 'seconds':
21811
+ case 'second':
21812
+ case 'secs':
21813
+ case 'sec':
21814
+ case 's':
21815
+ return n * s;
21816
+ case 'milliseconds':
21817
+ case 'millisecond':
21818
+ case 'msecs':
21819
+ case 'msec':
21820
+ case 'ms':
21821
+ return n;
21822
+ default:
21823
+ return undefined;
21824
+ }
21825
+ }
21826
+
21827
+ /**
21828
+ * Short format for `ms`.
21829
+ *
21830
+ * @param {Number} ms
21831
+ * @return {String}
21832
+ * @api private
21833
+ */
21834
+
21835
+ function fmtShort(ms) {
21836
+ var msAbs = Math.abs(ms);
21837
+ if (msAbs >= d) {
21838
+ return Math.round(ms / d) + 'd';
21839
+ }
21840
+ if (msAbs >= h) {
21841
+ return Math.round(ms / h) + 'h';
21842
+ }
21843
+ if (msAbs >= m) {
21844
+ return Math.round(ms / m) + 'm';
21845
+ }
21846
+ if (msAbs >= s) {
21847
+ return Math.round(ms / s) + 's';
21848
+ }
21849
+ return ms + 'ms';
21850
+ }
21851
+
21852
+ /**
21853
+ * Long format for `ms`.
21854
+ *
21855
+ * @param {Number} ms
21856
+ * @return {String}
21857
+ * @api private
21858
+ */
21859
+
21860
+ function fmtLong(ms) {
21861
+ var msAbs = Math.abs(ms);
21862
+ if (msAbs >= d) {
21863
+ return plural(ms, msAbs, d, 'day');
21864
+ }
21865
+ if (msAbs >= h) {
21866
+ return plural(ms, msAbs, h, 'hour');
21867
+ }
21868
+ if (msAbs >= m) {
21869
+ return plural(ms, msAbs, m, 'minute');
21870
+ }
21871
+ if (msAbs >= s) {
21872
+ return plural(ms, msAbs, s, 'second');
21873
+ }
21874
+ return ms + ' ms';
21875
+ }
21876
+
21877
+ /**
21878
+ * Pluralization helper.
21879
+ */
21880
+
21881
+ function plural(ms, msAbs, n, name) {
21882
+ var isPlural = msAbs >= n * 1.5;
21883
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
21884
+ }
21885
+ return ms;
21886
+ }
21887
+
21888
+ var common;
21889
+ var hasRequiredCommon;
21890
+
21891
+ function requireCommon () {
21892
+ if (hasRequiredCommon) return common;
21893
+ hasRequiredCommon = 1;
21894
+ /**
21895
+ * This is the common logic for both the Node.js and web browser
21896
+ * implementations of `debug()`.
21897
+ */
21898
+
21899
+ function setup(env) {
21900
+ createDebug.debug = createDebug;
21901
+ createDebug.default = createDebug;
21902
+ createDebug.coerce = coerce;
21903
+ createDebug.disable = disable;
21904
+ createDebug.enable = enable;
21905
+ createDebug.enabled = enabled;
21906
+ createDebug.humanize = requireMs();
21907
+ createDebug.destroy = destroy;
21908
+
21909
+ Object.keys(env).forEach(key => {
21910
+ createDebug[key] = env[key];
21911
+ });
21912
+
21913
+ /**
21914
+ * The currently active debug mode names, and names to skip.
21915
+ */
21916
+
21917
+ createDebug.names = [];
21918
+ createDebug.skips = [];
21919
+
21920
+ /**
21921
+ * Map of special "%n" handling functions, for the debug "format" argument.
21922
+ *
21923
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
21924
+ */
21925
+ createDebug.formatters = {};
21926
+
21927
+ /**
21928
+ * Selects a color for a debug namespace
21929
+ * @param {String} namespace The namespace string for the debug instance to be colored
21930
+ * @return {Number|String} An ANSI color code for the given namespace
21931
+ * @api private
21932
+ */
21933
+ function selectColor(namespace) {
21934
+ let hash = 0;
21935
+
21936
+ for (let i = 0; i < namespace.length; i++) {
21937
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
21938
+ hash |= 0; // Convert to 32bit integer
21939
+ }
21940
+
21941
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
21942
+ }
21943
+ createDebug.selectColor = selectColor;
21944
+
21945
+ /**
21946
+ * Create a debugger with the given `namespace`.
21947
+ *
21948
+ * @param {String} namespace
21949
+ * @return {Function}
21950
+ * @api public
21951
+ */
21952
+ function createDebug(namespace) {
21953
+ let prevTime;
21954
+ let enableOverride = null;
21955
+ let namespacesCache;
21956
+ let enabledCache;
21957
+
21958
+ function debug(...args) {
21959
+ // Disabled?
21960
+ if (!debug.enabled) {
21961
+ return;
21962
+ }
21963
+
21964
+ const self = debug;
21965
+
21966
+ // Set `diff` timestamp
21967
+ const curr = Number(new Date());
21968
+ const ms = curr - (prevTime || curr);
21969
+ self.diff = ms;
21970
+ self.prev = prevTime;
21971
+ self.curr = curr;
21972
+ prevTime = curr;
21973
+
21974
+ args[0] = createDebug.coerce(args[0]);
21975
+
21976
+ if (typeof args[0] !== 'string') {
21977
+ // Anything else let's inspect with %O
21978
+ args.unshift('%O');
21979
+ }
21980
+
21981
+ // Apply any `formatters` transformations
21982
+ let index = 0;
21983
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
21984
+ // If we encounter an escaped % then don't increase the array index
21985
+ if (match === '%%') {
21986
+ return '%';
21987
+ }
21988
+ index++;
21989
+ const formatter = createDebug.formatters[format];
21990
+ if (typeof formatter === 'function') {
21991
+ const val = args[index];
21992
+ match = formatter.call(self, val);
21993
+
21994
+ // Now we need to remove `args[index]` since it's inlined in the `format`
21995
+ args.splice(index, 1);
21996
+ index--;
21997
+ }
21998
+ return match;
21999
+ });
22000
+
22001
+ // Apply env-specific formatting (colors, etc.)
22002
+ createDebug.formatArgs.call(self, args);
22003
+
22004
+ const logFn = self.log || createDebug.log;
22005
+ logFn.apply(self, args);
22006
+ }
22007
+
22008
+ debug.namespace = namespace;
22009
+ debug.useColors = createDebug.useColors();
22010
+ debug.color = createDebug.selectColor(namespace);
22011
+ debug.extend = extend;
22012
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
22013
+
22014
+ Object.defineProperty(debug, 'enabled', {
22015
+ enumerable: true,
22016
+ configurable: false,
22017
+ get: () => {
22018
+ if (enableOverride !== null) {
22019
+ return enableOverride;
22020
+ }
22021
+ if (namespacesCache !== createDebug.namespaces) {
22022
+ namespacesCache = createDebug.namespaces;
22023
+ enabledCache = createDebug.enabled(namespace);
22024
+ }
22025
+
22026
+ return enabledCache;
22027
+ },
22028
+ set: v => {
22029
+ enableOverride = v;
22030
+ }
22031
+ });
22032
+
22033
+ // Env-specific initialization logic for debug instances
22034
+ if (typeof createDebug.init === 'function') {
22035
+ createDebug.init(debug);
22036
+ }
22037
+
22038
+ return debug;
22039
+ }
22040
+
22041
+ function extend(namespace, delimiter) {
22042
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
22043
+ newDebug.log = this.log;
22044
+ return newDebug;
22045
+ }
22046
+
22047
+ /**
22048
+ * Enables a debug mode by namespaces. This can include modes
22049
+ * separated by a colon and wildcards.
22050
+ *
22051
+ * @param {String} namespaces
22052
+ * @api public
22053
+ */
22054
+ function enable(namespaces) {
22055
+ createDebug.save(namespaces);
22056
+ createDebug.namespaces = namespaces;
22057
+
22058
+ createDebug.names = [];
22059
+ createDebug.skips = [];
22060
+
22061
+ let i;
22062
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
22063
+ const len = split.length;
22064
+
22065
+ for (i = 0; i < len; i++) {
22066
+ if (!split[i]) {
22067
+ // ignore empty strings
22068
+ continue;
22069
+ }
22070
+
22071
+ namespaces = split[i].replace(/\*/g, '.*?');
22072
+
22073
+ if (namespaces[0] === '-') {
22074
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
22075
+ } else {
22076
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
22077
+ }
22078
+ }
22079
+ }
22080
+
22081
+ /**
22082
+ * Disable debug output.
22083
+ *
22084
+ * @return {String} namespaces
22085
+ * @api public
22086
+ */
22087
+ function disable() {
22088
+ const namespaces = [
22089
+ ...createDebug.names.map(toNamespace),
22090
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
22091
+ ].join(',');
22092
+ createDebug.enable('');
22093
+ return namespaces;
22094
+ }
22095
+
22096
+ /**
22097
+ * Returns true if the given mode name is enabled, false otherwise.
22098
+ *
22099
+ * @param {String} name
22100
+ * @return {Boolean}
22101
+ * @api public
22102
+ */
22103
+ function enabled(name) {
22104
+ if (name[name.length - 1] === '*') {
22105
+ return true;
22106
+ }
22107
+
22108
+ let i;
22109
+ let len;
22110
+
22111
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
22112
+ if (createDebug.skips[i].test(name)) {
22113
+ return false;
22114
+ }
22115
+ }
22116
+
22117
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
22118
+ if (createDebug.names[i].test(name)) {
22119
+ return true;
22120
+ }
22121
+ }
22122
+
22123
+ return false;
22124
+ }
22125
+
22126
+ /**
22127
+ * Convert regexp to namespace
22128
+ *
22129
+ * @param {RegExp} regxep
22130
+ * @return {String} namespace
22131
+ * @api private
22132
+ */
22133
+ function toNamespace(regexp) {
22134
+ return regexp.toString()
22135
+ .substring(2, regexp.toString().length - 2)
22136
+ .replace(/\.\*\?$/, '*');
22137
+ }
22138
+
22139
+ /**
22140
+ * Coerce `val`.
22141
+ *
22142
+ * @param {Mixed} val
22143
+ * @return {Mixed}
22144
+ * @api private
22145
+ */
22146
+ function coerce(val) {
22147
+ if (val instanceof Error) {
22148
+ return val.stack || val.message;
22149
+ }
22150
+ return val;
22151
+ }
22152
+
22153
+ /**
22154
+ * XXX DO NOT USE. This is a temporary stub function.
22155
+ * XXX It WILL be removed in the next major release.
22156
+ */
22157
+ function destroy() {
22158
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
22159
+ }
22160
+
22161
+ createDebug.enable(createDebug.load());
22162
+
22163
+ return createDebug;
22164
+ }
22165
+
22166
+ common = setup;
22167
+ return common;
22168
+ }
22169
+
22170
+ /* eslint-env browser */
22171
+
22172
+ var hasRequiredBrowser;
22173
+
22174
+ function requireBrowser () {
22175
+ if (hasRequiredBrowser) return browser.exports;
22176
+ hasRequiredBrowser = 1;
22177
+ (function (module, exports) {
22178
+ /**
22179
+ * This is the web browser implementation of `debug()`.
22180
+ */
22181
+
22182
+ exports.formatArgs = formatArgs;
22183
+ exports.save = save;
22184
+ exports.load = load;
22185
+ exports.useColors = useColors;
22186
+ exports.storage = localstorage();
22187
+ exports.destroy = (() => {
22188
+ let warned = false;
22189
+
22190
+ return () => {
22191
+ if (!warned) {
22192
+ warned = true;
22193
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
22194
+ }
22195
+ };
22196
+ })();
22197
+
22198
+ /**
22199
+ * Colors.
22200
+ */
22201
+
22202
+ exports.colors = [
22203
+ '#0000CC',
22204
+ '#0000FF',
22205
+ '#0033CC',
22206
+ '#0033FF',
22207
+ '#0066CC',
22208
+ '#0066FF',
22209
+ '#0099CC',
22210
+ '#0099FF',
22211
+ '#00CC00',
22212
+ '#00CC33',
22213
+ '#00CC66',
22214
+ '#00CC99',
22215
+ '#00CCCC',
22216
+ '#00CCFF',
22217
+ '#3300CC',
22218
+ '#3300FF',
22219
+ '#3333CC',
22220
+ '#3333FF',
22221
+ '#3366CC',
22222
+ '#3366FF',
22223
+ '#3399CC',
22224
+ '#3399FF',
22225
+ '#33CC00',
22226
+ '#33CC33',
22227
+ '#33CC66',
22228
+ '#33CC99',
22229
+ '#33CCCC',
22230
+ '#33CCFF',
22231
+ '#6600CC',
22232
+ '#6600FF',
22233
+ '#6633CC',
22234
+ '#6633FF',
22235
+ '#66CC00',
22236
+ '#66CC33',
22237
+ '#9900CC',
22238
+ '#9900FF',
22239
+ '#9933CC',
22240
+ '#9933FF',
22241
+ '#99CC00',
22242
+ '#99CC33',
22243
+ '#CC0000',
22244
+ '#CC0033',
22245
+ '#CC0066',
22246
+ '#CC0099',
22247
+ '#CC00CC',
22248
+ '#CC00FF',
22249
+ '#CC3300',
22250
+ '#CC3333',
22251
+ '#CC3366',
22252
+ '#CC3399',
22253
+ '#CC33CC',
22254
+ '#CC33FF',
22255
+ '#CC6600',
22256
+ '#CC6633',
22257
+ '#CC9900',
22258
+ '#CC9933',
22259
+ '#CCCC00',
22260
+ '#CCCC33',
22261
+ '#FF0000',
22262
+ '#FF0033',
22263
+ '#FF0066',
22264
+ '#FF0099',
22265
+ '#FF00CC',
22266
+ '#FF00FF',
22267
+ '#FF3300',
22268
+ '#FF3333',
22269
+ '#FF3366',
22270
+ '#FF3399',
22271
+ '#FF33CC',
22272
+ '#FF33FF',
22273
+ '#FF6600',
22274
+ '#FF6633',
22275
+ '#FF9900',
22276
+ '#FF9933',
22277
+ '#FFCC00',
22278
+ '#FFCC33'
22279
+ ];
22280
+
22281
+ /**
22282
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
22283
+ * and the Firebug extension (any Firefox version) are known
22284
+ * to support "%c" CSS customizations.
22285
+ *
22286
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
22287
+ */
22288
+
22289
+ // eslint-disable-next-line complexity
22290
+ function useColors() {
22291
+ // NB: In an Electron preload script, document will be defined but not fully
22292
+ // initialized. Since we know we're in Chrome, we'll just detect this case
22293
+ // explicitly
22294
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
22295
+ return true;
22296
+ }
22297
+
22298
+ // Internet Explorer and Edge do not support colors.
22299
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
22300
+ return false;
22301
+ }
22302
+
22303
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
22304
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
22305
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
22306
+ // Is firebug? http://stackoverflow.com/a/398120/376773
22307
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
22308
+ // Is firefox >= v31?
22309
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
22310
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
22311
+ // Double check webkit in userAgent just in case we are in a worker
22312
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
22313
+ }
22314
+
22315
+ /**
22316
+ * Colorize log arguments if enabled.
22317
+ *
22318
+ * @api public
22319
+ */
22320
+
22321
+ function formatArgs(args) {
22322
+ args[0] = (this.useColors ? '%c' : '') +
22323
+ this.namespace +
22324
+ (this.useColors ? ' %c' : ' ') +
22325
+ args[0] +
22326
+ (this.useColors ? '%c ' : ' ') +
22327
+ '+' + module.exports.humanize(this.diff);
22328
+
22329
+ if (!this.useColors) {
22330
+ return;
22331
+ }
22332
+
22333
+ const c = 'color: ' + this.color;
22334
+ args.splice(1, 0, c, 'color: inherit');
22335
+
22336
+ // The final "%c" is somewhat tricky, because there could be other
22337
+ // arguments passed either before or after the %c, so we need to
22338
+ // figure out the correct index to insert the CSS into
22339
+ let index = 0;
22340
+ let lastC = 0;
22341
+ args[0].replace(/%[a-zA-Z%]/g, match => {
22342
+ if (match === '%%') {
22343
+ return;
22344
+ }
22345
+ index++;
22346
+ if (match === '%c') {
22347
+ // We only are interested in the *last* %c
22348
+ // (the user may have provided their own)
22349
+ lastC = index;
22350
+ }
22351
+ });
22352
+
22353
+ args.splice(lastC, 0, c);
22354
+ }
22355
+
22356
+ /**
22357
+ * Invokes `console.debug()` when available.
22358
+ * No-op when `console.debug` is not a "function".
22359
+ * If `console.debug` is not available, falls back
22360
+ * to `console.log`.
22361
+ *
22362
+ * @api public
22363
+ */
22364
+ exports.log = console.debug || console.log || (() => {});
22365
+
22366
+ /**
22367
+ * Save `namespaces`.
22368
+ *
22369
+ * @param {String} namespaces
22370
+ * @api private
22371
+ */
22372
+ function save(namespaces) {
22373
+ try {
22374
+ if (namespaces) {
22375
+ exports.storage.setItem('debug', namespaces);
22376
+ } else {
22377
+ exports.storage.removeItem('debug');
22378
+ }
22379
+ } catch (error) {
22380
+ // Swallow
22381
+ // XXX (@Qix-) should we be logging these?
22382
+ }
22383
+ }
22384
+
22385
+ /**
22386
+ * Load `namespaces`.
22387
+ *
22388
+ * @return {String} returns the previously persisted debug modes
22389
+ * @api private
22390
+ */
22391
+ function load() {
22392
+ let r;
22393
+ try {
22394
+ r = exports.storage.getItem('debug');
22395
+ } catch (error) {
22396
+ // Swallow
22397
+ // XXX (@Qix-) should we be logging these?
22398
+ }
22399
+
22400
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
22401
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
22402
+ r = process.env.DEBUG;
22403
+ }
22404
+
22405
+ return r;
22406
+ }
22407
+
22408
+ /**
22409
+ * Localstorage attempts to return the localstorage.
22410
+ *
22411
+ * This is necessary because safari throws
22412
+ * when a user disables cookies/localstorage
22413
+ * and you attempt to access it.
22414
+ *
22415
+ * @return {LocalStorage}
22416
+ * @api private
22417
+ */
22418
+
22419
+ function localstorage() {
22420
+ try {
22421
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
22422
+ // The Browser also has localStorage in the global context.
22423
+ return localStorage;
22424
+ } catch (error) {
22425
+ // Swallow
22426
+ // XXX (@Qix-) should we be logging these?
22427
+ }
22428
+ }
22429
+
22430
+ module.exports = requireCommon()(exports);
22431
+
22432
+ const {formatters} = module.exports;
22433
+
22434
+ /**
22435
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
22436
+ */
22437
+
22438
+ formatters.j = function (v) {
22439
+ try {
22440
+ return JSON.stringify(v);
22441
+ } catch (error) {
22442
+ return '[UnexpectedJSONParseError]: ' + error.message;
22443
+ }
22444
+ };
22445
+ } (browser, browser.exports));
22446
+ return browser.exports;
22447
+ }
22448
+
22449
+ var node = {exports: {}};
22450
+
22451
+ // MIT lisence
22452
+ // from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
22453
+
22454
+ function isatty() {
22455
+ return false;
22456
+ }
22457
+
22458
+ function ReadStream() {
22459
+ throw new Error('tty.ReadStream is not implemented');
22460
+ }
22461
+
22462
+ function WriteStream() {
22463
+ throw new Error('tty.ReadStream is not implemented');
22464
+ }
22465
+
22466
+ var _polyfillNode_tty = {
22467
+ isatty: isatty,
22468
+ ReadStream: ReadStream,
22469
+ WriteStream: WriteStream
22470
+ };
22471
+
22472
+ var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
22473
+ __proto__: null,
22474
+ ReadStream: ReadStream,
22475
+ WriteStream: WriteStream,
22476
+ default: _polyfillNode_tty,
22477
+ isatty: isatty
22478
+ });
22479
+
22480
+ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1);
22481
+
22482
+ /*
22483
+ The MIT License (MIT)
22484
+
22485
+ Copyright (c) 2016 CoderPuppy
22486
+
22487
+ Permission is hereby granted, free of charge, to any person obtaining a copy
22488
+ of this software and associated documentation files (the "Software"), to deal
22489
+ in the Software without restriction, including without limitation the rights
22490
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22491
+ copies of the Software, and to permit persons to whom the Software is
22492
+ furnished to do so, subject to the following conditions:
22493
+
22494
+ The above copyright notice and this permission notice shall be included in all
22495
+ copies or substantial portions of the Software.
22496
+
22497
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22498
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22499
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22500
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22501
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22502
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22503
+ SOFTWARE.
22504
+
22505
+ */
22506
+ var _endianness;
22507
+ function endianness() {
22508
+ if (typeof _endianness === 'undefined') {
22509
+ var a = new ArrayBuffer(2);
22510
+ var b = new Uint8Array(a);
22511
+ var c = new Uint16Array(a);
22512
+ b[0] = 1;
22513
+ b[1] = 2;
22514
+ if (c[0] === 258) {
22515
+ _endianness = 'BE';
22516
+ } else if (c[0] === 513){
22517
+ _endianness = 'LE';
22518
+ } else {
22519
+ throw new Error('unable to figure out endianess');
22520
+ }
22521
+ }
22522
+ return _endianness;
22523
+ }
22524
+
22525
+ function hostname() {
22526
+ if (typeof global$1.location !== 'undefined') {
22527
+ return global$1.location.hostname
22528
+ } else return '';
22529
+ }
22530
+
22531
+ function loadavg() {
22532
+ return [];
22533
+ }
22534
+
22535
+ function uptime() {
22536
+ return 0;
22537
+ }
22538
+
22539
+ function freemem() {
22540
+ return Number.MAX_VALUE;
22541
+ }
22542
+
22543
+ function totalmem() {
22544
+ return Number.MAX_VALUE;
22545
+ }
22546
+
22547
+ function cpus() {
22548
+ return [];
22549
+ }
22550
+
22551
+ function type() {
22552
+ return 'Browser';
22553
+ }
22554
+
22555
+ function release () {
22556
+ if (typeof global$1.navigator !== 'undefined') {
22557
+ return global$1.navigator.appVersion;
22558
+ }
22559
+ return '';
22560
+ }
22561
+
22562
+ function networkInterfaces () {
22563
+ return {};
22564
+ }
22565
+
22566
+ function getNetworkInterfaces () {
22567
+ return {};
22568
+ }
22569
+
22570
+ function arch() {
22571
+ return 'javascript';
22572
+ }
22573
+
22574
+ function platform() {
22575
+ return 'browser';
22576
+ }
22577
+
22578
+ function tmpDir() {
22579
+ return '/tmp';
22580
+ }
22581
+ var tmpdir = tmpDir;
22582
+
22583
+ var EOL = '\n';
22584
+
22585
+ function homedir(){
22586
+ return '$HOME'
22587
+ }
22588
+
22589
+ var _polyfillNode_os = {
22590
+ homedir: homedir,
22591
+ EOL: EOL,
22592
+ arch: arch,
22593
+ platform: platform,
22594
+ tmpdir: tmpdir,
22595
+ tmpDir: tmpDir,
22596
+ networkInterfaces:networkInterfaces,
22597
+ getNetworkInterfaces: getNetworkInterfaces,
22598
+ release: release,
22599
+ type: type,
22600
+ cpus: cpus,
22601
+ totalmem: totalmem,
22602
+ freemem: freemem,
22603
+ uptime: uptime,
22604
+ loadavg: loadavg,
22605
+ hostname: hostname,
22606
+ endianness: endianness,
22607
+ };
22608
+
22609
+ var _polyfillNode_os$1 = /*#__PURE__*/Object.freeze({
22610
+ __proto__: null,
22611
+ EOL: EOL,
22612
+ arch: arch,
22613
+ cpus: cpus,
22614
+ default: _polyfillNode_os,
22615
+ endianness: endianness,
22616
+ freemem: freemem,
22617
+ getNetworkInterfaces: getNetworkInterfaces,
22618
+ homedir: homedir,
22619
+ hostname: hostname,
22620
+ loadavg: loadavg,
22621
+ networkInterfaces: networkInterfaces,
22622
+ platform: platform,
22623
+ release: release,
22624
+ tmpDir: tmpDir,
22625
+ tmpdir: tmpdir,
22626
+ totalmem: totalmem,
22627
+ type: type,
22628
+ uptime: uptime
22629
+ });
22630
+
22631
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_os$1);
22632
+
22633
+ var hasFlag;
22634
+ var hasRequiredHasFlag;
22635
+
22636
+ function requireHasFlag () {
22637
+ if (hasRequiredHasFlag) return hasFlag;
22638
+ hasRequiredHasFlag = 1;
22639
+ hasFlag = (flag, argv) => {
22640
+ argv = argv || process.argv;
22641
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
22642
+ const pos = argv.indexOf(prefix + flag);
22643
+ const terminatorPos = argv.indexOf('--');
22644
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
22645
+ };
22646
+ return hasFlag;
22647
+ }
22648
+
22649
+ var supportsColor_1;
22650
+ var hasRequiredSupportsColor;
22651
+
22652
+ function requireSupportsColor () {
22653
+ if (hasRequiredSupportsColor) return supportsColor_1;
22654
+ hasRequiredSupportsColor = 1;
22655
+ const os = require$$0;
22656
+ const hasFlag = requireHasFlag();
22657
+
22658
+ const env = process.env;
22659
+
22660
+ let forceColor;
22661
+ if (hasFlag('no-color') ||
22662
+ hasFlag('no-colors') ||
22663
+ hasFlag('color=false')) {
22664
+ forceColor = false;
22665
+ } else if (hasFlag('color') ||
22666
+ hasFlag('colors') ||
22667
+ hasFlag('color=true') ||
22668
+ hasFlag('color=always')) {
22669
+ forceColor = true;
22670
+ }
22671
+ if ('FORCE_COLOR' in env) {
22672
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
22673
+ }
22674
+
22675
+ function translateLevel(level) {
22676
+ if (level === 0) {
22677
+ return false;
22678
+ }
22679
+
22680
+ return {
22681
+ level,
22682
+ hasBasic: true,
22683
+ has256: level >= 2,
22684
+ has16m: level >= 3
22685
+ };
22686
+ }
22687
+
22688
+ function supportsColor(stream) {
22689
+ if (forceColor === false) {
22690
+ return 0;
22691
+ }
22692
+
22693
+ if (hasFlag('color=16m') ||
22694
+ hasFlag('color=full') ||
22695
+ hasFlag('color=truecolor')) {
22696
+ return 3;
22697
+ }
22698
+
22699
+ if (hasFlag('color=256')) {
22700
+ return 2;
22701
+ }
22702
+
22703
+ if (stream && !stream.isTTY && forceColor !== true) {
22704
+ return 0;
22705
+ }
22706
+
22707
+ const min = forceColor ? 1 : 0;
22708
+
22709
+ if (process.platform === 'win32') {
22710
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
22711
+ // libuv that enables 256 color output on Windows. Anything earlier and it
22712
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
22713
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
22714
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
22715
+ // that supports 16m/TrueColor.
22716
+ const osRelease = os.release().split('.');
22717
+ if (
22718
+ Number(process.versions.node.split('.')[0]) >= 8 &&
22719
+ Number(osRelease[0]) >= 10 &&
22720
+ Number(osRelease[2]) >= 10586
22721
+ ) {
22722
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
22723
+ }
22724
+
22725
+ return 1;
22726
+ }
22727
+
22728
+ if ('CI' in env) {
22729
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
22730
+ return 1;
22731
+ }
22732
+
22733
+ return min;
22734
+ }
22735
+
22736
+ if ('TEAMCITY_VERSION' in env) {
22737
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
22738
+ }
22739
+
22740
+ if (env.COLORTERM === 'truecolor') {
22741
+ return 3;
22742
+ }
22743
+
22744
+ if ('TERM_PROGRAM' in env) {
22745
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
22746
+
22747
+ switch (env.TERM_PROGRAM) {
22748
+ case 'iTerm.app':
22749
+ return version >= 3 ? 3 : 2;
22750
+ case 'Apple_Terminal':
22751
+ return 2;
22752
+ // No default
22753
+ }
22754
+ }
22755
+
22756
+ if (/-256(color)?$/i.test(env.TERM)) {
22757
+ return 2;
22758
+ }
22759
+
22760
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
22761
+ return 1;
22762
+ }
22763
+
22764
+ if ('COLORTERM' in env) {
22765
+ return 1;
22766
+ }
22767
+
22768
+ if (env.TERM === 'dumb') {
22769
+ return min;
22770
+ }
22771
+
22772
+ return min;
22773
+ }
22774
+
22775
+ function getSupportLevel(stream) {
22776
+ const level = supportsColor(stream);
22777
+ return translateLevel(level);
22778
+ }
22779
+
22780
+ supportsColor_1 = {
22781
+ supportsColor: getSupportLevel,
22782
+ stdout: getSupportLevel(process.stdout),
22783
+ stderr: getSupportLevel(process.stderr)
22784
+ };
22785
+ return supportsColor_1;
22786
+ }
22787
+
22788
+ /**
22789
+ * Module dependencies.
22790
+ */
22791
+
22792
+ var hasRequiredNode;
22793
+
22794
+ function requireNode () {
22795
+ if (hasRequiredNode) return node.exports;
22796
+ hasRequiredNode = 1;
22797
+ (function (module, exports) {
22798
+ const tty = require$$0$1;
22799
+ const util = text_min;
22800
+
22801
+ /**
22802
+ * This is the Node.js implementation of `debug()`.
22803
+ */
22804
+
22805
+ exports.init = init;
22806
+ exports.log = log;
22807
+ exports.formatArgs = formatArgs;
22808
+ exports.save = save;
22809
+ exports.load = load;
22810
+ exports.useColors = useColors;
22811
+ exports.destroy = util.deprecate(
22812
+ () => {},
22813
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
22814
+ );
22815
+
22816
+ /**
22817
+ * Colors.
22818
+ */
22819
+
22820
+ exports.colors = [6, 2, 3, 4, 5, 1];
22821
+
22822
+ try {
22823
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
22824
+ // eslint-disable-next-line import/no-extraneous-dependencies
22825
+ const supportsColor = requireSupportsColor();
22826
+
22827
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
22828
+ exports.colors = [
22829
+ 20,
22830
+ 21,
22831
+ 26,
22832
+ 27,
22833
+ 32,
22834
+ 33,
22835
+ 38,
22836
+ 39,
22837
+ 40,
22838
+ 41,
22839
+ 42,
22840
+ 43,
22841
+ 44,
22842
+ 45,
22843
+ 56,
22844
+ 57,
22845
+ 62,
22846
+ 63,
22847
+ 68,
22848
+ 69,
22849
+ 74,
22850
+ 75,
22851
+ 76,
22852
+ 77,
22853
+ 78,
22854
+ 79,
22855
+ 80,
22856
+ 81,
22857
+ 92,
22858
+ 93,
22859
+ 98,
22860
+ 99,
22861
+ 112,
22862
+ 113,
22863
+ 128,
22864
+ 129,
22865
+ 134,
22866
+ 135,
22867
+ 148,
22868
+ 149,
22869
+ 160,
22870
+ 161,
22871
+ 162,
22872
+ 163,
22873
+ 164,
22874
+ 165,
22875
+ 166,
22876
+ 167,
22877
+ 168,
22878
+ 169,
22879
+ 170,
22880
+ 171,
22881
+ 172,
22882
+ 173,
22883
+ 178,
22884
+ 179,
22885
+ 184,
22886
+ 185,
22887
+ 196,
22888
+ 197,
22889
+ 198,
22890
+ 199,
22891
+ 200,
22892
+ 201,
22893
+ 202,
22894
+ 203,
22895
+ 204,
22896
+ 205,
22897
+ 206,
22898
+ 207,
22899
+ 208,
22900
+ 209,
22901
+ 214,
22902
+ 215,
22903
+ 220,
22904
+ 221
22905
+ ];
22906
+ }
22907
+ } catch (error) {
22908
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
22909
+ }
22910
+
22911
+ /**
22912
+ * Build up the default `inspectOpts` object from the environment variables.
22913
+ *
22914
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
22915
+ */
22916
+
22917
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
22918
+ return /^debug_/i.test(key);
22919
+ }).reduce((obj, key) => {
22920
+ // Camel-case
22921
+ const prop = key
22922
+ .substring(6)
22923
+ .toLowerCase()
22924
+ .replace(/_([a-z])/g, (_, k) => {
22925
+ return k.toUpperCase();
22926
+ });
22927
+
22928
+ // Coerce string value into JS value
22929
+ let val = process.env[key];
22930
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
22931
+ val = true;
22932
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
22933
+ val = false;
22934
+ } else if (val === 'null') {
22935
+ val = null;
22936
+ } else {
22937
+ val = Number(val);
22938
+ }
22939
+
22940
+ obj[prop] = val;
22941
+ return obj;
22942
+ }, {});
22943
+
22944
+ /**
22945
+ * Is stdout a TTY? Colored output is enabled when `true`.
22946
+ */
22947
+
22948
+ function useColors() {
22949
+ return 'colors' in exports.inspectOpts ?
22950
+ Boolean(exports.inspectOpts.colors) :
22951
+ tty.isatty(process.stderr.fd);
22952
+ }
22953
+
22954
+ /**
22955
+ * Adds ANSI color escape codes if enabled.
22956
+ *
22957
+ * @api public
22958
+ */
22959
+
22960
+ function formatArgs(args) {
22961
+ const {namespace: name, useColors} = this;
22962
+
22963
+ if (useColors) {
22964
+ const c = this.color;
22965
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
22966
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
22967
+
22968
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
22969
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
22970
+ } else {
22971
+ args[0] = getDate() + name + ' ' + args[0];
22972
+ }
22973
+ }
22974
+
22975
+ function getDate() {
22976
+ if (exports.inspectOpts.hideDate) {
22977
+ return '';
22978
+ }
22979
+ return new Date().toISOString() + ' ';
22980
+ }
22981
+
22982
+ /**
22983
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
22984
+ */
22985
+
22986
+ function log(...args) {
22987
+ return process.stderr.write(util.format(...args) + '\n');
22988
+ }
22989
+
22990
+ /**
22991
+ * Save `namespaces`.
22992
+ *
22993
+ * @param {String} namespaces
22994
+ * @api private
22995
+ */
22996
+ function save(namespaces) {
22997
+ if (namespaces) {
22998
+ process.env.DEBUG = namespaces;
22999
+ } else {
23000
+ // If you set a process.env field to null or undefined, it gets cast to the
23001
+ // string 'null' or 'undefined'. Just delete instead.
23002
+ delete process.env.DEBUG;
23003
+ }
23004
+ }
23005
+
23006
+ /**
23007
+ * Load `namespaces`.
23008
+ *
23009
+ * @return {String} returns the previously persisted debug modes
23010
+ * @api private
23011
+ */
23012
+
23013
+ function load() {
23014
+ return process.env.DEBUG;
23015
+ }
23016
+
23017
+ /**
23018
+ * Init logic for `debug` instances.
23019
+ *
23020
+ * Create a new `inspectOpts` object in case `useColors` is set
23021
+ * differently for a particular `debug` instance.
23022
+ */
23023
+
23024
+ function init(debug) {
23025
+ debug.inspectOpts = {};
23026
+
23027
+ const keys = Object.keys(exports.inspectOpts);
23028
+ for (let i = 0; i < keys.length; i++) {
23029
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
23030
+ }
23031
+ }
23032
+
23033
+ module.exports = requireCommon()(exports);
23034
+
23035
+ const {formatters} = module.exports;
23036
+
23037
+ /**
23038
+ * Map %o to `util.inspect()`, all on a single line.
23039
+ */
23040
+
23041
+ formatters.o = function (v) {
23042
+ this.inspectOpts.colors = this.useColors;
23043
+ return util.inspect(v, this.inspectOpts)
23044
+ .split('\n')
23045
+ .map(str => str.trim())
23046
+ .join(' ');
23047
+ };
23048
+
23049
+ /**
23050
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
23051
+ */
23052
+
23053
+ formatters.O = function (v) {
23054
+ this.inspectOpts.colors = this.useColors;
23055
+ return util.inspect(v, this.inspectOpts);
23056
+ };
23057
+ } (node, node.exports));
23058
+ return node.exports;
23059
+ }
23060
+
23061
+ /**
23062
+ * Detect Electron renderer / nwjs process, which is node, but we should
23063
+ * treat as a browser.
23064
+ */
23065
+
23066
+ var hasRequiredSrc;
23067
+
23068
+ function requireSrc () {
23069
+ if (hasRequiredSrc) return src.exports;
23070
+ hasRequiredSrc = 1;
23071
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
23072
+ src.exports = requireBrowser();
23073
+ } else {
23074
+ src.exports = requireNode();
23075
+ }
23076
+ return src.exports;
23077
+ }
23078
+
21713
23079
  var debug$1;
21714
23080
 
21715
23081
  var debug_1 = function () {
21716
23082
  if (!debug$1) {
21717
23083
  try {
21718
23084
  /* eslint global-require: off */
21719
- debug$1 = require("debug")("follow-redirects");
23085
+ debug$1 = requireSrc()("follow-redirects");
21720
23086
  }
21721
23087
  catch (error) { /* */ }
21722
23088
  if (typeof debug$1 !== "function") {
@@ -21726,7 +23092,7 @@ var debug_1 = function () {
21726
23092
  debug$1.apply(null, arguments);
21727
23093
  };
21728
23094
 
21729
- var url = require$$0$1;
23095
+ var url = require$$0$3;
21730
23096
  var URL$1 = url.URL;
21731
23097
  var http = require$$1;
21732
23098
  var https = require$$2;
@@ -27801,7 +29167,7 @@ Zlib$1.prototype.write = function(flush, input, in_off, in_len, out, out_off, ou
27801
29167
  this.write_in_progress = true;
27802
29168
 
27803
29169
  var self = this;
27804
- browser$1.nextTick(function() {
29170
+ browser$1$1.nextTick(function() {
27805
29171
  self.write_in_progress = false;
27806
29172
  var res = self._write(flush, input, in_off, in_len, out, out_off, out_len);
27807
29173
  self.callback(res[0], res[1]);
@@ -28345,7 +29711,7 @@ Zlib.prototype.params = function(level, strategy, callback) {
28345
29711
  }
28346
29712
  });
28347
29713
  } else {
28348
- browser$1.nextTick(callback);
29714
+ browser$1$1.nextTick(callback);
28349
29715
  }
28350
29716
  };
28351
29717
 
@@ -28369,7 +29735,7 @@ Zlib.prototype.flush = function(kind, callback) {
28369
29735
 
28370
29736
  if (ws.ended) {
28371
29737
  if (callback)
28372
- browser$1.nextTick(callback);
29738
+ browser$1$1.nextTick(callback);
28373
29739
  } else if (ws.ending) {
28374
29740
  if (callback)
28375
29741
  this.once('end', callback);
@@ -28386,7 +29752,7 @@ Zlib.prototype.flush = function(kind, callback) {
28386
29752
 
28387
29753
  Zlib.prototype.close = function(callback) {
28388
29754
  if (callback)
28389
- browser$1.nextTick(callback);
29755
+ browser$1$1.nextTick(callback);
28390
29756
 
28391
29757
  if (this._closed)
28392
29758
  return;
@@ -28396,7 +29762,7 @@ Zlib.prototype.close = function(callback) {
28396
29762
  this._binding.close();
28397
29763
 
28398
29764
  var self = this;
28399
- browser$1.nextTick(function() {
29765
+ browser$1$1.nextTick(function() {
28400
29766
  self.emit('close');
28401
29767
  });
28402
29768
  };
@@ -28594,7 +29960,7 @@ const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
28594
29960
  * @returns {Buffer|Blob}
28595
29961
  */
28596
29962
  function fromDataURI(uri, asBlob, options) {
28597
- const _Blob = options && options.Blob || platform.classes.Blob;
29963
+ const _Blob = options && options.Blob || platform$1.classes.Blob;
28598
29964
  const protocol = parseProtocol(uri);
28599
29965
 
28600
29966
  if (asBlob === undefined && _Blob) {
@@ -28769,7 +30135,7 @@ class AxiosTransformStream extends Stream$3.Transform{
28769
30135
 
28770
30136
  bytesNotified = bytesTransferred;
28771
30137
 
28772
- browser$1.nextTick(() => {
30138
+ browser$1$1.nextTick(() => {
28773
30139
  self.emit('progress', {
28774
30140
  'loaded': bytesTransferred,
28775
30141
  'total': totalBytes,
@@ -28823,11 +30189,11 @@ class AxiosTransformStream extends Stream$3.Transform{
28823
30189
  }
28824
30190
 
28825
30191
  if (self.push(_chunk)) {
28826
- browser$1.nextTick(_callback);
30192
+ browser$1$1.nextTick(_callback);
28827
30193
  } else {
28828
30194
  internals.onReadCallback = () => {
28829
30195
  internals.onReadCallback = null;
28830
- browser$1.nextTick(_callback);
30196
+ browser$1$1.nextTick(_callback);
28831
30197
  };
28832
30198
  }
28833
30199
  }
@@ -28871,7 +30237,7 @@ class AxiosTransformStream extends Stream$3.Transform{
28871
30237
  }
28872
30238
 
28873
30239
  pushChunk(_chunk, chunkRemainder ? () => {
28874
- browser$1.nextTick(_callback, null, chunkRemainder);
30240
+ browser$1$1.nextTick(_callback, null, chunkRemainder);
28875
30241
  } : _callback);
28876
30242
  };
28877
30243
 
@@ -29075,7 +30441,7 @@ const {http: httpFollow, https: httpsFollow} = followRedirects;
29075
30441
 
29076
30442
  const isHttps = /https:?/;
29077
30443
 
29078
- const supportedProtocols = platform.protocols.map(protocol => {
30444
+ const supportedProtocols = platform$1.protocols.map(protocol => {
29079
30445
  return protocol + ':';
29080
30446
  });
29081
30447
 
@@ -29149,7 +30515,7 @@ function setProxy(options, configProxy, location) {
29149
30515
  };
29150
30516
  }
29151
30517
 
29152
- const isHttpAdapterSupported = typeof browser$1 !== 'undefined' && utils.kindOf(browser$1) === 'process';
30518
+ const isHttpAdapterSupported = typeof browser$1$1 !== 'undefined' && utils.kindOf(browser$1$1) === 'process';
29153
30519
 
29154
30520
  // temporary hotfix
29155
30521
 
@@ -29697,7 +31063,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
29697
31063
  });
29698
31064
  };
29699
31065
 
29700
- var cookies = platform.isStandardBrowserEnv ?
31066
+ var cookies = platform$1.isStandardBrowserEnv ?
29701
31067
 
29702
31068
  // Standard browser envs support document.cookie
29703
31069
  (function standardBrowserEnv() {
@@ -29745,7 +31111,7 @@ var cookies = platform.isStandardBrowserEnv ?
29745
31111
  };
29746
31112
  })();
29747
31113
 
29748
- var isURLSameOrigin = platform.isStandardBrowserEnv ?
31114
+ var isURLSameOrigin = platform$1.isStandardBrowserEnv ?
29749
31115
 
29750
31116
  // Standard browser envs have full support of the APIs needed to test
29751
31117
  // whether the request URL is of the same origin as current location.
@@ -29858,7 +31224,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
29858
31224
  let contentType;
29859
31225
 
29860
31226
  if (utils.isFormData(requestData)) {
29861
- if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
31227
+ if (platform$1.isStandardBrowserEnv || platform$1.isStandardBrowserWebWorkerEnv) {
29862
31228
  requestHeaders.setContentType(false); // Let the browser set it
29863
31229
  } else if(!requestHeaders.getContentType(/^\s*multipart\/form-data/)){
29864
31230
  requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
@@ -29980,7 +31346,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
29980
31346
  // Add xsrf header
29981
31347
  // This is only done if running in a standard browser environment.
29982
31348
  // Specifically not if we're in a web worker, or react-native.
29983
- if (platform.isStandardBrowserEnv) {
31349
+ if (platform$1.isStandardBrowserEnv) {
29984
31350
  // Add xsrf header
29985
31351
  const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
29986
31352
  && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
@@ -30040,7 +31406,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
30040
31406
 
30041
31407
  const protocol = parseProtocol(fullPath);
30042
31408
 
30043
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
31409
+ if (protocol && platform$1.protocols.indexOf(protocol) === -1) {
30044
31410
  reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
30045
31411
  return;
30046
31412
  }
@@ -34100,6 +35466,55 @@ var TipPackagePurchases = /** @class */ (function () {
34100
35466
  return TipPackagePurchases;
34101
35467
  }());
34102
35468
 
35469
+ var SocialPostsRoute = /** @class */ (function () {
35470
+ function SocialPostsRoute() {
35471
+ }
35472
+ SocialPostsRoute.routes = {
35473
+ getPosts: { url: '/socialposts', method: HTTP_METHODS.GET },
35474
+ createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
35475
+ retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
35476
+ };
35477
+ return SocialPostsRoute;
35478
+ }());
35479
+
35480
+ var SocialPosts = /** @class */ (function () {
35481
+ function SocialPosts() {
35482
+ }
35483
+ /**
35484
+ * List all the Posts.
35485
+ *
35486
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
35487
+ *
35488
+ * @returns promise
35489
+ */
35490
+ SocialPosts.list = function (params) {
35491
+ return Requests.processRoute(SocialPostsRoute.routes.getPosts, undefined, undefined, params);
35492
+ };
35493
+ /**
35494
+ * Give a tip to another user
35495
+ *
35496
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
35497
+ *
35498
+ * @returns A promise
35499
+ */
35500
+ SocialPosts.create = function (data, params) {
35501
+ return Requests.processRoute(SocialPostsRoute.routes.createPost, data, {}, params);
35502
+ };
35503
+ /**
35504
+ * Retrieve the information for a single post.
35505
+ *
35506
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
35507
+ *
35508
+ * @param post_id The id fo the post to retrieve.
35509
+ *
35510
+ * @returns promise
35511
+ */
35512
+ SocialPosts.view = function (post_id, params) {
35513
+ return Requests.processRoute(SocialPostsRoute.routes.retrievePost, {}, { post_id: post_id }, params);
35514
+ };
35515
+ return SocialPosts;
35516
+ }());
35517
+
34103
35518
  var Parser = /** @class */ (function () {
34104
35519
  function Parser() {
34105
35520
  }
@@ -34481,6 +35896,7 @@ var Glitch = /** @class */ (function () {
34481
35896
  Utility: Utility,
34482
35897
  Tips: Tips,
34483
35898
  Social: Social,
35899
+ SocialPosts: SocialPosts,
34484
35900
  TipPackages: TipPackages,
34485
35901
  TipEmojis: TipEmojis,
34486
35902
  TipPackagePurchases: TipPackagePurchases