@hulkapps/app-manager-vue 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4141 @@
1
+ 'use strict';var http=require('http'),https=require('https'),url=require('url'),stream=require('stream'),assert=require('assert'),tty=require('tty'),util=require('util'),os=require('os'),zlib=require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var http__default=/*#__PURE__*/_interopDefaultLegacy(http);var https__default=/*#__PURE__*/_interopDefaultLegacy(https);var url__default=/*#__PURE__*/_interopDefaultLegacy(url);var stream__default=/*#__PURE__*/_interopDefaultLegacy(stream);var assert__default=/*#__PURE__*/_interopDefaultLegacy(assert);var tty__default=/*#__PURE__*/_interopDefaultLegacy(tty);var util__default=/*#__PURE__*/_interopDefaultLegacy(util);var os__default=/*#__PURE__*/_interopDefaultLegacy(os);var zlib__default=/*#__PURE__*/_interopDefaultLegacy(zlib);function ownKeys(object, enumerableOnly) {
2
+ var keys = Object.keys(object);
3
+
4
+ if (Object.getOwnPropertySymbols) {
5
+ var symbols = Object.getOwnPropertySymbols(object);
6
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
7
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8
+ })), keys.push.apply(keys, symbols);
9
+ }
10
+
11
+ return keys;
12
+ }
13
+
14
+ function _objectSpread2(target) {
15
+ for (var i = 1; i < arguments.length; i++) {
16
+ var source = null != arguments[i] ? arguments[i] : {};
17
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
18
+ _defineProperty(target, key, source[key]);
19
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
20
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
21
+ });
22
+ }
23
+
24
+ return target;
25
+ }
26
+
27
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
28
+ try {
29
+ var info = gen[key](arg);
30
+ var value = info.value;
31
+ } catch (error) {
32
+ reject(error);
33
+ return;
34
+ }
35
+
36
+ if (info.done) {
37
+ resolve(value);
38
+ } else {
39
+ Promise.resolve(value).then(_next, _throw);
40
+ }
41
+ }
42
+
43
+ function _asyncToGenerator(fn) {
44
+ return function () {
45
+ var self = this,
46
+ args = arguments;
47
+ return new Promise(function (resolve, reject) {
48
+ var gen = fn.apply(self, args);
49
+
50
+ function _next(value) {
51
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
52
+ }
53
+
54
+ function _throw(err) {
55
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
56
+ }
57
+
58
+ _next(undefined);
59
+ });
60
+ };
61
+ }
62
+
63
+ function _defineProperty(obj, key, value) {
64
+ if (key in obj) {
65
+ Object.defineProperty(obj, key, {
66
+ value: value,
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true
70
+ });
71
+ } else {
72
+ obj[key] = value;
73
+ }
74
+
75
+ return obj;
76
+ }
77
+
78
+ function _slicedToArray(arr, i) {
79
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
80
+ }
81
+
82
+ function _arrayWithHoles(arr) {
83
+ if (Array.isArray(arr)) return arr;
84
+ }
85
+
86
+ function _iterableToArrayLimit(arr, i) {
87
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
88
+
89
+ if (_i == null) return;
90
+ var _arr = [];
91
+ var _n = true;
92
+ var _d = false;
93
+
94
+ var _s, _e;
95
+
96
+ try {
97
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
98
+ _arr.push(_s.value);
99
+
100
+ if (i && _arr.length === i) break;
101
+ }
102
+ } catch (err) {
103
+ _d = true;
104
+ _e = err;
105
+ } finally {
106
+ try {
107
+ if (!_n && _i["return"] != null) _i["return"]();
108
+ } finally {
109
+ if (_d) throw _e;
110
+ }
111
+ }
112
+
113
+ return _arr;
114
+ }
115
+
116
+ function _unsupportedIterableToArray(o, minLen) {
117
+ if (!o) return;
118
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
119
+ var n = Object.prototype.toString.call(o).slice(8, -1);
120
+ if (n === "Object" && o.constructor) n = o.constructor.name;
121
+ if (n === "Map" || n === "Set") return Array.from(o);
122
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
123
+ }
124
+
125
+ function _arrayLikeToArray(arr, len) {
126
+ if (len == null || len > arr.length) len = arr.length;
127
+
128
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
129
+
130
+ return arr2;
131
+ }
132
+
133
+ function _nonIterableRest() {
134
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
135
+ }var bind = function bind(fn, thisArg) {
136
+ return function wrap() {
137
+ var args = new Array(arguments.length);
138
+ for (var i = 0; i < args.length; i++) {
139
+ args[i] = arguments[i];
140
+ }
141
+ return fn.apply(thisArg, args);
142
+ };
143
+ };// utils is a library of generic helper functions non-specific to axios
144
+
145
+ var toString = Object.prototype.toString;
146
+
147
+ /**
148
+ * Determine if a value is an Array
149
+ *
150
+ * @param {Object} val The value to test
151
+ * @returns {boolean} True if value is an Array, otherwise false
152
+ */
153
+ function isArray(val) {
154
+ return Array.isArray(val);
155
+ }
156
+
157
+ /**
158
+ * Determine if a value is undefined
159
+ *
160
+ * @param {Object} val The value to test
161
+ * @returns {boolean} True if the value is undefined, otherwise false
162
+ */
163
+ function isUndefined(val) {
164
+ return typeof val === 'undefined';
165
+ }
166
+
167
+ /**
168
+ * Determine if a value is a Buffer
169
+ *
170
+ * @param {Object} val The value to test
171
+ * @returns {boolean} True if value is a Buffer, otherwise false
172
+ */
173
+ function isBuffer(val) {
174
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
175
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
176
+ }
177
+
178
+ /**
179
+ * Determine if a value is an ArrayBuffer
180
+ *
181
+ * @param {Object} val The value to test
182
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
183
+ */
184
+ function isArrayBuffer(val) {
185
+ return toString.call(val) === '[object ArrayBuffer]';
186
+ }
187
+
188
+ /**
189
+ * Determine if a value is a FormData
190
+ *
191
+ * @param {Object} val The value to test
192
+ * @returns {boolean} True if value is an FormData, otherwise false
193
+ */
194
+ function isFormData(val) {
195
+ return toString.call(val) === '[object FormData]';
196
+ }
197
+
198
+ /**
199
+ * Determine if a value is a view on an ArrayBuffer
200
+ *
201
+ * @param {Object} val The value to test
202
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
203
+ */
204
+ function isArrayBufferView(val) {
205
+ var result;
206
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
207
+ result = ArrayBuffer.isView(val);
208
+ } else {
209
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
210
+ }
211
+ return result;
212
+ }
213
+
214
+ /**
215
+ * Determine if a value is a String
216
+ *
217
+ * @param {Object} val The value to test
218
+ * @returns {boolean} True if value is a String, otherwise false
219
+ */
220
+ function isString(val) {
221
+ return typeof val === 'string';
222
+ }
223
+
224
+ /**
225
+ * Determine if a value is a Number
226
+ *
227
+ * @param {Object} val The value to test
228
+ * @returns {boolean} True if value is a Number, otherwise false
229
+ */
230
+ function isNumber(val) {
231
+ return typeof val === 'number';
232
+ }
233
+
234
+ /**
235
+ * Determine if a value is an Object
236
+ *
237
+ * @param {Object} val The value to test
238
+ * @returns {boolean} True if value is an Object, otherwise false
239
+ */
240
+ function isObject(val) {
241
+ return val !== null && typeof val === 'object';
242
+ }
243
+
244
+ /**
245
+ * Determine if a value is a plain Object
246
+ *
247
+ * @param {Object} val The value to test
248
+ * @return {boolean} True if value is a plain Object, otherwise false
249
+ */
250
+ function isPlainObject(val) {
251
+ if (toString.call(val) !== '[object Object]') {
252
+ return false;
253
+ }
254
+
255
+ var prototype = Object.getPrototypeOf(val);
256
+ return prototype === null || prototype === Object.prototype;
257
+ }
258
+
259
+ /**
260
+ * Determine if a value is a Date
261
+ *
262
+ * @param {Object} val The value to test
263
+ * @returns {boolean} True if value is a Date, otherwise false
264
+ */
265
+ function isDate(val) {
266
+ return toString.call(val) === '[object Date]';
267
+ }
268
+
269
+ /**
270
+ * Determine if a value is a File
271
+ *
272
+ * @param {Object} val The value to test
273
+ * @returns {boolean} True if value is a File, otherwise false
274
+ */
275
+ function isFile(val) {
276
+ return toString.call(val) === '[object File]';
277
+ }
278
+
279
+ /**
280
+ * Determine if a value is a Blob
281
+ *
282
+ * @param {Object} val The value to test
283
+ * @returns {boolean} True if value is a Blob, otherwise false
284
+ */
285
+ function isBlob(val) {
286
+ return toString.call(val) === '[object Blob]';
287
+ }
288
+
289
+ /**
290
+ * Determine if a value is a Function
291
+ *
292
+ * @param {Object} val The value to test
293
+ * @returns {boolean} True if value is a Function, otherwise false
294
+ */
295
+ function isFunction(val) {
296
+ return toString.call(val) === '[object Function]';
297
+ }
298
+
299
+ /**
300
+ * Determine if a value is a Stream
301
+ *
302
+ * @param {Object} val The value to test
303
+ * @returns {boolean} True if value is a Stream, otherwise false
304
+ */
305
+ function isStream(val) {
306
+ return isObject(val) && isFunction(val.pipe);
307
+ }
308
+
309
+ /**
310
+ * Determine if a value is a URLSearchParams object
311
+ *
312
+ * @param {Object} val The value to test
313
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
314
+ */
315
+ function isURLSearchParams(val) {
316
+ return toString.call(val) === '[object URLSearchParams]';
317
+ }
318
+
319
+ /**
320
+ * Trim excess whitespace off the beginning and end of a string
321
+ *
322
+ * @param {String} str The String to trim
323
+ * @returns {String} The String freed of excess whitespace
324
+ */
325
+ function trim(str) {
326
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
327
+ }
328
+
329
+ /**
330
+ * Determine if we're running in a standard browser environment
331
+ *
332
+ * This allows axios to run in a web worker, and react-native.
333
+ * Both environments support XMLHttpRequest, but not fully standard globals.
334
+ *
335
+ * web workers:
336
+ * typeof window -> undefined
337
+ * typeof document -> undefined
338
+ *
339
+ * react-native:
340
+ * navigator.product -> 'ReactNative'
341
+ * nativescript
342
+ * navigator.product -> 'NativeScript' or 'NS'
343
+ */
344
+ function isStandardBrowserEnv() {
345
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
346
+ navigator.product === 'NativeScript' ||
347
+ navigator.product === 'NS')) {
348
+ return false;
349
+ }
350
+ return (
351
+ typeof window !== 'undefined' &&
352
+ typeof document !== 'undefined'
353
+ );
354
+ }
355
+
356
+ /**
357
+ * Iterate over an Array or an Object invoking a function for each item.
358
+ *
359
+ * If `obj` is an Array callback will be called passing
360
+ * the value, index, and complete array for each item.
361
+ *
362
+ * If 'obj' is an Object callback will be called passing
363
+ * the value, key, and complete object for each property.
364
+ *
365
+ * @param {Object|Array} obj The object to iterate
366
+ * @param {Function} fn The callback to invoke for each item
367
+ */
368
+ function forEach(obj, fn) {
369
+ // Don't bother if no value provided
370
+ if (obj === null || typeof obj === 'undefined') {
371
+ return;
372
+ }
373
+
374
+ // Force an array if not already something iterable
375
+ if (typeof obj !== 'object') {
376
+ /*eslint no-param-reassign:0*/
377
+ obj = [obj];
378
+ }
379
+
380
+ if (isArray(obj)) {
381
+ // Iterate over array values
382
+ for (var i = 0, l = obj.length; i < l; i++) {
383
+ fn.call(null, obj[i], i, obj);
384
+ }
385
+ } else {
386
+ // Iterate over object keys
387
+ for (var key in obj) {
388
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
389
+ fn.call(null, obj[key], key, obj);
390
+ }
391
+ }
392
+ }
393
+ }
394
+
395
+ /**
396
+ * Accepts varargs expecting each argument to be an object, then
397
+ * immutably merges the properties of each object and returns result.
398
+ *
399
+ * When multiple objects contain the same key the later object in
400
+ * the arguments list will take precedence.
401
+ *
402
+ * Example:
403
+ *
404
+ * ```js
405
+ * var result = merge({foo: 123}, {foo: 456});
406
+ * console.log(result.foo); // outputs 456
407
+ * ```
408
+ *
409
+ * @param {Object} obj1 Object to merge
410
+ * @returns {Object} Result of all merge properties
411
+ */
412
+ function merge(/* obj1, obj2, obj3, ... */) {
413
+ var result = {};
414
+ function assignValue(val, key) {
415
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
416
+ result[key] = merge(result[key], val);
417
+ } else if (isPlainObject(val)) {
418
+ result[key] = merge({}, val);
419
+ } else if (isArray(val)) {
420
+ result[key] = val.slice();
421
+ } else {
422
+ result[key] = val;
423
+ }
424
+ }
425
+
426
+ for (var i = 0, l = arguments.length; i < l; i++) {
427
+ forEach(arguments[i], assignValue);
428
+ }
429
+ return result;
430
+ }
431
+
432
+ /**
433
+ * Extends object a by mutably adding to it the properties of object b.
434
+ *
435
+ * @param {Object} a The object to be extended
436
+ * @param {Object} b The object to copy properties from
437
+ * @param {Object} thisArg The object to bind function to
438
+ * @return {Object} The resulting value of object a
439
+ */
440
+ function extend(a, b, thisArg) {
441
+ forEach(b, function assignValue(val, key) {
442
+ if (thisArg && typeof val === 'function') {
443
+ a[key] = bind(val, thisArg);
444
+ } else {
445
+ a[key] = val;
446
+ }
447
+ });
448
+ return a;
449
+ }
450
+
451
+ /**
452
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
453
+ *
454
+ * @param {string} content with BOM
455
+ * @return {string} content value without BOM
456
+ */
457
+ function stripBOM(content) {
458
+ if (content.charCodeAt(0) === 0xFEFF) {
459
+ content = content.slice(1);
460
+ }
461
+ return content;
462
+ }
463
+
464
+ var utils = {
465
+ isArray: isArray,
466
+ isArrayBuffer: isArrayBuffer,
467
+ isBuffer: isBuffer,
468
+ isFormData: isFormData,
469
+ isArrayBufferView: isArrayBufferView,
470
+ isString: isString,
471
+ isNumber: isNumber,
472
+ isObject: isObject,
473
+ isPlainObject: isPlainObject,
474
+ isUndefined: isUndefined,
475
+ isDate: isDate,
476
+ isFile: isFile,
477
+ isBlob: isBlob,
478
+ isFunction: isFunction,
479
+ isStream: isStream,
480
+ isURLSearchParams: isURLSearchParams,
481
+ isStandardBrowserEnv: isStandardBrowserEnv,
482
+ forEach: forEach,
483
+ merge: merge,
484
+ extend: extend,
485
+ trim: trim,
486
+ stripBOM: stripBOM
487
+ };function encode(val) {
488
+ return encodeURIComponent(val).
489
+ replace(/%3A/gi, ':').
490
+ replace(/%24/g, '$').
491
+ replace(/%2C/gi, ',').
492
+ replace(/%20/g, '+').
493
+ replace(/%5B/gi, '[').
494
+ replace(/%5D/gi, ']');
495
+ }
496
+
497
+ /**
498
+ * Build a URL by appending params to the end
499
+ *
500
+ * @param {string} url The base of the url (e.g., http://www.google.com)
501
+ * @param {object} [params] The params to be appended
502
+ * @returns {string} The formatted url
503
+ */
504
+ var buildURL = function buildURL(url, params, paramsSerializer) {
505
+ /*eslint no-param-reassign:0*/
506
+ if (!params) {
507
+ return url;
508
+ }
509
+
510
+ var serializedParams;
511
+ if (paramsSerializer) {
512
+ serializedParams = paramsSerializer(params);
513
+ } else if (utils.isURLSearchParams(params)) {
514
+ serializedParams = params.toString();
515
+ } else {
516
+ var parts = [];
517
+
518
+ utils.forEach(params, function serialize(val, key) {
519
+ if (val === null || typeof val === 'undefined') {
520
+ return;
521
+ }
522
+
523
+ if (utils.isArray(val)) {
524
+ key = key + '[]';
525
+ } else {
526
+ val = [val];
527
+ }
528
+
529
+ utils.forEach(val, function parseValue(v) {
530
+ if (utils.isDate(v)) {
531
+ v = v.toISOString();
532
+ } else if (utils.isObject(v)) {
533
+ v = JSON.stringify(v);
534
+ }
535
+ parts.push(encode(key) + '=' + encode(v));
536
+ });
537
+ });
538
+
539
+ serializedParams = parts.join('&');
540
+ }
541
+
542
+ if (serializedParams) {
543
+ var hashmarkIndex = url.indexOf('#');
544
+ if (hashmarkIndex !== -1) {
545
+ url = url.slice(0, hashmarkIndex);
546
+ }
547
+
548
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
549
+ }
550
+
551
+ return url;
552
+ };function InterceptorManager() {
553
+ this.handlers = [];
554
+ }
555
+
556
+ /**
557
+ * Add a new interceptor to the stack
558
+ *
559
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
560
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
561
+ *
562
+ * @return {Number} An ID used to remove interceptor later
563
+ */
564
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
565
+ this.handlers.push({
566
+ fulfilled: fulfilled,
567
+ rejected: rejected,
568
+ synchronous: options ? options.synchronous : false,
569
+ runWhen: options ? options.runWhen : null
570
+ });
571
+ return this.handlers.length - 1;
572
+ };
573
+
574
+ /**
575
+ * Remove an interceptor from the stack
576
+ *
577
+ * @param {Number} id The ID that was returned by `use`
578
+ */
579
+ InterceptorManager.prototype.eject = function eject(id) {
580
+ if (this.handlers[id]) {
581
+ this.handlers[id] = null;
582
+ }
583
+ };
584
+
585
+ /**
586
+ * Iterate over all the registered interceptors
587
+ *
588
+ * This method is particularly useful for skipping over any
589
+ * interceptors that may have become `null` calling `eject`.
590
+ *
591
+ * @param {Function} fn The function to call for each interceptor
592
+ */
593
+ InterceptorManager.prototype.forEach = function forEach(fn) {
594
+ utils.forEach(this.handlers, function forEachHandler(h) {
595
+ if (h !== null) {
596
+ fn(h);
597
+ }
598
+ });
599
+ };
600
+
601
+ var InterceptorManager_1 = InterceptorManager;var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
602
+ utils.forEach(headers, function processHeader(value, name) {
603
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
604
+ headers[normalizedName] = value;
605
+ delete headers[name];
606
+ }
607
+ });
608
+ };/**
609
+ * Update an Error with the specified config, error code, and response.
610
+ *
611
+ * @param {Error} error The error to update.
612
+ * @param {Object} config The config.
613
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
614
+ * @param {Object} [request] The request.
615
+ * @param {Object} [response] The response.
616
+ * @returns {Error} The error.
617
+ */
618
+ var enhanceError = function enhanceError(error, config, code, request, response) {
619
+ error.config = config;
620
+ if (code) {
621
+ error.code = code;
622
+ }
623
+
624
+ error.request = request;
625
+ error.response = response;
626
+ error.isAxiosError = true;
627
+
628
+ error.toJSON = function toJSON() {
629
+ return {
630
+ // Standard
631
+ message: this.message,
632
+ name: this.name,
633
+ // Microsoft
634
+ description: this.description,
635
+ number: this.number,
636
+ // Mozilla
637
+ fileName: this.fileName,
638
+ lineNumber: this.lineNumber,
639
+ columnNumber: this.columnNumber,
640
+ stack: this.stack,
641
+ // Axios
642
+ config: this.config,
643
+ code: this.code,
644
+ status: this.response && this.response.status ? this.response.status : null
645
+ };
646
+ };
647
+ return error;
648
+ };var transitional = {
649
+ silentJSONParsing: true,
650
+ forcedJSONParsing: true,
651
+ clarifyTimeoutError: false
652
+ };/**
653
+ * Create an Error with the specified message, config, error code, request and response.
654
+ *
655
+ * @param {string} message The error message.
656
+ * @param {Object} config The config.
657
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
658
+ * @param {Object} [request] The request.
659
+ * @param {Object} [response] The response.
660
+ * @returns {Error} The created error.
661
+ */
662
+ var createError = function createError(message, config, code, request, response) {
663
+ var error = new Error(message);
664
+ return enhanceError(error, config, code, request, response);
665
+ };/**
666
+ * Resolve or reject a Promise based on response status.
667
+ *
668
+ * @param {Function} resolve A function that resolves the promise.
669
+ * @param {Function} reject A function that rejects the promise.
670
+ * @param {object} response The response.
671
+ */
672
+ var settle = function settle(resolve, reject, response) {
673
+ var validateStatus = response.config.validateStatus;
674
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
675
+ resolve(response);
676
+ } else {
677
+ reject(createError(
678
+ 'Request failed with status code ' + response.status,
679
+ response.config,
680
+ null,
681
+ response.request,
682
+ response
683
+ ));
684
+ }
685
+ };var cookies = (
686
+ utils.isStandardBrowserEnv() ?
687
+
688
+ // Standard browser envs support document.cookie
689
+ (function standardBrowserEnv() {
690
+ return {
691
+ write: function write(name, value, expires, path, domain, secure) {
692
+ var cookie = [];
693
+ cookie.push(name + '=' + encodeURIComponent(value));
694
+
695
+ if (utils.isNumber(expires)) {
696
+ cookie.push('expires=' + new Date(expires).toGMTString());
697
+ }
698
+
699
+ if (utils.isString(path)) {
700
+ cookie.push('path=' + path);
701
+ }
702
+
703
+ if (utils.isString(domain)) {
704
+ cookie.push('domain=' + domain);
705
+ }
706
+
707
+ if (secure === true) {
708
+ cookie.push('secure');
709
+ }
710
+
711
+ document.cookie = cookie.join('; ');
712
+ },
713
+
714
+ read: function read(name) {
715
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
716
+ return (match ? decodeURIComponent(match[3]) : null);
717
+ },
718
+
719
+ remove: function remove(name) {
720
+ this.write(name, '', Date.now() - 86400000);
721
+ }
722
+ };
723
+ })() :
724
+
725
+ // Non standard browser env (web workers, react-native) lack needed support.
726
+ (function nonStandardBrowserEnv() {
727
+ return {
728
+ write: function write() {},
729
+ read: function read() { return null; },
730
+ remove: function remove() {}
731
+ };
732
+ })()
733
+ );/**
734
+ * Determines whether the specified URL is absolute
735
+ *
736
+ * @param {string} url The URL to test
737
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
738
+ */
739
+ var isAbsoluteURL = function isAbsoluteURL(url) {
740
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
741
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
742
+ // by any combination of letters, digits, plus, period, or hyphen.
743
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
744
+ };/**
745
+ * Creates a new URL by combining the specified URLs
746
+ *
747
+ * @param {string} baseURL The base URL
748
+ * @param {string} relativeURL The relative URL
749
+ * @returns {string} The combined URL
750
+ */
751
+ var combineURLs = function combineURLs(baseURL, relativeURL) {
752
+ return relativeURL
753
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
754
+ : baseURL;
755
+ };/**
756
+ * Creates a new URL by combining the baseURL with the requestedURL,
757
+ * only when the requestedURL is not already an absolute URL.
758
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
759
+ *
760
+ * @param {string} baseURL The base URL
761
+ * @param {string} requestedURL Absolute or relative URL to combine
762
+ * @returns {string} The combined full path
763
+ */
764
+ var buildFullPath = function buildFullPath(baseURL, requestedURL) {
765
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
766
+ return combineURLs(baseURL, requestedURL);
767
+ }
768
+ return requestedURL;
769
+ };// Headers whose duplicates are ignored by node
770
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
771
+ var ignoreDuplicateOf = [
772
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
773
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
774
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
775
+ 'referer', 'retry-after', 'user-agent'
776
+ ];
777
+
778
+ /**
779
+ * Parse headers into an object
780
+ *
781
+ * ```
782
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
783
+ * Content-Type: application/json
784
+ * Connection: keep-alive
785
+ * Transfer-Encoding: chunked
786
+ * ```
787
+ *
788
+ * @param {String} headers Headers needing to be parsed
789
+ * @returns {Object} Headers parsed into an object
790
+ */
791
+ var parseHeaders = function parseHeaders(headers) {
792
+ var parsed = {};
793
+ var key;
794
+ var val;
795
+ var i;
796
+
797
+ if (!headers) { return parsed; }
798
+
799
+ utils.forEach(headers.split('\n'), function parser(line) {
800
+ i = line.indexOf(':');
801
+ key = utils.trim(line.substr(0, i)).toLowerCase();
802
+ val = utils.trim(line.substr(i + 1));
803
+
804
+ if (key) {
805
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
806
+ return;
807
+ }
808
+ if (key === 'set-cookie') {
809
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
810
+ } else {
811
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
812
+ }
813
+ }
814
+ });
815
+
816
+ return parsed;
817
+ };var isURLSameOrigin = (
818
+ utils.isStandardBrowserEnv() ?
819
+
820
+ // Standard browser envs have full support of the APIs needed to test
821
+ // whether the request URL is of the same origin as current location.
822
+ (function standardBrowserEnv() {
823
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
824
+ var urlParsingNode = document.createElement('a');
825
+ var originURL;
826
+
827
+ /**
828
+ * Parse a URL to discover it's components
829
+ *
830
+ * @param {String} url The URL to be parsed
831
+ * @returns {Object}
832
+ */
833
+ function resolveURL(url) {
834
+ var href = url;
835
+
836
+ if (msie) {
837
+ // IE needs attribute set twice to normalize properties
838
+ urlParsingNode.setAttribute('href', href);
839
+ href = urlParsingNode.href;
840
+ }
841
+
842
+ urlParsingNode.setAttribute('href', href);
843
+
844
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
845
+ return {
846
+ href: urlParsingNode.href,
847
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
848
+ host: urlParsingNode.host,
849
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
850
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
851
+ hostname: urlParsingNode.hostname,
852
+ port: urlParsingNode.port,
853
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
854
+ urlParsingNode.pathname :
855
+ '/' + urlParsingNode.pathname
856
+ };
857
+ }
858
+
859
+ originURL = resolveURL(window.location.href);
860
+
861
+ /**
862
+ * Determine if a URL shares the same origin as the current location
863
+ *
864
+ * @param {String} requestURL The URL to test
865
+ * @returns {boolean} True if URL shares the same origin, otherwise false
866
+ */
867
+ return function isURLSameOrigin(requestURL) {
868
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
869
+ return (parsed.protocol === originURL.protocol &&
870
+ parsed.host === originURL.host);
871
+ };
872
+ })() :
873
+
874
+ // Non standard browser envs (web workers, react-native) lack needed support.
875
+ (function nonStandardBrowserEnv() {
876
+ return function isURLSameOrigin() {
877
+ return true;
878
+ };
879
+ })()
880
+ );/**
881
+ * A `Cancel` is an object that is thrown when an operation is canceled.
882
+ *
883
+ * @class
884
+ * @param {string=} message The message.
885
+ */
886
+ function Cancel(message) {
887
+ this.message = message;
888
+ }
889
+
890
+ Cancel.prototype.toString = function toString() {
891
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
892
+ };
893
+
894
+ Cancel.prototype.__CANCEL__ = true;
895
+
896
+ var Cancel_1 = Cancel;var xhr = function xhrAdapter(config) {
897
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
898
+ var requestData = config.data;
899
+ var requestHeaders = config.headers;
900
+ var responseType = config.responseType;
901
+ var onCanceled;
902
+ function done() {
903
+ if (config.cancelToken) {
904
+ config.cancelToken.unsubscribe(onCanceled);
905
+ }
906
+
907
+ if (config.signal) {
908
+ config.signal.removeEventListener('abort', onCanceled);
909
+ }
910
+ }
911
+
912
+ if (utils.isFormData(requestData)) {
913
+ delete requestHeaders['Content-Type']; // Let the browser set it
914
+ }
915
+
916
+ var request = new XMLHttpRequest();
917
+
918
+ // HTTP basic authentication
919
+ if (config.auth) {
920
+ var username = config.auth.username || '';
921
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
922
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
923
+ }
924
+
925
+ var fullPath = buildFullPath(config.baseURL, config.url);
926
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
927
+
928
+ // Set the request timeout in MS
929
+ request.timeout = config.timeout;
930
+
931
+ function onloadend() {
932
+ if (!request) {
933
+ return;
934
+ }
935
+ // Prepare the response
936
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
937
+ var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
938
+ request.responseText : request.response;
939
+ var response = {
940
+ data: responseData,
941
+ status: request.status,
942
+ statusText: request.statusText,
943
+ headers: responseHeaders,
944
+ config: config,
945
+ request: request
946
+ };
947
+
948
+ settle(function _resolve(value) {
949
+ resolve(value);
950
+ done();
951
+ }, function _reject(err) {
952
+ reject(err);
953
+ done();
954
+ }, response);
955
+
956
+ // Clean up request
957
+ request = null;
958
+ }
959
+
960
+ if ('onloadend' in request) {
961
+ // Use onloadend if available
962
+ request.onloadend = onloadend;
963
+ } else {
964
+ // Listen for ready state to emulate onloadend
965
+ request.onreadystatechange = function handleLoad() {
966
+ if (!request || request.readyState !== 4) {
967
+ return;
968
+ }
969
+
970
+ // The request errored out and we didn't get a response, this will be
971
+ // handled by onerror instead
972
+ // With one exception: request that using file: protocol, most browsers
973
+ // will return status as 0 even though it's a successful request
974
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
975
+ return;
976
+ }
977
+ // readystate handler is calling before onerror or ontimeout handlers,
978
+ // so we should call onloadend on the next 'tick'
979
+ setTimeout(onloadend);
980
+ };
981
+ }
982
+
983
+ // Handle browser request cancellation (as opposed to a manual cancellation)
984
+ request.onabort = function handleAbort() {
985
+ if (!request) {
986
+ return;
987
+ }
988
+
989
+ reject(createError('Request aborted', config, 'ECONNABORTED', request));
990
+
991
+ // Clean up request
992
+ request = null;
993
+ };
994
+
995
+ // Handle low level network errors
996
+ request.onerror = function handleError() {
997
+ // Real errors are hidden from us by the browser
998
+ // onerror should only fire if it's a network error
999
+ reject(createError('Network Error', config, null, request));
1000
+
1001
+ // Clean up request
1002
+ request = null;
1003
+ };
1004
+
1005
+ // Handle timeout
1006
+ request.ontimeout = function handleTimeout() {
1007
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
1008
+ var transitional$1 = config.transitional || transitional;
1009
+ if (config.timeoutErrorMessage) {
1010
+ timeoutErrorMessage = config.timeoutErrorMessage;
1011
+ }
1012
+ reject(createError(
1013
+ timeoutErrorMessage,
1014
+ config,
1015
+ transitional$1.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
1016
+ request));
1017
+
1018
+ // Clean up request
1019
+ request = null;
1020
+ };
1021
+
1022
+ // Add xsrf header
1023
+ // This is only done if running in a standard browser environment.
1024
+ // Specifically not if we're in a web worker, or react-native.
1025
+ if (utils.isStandardBrowserEnv()) {
1026
+ // Add xsrf header
1027
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1028
+ cookies.read(config.xsrfCookieName) :
1029
+ undefined;
1030
+
1031
+ if (xsrfValue) {
1032
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
1033
+ }
1034
+ }
1035
+
1036
+ // Add headers to the request
1037
+ if ('setRequestHeader' in request) {
1038
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1039
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1040
+ // Remove Content-Type if data is undefined
1041
+ delete requestHeaders[key];
1042
+ } else {
1043
+ // Otherwise add header to the request
1044
+ request.setRequestHeader(key, val);
1045
+ }
1046
+ });
1047
+ }
1048
+
1049
+ // Add withCredentials to request if needed
1050
+ if (!utils.isUndefined(config.withCredentials)) {
1051
+ request.withCredentials = !!config.withCredentials;
1052
+ }
1053
+
1054
+ // Add responseType to request if needed
1055
+ if (responseType && responseType !== 'json') {
1056
+ request.responseType = config.responseType;
1057
+ }
1058
+
1059
+ // Handle progress if needed
1060
+ if (typeof config.onDownloadProgress === 'function') {
1061
+ request.addEventListener('progress', config.onDownloadProgress);
1062
+ }
1063
+
1064
+ // Not all browsers support upload events
1065
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
1066
+ request.upload.addEventListener('progress', config.onUploadProgress);
1067
+ }
1068
+
1069
+ if (config.cancelToken || config.signal) {
1070
+ // Handle cancellation
1071
+ // eslint-disable-next-line func-names
1072
+ onCanceled = function(cancel) {
1073
+ if (!request) {
1074
+ return;
1075
+ }
1076
+ reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);
1077
+ request.abort();
1078
+ request = null;
1079
+ };
1080
+
1081
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
1082
+ if (config.signal) {
1083
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
1084
+ }
1085
+ }
1086
+
1087
+ if (!requestData) {
1088
+ requestData = null;
1089
+ }
1090
+
1091
+ // Send the request
1092
+ request.send(requestData);
1093
+ });
1094
+ };function createCommonjsModule(fn, basedir, module) {
1095
+ return module = {
1096
+ path: basedir,
1097
+ exports: {},
1098
+ require: function (path, base) {
1099
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
1100
+ }
1101
+ }, fn(module, module.exports), module.exports;
1102
+ }
1103
+
1104
+ function commonjsRequire () {
1105
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
1106
+ }/**
1107
+ * Helpers.
1108
+ */
1109
+
1110
+ var s = 1000;
1111
+ var m = s * 60;
1112
+ var h = m * 60;
1113
+ var d = h * 24;
1114
+ var w = d * 7;
1115
+ var y = d * 365.25;
1116
+
1117
+ /**
1118
+ * Parse or format the given `val`.
1119
+ *
1120
+ * Options:
1121
+ *
1122
+ * - `long` verbose formatting [false]
1123
+ *
1124
+ * @param {String|Number} val
1125
+ * @param {Object} [options]
1126
+ * @throws {Error} throw an error if val is not a non-empty string or a number
1127
+ * @return {String|Number}
1128
+ * @api public
1129
+ */
1130
+
1131
+ var ms = function(val, options) {
1132
+ options = options || {};
1133
+ var type = typeof val;
1134
+ if (type === 'string' && val.length > 0) {
1135
+ return parse(val);
1136
+ } else if (type === 'number' && isFinite(val)) {
1137
+ return options.long ? fmtLong(val) : fmtShort(val);
1138
+ }
1139
+ throw new Error(
1140
+ 'val is not a non-empty string or a valid number. val=' +
1141
+ JSON.stringify(val)
1142
+ );
1143
+ };
1144
+
1145
+ /**
1146
+ * Parse the given `str` and return milliseconds.
1147
+ *
1148
+ * @param {String} str
1149
+ * @return {Number}
1150
+ * @api private
1151
+ */
1152
+
1153
+ function parse(str) {
1154
+ str = String(str);
1155
+ if (str.length > 100) {
1156
+ return;
1157
+ }
1158
+ 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(
1159
+ str
1160
+ );
1161
+ if (!match) {
1162
+ return;
1163
+ }
1164
+ var n = parseFloat(match[1]);
1165
+ var type = (match[2] || 'ms').toLowerCase();
1166
+ switch (type) {
1167
+ case 'years':
1168
+ case 'year':
1169
+ case 'yrs':
1170
+ case 'yr':
1171
+ case 'y':
1172
+ return n * y;
1173
+ case 'weeks':
1174
+ case 'week':
1175
+ case 'w':
1176
+ return n * w;
1177
+ case 'days':
1178
+ case 'day':
1179
+ case 'd':
1180
+ return n * d;
1181
+ case 'hours':
1182
+ case 'hour':
1183
+ case 'hrs':
1184
+ case 'hr':
1185
+ case 'h':
1186
+ return n * h;
1187
+ case 'minutes':
1188
+ case 'minute':
1189
+ case 'mins':
1190
+ case 'min':
1191
+ case 'm':
1192
+ return n * m;
1193
+ case 'seconds':
1194
+ case 'second':
1195
+ case 'secs':
1196
+ case 'sec':
1197
+ case 's':
1198
+ return n * s;
1199
+ case 'milliseconds':
1200
+ case 'millisecond':
1201
+ case 'msecs':
1202
+ case 'msec':
1203
+ case 'ms':
1204
+ return n;
1205
+ default:
1206
+ return undefined;
1207
+ }
1208
+ }
1209
+
1210
+ /**
1211
+ * Short format for `ms`.
1212
+ *
1213
+ * @param {Number} ms
1214
+ * @return {String}
1215
+ * @api private
1216
+ */
1217
+
1218
+ function fmtShort(ms) {
1219
+ var msAbs = Math.abs(ms);
1220
+ if (msAbs >= d) {
1221
+ return Math.round(ms / d) + 'd';
1222
+ }
1223
+ if (msAbs >= h) {
1224
+ return Math.round(ms / h) + 'h';
1225
+ }
1226
+ if (msAbs >= m) {
1227
+ return Math.round(ms / m) + 'm';
1228
+ }
1229
+ if (msAbs >= s) {
1230
+ return Math.round(ms / s) + 's';
1231
+ }
1232
+ return ms + 'ms';
1233
+ }
1234
+
1235
+ /**
1236
+ * Long format for `ms`.
1237
+ *
1238
+ * @param {Number} ms
1239
+ * @return {String}
1240
+ * @api private
1241
+ */
1242
+
1243
+ function fmtLong(ms) {
1244
+ var msAbs = Math.abs(ms);
1245
+ if (msAbs >= d) {
1246
+ return plural(ms, msAbs, d, 'day');
1247
+ }
1248
+ if (msAbs >= h) {
1249
+ return plural(ms, msAbs, h, 'hour');
1250
+ }
1251
+ if (msAbs >= m) {
1252
+ return plural(ms, msAbs, m, 'minute');
1253
+ }
1254
+ if (msAbs >= s) {
1255
+ return plural(ms, msAbs, s, 'second');
1256
+ }
1257
+ return ms + ' ms';
1258
+ }
1259
+
1260
+ /**
1261
+ * Pluralization helper.
1262
+ */
1263
+
1264
+ function plural(ms, msAbs, n, name) {
1265
+ var isPlural = msAbs >= n * 1.5;
1266
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
1267
+ }/**
1268
+ * This is the common logic for both the Node.js and web browser
1269
+ * implementations of `debug()`.
1270
+ */
1271
+
1272
+ function setup(env) {
1273
+ createDebug.debug = createDebug;
1274
+ createDebug.default = createDebug;
1275
+ createDebug.coerce = coerce;
1276
+ createDebug.disable = disable;
1277
+ createDebug.enable = enable;
1278
+ createDebug.enabled = enabled;
1279
+ createDebug.humanize = ms;
1280
+ createDebug.destroy = destroy;
1281
+
1282
+ Object.keys(env).forEach(key => {
1283
+ createDebug[key] = env[key];
1284
+ });
1285
+
1286
+ /**
1287
+ * The currently active debug mode names, and names to skip.
1288
+ */
1289
+
1290
+ createDebug.names = [];
1291
+ createDebug.skips = [];
1292
+
1293
+ /**
1294
+ * Map of special "%n" handling functions, for the debug "format" argument.
1295
+ *
1296
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
1297
+ */
1298
+ createDebug.formatters = {};
1299
+
1300
+ /**
1301
+ * Selects a color for a debug namespace
1302
+ * @param {String} namespace The namespace string for the debug instance to be colored
1303
+ * @return {Number|String} An ANSI color code for the given namespace
1304
+ * @api private
1305
+ */
1306
+ function selectColor(namespace) {
1307
+ let hash = 0;
1308
+
1309
+ for (let i = 0; i < namespace.length; i++) {
1310
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
1311
+ hash |= 0; // Convert to 32bit integer
1312
+ }
1313
+
1314
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
1315
+ }
1316
+ createDebug.selectColor = selectColor;
1317
+
1318
+ /**
1319
+ * Create a debugger with the given `namespace`.
1320
+ *
1321
+ * @param {String} namespace
1322
+ * @return {Function}
1323
+ * @api public
1324
+ */
1325
+ function createDebug(namespace) {
1326
+ let prevTime;
1327
+ let enableOverride = null;
1328
+ let namespacesCache;
1329
+ let enabledCache;
1330
+
1331
+ function debug(...args) {
1332
+ // Disabled?
1333
+ if (!debug.enabled) {
1334
+ return;
1335
+ }
1336
+
1337
+ const self = debug;
1338
+
1339
+ // Set `diff` timestamp
1340
+ const curr = Number(new Date());
1341
+ const ms = curr - (prevTime || curr);
1342
+ self.diff = ms;
1343
+ self.prev = prevTime;
1344
+ self.curr = curr;
1345
+ prevTime = curr;
1346
+
1347
+ args[0] = createDebug.coerce(args[0]);
1348
+
1349
+ if (typeof args[0] !== 'string') {
1350
+ // Anything else let's inspect with %O
1351
+ args.unshift('%O');
1352
+ }
1353
+
1354
+ // Apply any `formatters` transformations
1355
+ let index = 0;
1356
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
1357
+ // If we encounter an escaped % then don't increase the array index
1358
+ if (match === '%%') {
1359
+ return '%';
1360
+ }
1361
+ index++;
1362
+ const formatter = createDebug.formatters[format];
1363
+ if (typeof formatter === 'function') {
1364
+ const val = args[index];
1365
+ match = formatter.call(self, val);
1366
+
1367
+ // Now we need to remove `args[index]` since it's inlined in the `format`
1368
+ args.splice(index, 1);
1369
+ index--;
1370
+ }
1371
+ return match;
1372
+ });
1373
+
1374
+ // Apply env-specific formatting (colors, etc.)
1375
+ createDebug.formatArgs.call(self, args);
1376
+
1377
+ const logFn = self.log || createDebug.log;
1378
+ logFn.apply(self, args);
1379
+ }
1380
+
1381
+ debug.namespace = namespace;
1382
+ debug.useColors = createDebug.useColors();
1383
+ debug.color = createDebug.selectColor(namespace);
1384
+ debug.extend = extend;
1385
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
1386
+
1387
+ Object.defineProperty(debug, 'enabled', {
1388
+ enumerable: true,
1389
+ configurable: false,
1390
+ get: () => {
1391
+ if (enableOverride !== null) {
1392
+ return enableOverride;
1393
+ }
1394
+ if (namespacesCache !== createDebug.namespaces) {
1395
+ namespacesCache = createDebug.namespaces;
1396
+ enabledCache = createDebug.enabled(namespace);
1397
+ }
1398
+
1399
+ return enabledCache;
1400
+ },
1401
+ set: v => {
1402
+ enableOverride = v;
1403
+ }
1404
+ });
1405
+
1406
+ // Env-specific initialization logic for debug instances
1407
+ if (typeof createDebug.init === 'function') {
1408
+ createDebug.init(debug);
1409
+ }
1410
+
1411
+ return debug;
1412
+ }
1413
+
1414
+ function extend(namespace, delimiter) {
1415
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
1416
+ newDebug.log = this.log;
1417
+ return newDebug;
1418
+ }
1419
+
1420
+ /**
1421
+ * Enables a debug mode by namespaces. This can include modes
1422
+ * separated by a colon and wildcards.
1423
+ *
1424
+ * @param {String} namespaces
1425
+ * @api public
1426
+ */
1427
+ function enable(namespaces) {
1428
+ createDebug.save(namespaces);
1429
+ createDebug.namespaces = namespaces;
1430
+
1431
+ createDebug.names = [];
1432
+ createDebug.skips = [];
1433
+
1434
+ let i;
1435
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
1436
+ const len = split.length;
1437
+
1438
+ for (i = 0; i < len; i++) {
1439
+ if (!split[i]) {
1440
+ // ignore empty strings
1441
+ continue;
1442
+ }
1443
+
1444
+ namespaces = split[i].replace(/\*/g, '.*?');
1445
+
1446
+ if (namespaces[0] === '-') {
1447
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
1448
+ } else {
1449
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
1450
+ }
1451
+ }
1452
+ }
1453
+
1454
+ /**
1455
+ * Disable debug output.
1456
+ *
1457
+ * @return {String} namespaces
1458
+ * @api public
1459
+ */
1460
+ function disable() {
1461
+ const namespaces = [
1462
+ ...createDebug.names.map(toNamespace),
1463
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
1464
+ ].join(',');
1465
+ createDebug.enable('');
1466
+ return namespaces;
1467
+ }
1468
+
1469
+ /**
1470
+ * Returns true if the given mode name is enabled, false otherwise.
1471
+ *
1472
+ * @param {String} name
1473
+ * @return {Boolean}
1474
+ * @api public
1475
+ */
1476
+ function enabled(name) {
1477
+ if (name[name.length - 1] === '*') {
1478
+ return true;
1479
+ }
1480
+
1481
+ let i;
1482
+ let len;
1483
+
1484
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
1485
+ if (createDebug.skips[i].test(name)) {
1486
+ return false;
1487
+ }
1488
+ }
1489
+
1490
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
1491
+ if (createDebug.names[i].test(name)) {
1492
+ return true;
1493
+ }
1494
+ }
1495
+
1496
+ return false;
1497
+ }
1498
+
1499
+ /**
1500
+ * Convert regexp to namespace
1501
+ *
1502
+ * @param {RegExp} regxep
1503
+ * @return {String} namespace
1504
+ * @api private
1505
+ */
1506
+ function toNamespace(regexp) {
1507
+ return regexp.toString()
1508
+ .substring(2, regexp.toString().length - 2)
1509
+ .replace(/\.\*\?$/, '*');
1510
+ }
1511
+
1512
+ /**
1513
+ * Coerce `val`.
1514
+ *
1515
+ * @param {Mixed} val
1516
+ * @return {Mixed}
1517
+ * @api private
1518
+ */
1519
+ function coerce(val) {
1520
+ if (val instanceof Error) {
1521
+ return val.stack || val.message;
1522
+ }
1523
+ return val;
1524
+ }
1525
+
1526
+ /**
1527
+ * XXX DO NOT USE. This is a temporary stub function.
1528
+ * XXX It WILL be removed in the next major release.
1529
+ */
1530
+ function destroy() {
1531
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
1532
+ }
1533
+
1534
+ createDebug.enable(createDebug.load());
1535
+
1536
+ return createDebug;
1537
+ }
1538
+
1539
+ var common = setup;var browser = createCommonjsModule(function (module, exports) {
1540
+ /* eslint-env browser */
1541
+
1542
+ /**
1543
+ * This is the web browser implementation of `debug()`.
1544
+ */
1545
+
1546
+ exports.formatArgs = formatArgs;
1547
+ exports.save = save;
1548
+ exports.load = load;
1549
+ exports.useColors = useColors;
1550
+ exports.storage = localstorage();
1551
+ exports.destroy = (() => {
1552
+ let warned = false;
1553
+
1554
+ return () => {
1555
+ if (!warned) {
1556
+ warned = true;
1557
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
1558
+ }
1559
+ };
1560
+ })();
1561
+
1562
+ /**
1563
+ * Colors.
1564
+ */
1565
+
1566
+ exports.colors = [
1567
+ '#0000CC',
1568
+ '#0000FF',
1569
+ '#0033CC',
1570
+ '#0033FF',
1571
+ '#0066CC',
1572
+ '#0066FF',
1573
+ '#0099CC',
1574
+ '#0099FF',
1575
+ '#00CC00',
1576
+ '#00CC33',
1577
+ '#00CC66',
1578
+ '#00CC99',
1579
+ '#00CCCC',
1580
+ '#00CCFF',
1581
+ '#3300CC',
1582
+ '#3300FF',
1583
+ '#3333CC',
1584
+ '#3333FF',
1585
+ '#3366CC',
1586
+ '#3366FF',
1587
+ '#3399CC',
1588
+ '#3399FF',
1589
+ '#33CC00',
1590
+ '#33CC33',
1591
+ '#33CC66',
1592
+ '#33CC99',
1593
+ '#33CCCC',
1594
+ '#33CCFF',
1595
+ '#6600CC',
1596
+ '#6600FF',
1597
+ '#6633CC',
1598
+ '#6633FF',
1599
+ '#66CC00',
1600
+ '#66CC33',
1601
+ '#9900CC',
1602
+ '#9900FF',
1603
+ '#9933CC',
1604
+ '#9933FF',
1605
+ '#99CC00',
1606
+ '#99CC33',
1607
+ '#CC0000',
1608
+ '#CC0033',
1609
+ '#CC0066',
1610
+ '#CC0099',
1611
+ '#CC00CC',
1612
+ '#CC00FF',
1613
+ '#CC3300',
1614
+ '#CC3333',
1615
+ '#CC3366',
1616
+ '#CC3399',
1617
+ '#CC33CC',
1618
+ '#CC33FF',
1619
+ '#CC6600',
1620
+ '#CC6633',
1621
+ '#CC9900',
1622
+ '#CC9933',
1623
+ '#CCCC00',
1624
+ '#CCCC33',
1625
+ '#FF0000',
1626
+ '#FF0033',
1627
+ '#FF0066',
1628
+ '#FF0099',
1629
+ '#FF00CC',
1630
+ '#FF00FF',
1631
+ '#FF3300',
1632
+ '#FF3333',
1633
+ '#FF3366',
1634
+ '#FF3399',
1635
+ '#FF33CC',
1636
+ '#FF33FF',
1637
+ '#FF6600',
1638
+ '#FF6633',
1639
+ '#FF9900',
1640
+ '#FF9933',
1641
+ '#FFCC00',
1642
+ '#FFCC33'
1643
+ ];
1644
+
1645
+ /**
1646
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
1647
+ * and the Firebug extension (any Firefox version) are known
1648
+ * to support "%c" CSS customizations.
1649
+ *
1650
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
1651
+ */
1652
+
1653
+ // eslint-disable-next-line complexity
1654
+ function useColors() {
1655
+ // NB: In an Electron preload script, document will be defined but not fully
1656
+ // initialized. Since we know we're in Chrome, we'll just detect this case
1657
+ // explicitly
1658
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
1659
+ return true;
1660
+ }
1661
+
1662
+ // Internet Explorer and Edge do not support colors.
1663
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
1664
+ return false;
1665
+ }
1666
+
1667
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
1668
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
1669
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
1670
+ // Is firebug? http://stackoverflow.com/a/398120/376773
1671
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
1672
+ // Is firefox >= v31?
1673
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
1674
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
1675
+ // Double check webkit in userAgent just in case we are in a worker
1676
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
1677
+ }
1678
+
1679
+ /**
1680
+ * Colorize log arguments if enabled.
1681
+ *
1682
+ * @api public
1683
+ */
1684
+
1685
+ function formatArgs(args) {
1686
+ args[0] = (this.useColors ? '%c' : '') +
1687
+ this.namespace +
1688
+ (this.useColors ? ' %c' : ' ') +
1689
+ args[0] +
1690
+ (this.useColors ? '%c ' : ' ') +
1691
+ '+' + module.exports.humanize(this.diff);
1692
+
1693
+ if (!this.useColors) {
1694
+ return;
1695
+ }
1696
+
1697
+ const c = 'color: ' + this.color;
1698
+ args.splice(1, 0, c, 'color: inherit');
1699
+
1700
+ // The final "%c" is somewhat tricky, because there could be other
1701
+ // arguments passed either before or after the %c, so we need to
1702
+ // figure out the correct index to insert the CSS into
1703
+ let index = 0;
1704
+ let lastC = 0;
1705
+ args[0].replace(/%[a-zA-Z%]/g, match => {
1706
+ if (match === '%%') {
1707
+ return;
1708
+ }
1709
+ index++;
1710
+ if (match === '%c') {
1711
+ // We only are interested in the *last* %c
1712
+ // (the user may have provided their own)
1713
+ lastC = index;
1714
+ }
1715
+ });
1716
+
1717
+ args.splice(lastC, 0, c);
1718
+ }
1719
+
1720
+ /**
1721
+ * Invokes `console.debug()` when available.
1722
+ * No-op when `console.debug` is not a "function".
1723
+ * If `console.debug` is not available, falls back
1724
+ * to `console.log`.
1725
+ *
1726
+ * @api public
1727
+ */
1728
+ exports.log = console.debug || console.log || (() => {});
1729
+
1730
+ /**
1731
+ * Save `namespaces`.
1732
+ *
1733
+ * @param {String} namespaces
1734
+ * @api private
1735
+ */
1736
+ function save(namespaces) {
1737
+ try {
1738
+ if (namespaces) {
1739
+ exports.storage.setItem('debug', namespaces);
1740
+ } else {
1741
+ exports.storage.removeItem('debug');
1742
+ }
1743
+ } catch (error) {
1744
+ // Swallow
1745
+ // XXX (@Qix-) should we be logging these?
1746
+ }
1747
+ }
1748
+
1749
+ /**
1750
+ * Load `namespaces`.
1751
+ *
1752
+ * @return {String} returns the previously persisted debug modes
1753
+ * @api private
1754
+ */
1755
+ function load() {
1756
+ let r;
1757
+ try {
1758
+ r = exports.storage.getItem('debug');
1759
+ } catch (error) {
1760
+ // Swallow
1761
+ // XXX (@Qix-) should we be logging these?
1762
+ }
1763
+
1764
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
1765
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
1766
+ r = process.env.DEBUG;
1767
+ }
1768
+
1769
+ return r;
1770
+ }
1771
+
1772
+ /**
1773
+ * Localstorage attempts to return the localstorage.
1774
+ *
1775
+ * This is necessary because safari throws
1776
+ * when a user disables cookies/localstorage
1777
+ * and you attempt to access it.
1778
+ *
1779
+ * @return {LocalStorage}
1780
+ * @api private
1781
+ */
1782
+
1783
+ function localstorage() {
1784
+ try {
1785
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
1786
+ // The Browser also has localStorage in the global context.
1787
+ return localStorage;
1788
+ } catch (error) {
1789
+ // Swallow
1790
+ // XXX (@Qix-) should we be logging these?
1791
+ }
1792
+ }
1793
+
1794
+ module.exports = common(exports);
1795
+
1796
+ const {formatters} = module.exports;
1797
+
1798
+ /**
1799
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
1800
+ */
1801
+
1802
+ formatters.j = function (v) {
1803
+ try {
1804
+ return JSON.stringify(v);
1805
+ } catch (error) {
1806
+ return '[UnexpectedJSONParseError]: ' + error.message;
1807
+ }
1808
+ };
1809
+ });var hasFlag = (flag, argv) => {
1810
+ argv = argv || process.argv;
1811
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
1812
+ const pos = argv.indexOf(prefix + flag);
1813
+ const terminatorPos = argv.indexOf('--');
1814
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
1815
+ };const env = process.env;
1816
+
1817
+ let forceColor;
1818
+ if (hasFlag('no-color') ||
1819
+ hasFlag('no-colors') ||
1820
+ hasFlag('color=false')) {
1821
+ forceColor = false;
1822
+ } else if (hasFlag('color') ||
1823
+ hasFlag('colors') ||
1824
+ hasFlag('color=true') ||
1825
+ hasFlag('color=always')) {
1826
+ forceColor = true;
1827
+ }
1828
+ if ('FORCE_COLOR' in env) {
1829
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
1830
+ }
1831
+
1832
+ function translateLevel(level) {
1833
+ if (level === 0) {
1834
+ return false;
1835
+ }
1836
+
1837
+ return {
1838
+ level,
1839
+ hasBasic: true,
1840
+ has256: level >= 2,
1841
+ has16m: level >= 3
1842
+ };
1843
+ }
1844
+
1845
+ function supportsColor(stream) {
1846
+ if (forceColor === false) {
1847
+ return 0;
1848
+ }
1849
+
1850
+ if (hasFlag('color=16m') ||
1851
+ hasFlag('color=full') ||
1852
+ hasFlag('color=truecolor')) {
1853
+ return 3;
1854
+ }
1855
+
1856
+ if (hasFlag('color=256')) {
1857
+ return 2;
1858
+ }
1859
+
1860
+ if (stream && !stream.isTTY && forceColor !== true) {
1861
+ return 0;
1862
+ }
1863
+
1864
+ const min = forceColor ? 1 : 0;
1865
+
1866
+ if (process.platform === 'win32') {
1867
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
1868
+ // libuv that enables 256 color output on Windows. Anything earlier and it
1869
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
1870
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
1871
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
1872
+ // that supports 16m/TrueColor.
1873
+ const osRelease = os__default["default"].release().split('.');
1874
+ if (
1875
+ Number(process.versions.node.split('.')[0]) >= 8 &&
1876
+ Number(osRelease[0]) >= 10 &&
1877
+ Number(osRelease[2]) >= 10586
1878
+ ) {
1879
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1880
+ }
1881
+
1882
+ return 1;
1883
+ }
1884
+
1885
+ if ('CI' in env) {
1886
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
1887
+ return 1;
1888
+ }
1889
+
1890
+ return min;
1891
+ }
1892
+
1893
+ if ('TEAMCITY_VERSION' in env) {
1894
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1895
+ }
1896
+
1897
+ if (env.COLORTERM === 'truecolor') {
1898
+ return 3;
1899
+ }
1900
+
1901
+ if ('TERM_PROGRAM' in env) {
1902
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1903
+
1904
+ switch (env.TERM_PROGRAM) {
1905
+ case 'iTerm.app':
1906
+ return version >= 3 ? 3 : 2;
1907
+ case 'Apple_Terminal':
1908
+ return 2;
1909
+ // No default
1910
+ }
1911
+ }
1912
+
1913
+ if (/-256(color)?$/i.test(env.TERM)) {
1914
+ return 2;
1915
+ }
1916
+
1917
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1918
+ return 1;
1919
+ }
1920
+
1921
+ if ('COLORTERM' in env) {
1922
+ return 1;
1923
+ }
1924
+
1925
+ if (env.TERM === 'dumb') {
1926
+ return min;
1927
+ }
1928
+
1929
+ return min;
1930
+ }
1931
+
1932
+ function getSupportLevel(stream) {
1933
+ const level = supportsColor(stream);
1934
+ return translateLevel(level);
1935
+ }
1936
+
1937
+ var supportsColor_1 = {
1938
+ supportsColor: getSupportLevel,
1939
+ stdout: getSupportLevel(process.stdout),
1940
+ stderr: getSupportLevel(process.stderr)
1941
+ };var node = createCommonjsModule(function (module, exports) {
1942
+ /**
1943
+ * Module dependencies.
1944
+ */
1945
+
1946
+
1947
+
1948
+
1949
+ /**
1950
+ * This is the Node.js implementation of `debug()`.
1951
+ */
1952
+
1953
+ exports.init = init;
1954
+ exports.log = log;
1955
+ exports.formatArgs = formatArgs;
1956
+ exports.save = save;
1957
+ exports.load = load;
1958
+ exports.useColors = useColors;
1959
+ exports.destroy = util__default["default"].deprecate(
1960
+ () => {},
1961
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
1962
+ );
1963
+
1964
+ /**
1965
+ * Colors.
1966
+ */
1967
+
1968
+ exports.colors = [6, 2, 3, 4, 5, 1];
1969
+
1970
+ try {
1971
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
1972
+ // eslint-disable-next-line import/no-extraneous-dependencies
1973
+ const supportsColor = supportsColor_1;
1974
+
1975
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1976
+ exports.colors = [
1977
+ 20,
1978
+ 21,
1979
+ 26,
1980
+ 27,
1981
+ 32,
1982
+ 33,
1983
+ 38,
1984
+ 39,
1985
+ 40,
1986
+ 41,
1987
+ 42,
1988
+ 43,
1989
+ 44,
1990
+ 45,
1991
+ 56,
1992
+ 57,
1993
+ 62,
1994
+ 63,
1995
+ 68,
1996
+ 69,
1997
+ 74,
1998
+ 75,
1999
+ 76,
2000
+ 77,
2001
+ 78,
2002
+ 79,
2003
+ 80,
2004
+ 81,
2005
+ 92,
2006
+ 93,
2007
+ 98,
2008
+ 99,
2009
+ 112,
2010
+ 113,
2011
+ 128,
2012
+ 129,
2013
+ 134,
2014
+ 135,
2015
+ 148,
2016
+ 149,
2017
+ 160,
2018
+ 161,
2019
+ 162,
2020
+ 163,
2021
+ 164,
2022
+ 165,
2023
+ 166,
2024
+ 167,
2025
+ 168,
2026
+ 169,
2027
+ 170,
2028
+ 171,
2029
+ 172,
2030
+ 173,
2031
+ 178,
2032
+ 179,
2033
+ 184,
2034
+ 185,
2035
+ 196,
2036
+ 197,
2037
+ 198,
2038
+ 199,
2039
+ 200,
2040
+ 201,
2041
+ 202,
2042
+ 203,
2043
+ 204,
2044
+ 205,
2045
+ 206,
2046
+ 207,
2047
+ 208,
2048
+ 209,
2049
+ 214,
2050
+ 215,
2051
+ 220,
2052
+ 221
2053
+ ];
2054
+ }
2055
+ } catch (error) {
2056
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
2057
+ }
2058
+
2059
+ /**
2060
+ * Build up the default `inspectOpts` object from the environment variables.
2061
+ *
2062
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
2063
+ */
2064
+
2065
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
2066
+ return /^debug_/i.test(key);
2067
+ }).reduce((obj, key) => {
2068
+ // Camel-case
2069
+ const prop = key
2070
+ .substring(6)
2071
+ .toLowerCase()
2072
+ .replace(/_([a-z])/g, (_, k) => {
2073
+ return k.toUpperCase();
2074
+ });
2075
+
2076
+ // Coerce string value into JS value
2077
+ let val = process.env[key];
2078
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
2079
+ val = true;
2080
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
2081
+ val = false;
2082
+ } else if (val === 'null') {
2083
+ val = null;
2084
+ } else {
2085
+ val = Number(val);
2086
+ }
2087
+
2088
+ obj[prop] = val;
2089
+ return obj;
2090
+ }, {});
2091
+
2092
+ /**
2093
+ * Is stdout a TTY? Colored output is enabled when `true`.
2094
+ */
2095
+
2096
+ function useColors() {
2097
+ return 'colors' in exports.inspectOpts ?
2098
+ Boolean(exports.inspectOpts.colors) :
2099
+ tty__default["default"].isatty(process.stderr.fd);
2100
+ }
2101
+
2102
+ /**
2103
+ * Adds ANSI color escape codes if enabled.
2104
+ *
2105
+ * @api public
2106
+ */
2107
+
2108
+ function formatArgs(args) {
2109
+ const {namespace: name, useColors} = this;
2110
+
2111
+ if (useColors) {
2112
+ const c = this.color;
2113
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
2114
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
2115
+
2116
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
2117
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
2118
+ } else {
2119
+ args[0] = getDate() + name + ' ' + args[0];
2120
+ }
2121
+ }
2122
+
2123
+ function getDate() {
2124
+ if (exports.inspectOpts.hideDate) {
2125
+ return '';
2126
+ }
2127
+ return new Date().toISOString() + ' ';
2128
+ }
2129
+
2130
+ /**
2131
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
2132
+ */
2133
+
2134
+ function log(...args) {
2135
+ return process.stderr.write(util__default["default"].format(...args) + '\n');
2136
+ }
2137
+
2138
+ /**
2139
+ * Save `namespaces`.
2140
+ *
2141
+ * @param {String} namespaces
2142
+ * @api private
2143
+ */
2144
+ function save(namespaces) {
2145
+ if (namespaces) {
2146
+ process.env.DEBUG = namespaces;
2147
+ } else {
2148
+ // If you set a process.env field to null or undefined, it gets cast to the
2149
+ // string 'null' or 'undefined'. Just delete instead.
2150
+ delete process.env.DEBUG;
2151
+ }
2152
+ }
2153
+
2154
+ /**
2155
+ * Load `namespaces`.
2156
+ *
2157
+ * @return {String} returns the previously persisted debug modes
2158
+ * @api private
2159
+ */
2160
+
2161
+ function load() {
2162
+ return process.env.DEBUG;
2163
+ }
2164
+
2165
+ /**
2166
+ * Init logic for `debug` instances.
2167
+ *
2168
+ * Create a new `inspectOpts` object in case `useColors` is set
2169
+ * differently for a particular `debug` instance.
2170
+ */
2171
+
2172
+ function init(debug) {
2173
+ debug.inspectOpts = {};
2174
+
2175
+ const keys = Object.keys(exports.inspectOpts);
2176
+ for (let i = 0; i < keys.length; i++) {
2177
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
2178
+ }
2179
+ }
2180
+
2181
+ module.exports = common(exports);
2182
+
2183
+ const {formatters} = module.exports;
2184
+
2185
+ /**
2186
+ * Map %o to `util.inspect()`, all on a single line.
2187
+ */
2188
+
2189
+ formatters.o = function (v) {
2190
+ this.inspectOpts.colors = this.useColors;
2191
+ return util__default["default"].inspect(v, this.inspectOpts)
2192
+ .split('\n')
2193
+ .map(str => str.trim())
2194
+ .join(' ');
2195
+ };
2196
+
2197
+ /**
2198
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
2199
+ */
2200
+
2201
+ formatters.O = function (v) {
2202
+ this.inspectOpts.colors = this.useColors;
2203
+ return util__default["default"].inspect(v, this.inspectOpts);
2204
+ };
2205
+ });var src = createCommonjsModule(function (module) {
2206
+ /**
2207
+ * Detect Electron renderer / nwjs process, which is node, but we should
2208
+ * treat as a browser.
2209
+ */
2210
+
2211
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
2212
+ module.exports = browser;
2213
+ } else {
2214
+ module.exports = node;
2215
+ }
2216
+ });var debug;
2217
+
2218
+ var debug_1 = function () {
2219
+ if (!debug) {
2220
+ try {
2221
+ /* eslint global-require: off */
2222
+ debug = src("follow-redirects");
2223
+ }
2224
+ catch (error) { /* */ }
2225
+ if (typeof debug !== "function") {
2226
+ debug = function () { /* */ };
2227
+ }
2228
+ }
2229
+ debug.apply(null, arguments);
2230
+ };var URL = url__default["default"].URL;
2231
+
2232
+
2233
+ var Writable = stream__default["default"].Writable;
2234
+
2235
+
2236
+
2237
+ // Create handlers that pass events from native requests
2238
+ var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
2239
+ var eventHandlers = Object.create(null);
2240
+ events.forEach(function (event) {
2241
+ eventHandlers[event] = function (arg1, arg2, arg3) {
2242
+ this._redirectable.emit(event, arg1, arg2, arg3);
2243
+ };
2244
+ });
2245
+
2246
+ // Error types with codes
2247
+ var RedirectionError = createErrorType(
2248
+ "ERR_FR_REDIRECTION_FAILURE",
2249
+ "Redirected request failed"
2250
+ );
2251
+ var TooManyRedirectsError = createErrorType(
2252
+ "ERR_FR_TOO_MANY_REDIRECTS",
2253
+ "Maximum number of redirects exceeded"
2254
+ );
2255
+ var MaxBodyLengthExceededError = createErrorType(
2256
+ "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
2257
+ "Request body larger than maxBodyLength limit"
2258
+ );
2259
+ var WriteAfterEndError = createErrorType(
2260
+ "ERR_STREAM_WRITE_AFTER_END",
2261
+ "write after end"
2262
+ );
2263
+
2264
+ // An HTTP(S) request that can be redirected
2265
+ function RedirectableRequest(options, responseCallback) {
2266
+ // Initialize the request
2267
+ Writable.call(this);
2268
+ this._sanitizeOptions(options);
2269
+ this._options = options;
2270
+ this._ended = false;
2271
+ this._ending = false;
2272
+ this._redirectCount = 0;
2273
+ this._redirects = [];
2274
+ this._requestBodyLength = 0;
2275
+ this._requestBodyBuffers = [];
2276
+
2277
+ // Attach a callback if passed
2278
+ if (responseCallback) {
2279
+ this.on("response", responseCallback);
2280
+ }
2281
+
2282
+ // React to responses of native requests
2283
+ var self = this;
2284
+ this._onNativeResponse = function (response) {
2285
+ self._processResponse(response);
2286
+ };
2287
+
2288
+ // Perform the first request
2289
+ this._performRequest();
2290
+ }
2291
+ RedirectableRequest.prototype = Object.create(Writable.prototype);
2292
+
2293
+ RedirectableRequest.prototype.abort = function () {
2294
+ abortRequest(this._currentRequest);
2295
+ this.emit("abort");
2296
+ };
2297
+
2298
+ // Writes buffered data to the current native request
2299
+ RedirectableRequest.prototype.write = function (data, encoding, callback) {
2300
+ // Writing is not allowed if end has been called
2301
+ if (this._ending) {
2302
+ throw new WriteAfterEndError();
2303
+ }
2304
+
2305
+ // Validate input and shift parameters if necessary
2306
+ if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
2307
+ throw new TypeError("data should be a string, Buffer or Uint8Array");
2308
+ }
2309
+ if (typeof encoding === "function") {
2310
+ callback = encoding;
2311
+ encoding = null;
2312
+ }
2313
+
2314
+ // Ignore empty buffers, since writing them doesn't invoke the callback
2315
+ // https://github.com/nodejs/node/issues/22066
2316
+ if (data.length === 0) {
2317
+ if (callback) {
2318
+ callback();
2319
+ }
2320
+ return;
2321
+ }
2322
+ // Only write when we don't exceed the maximum body length
2323
+ if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
2324
+ this._requestBodyLength += data.length;
2325
+ this._requestBodyBuffers.push({ data: data, encoding: encoding });
2326
+ this._currentRequest.write(data, encoding, callback);
2327
+ }
2328
+ // Error when we exceed the maximum body length
2329
+ else {
2330
+ this.emit("error", new MaxBodyLengthExceededError());
2331
+ this.abort();
2332
+ }
2333
+ };
2334
+
2335
+ // Ends the current native request
2336
+ RedirectableRequest.prototype.end = function (data, encoding, callback) {
2337
+ // Shift parameters if necessary
2338
+ if (typeof data === "function") {
2339
+ callback = data;
2340
+ data = encoding = null;
2341
+ }
2342
+ else if (typeof encoding === "function") {
2343
+ callback = encoding;
2344
+ encoding = null;
2345
+ }
2346
+
2347
+ // Write data if needed and end
2348
+ if (!data) {
2349
+ this._ended = this._ending = true;
2350
+ this._currentRequest.end(null, null, callback);
2351
+ }
2352
+ else {
2353
+ var self = this;
2354
+ var currentRequest = this._currentRequest;
2355
+ this.write(data, encoding, function () {
2356
+ self._ended = true;
2357
+ currentRequest.end(null, null, callback);
2358
+ });
2359
+ this._ending = true;
2360
+ }
2361
+ };
2362
+
2363
+ // Sets a header value on the current native request
2364
+ RedirectableRequest.prototype.setHeader = function (name, value) {
2365
+ this._options.headers[name] = value;
2366
+ this._currentRequest.setHeader(name, value);
2367
+ };
2368
+
2369
+ // Clears a header value on the current native request
2370
+ RedirectableRequest.prototype.removeHeader = function (name) {
2371
+ delete this._options.headers[name];
2372
+ this._currentRequest.removeHeader(name);
2373
+ };
2374
+
2375
+ // Global timeout for all underlying requests
2376
+ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
2377
+ var self = this;
2378
+
2379
+ // Destroys the socket on timeout
2380
+ function destroyOnTimeout(socket) {
2381
+ socket.setTimeout(msecs);
2382
+ socket.removeListener("timeout", socket.destroy);
2383
+ socket.addListener("timeout", socket.destroy);
2384
+ }
2385
+
2386
+ // Sets up a timer to trigger a timeout event
2387
+ function startTimer(socket) {
2388
+ if (self._timeout) {
2389
+ clearTimeout(self._timeout);
2390
+ }
2391
+ self._timeout = setTimeout(function () {
2392
+ self.emit("timeout");
2393
+ clearTimer();
2394
+ }, msecs);
2395
+ destroyOnTimeout(socket);
2396
+ }
2397
+
2398
+ // Stops a timeout from triggering
2399
+ function clearTimer() {
2400
+ // Clear the timeout
2401
+ if (self._timeout) {
2402
+ clearTimeout(self._timeout);
2403
+ self._timeout = null;
2404
+ }
2405
+
2406
+ // Clean up all attached listeners
2407
+ self.removeListener("abort", clearTimer);
2408
+ self.removeListener("error", clearTimer);
2409
+ self.removeListener("response", clearTimer);
2410
+ if (callback) {
2411
+ self.removeListener("timeout", callback);
2412
+ }
2413
+ if (!self.socket) {
2414
+ self._currentRequest.removeListener("socket", startTimer);
2415
+ }
2416
+ }
2417
+
2418
+ // Attach callback if passed
2419
+ if (callback) {
2420
+ this.on("timeout", callback);
2421
+ }
2422
+
2423
+ // Start the timer if or when the socket is opened
2424
+ if (this.socket) {
2425
+ startTimer(this.socket);
2426
+ }
2427
+ else {
2428
+ this._currentRequest.once("socket", startTimer);
2429
+ }
2430
+
2431
+ // Clean up on events
2432
+ this.on("socket", destroyOnTimeout);
2433
+ this.on("abort", clearTimer);
2434
+ this.on("error", clearTimer);
2435
+ this.on("response", clearTimer);
2436
+
2437
+ return this;
2438
+ };
2439
+
2440
+ // Proxy all other public ClientRequest methods
2441
+ [
2442
+ "flushHeaders", "getHeader",
2443
+ "setNoDelay", "setSocketKeepAlive",
2444
+ ].forEach(function (method) {
2445
+ RedirectableRequest.prototype[method] = function (a, b) {
2446
+ return this._currentRequest[method](a, b);
2447
+ };
2448
+ });
2449
+
2450
+ // Proxy all public ClientRequest properties
2451
+ ["aborted", "connection", "socket"].forEach(function (property) {
2452
+ Object.defineProperty(RedirectableRequest.prototype, property, {
2453
+ get: function () { return this._currentRequest[property]; },
2454
+ });
2455
+ });
2456
+
2457
+ RedirectableRequest.prototype._sanitizeOptions = function (options) {
2458
+ // Ensure headers are always present
2459
+ if (!options.headers) {
2460
+ options.headers = {};
2461
+ }
2462
+
2463
+ // Since http.request treats host as an alias of hostname,
2464
+ // but the url module interprets host as hostname plus port,
2465
+ // eliminate the host property to avoid confusion.
2466
+ if (options.host) {
2467
+ // Use hostname if set, because it has precedence
2468
+ if (!options.hostname) {
2469
+ options.hostname = options.host;
2470
+ }
2471
+ delete options.host;
2472
+ }
2473
+
2474
+ // Complete the URL object when necessary
2475
+ if (!options.pathname && options.path) {
2476
+ var searchPos = options.path.indexOf("?");
2477
+ if (searchPos < 0) {
2478
+ options.pathname = options.path;
2479
+ }
2480
+ else {
2481
+ options.pathname = options.path.substring(0, searchPos);
2482
+ options.search = options.path.substring(searchPos);
2483
+ }
2484
+ }
2485
+ };
2486
+
2487
+
2488
+ // Executes the next native request (initial or redirect)
2489
+ RedirectableRequest.prototype._performRequest = function () {
2490
+ // Load the native protocol
2491
+ var protocol = this._options.protocol;
2492
+ var nativeProtocol = this._options.nativeProtocols[protocol];
2493
+ if (!nativeProtocol) {
2494
+ this.emit("error", new TypeError("Unsupported protocol " + protocol));
2495
+ return;
2496
+ }
2497
+
2498
+ // If specified, use the agent corresponding to the protocol
2499
+ // (HTTP and HTTPS use different types of agents)
2500
+ if (this._options.agents) {
2501
+ var scheme = protocol.substr(0, protocol.length - 1);
2502
+ this._options.agent = this._options.agents[scheme];
2503
+ }
2504
+
2505
+ // Create the native request
2506
+ var request = this._currentRequest =
2507
+ nativeProtocol.request(this._options, this._onNativeResponse);
2508
+ this._currentUrl = url__default["default"].format(this._options);
2509
+
2510
+ // Set up event handlers
2511
+ request._redirectable = this;
2512
+ for (var e = 0; e < events.length; e++) {
2513
+ request.on(events[e], eventHandlers[events[e]]);
2514
+ }
2515
+
2516
+ // End a redirected request
2517
+ // (The first request must be ended explicitly with RedirectableRequest#end)
2518
+ if (this._isRedirect) {
2519
+ // Write the request entity and end.
2520
+ var i = 0;
2521
+ var self = this;
2522
+ var buffers = this._requestBodyBuffers;
2523
+ (function writeNext(error) {
2524
+ // Only write if this request has not been redirected yet
2525
+ /* istanbul ignore else */
2526
+ if (request === self._currentRequest) {
2527
+ // Report any write errors
2528
+ /* istanbul ignore if */
2529
+ if (error) {
2530
+ self.emit("error", error);
2531
+ }
2532
+ // Write the next buffer if there are still left
2533
+ else if (i < buffers.length) {
2534
+ var buffer = buffers[i++];
2535
+ /* istanbul ignore else */
2536
+ if (!request.finished) {
2537
+ request.write(buffer.data, buffer.encoding, writeNext);
2538
+ }
2539
+ }
2540
+ // End the request if `end` has been called on us
2541
+ else if (self._ended) {
2542
+ request.end();
2543
+ }
2544
+ }
2545
+ }());
2546
+ }
2547
+ };
2548
+
2549
+ // Processes a response from the current native request
2550
+ RedirectableRequest.prototype._processResponse = function (response) {
2551
+ // Store the redirected response
2552
+ var statusCode = response.statusCode;
2553
+ if (this._options.trackRedirects) {
2554
+ this._redirects.push({
2555
+ url: this._currentUrl,
2556
+ headers: response.headers,
2557
+ statusCode: statusCode,
2558
+ });
2559
+ }
2560
+
2561
+ // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
2562
+ // that further action needs to be taken by the user agent in order to
2563
+ // fulfill the request. If a Location header field is provided,
2564
+ // the user agent MAY automatically redirect its request to the URI
2565
+ // referenced by the Location field value,
2566
+ // even if the specific status code is not understood.
2567
+
2568
+ // If the response is not a redirect; return it as-is
2569
+ var location = response.headers.location;
2570
+ if (!location || this._options.followRedirects === false ||
2571
+ statusCode < 300 || statusCode >= 400) {
2572
+ response.responseUrl = this._currentUrl;
2573
+ response.redirects = this._redirects;
2574
+ this.emit("response", response);
2575
+
2576
+ // Clean up
2577
+ this._requestBodyBuffers = [];
2578
+ return;
2579
+ }
2580
+
2581
+ // The response is a redirect, so abort the current request
2582
+ abortRequest(this._currentRequest);
2583
+ // Discard the remainder of the response to avoid waiting for data
2584
+ response.destroy();
2585
+
2586
+ // RFC7231§6.4: A client SHOULD detect and intervene
2587
+ // in cyclical redirections (i.e., "infinite" redirection loops).
2588
+ if (++this._redirectCount > this._options.maxRedirects) {
2589
+ this.emit("error", new TooManyRedirectsError());
2590
+ return;
2591
+ }
2592
+
2593
+ // RFC7231§6.4: Automatic redirection needs to done with
2594
+ // care for methods not known to be safe, […]
2595
+ // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
2596
+ // the request method from POST to GET for the subsequent request.
2597
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
2598
+ // RFC7231§6.4.4: The 303 (See Other) status code indicates that
2599
+ // the server is redirecting the user agent to a different resource […]
2600
+ // A user agent can perform a retrieval request targeting that URI
2601
+ // (a GET or HEAD request if using HTTP) […]
2602
+ (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {
2603
+ this._options.method = "GET";
2604
+ // Drop a possible entity and headers related to it
2605
+ this._requestBodyBuffers = [];
2606
+ removeMatchingHeaders(/^content-/i, this._options.headers);
2607
+ }
2608
+
2609
+ // Drop the Host header, as the redirect might lead to a different host
2610
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
2611
+
2612
+ // If the redirect is relative, carry over the host of the last request
2613
+ var currentUrlParts = url__default["default"].parse(this._currentUrl);
2614
+ var currentHost = currentHostHeader || currentUrlParts.host;
2615
+ var currentUrl = /^\w+:/.test(location) ? this._currentUrl :
2616
+ url__default["default"].format(Object.assign(currentUrlParts, { host: currentHost }));
2617
+
2618
+ // Determine the URL of the redirection
2619
+ var redirectUrl;
2620
+ try {
2621
+ redirectUrl = url__default["default"].resolve(currentUrl, location);
2622
+ }
2623
+ catch (cause) {
2624
+ this.emit("error", new RedirectionError(cause));
2625
+ return;
2626
+ }
2627
+
2628
+ // Create the redirected request
2629
+ debug_1("redirecting to", redirectUrl);
2630
+ this._isRedirect = true;
2631
+ var redirectUrlParts = url__default["default"].parse(redirectUrl);
2632
+ Object.assign(this._options, redirectUrlParts);
2633
+
2634
+ // Drop confidential headers when redirecting to a less secure protocol
2635
+ // or to a different domain that is not a superdomain
2636
+ if (redirectUrlParts.protocol !== currentUrlParts.protocol &&
2637
+ redirectUrlParts.protocol !== "https:" ||
2638
+ redirectUrlParts.host !== currentHost &&
2639
+ !isSubdomain(redirectUrlParts.host, currentHost)) {
2640
+ removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
2641
+ }
2642
+
2643
+ // Evaluate the beforeRedirect callback
2644
+ if (typeof this._options.beforeRedirect === "function") {
2645
+ var responseDetails = { headers: response.headers };
2646
+ try {
2647
+ this._options.beforeRedirect.call(null, this._options, responseDetails);
2648
+ }
2649
+ catch (err) {
2650
+ this.emit("error", err);
2651
+ return;
2652
+ }
2653
+ this._sanitizeOptions(this._options);
2654
+ }
2655
+
2656
+ // Perform the redirected request
2657
+ try {
2658
+ this._performRequest();
2659
+ }
2660
+ catch (cause) {
2661
+ this.emit("error", new RedirectionError(cause));
2662
+ }
2663
+ };
2664
+
2665
+ // Wraps the key/value object of protocols with redirect functionality
2666
+ function wrap(protocols) {
2667
+ // Default settings
2668
+ var exports = {
2669
+ maxRedirects: 21,
2670
+ maxBodyLength: 10 * 1024 * 1024,
2671
+ };
2672
+
2673
+ // Wrap each protocol
2674
+ var nativeProtocols = {};
2675
+ Object.keys(protocols).forEach(function (scheme) {
2676
+ var protocol = scheme + ":";
2677
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
2678
+ var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
2679
+
2680
+ // Executes a request, following redirects
2681
+ function request(input, options, callback) {
2682
+ // Parse parameters
2683
+ if (typeof input === "string") {
2684
+ var urlStr = input;
2685
+ try {
2686
+ input = urlToOptions(new URL(urlStr));
2687
+ }
2688
+ catch (err) {
2689
+ /* istanbul ignore next */
2690
+ input = url__default["default"].parse(urlStr);
2691
+ }
2692
+ }
2693
+ else if (URL && (input instanceof URL)) {
2694
+ input = urlToOptions(input);
2695
+ }
2696
+ else {
2697
+ callback = options;
2698
+ options = input;
2699
+ input = { protocol: protocol };
2700
+ }
2701
+ if (typeof options === "function") {
2702
+ callback = options;
2703
+ options = null;
2704
+ }
2705
+
2706
+ // Set defaults
2707
+ options = Object.assign({
2708
+ maxRedirects: exports.maxRedirects,
2709
+ maxBodyLength: exports.maxBodyLength,
2710
+ }, input, options);
2711
+ options.nativeProtocols = nativeProtocols;
2712
+
2713
+ assert__default["default"].equal(options.protocol, protocol, "protocol mismatch");
2714
+ debug_1("options", options);
2715
+ return new RedirectableRequest(options, callback);
2716
+ }
2717
+
2718
+ // Executes a GET request, following redirects
2719
+ function get(input, options, callback) {
2720
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
2721
+ wrappedRequest.end();
2722
+ return wrappedRequest;
2723
+ }
2724
+
2725
+ // Expose the properties on the wrapped protocol
2726
+ Object.defineProperties(wrappedProtocol, {
2727
+ request: { value: request, configurable: true, enumerable: true, writable: true },
2728
+ get: { value: get, configurable: true, enumerable: true, writable: true },
2729
+ });
2730
+ });
2731
+ return exports;
2732
+ }
2733
+
2734
+ /* istanbul ignore next */
2735
+ function noop() { /* empty */ }
2736
+
2737
+ // from https://github.com/nodejs/node/blob/master/lib/internal/url.js
2738
+ function urlToOptions(urlObject) {
2739
+ var options = {
2740
+ protocol: urlObject.protocol,
2741
+ hostname: urlObject.hostname.startsWith("[") ?
2742
+ /* istanbul ignore next */
2743
+ urlObject.hostname.slice(1, -1) :
2744
+ urlObject.hostname,
2745
+ hash: urlObject.hash,
2746
+ search: urlObject.search,
2747
+ pathname: urlObject.pathname,
2748
+ path: urlObject.pathname + urlObject.search,
2749
+ href: urlObject.href,
2750
+ };
2751
+ if (urlObject.port !== "") {
2752
+ options.port = Number(urlObject.port);
2753
+ }
2754
+ return options;
2755
+ }
2756
+
2757
+ function removeMatchingHeaders(regex, headers) {
2758
+ var lastValue;
2759
+ for (var header in headers) {
2760
+ if (regex.test(header)) {
2761
+ lastValue = headers[header];
2762
+ delete headers[header];
2763
+ }
2764
+ }
2765
+ return (lastValue === null || typeof lastValue === "undefined") ?
2766
+ undefined : String(lastValue).trim();
2767
+ }
2768
+
2769
+ function createErrorType(code, defaultMessage) {
2770
+ function CustomError(cause) {
2771
+ Error.captureStackTrace(this, this.constructor);
2772
+ if (!cause) {
2773
+ this.message = defaultMessage;
2774
+ }
2775
+ else {
2776
+ this.message = defaultMessage + ": " + cause.message;
2777
+ this.cause = cause;
2778
+ }
2779
+ }
2780
+ CustomError.prototype = new Error();
2781
+ CustomError.prototype.constructor = CustomError;
2782
+ CustomError.prototype.name = "Error [" + code + "]";
2783
+ CustomError.prototype.code = code;
2784
+ return CustomError;
2785
+ }
2786
+
2787
+ function abortRequest(request) {
2788
+ for (var e = 0; e < events.length; e++) {
2789
+ request.removeListener(events[e], eventHandlers[events[e]]);
2790
+ }
2791
+ request.on("error", noop);
2792
+ request.abort();
2793
+ }
2794
+
2795
+ function isSubdomain(subdomain, domain) {
2796
+ const dot = subdomain.length - domain.length - 1;
2797
+ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
2798
+ }
2799
+
2800
+ // Exports
2801
+ var followRedirects = wrap({ http: http__default["default"], https: https__default["default"] });
2802
+ var wrap_1 = wrap;
2803
+ followRedirects.wrap = wrap_1;var data = {
2804
+ "version": "0.26.1"
2805
+ };var httpFollow = followRedirects.http;
2806
+ var httpsFollow = followRedirects.https;
2807
+
2808
+
2809
+ var VERSION$1 = data.version;
2810
+
2811
+
2812
+
2813
+
2814
+
2815
+ var isHttps = /https:?/;
2816
+
2817
+ /**
2818
+ *
2819
+ * @param {http.ClientRequestArgs} options
2820
+ * @param {AxiosProxyConfig} proxy
2821
+ * @param {string} location
2822
+ */
2823
+ function setProxy(options, proxy, location) {
2824
+ options.hostname = proxy.host;
2825
+ options.host = proxy.host;
2826
+ options.port = proxy.port;
2827
+ options.path = location;
2828
+
2829
+ // Basic proxy authorization
2830
+ if (proxy.auth) {
2831
+ var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
2832
+ options.headers['Proxy-Authorization'] = 'Basic ' + base64;
2833
+ }
2834
+
2835
+ // If a proxy is used, any redirects must also pass through the proxy
2836
+ options.beforeRedirect = function beforeRedirect(redirection) {
2837
+ redirection.headers.host = redirection.host;
2838
+ setProxy(redirection, proxy, redirection.href);
2839
+ };
2840
+ }
2841
+
2842
+ /*eslint consistent-return:0*/
2843
+ var http_1 = function httpAdapter(config) {
2844
+ return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
2845
+ var onCanceled;
2846
+ function done() {
2847
+ if (config.cancelToken) {
2848
+ config.cancelToken.unsubscribe(onCanceled);
2849
+ }
2850
+
2851
+ if (config.signal) {
2852
+ config.signal.removeEventListener('abort', onCanceled);
2853
+ }
2854
+ }
2855
+ var resolve = function resolve(value) {
2856
+ done();
2857
+ resolvePromise(value);
2858
+ };
2859
+ var rejected = false;
2860
+ var reject = function reject(value) {
2861
+ done();
2862
+ rejected = true;
2863
+ rejectPromise(value);
2864
+ };
2865
+ var data = config.data;
2866
+ var headers = config.headers;
2867
+ var headerNames = {};
2868
+
2869
+ Object.keys(headers).forEach(function storeLowerName(name) {
2870
+ headerNames[name.toLowerCase()] = name;
2871
+ });
2872
+
2873
+ // Set User-Agent (required by some servers)
2874
+ // See https://github.com/axios/axios/issues/69
2875
+ if ('user-agent' in headerNames) {
2876
+ // User-Agent is specified; handle case where no UA header is desired
2877
+ if (!headers[headerNames['user-agent']]) {
2878
+ delete headers[headerNames['user-agent']];
2879
+ }
2880
+ // Otherwise, use specified value
2881
+ } else {
2882
+ // Only set header if it hasn't been set in config
2883
+ headers['User-Agent'] = 'axios/' + VERSION$1;
2884
+ }
2885
+
2886
+ if (data && !utils.isStream(data)) {
2887
+ if (Buffer.isBuffer(data)) ; else if (utils.isArrayBuffer(data)) {
2888
+ data = Buffer.from(new Uint8Array(data));
2889
+ } else if (utils.isString(data)) {
2890
+ data = Buffer.from(data, 'utf-8');
2891
+ } else {
2892
+ return reject(createError(
2893
+ 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
2894
+ config
2895
+ ));
2896
+ }
2897
+
2898
+ if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
2899
+ return reject(createError('Request body larger than maxBodyLength limit', config));
2900
+ }
2901
+
2902
+ // Add Content-Length header if data exists
2903
+ if (!headerNames['content-length']) {
2904
+ headers['Content-Length'] = data.length;
2905
+ }
2906
+ }
2907
+
2908
+ // HTTP basic authentication
2909
+ var auth = undefined;
2910
+ if (config.auth) {
2911
+ var username = config.auth.username || '';
2912
+ var password = config.auth.password || '';
2913
+ auth = username + ':' + password;
2914
+ }
2915
+
2916
+ // Parse url
2917
+ var fullPath = buildFullPath(config.baseURL, config.url);
2918
+ var parsed = url__default["default"].parse(fullPath);
2919
+ var protocol = parsed.protocol || 'http:';
2920
+
2921
+ if (!auth && parsed.auth) {
2922
+ var urlAuth = parsed.auth.split(':');
2923
+ var urlUsername = urlAuth[0] || '';
2924
+ var urlPassword = urlAuth[1] || '';
2925
+ auth = urlUsername + ':' + urlPassword;
2926
+ }
2927
+
2928
+ if (auth && headerNames.authorization) {
2929
+ delete headers[headerNames.authorization];
2930
+ }
2931
+
2932
+ var isHttpsRequest = isHttps.test(protocol);
2933
+ var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
2934
+
2935
+ try {
2936
+ buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, '');
2937
+ } catch (err) {
2938
+ var customErr = new Error(err.message);
2939
+ customErr.config = config;
2940
+ customErr.url = config.url;
2941
+ customErr.exists = true;
2942
+ reject(customErr);
2943
+ }
2944
+
2945
+ var options = {
2946
+ path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
2947
+ method: config.method.toUpperCase(),
2948
+ headers: headers,
2949
+ agent: agent,
2950
+ agents: { http: config.httpAgent, https: config.httpsAgent },
2951
+ auth: auth
2952
+ };
2953
+
2954
+ if (config.socketPath) {
2955
+ options.socketPath = config.socketPath;
2956
+ } else {
2957
+ options.hostname = parsed.hostname;
2958
+ options.port = parsed.port;
2959
+ }
2960
+
2961
+ var proxy = config.proxy;
2962
+ if (!proxy && proxy !== false) {
2963
+ var proxyEnv = protocol.slice(0, -1) + '_proxy';
2964
+ var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
2965
+ if (proxyUrl) {
2966
+ var parsedProxyUrl = url__default["default"].parse(proxyUrl);
2967
+ var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
2968
+ var shouldProxy = true;
2969
+
2970
+ if (noProxyEnv) {
2971
+ var noProxy = noProxyEnv.split(',').map(function trim(s) {
2972
+ return s.trim();
2973
+ });
2974
+
2975
+ shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
2976
+ if (!proxyElement) {
2977
+ return false;
2978
+ }
2979
+ if (proxyElement === '*') {
2980
+ return true;
2981
+ }
2982
+ if (proxyElement[0] === '.' &&
2983
+ parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
2984
+ return true;
2985
+ }
2986
+
2987
+ return parsed.hostname === proxyElement;
2988
+ });
2989
+ }
2990
+
2991
+ if (shouldProxy) {
2992
+ proxy = {
2993
+ host: parsedProxyUrl.hostname,
2994
+ port: parsedProxyUrl.port,
2995
+ protocol: parsedProxyUrl.protocol
2996
+ };
2997
+
2998
+ if (parsedProxyUrl.auth) {
2999
+ var proxyUrlAuth = parsedProxyUrl.auth.split(':');
3000
+ proxy.auth = {
3001
+ username: proxyUrlAuth[0],
3002
+ password: proxyUrlAuth[1]
3003
+ };
3004
+ }
3005
+ }
3006
+ }
3007
+ }
3008
+
3009
+ if (proxy) {
3010
+ options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
3011
+ setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
3012
+ }
3013
+
3014
+ var transport;
3015
+ var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
3016
+ if (config.transport) {
3017
+ transport = config.transport;
3018
+ } else if (config.maxRedirects === 0) {
3019
+ transport = isHttpsProxy ? https__default["default"] : http__default["default"];
3020
+ } else {
3021
+ if (config.maxRedirects) {
3022
+ options.maxRedirects = config.maxRedirects;
3023
+ }
3024
+ transport = isHttpsProxy ? httpsFollow : httpFollow;
3025
+ }
3026
+
3027
+ if (config.maxBodyLength > -1) {
3028
+ options.maxBodyLength = config.maxBodyLength;
3029
+ }
3030
+
3031
+ if (config.insecureHTTPParser) {
3032
+ options.insecureHTTPParser = config.insecureHTTPParser;
3033
+ }
3034
+
3035
+ // Create the request
3036
+ var req = transport.request(options, function handleResponse(res) {
3037
+ if (req.aborted) return;
3038
+
3039
+ // uncompress the response body transparently if required
3040
+ var stream = res;
3041
+
3042
+ // return the last request in case of redirects
3043
+ var lastRequest = res.req || req;
3044
+
3045
+
3046
+ // if no content, is HEAD request or decompress disabled we should not decompress
3047
+ if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
3048
+ switch (res.headers['content-encoding']) {
3049
+ /*eslint default-case:0*/
3050
+ case 'gzip':
3051
+ case 'compress':
3052
+ case 'deflate':
3053
+ // add the unzipper to the body stream processing pipeline
3054
+ stream = stream.pipe(zlib__default["default"].createUnzip());
3055
+
3056
+ // remove the content-encoding in order to not confuse downstream operations
3057
+ delete res.headers['content-encoding'];
3058
+ break;
3059
+ }
3060
+ }
3061
+
3062
+ var response = {
3063
+ status: res.statusCode,
3064
+ statusText: res.statusMessage,
3065
+ headers: res.headers,
3066
+ config: config,
3067
+ request: lastRequest
3068
+ };
3069
+
3070
+ if (config.responseType === 'stream') {
3071
+ response.data = stream;
3072
+ settle(resolve, reject, response);
3073
+ } else {
3074
+ var responseBuffer = [];
3075
+ var totalResponseBytes = 0;
3076
+ stream.on('data', function handleStreamData(chunk) {
3077
+ responseBuffer.push(chunk);
3078
+ totalResponseBytes += chunk.length;
3079
+
3080
+ // make sure the content length is not over the maxContentLength if specified
3081
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
3082
+ // stream.destoy() emit aborted event before calling reject() on Node.js v16
3083
+ rejected = true;
3084
+ stream.destroy();
3085
+ reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
3086
+ config, null, lastRequest));
3087
+ }
3088
+ });
3089
+
3090
+ stream.on('aborted', function handlerStreamAborted() {
3091
+ if (rejected) {
3092
+ return;
3093
+ }
3094
+ stream.destroy();
3095
+ reject(createError('error request aborted', config, 'ERR_REQUEST_ABORTED', lastRequest));
3096
+ });
3097
+
3098
+ stream.on('error', function handleStreamError(err) {
3099
+ if (req.aborted) return;
3100
+ reject(enhanceError(err, config, null, lastRequest));
3101
+ });
3102
+
3103
+ stream.on('end', function handleStreamEnd() {
3104
+ try {
3105
+ var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
3106
+ if (config.responseType !== 'arraybuffer') {
3107
+ responseData = responseData.toString(config.responseEncoding);
3108
+ if (!config.responseEncoding || config.responseEncoding === 'utf8') {
3109
+ responseData = utils.stripBOM(responseData);
3110
+ }
3111
+ }
3112
+ response.data = responseData;
3113
+ } catch (err) {
3114
+ reject(enhanceError(err, config, err.code, response.request, response));
3115
+ }
3116
+ settle(resolve, reject, response);
3117
+ });
3118
+ }
3119
+ });
3120
+
3121
+ // Handle errors
3122
+ req.on('error', function handleRequestError(err) {
3123
+ if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
3124
+ reject(enhanceError(err, config, null, req));
3125
+ });
3126
+
3127
+ // set tcp keep alive to prevent drop connection by peer
3128
+ req.on('socket', function handleRequestSocket(socket) {
3129
+ // default interval of sending ack packet is 1 minute
3130
+ socket.setKeepAlive(true, 1000 * 60);
3131
+ });
3132
+
3133
+ // Handle request timeout
3134
+ if (config.timeout) {
3135
+ // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
3136
+ var timeout = parseInt(config.timeout, 10);
3137
+
3138
+ if (isNaN(timeout)) {
3139
+ reject(createError(
3140
+ 'error trying to parse `config.timeout` to int',
3141
+ config,
3142
+ 'ERR_PARSE_TIMEOUT',
3143
+ req
3144
+ ));
3145
+
3146
+ return;
3147
+ }
3148
+
3149
+ // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
3150
+ // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
3151
+ // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
3152
+ // And then these socket which be hang up will devoring CPU little by little.
3153
+ // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
3154
+ req.setTimeout(timeout, function handleRequestTimeout() {
3155
+ req.abort();
3156
+ var timeoutErrorMessage = '';
3157
+ if (config.timeoutErrorMessage) {
3158
+ timeoutErrorMessage = config.timeoutErrorMessage;
3159
+ } else {
3160
+ timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
3161
+ }
3162
+ var transitional$1 = config.transitional || transitional;
3163
+ reject(createError(
3164
+ timeoutErrorMessage,
3165
+ config,
3166
+ transitional$1.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
3167
+ req
3168
+ ));
3169
+ });
3170
+ }
3171
+
3172
+ if (config.cancelToken || config.signal) {
3173
+ // Handle cancellation
3174
+ // eslint-disable-next-line func-names
3175
+ onCanceled = function(cancel) {
3176
+ if (req.aborted) return;
3177
+
3178
+ req.abort();
3179
+ reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);
3180
+ };
3181
+
3182
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
3183
+ if (config.signal) {
3184
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
3185
+ }
3186
+ }
3187
+
3188
+
3189
+ // Send the request
3190
+ if (utils.isStream(data)) {
3191
+ data.on('error', function handleStreamError(err) {
3192
+ reject(enhanceError(err, config, null, req));
3193
+ }).pipe(req);
3194
+ } else {
3195
+ req.end(data);
3196
+ }
3197
+ });
3198
+ };var DEFAULT_CONTENT_TYPE = {
3199
+ 'Content-Type': 'application/x-www-form-urlencoded'
3200
+ };
3201
+
3202
+ function setContentTypeIfUnset(headers, value) {
3203
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
3204
+ headers['Content-Type'] = value;
3205
+ }
3206
+ }
3207
+
3208
+ function getDefaultAdapter() {
3209
+ var adapter;
3210
+ if (typeof XMLHttpRequest !== 'undefined') {
3211
+ // For browsers use XHR adapter
3212
+ adapter = xhr;
3213
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
3214
+ // For node use HTTP adapter
3215
+ adapter = http_1;
3216
+ }
3217
+ return adapter;
3218
+ }
3219
+
3220
+ function stringifySafely(rawValue, parser, encoder) {
3221
+ if (utils.isString(rawValue)) {
3222
+ try {
3223
+ (parser || JSON.parse)(rawValue);
3224
+ return utils.trim(rawValue);
3225
+ } catch (e) {
3226
+ if (e.name !== 'SyntaxError') {
3227
+ throw e;
3228
+ }
3229
+ }
3230
+ }
3231
+
3232
+ return (encoder || JSON.stringify)(rawValue);
3233
+ }
3234
+
3235
+ var defaults = {
3236
+
3237
+ transitional: transitional,
3238
+
3239
+ adapter: getDefaultAdapter(),
3240
+
3241
+ transformRequest: [function transformRequest(data, headers) {
3242
+ normalizeHeaderName(headers, 'Accept');
3243
+ normalizeHeaderName(headers, 'Content-Type');
3244
+
3245
+ if (utils.isFormData(data) ||
3246
+ utils.isArrayBuffer(data) ||
3247
+ utils.isBuffer(data) ||
3248
+ utils.isStream(data) ||
3249
+ utils.isFile(data) ||
3250
+ utils.isBlob(data)
3251
+ ) {
3252
+ return data;
3253
+ }
3254
+ if (utils.isArrayBufferView(data)) {
3255
+ return data.buffer;
3256
+ }
3257
+ if (utils.isURLSearchParams(data)) {
3258
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
3259
+ return data.toString();
3260
+ }
3261
+ if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
3262
+ setContentTypeIfUnset(headers, 'application/json');
3263
+ return stringifySafely(data);
3264
+ }
3265
+ return data;
3266
+ }],
3267
+
3268
+ transformResponse: [function transformResponse(data) {
3269
+ var transitional = this.transitional || defaults.transitional;
3270
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
3271
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
3272
+ var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
3273
+
3274
+ if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
3275
+ try {
3276
+ return JSON.parse(data);
3277
+ } catch (e) {
3278
+ if (strictJSONParsing) {
3279
+ if (e.name === 'SyntaxError') {
3280
+ throw enhanceError(e, this, 'E_JSON_PARSE');
3281
+ }
3282
+ throw e;
3283
+ }
3284
+ }
3285
+ }
3286
+
3287
+ return data;
3288
+ }],
3289
+
3290
+ /**
3291
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
3292
+ * timeout is not created.
3293
+ */
3294
+ timeout: 0,
3295
+
3296
+ xsrfCookieName: 'XSRF-TOKEN',
3297
+ xsrfHeaderName: 'X-XSRF-TOKEN',
3298
+
3299
+ maxContentLength: -1,
3300
+ maxBodyLength: -1,
3301
+
3302
+ validateStatus: function validateStatus(status) {
3303
+ return status >= 200 && status < 300;
3304
+ },
3305
+
3306
+ headers: {
3307
+ common: {
3308
+ 'Accept': 'application/json, text/plain, */*'
3309
+ }
3310
+ }
3311
+ };
3312
+
3313
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
3314
+ defaults.headers[method] = {};
3315
+ });
3316
+
3317
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3318
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
3319
+ });
3320
+
3321
+ var defaults_1 = defaults;/**
3322
+ * Transform the data for a request or a response
3323
+ *
3324
+ * @param {Object|String} data The data to be transformed
3325
+ * @param {Array} headers The headers for the request or response
3326
+ * @param {Array|Function} fns A single function or Array of functions
3327
+ * @returns {*} The resulting transformed data
3328
+ */
3329
+ var transformData = function transformData(data, headers, fns) {
3330
+ var context = this || defaults_1;
3331
+ /*eslint no-param-reassign:0*/
3332
+ utils.forEach(fns, function transform(fn) {
3333
+ data = fn.call(context, data, headers);
3334
+ });
3335
+
3336
+ return data;
3337
+ };var isCancel = function isCancel(value) {
3338
+ return !!(value && value.__CANCEL__);
3339
+ };/**
3340
+ * Throws a `Cancel` if cancellation has been requested.
3341
+ */
3342
+ function throwIfCancellationRequested(config) {
3343
+ if (config.cancelToken) {
3344
+ config.cancelToken.throwIfRequested();
3345
+ }
3346
+
3347
+ if (config.signal && config.signal.aborted) {
3348
+ throw new Cancel_1('canceled');
3349
+ }
3350
+ }
3351
+
3352
+ /**
3353
+ * Dispatch a request to the server using the configured adapter.
3354
+ *
3355
+ * @param {object} config The config that is to be used for the request
3356
+ * @returns {Promise} The Promise to be fulfilled
3357
+ */
3358
+ var dispatchRequest = function dispatchRequest(config) {
3359
+ throwIfCancellationRequested(config);
3360
+
3361
+ // Ensure headers exist
3362
+ config.headers = config.headers || {};
3363
+
3364
+ // Transform request data
3365
+ config.data = transformData.call(
3366
+ config,
3367
+ config.data,
3368
+ config.headers,
3369
+ config.transformRequest
3370
+ );
3371
+
3372
+ // Flatten headers
3373
+ config.headers = utils.merge(
3374
+ config.headers.common || {},
3375
+ config.headers[config.method] || {},
3376
+ config.headers
3377
+ );
3378
+
3379
+ utils.forEach(
3380
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3381
+ function cleanHeaderConfig(method) {
3382
+ delete config.headers[method];
3383
+ }
3384
+ );
3385
+
3386
+ var adapter = config.adapter || defaults_1.adapter;
3387
+
3388
+ return adapter(config).then(function onAdapterResolution(response) {
3389
+ throwIfCancellationRequested(config);
3390
+
3391
+ // Transform response data
3392
+ response.data = transformData.call(
3393
+ config,
3394
+ response.data,
3395
+ response.headers,
3396
+ config.transformResponse
3397
+ );
3398
+
3399
+ return response;
3400
+ }, function onAdapterRejection(reason) {
3401
+ if (!isCancel(reason)) {
3402
+ throwIfCancellationRequested(config);
3403
+
3404
+ // Transform response data
3405
+ if (reason && reason.response) {
3406
+ reason.response.data = transformData.call(
3407
+ config,
3408
+ reason.response.data,
3409
+ reason.response.headers,
3410
+ config.transformResponse
3411
+ );
3412
+ }
3413
+ }
3414
+
3415
+ return Promise.reject(reason);
3416
+ });
3417
+ };/**
3418
+ * Config-specific merge-function which creates a new config-object
3419
+ * by merging two configuration objects together.
3420
+ *
3421
+ * @param {Object} config1
3422
+ * @param {Object} config2
3423
+ * @returns {Object} New object resulting from merging config2 to config1
3424
+ */
3425
+ var mergeConfig = function mergeConfig(config1, config2) {
3426
+ // eslint-disable-next-line no-param-reassign
3427
+ config2 = config2 || {};
3428
+ var config = {};
3429
+
3430
+ function getMergedValue(target, source) {
3431
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
3432
+ return utils.merge(target, source);
3433
+ } else if (utils.isPlainObject(source)) {
3434
+ return utils.merge({}, source);
3435
+ } else if (utils.isArray(source)) {
3436
+ return source.slice();
3437
+ }
3438
+ return source;
3439
+ }
3440
+
3441
+ // eslint-disable-next-line consistent-return
3442
+ function mergeDeepProperties(prop) {
3443
+ if (!utils.isUndefined(config2[prop])) {
3444
+ return getMergedValue(config1[prop], config2[prop]);
3445
+ } else if (!utils.isUndefined(config1[prop])) {
3446
+ return getMergedValue(undefined, config1[prop]);
3447
+ }
3448
+ }
3449
+
3450
+ // eslint-disable-next-line consistent-return
3451
+ function valueFromConfig2(prop) {
3452
+ if (!utils.isUndefined(config2[prop])) {
3453
+ return getMergedValue(undefined, config2[prop]);
3454
+ }
3455
+ }
3456
+
3457
+ // eslint-disable-next-line consistent-return
3458
+ function defaultToConfig2(prop) {
3459
+ if (!utils.isUndefined(config2[prop])) {
3460
+ return getMergedValue(undefined, config2[prop]);
3461
+ } else if (!utils.isUndefined(config1[prop])) {
3462
+ return getMergedValue(undefined, config1[prop]);
3463
+ }
3464
+ }
3465
+
3466
+ // eslint-disable-next-line consistent-return
3467
+ function mergeDirectKeys(prop) {
3468
+ if (prop in config2) {
3469
+ return getMergedValue(config1[prop], config2[prop]);
3470
+ } else if (prop in config1) {
3471
+ return getMergedValue(undefined, config1[prop]);
3472
+ }
3473
+ }
3474
+
3475
+ var mergeMap = {
3476
+ 'url': valueFromConfig2,
3477
+ 'method': valueFromConfig2,
3478
+ 'data': valueFromConfig2,
3479
+ 'baseURL': defaultToConfig2,
3480
+ 'transformRequest': defaultToConfig2,
3481
+ 'transformResponse': defaultToConfig2,
3482
+ 'paramsSerializer': defaultToConfig2,
3483
+ 'timeout': defaultToConfig2,
3484
+ 'timeoutMessage': defaultToConfig2,
3485
+ 'withCredentials': defaultToConfig2,
3486
+ 'adapter': defaultToConfig2,
3487
+ 'responseType': defaultToConfig2,
3488
+ 'xsrfCookieName': defaultToConfig2,
3489
+ 'xsrfHeaderName': defaultToConfig2,
3490
+ 'onUploadProgress': defaultToConfig2,
3491
+ 'onDownloadProgress': defaultToConfig2,
3492
+ 'decompress': defaultToConfig2,
3493
+ 'maxContentLength': defaultToConfig2,
3494
+ 'maxBodyLength': defaultToConfig2,
3495
+ 'transport': defaultToConfig2,
3496
+ 'httpAgent': defaultToConfig2,
3497
+ 'httpsAgent': defaultToConfig2,
3498
+ 'cancelToken': defaultToConfig2,
3499
+ 'socketPath': defaultToConfig2,
3500
+ 'responseEncoding': defaultToConfig2,
3501
+ 'validateStatus': mergeDirectKeys
3502
+ };
3503
+
3504
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
3505
+ var merge = mergeMap[prop] || mergeDeepProperties;
3506
+ var configValue = merge(prop);
3507
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3508
+ });
3509
+
3510
+ return config;
3511
+ };var VERSION = data.version;
3512
+
3513
+ var validators$1 = {};
3514
+
3515
+ // eslint-disable-next-line func-names
3516
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
3517
+ validators$1[type] = function validator(thing) {
3518
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
3519
+ };
3520
+ });
3521
+
3522
+ var deprecatedWarnings = {};
3523
+
3524
+ /**
3525
+ * Transitional option validator
3526
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
3527
+ * @param {string?} version - deprecated version / removed since version
3528
+ * @param {string?} message - some message with additional info
3529
+ * @returns {function}
3530
+ */
3531
+ validators$1.transitional = function transitional(validator, version, message) {
3532
+ function formatMessage(opt, desc) {
3533
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3534
+ }
3535
+
3536
+ // eslint-disable-next-line func-names
3537
+ return function(value, opt, opts) {
3538
+ if (validator === false) {
3539
+ throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
3540
+ }
3541
+
3542
+ if (version && !deprecatedWarnings[opt]) {
3543
+ deprecatedWarnings[opt] = true;
3544
+ // eslint-disable-next-line no-console
3545
+ console.warn(
3546
+ formatMessage(
3547
+ opt,
3548
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
3549
+ )
3550
+ );
3551
+ }
3552
+
3553
+ return validator ? validator(value, opt, opts) : true;
3554
+ };
3555
+ };
3556
+
3557
+ /**
3558
+ * Assert object's properties type
3559
+ * @param {object} options
3560
+ * @param {object} schema
3561
+ * @param {boolean?} allowUnknown
3562
+ */
3563
+
3564
+ function assertOptions(options, schema, allowUnknown) {
3565
+ if (typeof options !== 'object') {
3566
+ throw new TypeError('options must be an object');
3567
+ }
3568
+ var keys = Object.keys(options);
3569
+ var i = keys.length;
3570
+ while (i-- > 0) {
3571
+ var opt = keys[i];
3572
+ var validator = schema[opt];
3573
+ if (validator) {
3574
+ var value = options[opt];
3575
+ var result = value === undefined || validator(value, opt, options);
3576
+ if (result !== true) {
3577
+ throw new TypeError('option ' + opt + ' must be ' + result);
3578
+ }
3579
+ continue;
3580
+ }
3581
+ if (allowUnknown !== true) {
3582
+ throw Error('Unknown option ' + opt);
3583
+ }
3584
+ }
3585
+ }
3586
+
3587
+ var validator = {
3588
+ assertOptions: assertOptions,
3589
+ validators: validators$1
3590
+ };var validators = validator.validators;
3591
+ /**
3592
+ * Create a new instance of Axios
3593
+ *
3594
+ * @param {Object} instanceConfig The default config for the instance
3595
+ */
3596
+ function Axios(instanceConfig) {
3597
+ this.defaults = instanceConfig;
3598
+ this.interceptors = {
3599
+ request: new InterceptorManager_1(),
3600
+ response: new InterceptorManager_1()
3601
+ };
3602
+ }
3603
+
3604
+ /**
3605
+ * Dispatch a request
3606
+ *
3607
+ * @param {Object} config The config specific for this request (merged with this.defaults)
3608
+ */
3609
+ Axios.prototype.request = function request(configOrUrl, config) {
3610
+ /*eslint no-param-reassign:0*/
3611
+ // Allow for axios('example/url'[, config]) a la fetch API
3612
+ if (typeof configOrUrl === 'string') {
3613
+ config = config || {};
3614
+ config.url = configOrUrl;
3615
+ } else {
3616
+ config = configOrUrl || {};
3617
+ }
3618
+
3619
+ config = mergeConfig(this.defaults, config);
3620
+
3621
+ // Set config.method
3622
+ if (config.method) {
3623
+ config.method = config.method.toLowerCase();
3624
+ } else if (this.defaults.method) {
3625
+ config.method = this.defaults.method.toLowerCase();
3626
+ } else {
3627
+ config.method = 'get';
3628
+ }
3629
+
3630
+ var transitional = config.transitional;
3631
+
3632
+ if (transitional !== undefined) {
3633
+ validator.assertOptions(transitional, {
3634
+ silentJSONParsing: validators.transitional(validators.boolean),
3635
+ forcedJSONParsing: validators.transitional(validators.boolean),
3636
+ clarifyTimeoutError: validators.transitional(validators.boolean)
3637
+ }, false);
3638
+ }
3639
+
3640
+ // filter out skipped interceptors
3641
+ var requestInterceptorChain = [];
3642
+ var synchronousRequestInterceptors = true;
3643
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3644
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3645
+ return;
3646
+ }
3647
+
3648
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3649
+
3650
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3651
+ });
3652
+
3653
+ var responseInterceptorChain = [];
3654
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3655
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3656
+ });
3657
+
3658
+ var promise;
3659
+
3660
+ if (!synchronousRequestInterceptors) {
3661
+ var chain = [dispatchRequest, undefined];
3662
+
3663
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
3664
+ chain = chain.concat(responseInterceptorChain);
3665
+
3666
+ promise = Promise.resolve(config);
3667
+ while (chain.length) {
3668
+ promise = promise.then(chain.shift(), chain.shift());
3669
+ }
3670
+
3671
+ return promise;
3672
+ }
3673
+
3674
+
3675
+ var newConfig = config;
3676
+ while (requestInterceptorChain.length) {
3677
+ var onFulfilled = requestInterceptorChain.shift();
3678
+ var onRejected = requestInterceptorChain.shift();
3679
+ try {
3680
+ newConfig = onFulfilled(newConfig);
3681
+ } catch (error) {
3682
+ onRejected(error);
3683
+ break;
3684
+ }
3685
+ }
3686
+
3687
+ try {
3688
+ promise = dispatchRequest(newConfig);
3689
+ } catch (error) {
3690
+ return Promise.reject(error);
3691
+ }
3692
+
3693
+ while (responseInterceptorChain.length) {
3694
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
3695
+ }
3696
+
3697
+ return promise;
3698
+ };
3699
+
3700
+ Axios.prototype.getUri = function getUri(config) {
3701
+ config = mergeConfig(this.defaults, config);
3702
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
3703
+ };
3704
+
3705
+ // Provide aliases for supported request methods
3706
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3707
+ /*eslint func-names:0*/
3708
+ Axios.prototype[method] = function(url, config) {
3709
+ return this.request(mergeConfig(config || {}, {
3710
+ method: method,
3711
+ url: url,
3712
+ data: (config || {}).data
3713
+ }));
3714
+ };
3715
+ });
3716
+
3717
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3718
+ /*eslint func-names:0*/
3719
+ Axios.prototype[method] = function(url, data, config) {
3720
+ return this.request(mergeConfig(config || {}, {
3721
+ method: method,
3722
+ url: url,
3723
+ data: data
3724
+ }));
3725
+ };
3726
+ });
3727
+
3728
+ var Axios_1 = Axios;/**
3729
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
3730
+ *
3731
+ * @class
3732
+ * @param {Function} executor The executor function.
3733
+ */
3734
+ function CancelToken(executor) {
3735
+ if (typeof executor !== 'function') {
3736
+ throw new TypeError('executor must be a function.');
3737
+ }
3738
+
3739
+ var resolvePromise;
3740
+
3741
+ this.promise = new Promise(function promiseExecutor(resolve) {
3742
+ resolvePromise = resolve;
3743
+ });
3744
+
3745
+ var token = this;
3746
+
3747
+ // eslint-disable-next-line func-names
3748
+ this.promise.then(function(cancel) {
3749
+ if (!token._listeners) return;
3750
+
3751
+ var i;
3752
+ var l = token._listeners.length;
3753
+
3754
+ for (i = 0; i < l; i++) {
3755
+ token._listeners[i](cancel);
3756
+ }
3757
+ token._listeners = null;
3758
+ });
3759
+
3760
+ // eslint-disable-next-line func-names
3761
+ this.promise.then = function(onfulfilled) {
3762
+ var _resolve;
3763
+ // eslint-disable-next-line func-names
3764
+ var promise = new Promise(function(resolve) {
3765
+ token.subscribe(resolve);
3766
+ _resolve = resolve;
3767
+ }).then(onfulfilled);
3768
+
3769
+ promise.cancel = function reject() {
3770
+ token.unsubscribe(_resolve);
3771
+ };
3772
+
3773
+ return promise;
3774
+ };
3775
+
3776
+ executor(function cancel(message) {
3777
+ if (token.reason) {
3778
+ // Cancellation has already been requested
3779
+ return;
3780
+ }
3781
+
3782
+ token.reason = new Cancel_1(message);
3783
+ resolvePromise(token.reason);
3784
+ });
3785
+ }
3786
+
3787
+ /**
3788
+ * Throws a `Cancel` if cancellation has been requested.
3789
+ */
3790
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
3791
+ if (this.reason) {
3792
+ throw this.reason;
3793
+ }
3794
+ };
3795
+
3796
+ /**
3797
+ * Subscribe to the cancel signal
3798
+ */
3799
+
3800
+ CancelToken.prototype.subscribe = function subscribe(listener) {
3801
+ if (this.reason) {
3802
+ listener(this.reason);
3803
+ return;
3804
+ }
3805
+
3806
+ if (this._listeners) {
3807
+ this._listeners.push(listener);
3808
+ } else {
3809
+ this._listeners = [listener];
3810
+ }
3811
+ };
3812
+
3813
+ /**
3814
+ * Unsubscribe from the cancel signal
3815
+ */
3816
+
3817
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
3818
+ if (!this._listeners) {
3819
+ return;
3820
+ }
3821
+ var index = this._listeners.indexOf(listener);
3822
+ if (index !== -1) {
3823
+ this._listeners.splice(index, 1);
3824
+ }
3825
+ };
3826
+
3827
+ /**
3828
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
3829
+ * cancels the `CancelToken`.
3830
+ */
3831
+ CancelToken.source = function source() {
3832
+ var cancel;
3833
+ var token = new CancelToken(function executor(c) {
3834
+ cancel = c;
3835
+ });
3836
+ return {
3837
+ token: token,
3838
+ cancel: cancel
3839
+ };
3840
+ };
3841
+
3842
+ var CancelToken_1 = CancelToken;/**
3843
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3844
+ *
3845
+ * Common use case would be to use `Function.prototype.apply`.
3846
+ *
3847
+ * ```js
3848
+ * function f(x, y, z) {}
3849
+ * var args = [1, 2, 3];
3850
+ * f.apply(null, args);
3851
+ * ```
3852
+ *
3853
+ * With `spread` this example can be re-written.
3854
+ *
3855
+ * ```js
3856
+ * spread(function(x, y, z) {})([1, 2, 3]);
3857
+ * ```
3858
+ *
3859
+ * @param {Function} callback
3860
+ * @returns {Function}
3861
+ */
3862
+ var spread = function spread(callback) {
3863
+ return function wrap(arr) {
3864
+ return callback.apply(null, arr);
3865
+ };
3866
+ };/**
3867
+ * Determines whether the payload is an error thrown by Axios
3868
+ *
3869
+ * @param {*} payload The value to test
3870
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3871
+ */
3872
+ var isAxiosError = function isAxiosError(payload) {
3873
+ return utils.isObject(payload) && (payload.isAxiosError === true);
3874
+ };/**
3875
+ * Create an instance of Axios
3876
+ *
3877
+ * @param {Object} defaultConfig The default config for the instance
3878
+ * @return {Axios} A new instance of Axios
3879
+ */
3880
+ function createInstance(defaultConfig) {
3881
+ var context = new Axios_1(defaultConfig);
3882
+ var instance = bind(Axios_1.prototype.request, context);
3883
+
3884
+ // Copy axios.prototype to instance
3885
+ utils.extend(instance, Axios_1.prototype, context);
3886
+
3887
+ // Copy context to instance
3888
+ utils.extend(instance, context);
3889
+
3890
+ // Factory for creating new instances
3891
+ instance.create = function create(instanceConfig) {
3892
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
3893
+ };
3894
+
3895
+ return instance;
3896
+ }
3897
+
3898
+ // Create the default instance to be exported
3899
+ var axios$1 = createInstance(defaults_1);
3900
+
3901
+ // Expose Axios class to allow class inheritance
3902
+ axios$1.Axios = Axios_1;
3903
+
3904
+ // Expose Cancel & CancelToken
3905
+ axios$1.Cancel = Cancel_1;
3906
+ axios$1.CancelToken = CancelToken_1;
3907
+ axios$1.isCancel = isCancel;
3908
+ axios$1.VERSION = data.version;
3909
+
3910
+ // Expose all/spread
3911
+ axios$1.all = function all(promises) {
3912
+ return Promise.all(promises);
3913
+ };
3914
+ axios$1.spread = spread;
3915
+
3916
+ // Expose isAxiosError
3917
+ axios$1.isAxiosError = isAxiosError;
3918
+
3919
+ var axios_1 = axios$1;
3920
+
3921
+ // Allow use of default import syntax in TypeScript
3922
+ var _default = axios$1;
3923
+ axios_1.default = _default;var axios = axios_1;var script = {
3924
+ name: "Banners",
3925
+ props: {
3926
+ type: {
3927
+ type: String,
3928
+ validator: function validator(value) {
3929
+ return ['header', 'footer'].includes(value);
3930
+ },
3931
+ default: function _default() {
3932
+ return 'header';
3933
+ }
3934
+ }
3935
+ },
3936
+ data: function data() {
3937
+ return {
3938
+ dismissedBanners: [],
3939
+ staticContent: {}
3940
+ };
3941
+ },
3942
+ computed: {
3943
+ mappedStaticContentHeaders: function mappedStaticContentHeaders() {
3944
+ var computed = [];
3945
+ var banner_type = this.type === 'header' ? 'headers' : 'footers';
3946
+
3947
+ for (var key in this.staticContent[banner_type]) {
3948
+ if (!this.dismissedBanners.includes(parseInt(key))) {
3949
+ computed.push(this.staticContent[banner_type][key]);
3950
+ }
3951
+ }
3952
+
3953
+ return computed;
3954
+ }
3955
+ },
3956
+ methods: {
3957
+ dismissBanner: function dismissBanner(key) {
3958
+ this.dismissedBanners.push(key);
3959
+ }
3960
+ },
3961
+ mounted: function mounted() {
3962
+ var _this = this;
3963
+
3964
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
3965
+ var _yield$axios$get, data;
3966
+
3967
+ return regeneratorRuntime.wrap(function _callee$(_context) {
3968
+ while (1) {
3969
+ switch (_context.prev = _context.next) {
3970
+ case 0:
3971
+ _context.next = 2;
3972
+ return axios.get("".concat(_this.app_manager_config.baseUrl, "/api/app-manager/marketing-banners"));
3973
+
3974
+ case 2:
3975
+ _yield$axios$get = _context.sent;
3976
+ data = _yield$axios$get.data;
3977
+ _this.staticContent = data.banners;
3978
+
3979
+ case 5:
3980
+ case "end":
3981
+ return _context.stop();
3982
+ }
3983
+ }
3984
+ }, _callee);
3985
+ }))();
3986
+ }
3987
+ };function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
3988
+ if (typeof shadowMode !== 'boolean') {
3989
+ createInjectorSSR = createInjector;
3990
+ createInjector = shadowMode;
3991
+ shadowMode = false;
3992
+ }
3993
+ // Vue.extend constructor export interop.
3994
+ const options = typeof script === 'function' ? script.options : script;
3995
+ // render functions
3996
+ if (template && template.render) {
3997
+ options.render = template.render;
3998
+ options.staticRenderFns = template.staticRenderFns;
3999
+ options._compiled = true;
4000
+ // functional template
4001
+ if (isFunctionalTemplate) {
4002
+ options.functional = true;
4003
+ }
4004
+ }
4005
+ // scopedId
4006
+ if (scopeId) {
4007
+ options._scopeId = scopeId;
4008
+ }
4009
+ let hook;
4010
+ if (moduleIdentifier) {
4011
+ // server build
4012
+ hook = function (context) {
4013
+ // 2.3 injection
4014
+ context =
4015
+ context || // cached call
4016
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
4017
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
4018
+ // 2.2 with runInNewContext: true
4019
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4020
+ context = __VUE_SSR_CONTEXT__;
4021
+ }
4022
+ // inject component styles
4023
+ if (style) {
4024
+ style.call(this, createInjectorSSR(context));
4025
+ }
4026
+ // register component module identifier for async chunk inference
4027
+ if (context && context._registeredComponents) {
4028
+ context._registeredComponents.add(moduleIdentifier);
4029
+ }
4030
+ };
4031
+ // used by ssr in case component is cached and beforeCreate
4032
+ // never gets called
4033
+ options._ssrRegister = hook;
4034
+ }
4035
+ else if (style) {
4036
+ hook = shadowMode
4037
+ ? function (context) {
4038
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
4039
+ }
4040
+ : function (context) {
4041
+ style.call(this, createInjector(context));
4042
+ };
4043
+ }
4044
+ if (hook) {
4045
+ if (options.functional) {
4046
+ // register for functional component in vue file
4047
+ const originalRender = options.render;
4048
+ options.render = function renderWithStyleInjection(h, context) {
4049
+ hook.call(context);
4050
+ return originalRender(h, context);
4051
+ };
4052
+ }
4053
+ else {
4054
+ // inject component registration as beforeCreate hook
4055
+ const existing = options.beforeCreate;
4056
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
4057
+ }
4058
+ }
4059
+ return script;
4060
+ }/* script */
4061
+ var __vue_script__ = script;
4062
+ /* template */
4063
+
4064
+ var __vue_render__ = function __vue_render__() {
4065
+ var _vm = this;
4066
+
4067
+ var _h = _vm.$createElement;
4068
+
4069
+ var _c = _vm._self._c || _h;
4070
+
4071
+ return _vm.mappedStaticContentHeaders.length ? _c('PLayoutSection', _vm._l(_vm.mappedStaticContentHeaders, function (header, key) {
4072
+ return _c('PBanner', {
4073
+ key: key,
4074
+ attrs: {
4075
+ "id": "static-content-header-" + key,
4076
+ "status": header.status
4077
+ },
4078
+ on: {
4079
+ "dismiss": function dismiss() {
4080
+ return _vm.dismissBanner(key);
4081
+ }
4082
+ }
4083
+ }, [_c('span', {
4084
+ domProps: {
4085
+ "innerHTML": _vm._s(header.content)
4086
+ }
4087
+ })]);
4088
+ }), 1) : _vm._e();
4089
+ };
4090
+
4091
+ var __vue_staticRenderFns__ = [];
4092
+ /* style */
4093
+
4094
+ var __vue_inject_styles__ = undefined;
4095
+ /* scoped */
4096
+
4097
+ var __vue_scope_id__ = "data-v-69017906";
4098
+ /* module identifier */
4099
+
4100
+ var __vue_module_identifier__ = "data-v-69017906";
4101
+ /* functional template */
4102
+
4103
+ var __vue_is_functional_template__ = false;
4104
+ /* style inject */
4105
+
4106
+ /* style inject SSR */
4107
+
4108
+ /* style inject shadow dom */
4109
+
4110
+ var __vue_component__ = /*#__PURE__*/normalizeComponent({
4111
+ render: __vue_render__,
4112
+ staticRenderFns: __vue_staticRenderFns__
4113
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
4114
+
4115
+ var __vue_component__$1 = __vue_component__;/* eslint-disable import/prefer-default-export */var components$1=/*#__PURE__*/Object.freeze({__proto__:null,Banners:__vue_component__$1});var defaultConfig = {
4116
+ baseUrl: ''
4117
+ }; // install function executed by Vue.use()
4118
+
4119
+ var install = function installAppManagerVue(Vue) {
4120
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4121
+ Object.entries(components$1).forEach(function (_ref) {
4122
+ var _ref2 = _slicedToArray(_ref, 2),
4123
+ componentName = _ref2[0],
4124
+ component = _ref2[1];
4125
+
4126
+ Vue.component(componentName, component);
4127
+ });
4128
+ Vue.prototype.app_manager_config = _objectSpread2(_objectSpread2({}, defaultConfig), config);
4129
+ }; // Create module definition for Vue.use()
4130
+ var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,Banners:__vue_component__$1});// only expose one global var, with component exports exposed as properties of
4131
+ // that global var (eg. plugin.component)
4132
+
4133
+ Object.entries(components).forEach(function (_ref) {
4134
+ var _ref2 = _slicedToArray(_ref, 2),
4135
+ componentName = _ref2[0],
4136
+ component = _ref2[1];
4137
+
4138
+ if (componentName !== 'default') {
4139
+ install[componentName] = component;
4140
+ }
4141
+ });module.exports=install;