@dstny/scp-authenticator 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1490 -653
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1511 -670
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -6
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var require_delayed_stream = __commonJS({
|
|
|
35
35
|
"../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var Stream = require("stream").Stream;
|
|
38
|
-
var
|
|
38
|
+
var util3 = require("util");
|
|
39
39
|
module2.exports = DelayedStream;
|
|
40
40
|
function DelayedStream() {
|
|
41
41
|
this.source = null;
|
|
@@ -46,7 +46,7 @@ var require_delayed_stream = __commonJS({
|
|
|
46
46
|
this._released = false;
|
|
47
47
|
this._bufferedEvents = [];
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
util3.inherits(DelayedStream, Stream);
|
|
50
50
|
DelayedStream.create = function(source, options) {
|
|
51
51
|
var delayedStream = new this();
|
|
52
52
|
options = options || {};
|
|
@@ -126,7 +126,7 @@ var require_delayed_stream = __commonJS({
|
|
|
126
126
|
var require_combined_stream = __commonJS({
|
|
127
127
|
"../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module2) {
|
|
128
128
|
"use strict";
|
|
129
|
-
var
|
|
129
|
+
var util3 = require("util");
|
|
130
130
|
var Stream = require("stream").Stream;
|
|
131
131
|
var DelayedStream = require_delayed_stream();
|
|
132
132
|
module2.exports = CombinedStream;
|
|
@@ -142,7 +142,7 @@ var require_combined_stream = __commonJS({
|
|
|
142
142
|
this._insideLoop = false;
|
|
143
143
|
this._pendingNext = false;
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
util3.inherits(CombinedStream, Stream);
|
|
146
146
|
CombinedStream.create = function(options) {
|
|
147
147
|
var combinedStream = new this();
|
|
148
148
|
options = options || {};
|
|
@@ -151,26 +151,26 @@ var require_combined_stream = __commonJS({
|
|
|
151
151
|
}
|
|
152
152
|
return combinedStream;
|
|
153
153
|
};
|
|
154
|
-
CombinedStream.isStreamLike = function(
|
|
155
|
-
return typeof
|
|
154
|
+
CombinedStream.isStreamLike = function(stream4) {
|
|
155
|
+
return typeof stream4 !== "function" && typeof stream4 !== "string" && typeof stream4 !== "boolean" && typeof stream4 !== "number" && !Buffer.isBuffer(stream4);
|
|
156
156
|
};
|
|
157
|
-
CombinedStream.prototype.append = function(
|
|
158
|
-
var isStreamLike = CombinedStream.isStreamLike(
|
|
157
|
+
CombinedStream.prototype.append = function(stream4) {
|
|
158
|
+
var isStreamLike = CombinedStream.isStreamLike(stream4);
|
|
159
159
|
if (isStreamLike) {
|
|
160
|
-
if (!(
|
|
161
|
-
var newStream = DelayedStream.create(
|
|
160
|
+
if (!(stream4 instanceof DelayedStream)) {
|
|
161
|
+
var newStream = DelayedStream.create(stream4, {
|
|
162
162
|
maxDataSize: Infinity,
|
|
163
163
|
pauseStream: this.pauseStreams
|
|
164
164
|
});
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
stream4.on("data", this._checkDataSize.bind(this));
|
|
166
|
+
stream4 = newStream;
|
|
167
167
|
}
|
|
168
|
-
this._handleErrors(
|
|
168
|
+
this._handleErrors(stream4);
|
|
169
169
|
if (this.pauseStreams) {
|
|
170
|
-
|
|
170
|
+
stream4.pause();
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
this._streams.push(
|
|
173
|
+
this._streams.push(stream4);
|
|
174
174
|
return this;
|
|
175
175
|
};
|
|
176
176
|
CombinedStream.prototype.pipe = function(dest, options) {
|
|
@@ -195,40 +195,40 @@ var require_combined_stream = __commonJS({
|
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
CombinedStream.prototype._realGetNext = function() {
|
|
198
|
-
var
|
|
199
|
-
if (typeof
|
|
198
|
+
var stream4 = this._streams.shift();
|
|
199
|
+
if (typeof stream4 == "undefined") {
|
|
200
200
|
this.end();
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
if (typeof
|
|
204
|
-
this._pipeNext(
|
|
203
|
+
if (typeof stream4 !== "function") {
|
|
204
|
+
this._pipeNext(stream4);
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
|
-
var getStream =
|
|
208
|
-
getStream(function(
|
|
209
|
-
var isStreamLike = CombinedStream.isStreamLike(
|
|
207
|
+
var getStream = stream4;
|
|
208
|
+
getStream(function(stream5) {
|
|
209
|
+
var isStreamLike = CombinedStream.isStreamLike(stream5);
|
|
210
210
|
if (isStreamLike) {
|
|
211
|
-
|
|
212
|
-
this._handleErrors(
|
|
211
|
+
stream5.on("data", this._checkDataSize.bind(this));
|
|
212
|
+
this._handleErrors(stream5);
|
|
213
213
|
}
|
|
214
|
-
this._pipeNext(
|
|
214
|
+
this._pipeNext(stream5);
|
|
215
215
|
}.bind(this));
|
|
216
216
|
};
|
|
217
|
-
CombinedStream.prototype._pipeNext = function(
|
|
218
|
-
this._currentStream =
|
|
219
|
-
var isStreamLike = CombinedStream.isStreamLike(
|
|
217
|
+
CombinedStream.prototype._pipeNext = function(stream4) {
|
|
218
|
+
this._currentStream = stream4;
|
|
219
|
+
var isStreamLike = CombinedStream.isStreamLike(stream4);
|
|
220
220
|
if (isStreamLike) {
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
stream4.on("end", this._getNext.bind(this));
|
|
222
|
+
stream4.pipe(this, { end: false });
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
|
-
var value =
|
|
225
|
+
var value = stream4;
|
|
226
226
|
this.write(value);
|
|
227
227
|
this._getNext();
|
|
228
228
|
};
|
|
229
|
-
CombinedStream.prototype._handleErrors = function(
|
|
229
|
+
CombinedStream.prototype._handleErrors = function(stream4) {
|
|
230
230
|
var self2 = this;
|
|
231
|
-
|
|
231
|
+
stream4.on("error", function(err) {
|
|
232
232
|
self2._emitError(err);
|
|
233
233
|
});
|
|
234
234
|
};
|
|
@@ -277,11 +277,11 @@ var require_combined_stream = __commonJS({
|
|
|
277
277
|
CombinedStream.prototype._updateDataSize = function() {
|
|
278
278
|
this.dataSize = 0;
|
|
279
279
|
var self2 = this;
|
|
280
|
-
this._streams.forEach(function(
|
|
281
|
-
if (!
|
|
280
|
+
this._streams.forEach(function(stream4) {
|
|
281
|
+
if (!stream4.dataSize) {
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
self2.dataSize +=
|
|
284
|
+
self2.dataSize += stream4.dataSize;
|
|
285
285
|
});
|
|
286
286
|
if (this._currentStream && this._currentStream.dataSize) {
|
|
287
287
|
this.dataSize += this._currentStream.dataSize;
|
|
@@ -8982,9 +8982,9 @@ var require_iterate = __commonJS({
|
|
|
8982
8982
|
var async = require_async();
|
|
8983
8983
|
var abort = require_abort();
|
|
8984
8984
|
module2.exports = iterate;
|
|
8985
|
-
function iterate(list,
|
|
8985
|
+
function iterate(list, iterator3, state, callback) {
|
|
8986
8986
|
var key = state["keyedList"] ? state["keyedList"][state.index] : state.index;
|
|
8987
|
-
state.jobs[key] = runJob(
|
|
8987
|
+
state.jobs[key] = runJob(iterator3, key, list[key], function(error, output) {
|
|
8988
8988
|
if (!(key in state.jobs)) {
|
|
8989
8989
|
return;
|
|
8990
8990
|
}
|
|
@@ -8997,12 +8997,12 @@ var require_iterate = __commonJS({
|
|
|
8997
8997
|
callback(error, state.results);
|
|
8998
8998
|
});
|
|
8999
8999
|
}
|
|
9000
|
-
function runJob(
|
|
9000
|
+
function runJob(iterator3, key, item, callback) {
|
|
9001
9001
|
var aborter;
|
|
9002
|
-
if (
|
|
9003
|
-
aborter =
|
|
9002
|
+
if (iterator3.length == 2) {
|
|
9003
|
+
aborter = iterator3(item, async(callback));
|
|
9004
9004
|
} else {
|
|
9005
|
-
aborter =
|
|
9005
|
+
aborter = iterator3(item, key, async(callback));
|
|
9006
9006
|
}
|
|
9007
9007
|
return aborter;
|
|
9008
9008
|
}
|
|
@@ -9058,10 +9058,10 @@ var require_parallel = __commonJS({
|
|
|
9058
9058
|
var initState = require_state();
|
|
9059
9059
|
var terminator = require_terminator();
|
|
9060
9060
|
module2.exports = parallel;
|
|
9061
|
-
function parallel(list,
|
|
9061
|
+
function parallel(list, iterator3, callback) {
|
|
9062
9062
|
var state = initState(list);
|
|
9063
9063
|
while (state.index < (state["keyedList"] || list).length) {
|
|
9064
|
-
iterate(list,
|
|
9064
|
+
iterate(list, iterator3, state, function(error, result) {
|
|
9065
9065
|
if (error) {
|
|
9066
9066
|
callback(error, result);
|
|
9067
9067
|
return;
|
|
@@ -9088,16 +9088,16 @@ var require_serialOrdered = __commonJS({
|
|
|
9088
9088
|
module2.exports = serialOrdered;
|
|
9089
9089
|
module2.exports.ascending = ascending;
|
|
9090
9090
|
module2.exports.descending = descending;
|
|
9091
|
-
function serialOrdered(list,
|
|
9091
|
+
function serialOrdered(list, iterator3, sortMethod, callback) {
|
|
9092
9092
|
var state = initState(list, sortMethod);
|
|
9093
|
-
iterate(list,
|
|
9093
|
+
iterate(list, iterator3, state, function iteratorHandler(error, result) {
|
|
9094
9094
|
if (error) {
|
|
9095
9095
|
callback(error, result);
|
|
9096
9096
|
return;
|
|
9097
9097
|
}
|
|
9098
9098
|
state.index++;
|
|
9099
9099
|
if (state.index < (state["keyedList"] || list).length) {
|
|
9100
|
-
iterate(list,
|
|
9100
|
+
iterate(list, iterator3, state, iteratorHandler);
|
|
9101
9101
|
return;
|
|
9102
9102
|
}
|
|
9103
9103
|
callback(null, state.results);
|
|
@@ -9119,8 +9119,8 @@ var require_serial = __commonJS({
|
|
|
9119
9119
|
"use strict";
|
|
9120
9120
|
var serialOrdered = require_serialOrdered();
|
|
9121
9121
|
module2.exports = serial;
|
|
9122
|
-
function serial(list,
|
|
9123
|
-
return serialOrdered(list,
|
|
9122
|
+
function serial(list, iterator3, callback) {
|
|
9123
|
+
return serialOrdered(list, iterator3, null, callback);
|
|
9124
9124
|
}
|
|
9125
9125
|
}
|
|
9126
9126
|
});
|
|
@@ -9155,7 +9155,7 @@ var require_form_data = __commonJS({
|
|
|
9155
9155
|
"../../node_modules/.pnpm/form-data@4.0.0/node_modules/form-data/lib/form_data.js"(exports, module2) {
|
|
9156
9156
|
"use strict";
|
|
9157
9157
|
var CombinedStream = require_combined_stream();
|
|
9158
|
-
var
|
|
9158
|
+
var util3 = require("util");
|
|
9159
9159
|
var path = require("path");
|
|
9160
9160
|
var http2 = require("http");
|
|
9161
9161
|
var https2 = require("https");
|
|
@@ -9165,11 +9165,11 @@ var require_form_data = __commonJS({
|
|
|
9165
9165
|
var mime = require_mime_types();
|
|
9166
9166
|
var asynckit = require_asynckit();
|
|
9167
9167
|
var populate = require_populate();
|
|
9168
|
-
module2.exports =
|
|
9169
|
-
|
|
9170
|
-
function
|
|
9171
|
-
if (!(this instanceof
|
|
9172
|
-
return new
|
|
9168
|
+
module2.exports = FormData3;
|
|
9169
|
+
util3.inherits(FormData3, CombinedStream);
|
|
9170
|
+
function FormData3(options) {
|
|
9171
|
+
if (!(this instanceof FormData3)) {
|
|
9172
|
+
return new FormData3(options);
|
|
9173
9173
|
}
|
|
9174
9174
|
this._overheadLength = 0;
|
|
9175
9175
|
this._valueLength = 0;
|
|
@@ -9180,9 +9180,9 @@ var require_form_data = __commonJS({
|
|
|
9180
9180
|
this[option] = options[option];
|
|
9181
9181
|
}
|
|
9182
9182
|
}
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9183
|
+
FormData3.LINE_BREAK = "\r\n";
|
|
9184
|
+
FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
9185
|
+
FormData3.prototype.append = function(field, value, options) {
|
|
9186
9186
|
options = options || {};
|
|
9187
9187
|
if (typeof options == "string") {
|
|
9188
9188
|
options = { filename: options };
|
|
@@ -9191,7 +9191,7 @@ var require_form_data = __commonJS({
|
|
|
9191
9191
|
if (typeof value == "number") {
|
|
9192
9192
|
value = "" + value;
|
|
9193
9193
|
}
|
|
9194
|
-
if (
|
|
9194
|
+
if (util3.isArray(value)) {
|
|
9195
9195
|
this._error(new Error("Arrays are not supported."));
|
|
9196
9196
|
return;
|
|
9197
9197
|
}
|
|
@@ -9202,7 +9202,7 @@ var require_form_data = __commonJS({
|
|
|
9202
9202
|
append2(footer);
|
|
9203
9203
|
this._trackLength(header, value, options);
|
|
9204
9204
|
};
|
|
9205
|
-
|
|
9205
|
+
FormData3.prototype._trackLength = function(header, value, options) {
|
|
9206
9206
|
var valueLength = 0;
|
|
9207
9207
|
if (options.knownLength != null) {
|
|
9208
9208
|
valueLength += +options.knownLength;
|
|
@@ -9212,7 +9212,7 @@ var require_form_data = __commonJS({
|
|
|
9212
9212
|
valueLength = Buffer.byteLength(value);
|
|
9213
9213
|
}
|
|
9214
9214
|
this._valueLength += valueLength;
|
|
9215
|
-
this._overheadLength += Buffer.byteLength(header) +
|
|
9215
|
+
this._overheadLength += Buffer.byteLength(header) + FormData3.LINE_BREAK.length;
|
|
9216
9216
|
if (!value || !value.path && !(value.readable && value.hasOwnProperty("httpVersion")) && !(value instanceof Stream)) {
|
|
9217
9217
|
return;
|
|
9218
9218
|
}
|
|
@@ -9220,7 +9220,7 @@ var require_form_data = __commonJS({
|
|
|
9220
9220
|
this._valuesToMeasure.push(value);
|
|
9221
9221
|
}
|
|
9222
9222
|
};
|
|
9223
|
-
|
|
9223
|
+
FormData3.prototype._lengthRetriever = function(value, callback) {
|
|
9224
9224
|
if (value.hasOwnProperty("fd")) {
|
|
9225
9225
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
9226
9226
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
@@ -9247,7 +9247,7 @@ var require_form_data = __commonJS({
|
|
|
9247
9247
|
callback("Unknown stream");
|
|
9248
9248
|
}
|
|
9249
9249
|
};
|
|
9250
|
-
|
|
9250
|
+
FormData3.prototype._multiPartHeader = function(field, value, options) {
|
|
9251
9251
|
if (typeof options.header == "string") {
|
|
9252
9252
|
return options.header;
|
|
9253
9253
|
}
|
|
@@ -9275,12 +9275,12 @@ var require_form_data = __commonJS({
|
|
|
9275
9275
|
header = [header];
|
|
9276
9276
|
}
|
|
9277
9277
|
if (header.length) {
|
|
9278
|
-
contents += prop + ": " + header.join("; ") +
|
|
9278
|
+
contents += prop + ": " + header.join("; ") + FormData3.LINE_BREAK;
|
|
9279
9279
|
}
|
|
9280
9280
|
}
|
|
9281
|
-
return "--" + this.getBoundary() +
|
|
9281
|
+
return "--" + this.getBoundary() + FormData3.LINE_BREAK + contents + FormData3.LINE_BREAK;
|
|
9282
9282
|
};
|
|
9283
|
-
|
|
9283
|
+
FormData3.prototype._getContentDisposition = function(value, options) {
|
|
9284
9284
|
var filename, contentDisposition;
|
|
9285
9285
|
if (typeof options.filepath === "string") {
|
|
9286
9286
|
filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
@@ -9294,7 +9294,7 @@ var require_form_data = __commonJS({
|
|
|
9294
9294
|
}
|
|
9295
9295
|
return contentDisposition;
|
|
9296
9296
|
};
|
|
9297
|
-
|
|
9297
|
+
FormData3.prototype._getContentType = function(value, options) {
|
|
9298
9298
|
var contentType = options.contentType;
|
|
9299
9299
|
if (!contentType && value.name) {
|
|
9300
9300
|
contentType = mime.lookup(value.name);
|
|
@@ -9309,13 +9309,13 @@ var require_form_data = __commonJS({
|
|
|
9309
9309
|
contentType = mime.lookup(options.filepath || options.filename);
|
|
9310
9310
|
}
|
|
9311
9311
|
if (!contentType && typeof value == "object") {
|
|
9312
|
-
contentType =
|
|
9312
|
+
contentType = FormData3.DEFAULT_CONTENT_TYPE;
|
|
9313
9313
|
}
|
|
9314
9314
|
return contentType;
|
|
9315
9315
|
};
|
|
9316
|
-
|
|
9316
|
+
FormData3.prototype._multiPartFooter = function() {
|
|
9317
9317
|
return function(next) {
|
|
9318
|
-
var footer =
|
|
9318
|
+
var footer = FormData3.LINE_BREAK;
|
|
9319
9319
|
var lastPart = this._streams.length === 0;
|
|
9320
9320
|
if (lastPart) {
|
|
9321
9321
|
footer += this._lastBoundary();
|
|
@@ -9323,10 +9323,10 @@ var require_form_data = __commonJS({
|
|
|
9323
9323
|
next(footer);
|
|
9324
9324
|
}.bind(this);
|
|
9325
9325
|
};
|
|
9326
|
-
|
|
9327
|
-
return "--" + this.getBoundary() + "--" +
|
|
9326
|
+
FormData3.prototype._lastBoundary = function() {
|
|
9327
|
+
return "--" + this.getBoundary() + "--" + FormData3.LINE_BREAK;
|
|
9328
9328
|
};
|
|
9329
|
-
|
|
9329
|
+
FormData3.prototype.getHeaders = function(userHeaders) {
|
|
9330
9330
|
var header;
|
|
9331
9331
|
var formHeaders = {
|
|
9332
9332
|
"content-type": "multipart/form-data; boundary=" + this.getBoundary()
|
|
@@ -9338,16 +9338,16 @@ var require_form_data = __commonJS({
|
|
|
9338
9338
|
}
|
|
9339
9339
|
return formHeaders;
|
|
9340
9340
|
};
|
|
9341
|
-
|
|
9341
|
+
FormData3.prototype.setBoundary = function(boundary) {
|
|
9342
9342
|
this._boundary = boundary;
|
|
9343
9343
|
};
|
|
9344
|
-
|
|
9344
|
+
FormData3.prototype.getBoundary = function() {
|
|
9345
9345
|
if (!this._boundary) {
|
|
9346
9346
|
this._generateBoundary();
|
|
9347
9347
|
}
|
|
9348
9348
|
return this._boundary;
|
|
9349
9349
|
};
|
|
9350
|
-
|
|
9350
|
+
FormData3.prototype.getBuffer = function() {
|
|
9351
9351
|
var dataBuffer = new Buffer.alloc(0);
|
|
9352
9352
|
var boundary = this.getBoundary();
|
|
9353
9353
|
for (var i = 0, len = this._streams.length; i < len; i++) {
|
|
@@ -9358,20 +9358,20 @@ var require_form_data = __commonJS({
|
|
|
9358
9358
|
dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
|
|
9359
9359
|
}
|
|
9360
9360
|
if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
|
|
9361
|
-
dataBuffer = Buffer.concat([dataBuffer, Buffer.from(
|
|
9361
|
+
dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData3.LINE_BREAK)]);
|
|
9362
9362
|
}
|
|
9363
9363
|
}
|
|
9364
9364
|
}
|
|
9365
9365
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
9366
9366
|
};
|
|
9367
|
-
|
|
9367
|
+
FormData3.prototype._generateBoundary = function() {
|
|
9368
9368
|
var boundary = "--------------------------";
|
|
9369
9369
|
for (var i = 0; i < 24; i++) {
|
|
9370
9370
|
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
9371
9371
|
}
|
|
9372
9372
|
this._boundary = boundary;
|
|
9373
9373
|
};
|
|
9374
|
-
|
|
9374
|
+
FormData3.prototype.getLengthSync = function() {
|
|
9375
9375
|
var knownLength = this._overheadLength + this._valueLength;
|
|
9376
9376
|
if (this._streams.length) {
|
|
9377
9377
|
knownLength += this._lastBoundary().length;
|
|
@@ -9381,14 +9381,14 @@ var require_form_data = __commonJS({
|
|
|
9381
9381
|
}
|
|
9382
9382
|
return knownLength;
|
|
9383
9383
|
};
|
|
9384
|
-
|
|
9384
|
+
FormData3.prototype.hasKnownLength = function() {
|
|
9385
9385
|
var hasKnownLength = true;
|
|
9386
9386
|
if (this._valuesToMeasure.length) {
|
|
9387
9387
|
hasKnownLength = false;
|
|
9388
9388
|
}
|
|
9389
9389
|
return hasKnownLength;
|
|
9390
9390
|
};
|
|
9391
|
-
|
|
9391
|
+
FormData3.prototype.getLength = function(cb) {
|
|
9392
9392
|
var knownLength = this._overheadLength + this._valueLength;
|
|
9393
9393
|
if (this._streams.length) {
|
|
9394
9394
|
knownLength += this._lastBoundary().length;
|
|
@@ -9408,7 +9408,7 @@ var require_form_data = __commonJS({
|
|
|
9408
9408
|
cb(null, knownLength);
|
|
9409
9409
|
});
|
|
9410
9410
|
};
|
|
9411
|
-
|
|
9411
|
+
FormData3.prototype.submit = function(params, cb) {
|
|
9412
9412
|
var request, options, defaults2 = { method: "post" };
|
|
9413
9413
|
if (typeof params == "string") {
|
|
9414
9414
|
params = parseUrl(params);
|
|
@@ -9453,14 +9453,14 @@ var require_form_data = __commonJS({
|
|
|
9453
9453
|
}.bind(this));
|
|
9454
9454
|
return request;
|
|
9455
9455
|
};
|
|
9456
|
-
|
|
9456
|
+
FormData3.prototype._error = function(err) {
|
|
9457
9457
|
if (!this.error) {
|
|
9458
9458
|
this.error = err;
|
|
9459
9459
|
this.pause();
|
|
9460
9460
|
this.emit("error", err);
|
|
9461
9461
|
}
|
|
9462
9462
|
};
|
|
9463
|
-
|
|
9463
|
+
FormData3.prototype.toString = function() {
|
|
9464
9464
|
return "[object FormData]";
|
|
9465
9465
|
};
|
|
9466
9466
|
}
|
|
@@ -9482,7 +9482,7 @@ var require_proxy_from_env = __commonJS({
|
|
|
9482
9482
|
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
9483
9483
|
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
9484
9484
|
};
|
|
9485
|
-
function
|
|
9485
|
+
function getProxyForUrl(url2) {
|
|
9486
9486
|
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
|
|
9487
9487
|
var proto = parsedUrl.protocol;
|
|
9488
9488
|
var hostname = parsedUrl.host;
|
|
@@ -9532,7 +9532,7 @@ var require_proxy_from_env = __commonJS({
|
|
|
9532
9532
|
function getEnv(key) {
|
|
9533
9533
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
9534
9534
|
}
|
|
9535
|
-
exports.getProxyForUrl =
|
|
9535
|
+
exports.getProxyForUrl = getProxyForUrl;
|
|
9536
9536
|
}
|
|
9537
9537
|
});
|
|
9538
9538
|
|
|
@@ -10090,8 +10090,8 @@ var require_supports_color = __commonJS({
|
|
|
10090
10090
|
}
|
|
10091
10091
|
return min;
|
|
10092
10092
|
}
|
|
10093
|
-
function getSupportLevel(
|
|
10094
|
-
const level = supportsColor(
|
|
10093
|
+
function getSupportLevel(stream4) {
|
|
10094
|
+
const level = supportsColor(stream4, stream4 && stream4.isTTY);
|
|
10095
10095
|
return translateLevel(level);
|
|
10096
10096
|
}
|
|
10097
10097
|
module2.exports = {
|
|
@@ -10107,14 +10107,14 @@ var require_node = __commonJS({
|
|
|
10107
10107
|
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) {
|
|
10108
10108
|
"use strict";
|
|
10109
10109
|
var tty = require("tty");
|
|
10110
|
-
var
|
|
10110
|
+
var util3 = require("util");
|
|
10111
10111
|
exports.init = init;
|
|
10112
10112
|
exports.log = log;
|
|
10113
10113
|
exports.formatArgs = formatArgs;
|
|
10114
10114
|
exports.save = save;
|
|
10115
10115
|
exports.load = load;
|
|
10116
10116
|
exports.useColors = useColors;
|
|
10117
|
-
exports.destroy =
|
|
10117
|
+
exports.destroy = util3.deprecate(
|
|
10118
10118
|
() => {
|
|
10119
10119
|
},
|
|
10120
10120
|
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
@@ -10245,7 +10245,7 @@ var require_node = __commonJS({
|
|
|
10245
10245
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
10246
10246
|
}
|
|
10247
10247
|
function log(...args) {
|
|
10248
|
-
return process.stderr.write(
|
|
10248
|
+
return process.stderr.write(util3.format(...args) + "\n");
|
|
10249
10249
|
}
|
|
10250
10250
|
function save(namespaces) {
|
|
10251
10251
|
if (namespaces) {
|
|
@@ -10268,11 +10268,11 @@ var require_node = __commonJS({
|
|
|
10268
10268
|
var { formatters } = module2.exports;
|
|
10269
10269
|
formatters.o = function(v) {
|
|
10270
10270
|
this.inspectOpts.colors = this.useColors;
|
|
10271
|
-
return
|
|
10271
|
+
return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
10272
10272
|
};
|
|
10273
10273
|
formatters.O = function(v) {
|
|
10274
10274
|
this.inspectOpts.colors = this.useColors;
|
|
10275
|
-
return
|
|
10275
|
+
return util3.inspect(v, this.inspectOpts);
|
|
10276
10276
|
};
|
|
10277
10277
|
}
|
|
10278
10278
|
});
|
|
@@ -11250,8 +11250,153 @@ Object.defineProperty(Emittery, "listenerRemoved", {
|
|
|
11250
11250
|
configurable: false
|
|
11251
11251
|
});
|
|
11252
11252
|
|
|
11253
|
-
//
|
|
11254
|
-
|
|
11253
|
+
// ../credentials/dist/index.mjs
|
|
11254
|
+
function base64decode(str) {
|
|
11255
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
11256
|
+
let output = "";
|
|
11257
|
+
str = String(str).replace(/={1,10}$/, "");
|
|
11258
|
+
if (str.length % 4 === 1) {
|
|
11259
|
+
throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");
|
|
11260
|
+
}
|
|
11261
|
+
for (
|
|
11262
|
+
let bc = 0, bs, buffer, idx = 0;
|
|
11263
|
+
// tslint:disable-next-line:no-conditional-assignment
|
|
11264
|
+
buffer = str.charAt(idx++);
|
|
11265
|
+
// tslint:disable-next-line:no-bitwise
|
|
11266
|
+
~buffer && // tslint:disable-next-line:no-conditional-assignment
|
|
11267
|
+
(bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? (
|
|
11268
|
+
// tslint:disable-next-line:no-bitwise
|
|
11269
|
+
output += String.fromCharCode(255 & bs >> (-2 * bc & 6))
|
|
11270
|
+
) : 0
|
|
11271
|
+
) {
|
|
11272
|
+
buffer = chars.indexOf(buffer);
|
|
11273
|
+
}
|
|
11274
|
+
return output;
|
|
11275
|
+
}
|
|
11276
|
+
async function sha1(str) {
|
|
11277
|
+
if (typeof crypto === "object") {
|
|
11278
|
+
const hash = await crypto.subtle.digest("SHA-1", new TextEncoder().encode(str));
|
|
11279
|
+
return Array.from(new Uint8Array(hash)).map((v) => v.toString(16).padStart(2, "0")).join("");
|
|
11280
|
+
} else {
|
|
11281
|
+
const Crypto = await import("crypto");
|
|
11282
|
+
return Crypto.createHash("sha1").update(str).digest("hex");
|
|
11283
|
+
}
|
|
11284
|
+
}
|
|
11285
|
+
var STORE_CREDENTILAS_KEY = "sdk-auth-credential";
|
|
11286
|
+
var Credentials = class _Credentials {
|
|
11287
|
+
static async fromStorage(storage) {
|
|
11288
|
+
const str = await storage.getItem(STORE_CREDENTILAS_KEY);
|
|
11289
|
+
if (str == null || str == void 0) {
|
|
11290
|
+
throw new Error("No credentials found in storage.");
|
|
11291
|
+
}
|
|
11292
|
+
return _Credentials.fromJSON(str);
|
|
11293
|
+
}
|
|
11294
|
+
static async toStorage(storage, credentials) {
|
|
11295
|
+
await storage.setItem(STORE_CREDENTILAS_KEY, JSON.stringify(credentials));
|
|
11296
|
+
}
|
|
11297
|
+
static async clearFromStorage(storage) {
|
|
11298
|
+
await storage.deleteItem(STORE_CREDENTILAS_KEY);
|
|
11299
|
+
}
|
|
11300
|
+
static fromJSON(str) {
|
|
11301
|
+
const { access_token, refresh_token, expires_in } = JSON.parse(str);
|
|
11302
|
+
return new _Credentials(access_token, refresh_token, expires_in);
|
|
11303
|
+
}
|
|
11304
|
+
static onStorageUpdate(storage, callback) {
|
|
11305
|
+
return storage.on(STORE_CREDENTILAS_KEY, (credentials) => {
|
|
11306
|
+
if (typeof credentials === "string") {
|
|
11307
|
+
callback(_Credentials.fromJSON(credentials));
|
|
11308
|
+
}
|
|
11309
|
+
});
|
|
11310
|
+
}
|
|
11311
|
+
static equals(a, b) {
|
|
11312
|
+
if (!a && !b) {
|
|
11313
|
+
return true;
|
|
11314
|
+
}
|
|
11315
|
+
if (a && !b || b && !a) {
|
|
11316
|
+
return false;
|
|
11317
|
+
}
|
|
11318
|
+
return a?.access_token === b?.access_token && a?._refresh_token === b?.refresh_token && a?.expires_in === b?.expires_in;
|
|
11319
|
+
}
|
|
11320
|
+
/**
|
|
11321
|
+
* Used to access resources.
|
|
11322
|
+
*/
|
|
11323
|
+
_access_token;
|
|
11324
|
+
/**
|
|
11325
|
+
* Used to obtain a new access token.
|
|
11326
|
+
*/
|
|
11327
|
+
_refresh_token;
|
|
11328
|
+
/**
|
|
11329
|
+
* Number of seconds until the access token expires.
|
|
11330
|
+
* This value is calculated at the moment the access token is generated.
|
|
11331
|
+
*/
|
|
11332
|
+
_expires_in;
|
|
11333
|
+
constructor(access_token, refresh_token, expires_in) {
|
|
11334
|
+
this._access_token = access_token;
|
|
11335
|
+
this._refresh_token = refresh_token;
|
|
11336
|
+
this._expires_in = expires_in;
|
|
11337
|
+
}
|
|
11338
|
+
/**
|
|
11339
|
+
* Lists the claims present in the access token.
|
|
11340
|
+
*/
|
|
11341
|
+
get claims() {
|
|
11342
|
+
const fallback = {};
|
|
11343
|
+
if (typeof this._access_token != "string") {
|
|
11344
|
+
return fallback;
|
|
11345
|
+
}
|
|
11346
|
+
const [, b64payload] = this._access_token.split(".");
|
|
11347
|
+
const payload = base64decode(b64payload);
|
|
11348
|
+
if (!payload) {
|
|
11349
|
+
return fallback;
|
|
11350
|
+
}
|
|
11351
|
+
try {
|
|
11352
|
+
return JSON.parse(payload);
|
|
11353
|
+
} catch (err) {
|
|
11354
|
+
return {};
|
|
11355
|
+
}
|
|
11356
|
+
}
|
|
11357
|
+
get access_token() {
|
|
11358
|
+
return this._access_token;
|
|
11359
|
+
}
|
|
11360
|
+
get refresh_token() {
|
|
11361
|
+
return this._refresh_token;
|
|
11362
|
+
}
|
|
11363
|
+
get expires_in() {
|
|
11364
|
+
return this._expires_in;
|
|
11365
|
+
}
|
|
11366
|
+
get token_type() {
|
|
11367
|
+
return "Bearer";
|
|
11368
|
+
}
|
|
11369
|
+
get expires_at() {
|
|
11370
|
+
if (typeof this.claims?.exp === "number") {
|
|
11371
|
+
return new Date(this.claims?.exp * 1e3);
|
|
11372
|
+
}
|
|
11373
|
+
const expiryDate = /* @__PURE__ */ new Date();
|
|
11374
|
+
expiryDate.setSeconds(expiryDate.getSeconds() + this._expires_in);
|
|
11375
|
+
return expiryDate;
|
|
11376
|
+
}
|
|
11377
|
+
isExpired() {
|
|
11378
|
+
return this.expires_at && (/* @__PURE__ */ new Date()).getTime() > new Date(this.expires_at).getTime();
|
|
11379
|
+
}
|
|
11380
|
+
async getUepId() {
|
|
11381
|
+
const { sub, uep_id: rawUepId } = this.claims;
|
|
11382
|
+
if (!sub) {
|
|
11383
|
+
throw new Error("Missing 'sub' claim.");
|
|
11384
|
+
}
|
|
11385
|
+
if (rawUepId) {
|
|
11386
|
+
return rawUepId;
|
|
11387
|
+
}
|
|
11388
|
+
return await sha1(sub);
|
|
11389
|
+
}
|
|
11390
|
+
toJSON() {
|
|
11391
|
+
return {
|
|
11392
|
+
access_token: this._access_token,
|
|
11393
|
+
refresh_token: this._refresh_token,
|
|
11394
|
+
expires_in: this._expires_in,
|
|
11395
|
+
expires_at: this.expires_at,
|
|
11396
|
+
token_type: this.token_type
|
|
11397
|
+
};
|
|
11398
|
+
}
|
|
11399
|
+
};
|
|
11255
11400
|
|
|
11256
11401
|
// src/utils/jwt.ts
|
|
11257
11402
|
function decodeToken(token) {
|
|
@@ -11429,14 +11574,14 @@ var Authenticator = class extends Emittery {
|
|
|
11429
11574
|
} else {
|
|
11430
11575
|
const localStorageCredentials = await this.secureStorage.getItem(STORE_CREDENTIALS_KEY);
|
|
11431
11576
|
if (typeof localStorageCredentials === "string") {
|
|
11432
|
-
credentials =
|
|
11577
|
+
credentials = Credentials.fromJSON(localStorageCredentials);
|
|
11433
11578
|
}
|
|
11434
11579
|
}
|
|
11435
11580
|
if (credentials) {
|
|
11436
11581
|
this.logger?.log("Has credentials:", credentials);
|
|
11437
11582
|
await this._signInWithCredentials(credentials);
|
|
11438
11583
|
}
|
|
11439
|
-
this.removeCredentialStorageUpdates =
|
|
11584
|
+
this.removeCredentialStorageUpdates = Credentials.onStorageUpdate(
|
|
11440
11585
|
this.secureStorage,
|
|
11441
11586
|
(credentials2) => {
|
|
11442
11587
|
this._signInWithCredentials(credentials2, true);
|
|
@@ -11455,7 +11600,7 @@ var Authenticator = class extends Emittery {
|
|
|
11455
11600
|
this.unsubscribeUpdateState = this.on(
|
|
11456
11601
|
INTERNAL_CREDENTIALS,
|
|
11457
11602
|
async ({ credentials: credentials2, isFromOtherInstance }) => {
|
|
11458
|
-
if (
|
|
11603
|
+
if (Credentials.equals(this._credentials, credentials2)) {
|
|
11459
11604
|
return;
|
|
11460
11605
|
}
|
|
11461
11606
|
this._credentials = credentials2;
|
|
@@ -11802,16 +11947,17 @@ var Authenticator = class extends Emittery {
|
|
|
11802
11947
|
};
|
|
11803
11948
|
var Authenticator_default = Authenticator;
|
|
11804
11949
|
|
|
11805
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
11950
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/bind.js
|
|
11806
11951
|
function bind(fn, thisArg) {
|
|
11807
11952
|
return function wrap() {
|
|
11808
11953
|
return fn.apply(thisArg, arguments);
|
|
11809
11954
|
};
|
|
11810
11955
|
}
|
|
11811
11956
|
|
|
11812
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
11957
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/utils.js
|
|
11813
11958
|
var { toString } = Object.prototype;
|
|
11814
11959
|
var { getPrototypeOf } = Object;
|
|
11960
|
+
var { iterator: iterator2, toStringTag } = Symbol;
|
|
11815
11961
|
var kindOf = ((cache) => (thing) => {
|
|
11816
11962
|
const str = toString.call(thing);
|
|
11817
11963
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -11846,7 +11992,7 @@ var isPlainObject = (val) => {
|
|
|
11846
11992
|
return false;
|
|
11847
11993
|
}
|
|
11848
11994
|
const prototype3 = getPrototypeOf(val);
|
|
11849
|
-
return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(
|
|
11995
|
+
return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator2 in val);
|
|
11850
11996
|
};
|
|
11851
11997
|
var isDate = kindOfTest("Date");
|
|
11852
11998
|
var isFile = kindOfTest("File");
|
|
@@ -11854,10 +12000,12 @@ var isBlob = kindOfTest("Blob");
|
|
|
11854
12000
|
var isFileList = kindOfTest("FileList");
|
|
11855
12001
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
11856
12002
|
var isFormData = (thing) => {
|
|
11857
|
-
|
|
11858
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData ||
|
|
12003
|
+
let kind;
|
|
12004
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
12005
|
+
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
11859
12006
|
};
|
|
11860
12007
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
12008
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
11861
12009
|
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
11862
12010
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
11863
12011
|
if (obj === null || typeof obj === "undefined") {
|
|
@@ -11895,7 +12043,11 @@ function findKey(obj, key) {
|
|
|
11895
12043
|
}
|
|
11896
12044
|
return null;
|
|
11897
12045
|
}
|
|
11898
|
-
var _global =
|
|
12046
|
+
var _global = (() => {
|
|
12047
|
+
if (typeof globalThis !== "undefined")
|
|
12048
|
+
return globalThis;
|
|
12049
|
+
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
12050
|
+
})();
|
|
11899
12051
|
var isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
11900
12052
|
function merge() {
|
|
11901
12053
|
const { caseless } = isContextDefined(this) && this || {};
|
|
@@ -11992,10 +12144,10 @@ var isTypedArray = ((TypedArray) => {
|
|
|
11992
12144
|
};
|
|
11993
12145
|
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
11994
12146
|
var forEachEntry = (obj, fn) => {
|
|
11995
|
-
const generator = obj && obj[
|
|
11996
|
-
const
|
|
12147
|
+
const generator = obj && obj[iterator2];
|
|
12148
|
+
const _iterator = generator.call(obj);
|
|
11997
12149
|
let result;
|
|
11998
|
-
while ((result =
|
|
12150
|
+
while ((result = _iterator.next()) && !result.done) {
|
|
11999
12151
|
const pair = result.value;
|
|
12000
12152
|
fn.call(obj, pair[0], pair[1]);
|
|
12001
12153
|
}
|
|
@@ -12011,7 +12163,7 @@ var matchAll = (regExp, str) => {
|
|
|
12011
12163
|
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
12012
12164
|
var toCamelCase = (str) => {
|
|
12013
12165
|
return str.toLowerCase().replace(
|
|
12014
|
-
/[_
|
|
12166
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
12015
12167
|
function replacer(m, p1, p2) {
|
|
12016
12168
|
return p1.toUpperCase() + p2;
|
|
12017
12169
|
}
|
|
@@ -12023,8 +12175,9 @@ var reduceDescriptors = (obj, reducer) => {
|
|
|
12023
12175
|
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
12024
12176
|
const reducedDescriptors = {};
|
|
12025
12177
|
forEach(descriptors2, (descriptor, name) => {
|
|
12026
|
-
|
|
12027
|
-
|
|
12178
|
+
let ret;
|
|
12179
|
+
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
12180
|
+
reducedDescriptors[name] = ret || descriptor;
|
|
12028
12181
|
}
|
|
12029
12182
|
});
|
|
12030
12183
|
Object.defineProperties(obj, reducedDescriptors);
|
|
@@ -12062,9 +12215,11 @@ var toObjectSet = (arrayOrString, delimiter) => {
|
|
|
12062
12215
|
var noop = () => {
|
|
12063
12216
|
};
|
|
12064
12217
|
var toFiniteNumber = (value, defaultValue) => {
|
|
12065
|
-
value = +value;
|
|
12066
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
12218
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
12067
12219
|
};
|
|
12220
|
+
function isSpecCompliantForm(thing) {
|
|
12221
|
+
return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator2]);
|
|
12222
|
+
}
|
|
12068
12223
|
var toJSONObject = (obj) => {
|
|
12069
12224
|
const stack = new Array(10);
|
|
12070
12225
|
const visit = (source, i) => {
|
|
@@ -12087,6 +12242,29 @@ var toJSONObject = (obj) => {
|
|
|
12087
12242
|
};
|
|
12088
12243
|
return visit(obj, 0);
|
|
12089
12244
|
};
|
|
12245
|
+
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
12246
|
+
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
12247
|
+
var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
12248
|
+
if (setImmediateSupported) {
|
|
12249
|
+
return setImmediate;
|
|
12250
|
+
}
|
|
12251
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
12252
|
+
_global.addEventListener("message", ({ source, data }) => {
|
|
12253
|
+
if (source === _global && data === token) {
|
|
12254
|
+
callbacks.length && callbacks.shift()();
|
|
12255
|
+
}
|
|
12256
|
+
}, false);
|
|
12257
|
+
return (cb) => {
|
|
12258
|
+
callbacks.push(cb);
|
|
12259
|
+
_global.postMessage(token, "*");
|
|
12260
|
+
};
|
|
12261
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
12262
|
+
})(
|
|
12263
|
+
typeof setImmediate === "function",
|
|
12264
|
+
isFunction(_global.postMessage)
|
|
12265
|
+
);
|
|
12266
|
+
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
12267
|
+
var isIterable = (thing) => thing != null && isFunction(thing[iterator2]);
|
|
12090
12268
|
var utils_default = {
|
|
12091
12269
|
isArray,
|
|
12092
12270
|
isArrayBuffer,
|
|
@@ -12098,6 +12276,10 @@ var utils_default = {
|
|
|
12098
12276
|
isBoolean,
|
|
12099
12277
|
isObject,
|
|
12100
12278
|
isPlainObject,
|
|
12279
|
+
isReadableStream,
|
|
12280
|
+
isRequest,
|
|
12281
|
+
isResponse,
|
|
12282
|
+
isHeaders,
|
|
12101
12283
|
isUndefined,
|
|
12102
12284
|
isDate,
|
|
12103
12285
|
isFile,
|
|
@@ -12134,10 +12316,16 @@ var utils_default = {
|
|
|
12134
12316
|
findKey,
|
|
12135
12317
|
global: _global,
|
|
12136
12318
|
isContextDefined,
|
|
12137
|
-
|
|
12319
|
+
isSpecCompliantForm,
|
|
12320
|
+
toJSONObject,
|
|
12321
|
+
isAsyncFn,
|
|
12322
|
+
isThenable,
|
|
12323
|
+
setImmediate: _setImmediate,
|
|
12324
|
+
asap,
|
|
12325
|
+
isIterable
|
|
12138
12326
|
};
|
|
12139
12327
|
|
|
12140
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12328
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/AxiosError.js
|
|
12141
12329
|
function AxiosError(message, code, config, request, response) {
|
|
12142
12330
|
Error.call(this);
|
|
12143
12331
|
if (Error.captureStackTrace) {
|
|
@@ -12150,7 +12338,10 @@ function AxiosError(message, code, config, request, response) {
|
|
|
12150
12338
|
code && (this.code = code);
|
|
12151
12339
|
config && (this.config = config);
|
|
12152
12340
|
request && (this.request = request);
|
|
12153
|
-
|
|
12341
|
+
if (response) {
|
|
12342
|
+
this.response = response;
|
|
12343
|
+
this.status = response.status ? response.status : null;
|
|
12344
|
+
}
|
|
12154
12345
|
}
|
|
12155
12346
|
utils_default.inherits(AxiosError, Error, {
|
|
12156
12347
|
toJSON: function toJSON() {
|
|
@@ -12169,7 +12360,7 @@ utils_default.inherits(AxiosError, Error, {
|
|
|
12169
12360
|
// Axios
|
|
12170
12361
|
config: utils_default.toJSONObject(this.config),
|
|
12171
12362
|
code: this.code,
|
|
12172
|
-
status: this.
|
|
12363
|
+
status: this.status
|
|
12173
12364
|
};
|
|
12174
12365
|
}
|
|
12175
12366
|
});
|
|
@@ -12209,11 +12400,11 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
|
12209
12400
|
};
|
|
12210
12401
|
var AxiosError_default = AxiosError;
|
|
12211
12402
|
|
|
12212
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12403
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/platform/node/classes/FormData.js
|
|
12213
12404
|
var import_form_data = __toESM(require_form_data(), 1);
|
|
12214
12405
|
var FormData_default = import_form_data.default;
|
|
12215
12406
|
|
|
12216
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12407
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/toFormData.js
|
|
12217
12408
|
function isVisitable(thing) {
|
|
12218
12409
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
12219
12410
|
}
|
|
@@ -12234,9 +12425,6 @@ function isFlatArray(arr) {
|
|
|
12234
12425
|
var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
|
|
12235
12426
|
return /^is[A-Z]/.test(prop);
|
|
12236
12427
|
});
|
|
12237
|
-
function isSpecCompliant(thing) {
|
|
12238
|
-
return thing && utils_default.isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator];
|
|
12239
|
-
}
|
|
12240
12428
|
function toFormData(obj, formData, options) {
|
|
12241
12429
|
if (!utils_default.isObject(obj)) {
|
|
12242
12430
|
throw new TypeError("target must be an object");
|
|
@@ -12254,7 +12442,7 @@ function toFormData(obj, formData, options) {
|
|
|
12254
12442
|
const dots = options.dots;
|
|
12255
12443
|
const indexes = options.indexes;
|
|
12256
12444
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
12257
|
-
const useBlob = _Blob &&
|
|
12445
|
+
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
12258
12446
|
if (!utils_default.isFunction(visitor)) {
|
|
12259
12447
|
throw new TypeError("visitor must be a function");
|
|
12260
12448
|
}
|
|
@@ -12278,7 +12466,7 @@ function toFormData(obj, formData, options) {
|
|
|
12278
12466
|
if (utils_default.endsWith(key, "{}")) {
|
|
12279
12467
|
key = metaTokens ? key : key.slice(0, -2);
|
|
12280
12468
|
value = JSON.stringify(value);
|
|
12281
|
-
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]") && (arr = utils_default.toArray(value)))
|
|
12469
|
+
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
|
|
12282
12470
|
key = removeBrackets(key);
|
|
12283
12471
|
arr.forEach(function each(el, index) {
|
|
12284
12472
|
!(utils_default.isUndefined(el) || el === null) && formData.append(
|
|
@@ -12331,7 +12519,7 @@ function toFormData(obj, formData, options) {
|
|
|
12331
12519
|
}
|
|
12332
12520
|
var toFormData_default = toFormData;
|
|
12333
12521
|
|
|
12334
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12522
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
12335
12523
|
function encode(str) {
|
|
12336
12524
|
const charMap = {
|
|
12337
12525
|
"!": "%21",
|
|
@@ -12364,7 +12552,7 @@ prototype2.toString = function toString2(encoder) {
|
|
|
12364
12552
|
};
|
|
12365
12553
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
12366
12554
|
|
|
12367
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12555
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/buildURL.js
|
|
12368
12556
|
function encode2(val) {
|
|
12369
12557
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
12370
12558
|
}
|
|
@@ -12373,6 +12561,11 @@ function buildURL(url2, params, options) {
|
|
|
12373
12561
|
return url2;
|
|
12374
12562
|
}
|
|
12375
12563
|
const _encode = options && options.encode || encode2;
|
|
12564
|
+
if (utils_default.isFunction(options)) {
|
|
12565
|
+
options = {
|
|
12566
|
+
serialize: options
|
|
12567
|
+
};
|
|
12568
|
+
}
|
|
12376
12569
|
const serializeFn = options && options.serialize;
|
|
12377
12570
|
let serializedParams;
|
|
12378
12571
|
if (serializeFn) {
|
|
@@ -12390,7 +12583,7 @@ function buildURL(url2, params, options) {
|
|
|
12390
12583
|
return url2;
|
|
12391
12584
|
}
|
|
12392
12585
|
|
|
12393
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12586
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/InterceptorManager.js
|
|
12394
12587
|
var InterceptorManager = class {
|
|
12395
12588
|
constructor() {
|
|
12396
12589
|
this.handlers = [];
|
|
@@ -12454,37 +12647,79 @@ var InterceptorManager = class {
|
|
|
12454
12647
|
};
|
|
12455
12648
|
var InterceptorManager_default = InterceptorManager;
|
|
12456
12649
|
|
|
12457
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12650
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/defaults/transitional.js
|
|
12458
12651
|
var transitional_default = {
|
|
12459
12652
|
silentJSONParsing: true,
|
|
12460
12653
|
forcedJSONParsing: true,
|
|
12461
12654
|
clarifyTimeoutError: false
|
|
12462
12655
|
};
|
|
12463
12656
|
|
|
12464
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12657
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/platform/node/index.js
|
|
12658
|
+
var import_crypto = __toESM(require("crypto"), 1);
|
|
12659
|
+
|
|
12660
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
12465
12661
|
var import_url = __toESM(require("url"), 1);
|
|
12466
12662
|
var URLSearchParams_default = import_url.default.URLSearchParams;
|
|
12467
12663
|
|
|
12468
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12469
|
-
var
|
|
12470
|
-
var
|
|
12471
|
-
|
|
12472
|
-
|
|
12664
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/platform/node/index.js
|
|
12665
|
+
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
12666
|
+
var DIGIT = "0123456789";
|
|
12667
|
+
var ALPHABET = {
|
|
12668
|
+
DIGIT,
|
|
12669
|
+
ALPHA,
|
|
12670
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
12671
|
+
};
|
|
12672
|
+
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
12673
|
+
let str = "";
|
|
12674
|
+
const { length } = alphabet;
|
|
12675
|
+
const randomValues = new Uint32Array(size);
|
|
12676
|
+
import_crypto.default.randomFillSync(randomValues);
|
|
12677
|
+
for (let i = 0; i < size; i++) {
|
|
12678
|
+
str += alphabet[randomValues[i] % length];
|
|
12679
|
+
}
|
|
12680
|
+
return str;
|
|
12681
|
+
};
|
|
12473
12682
|
var node_default = {
|
|
12474
12683
|
isNode: true,
|
|
12475
12684
|
classes: {
|
|
12476
12685
|
URLSearchParams: URLSearchParams_default,
|
|
12477
|
-
FormData:
|
|
12686
|
+
FormData: FormData_default,
|
|
12478
12687
|
Blob: typeof Blob !== "undefined" && Blob || null
|
|
12479
12688
|
},
|
|
12689
|
+
ALPHABET,
|
|
12690
|
+
generateString,
|
|
12480
12691
|
protocols: ["http", "https", "file", "data"]
|
|
12481
12692
|
};
|
|
12482
12693
|
|
|
12483
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12694
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/platform/common/utils.js
|
|
12695
|
+
var utils_exports = {};
|
|
12696
|
+
__export(utils_exports, {
|
|
12697
|
+
hasBrowserEnv: () => hasBrowserEnv,
|
|
12698
|
+
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
12699
|
+
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
|
12700
|
+
navigator: () => _navigator,
|
|
12701
|
+
origin: () => origin
|
|
12702
|
+
});
|
|
12703
|
+
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
12704
|
+
var _navigator = typeof navigator === "object" && navigator || void 0;
|
|
12705
|
+
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
12706
|
+
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
12707
|
+
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
12708
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
12709
|
+
})();
|
|
12710
|
+
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
12711
|
+
|
|
12712
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/platform/index.js
|
|
12713
|
+
var platform_default = {
|
|
12714
|
+
...utils_exports,
|
|
12715
|
+
...node_default
|
|
12716
|
+
};
|
|
12717
|
+
|
|
12718
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
12484
12719
|
function toURLEncodedForm(data, options) {
|
|
12485
|
-
return toFormData_default(data, new
|
|
12720
|
+
return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
|
|
12486
12721
|
visitor: function(value, key, path, helpers) {
|
|
12487
|
-
if (
|
|
12722
|
+
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
12488
12723
|
this.append(key, value.toString("base64"));
|
|
12489
12724
|
return false;
|
|
12490
12725
|
}
|
|
@@ -12493,7 +12728,7 @@ function toURLEncodedForm(data, options) {
|
|
|
12493
12728
|
}, options));
|
|
12494
12729
|
}
|
|
12495
12730
|
|
|
12496
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12731
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
12497
12732
|
function parsePropPath(name) {
|
|
12498
12733
|
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
12499
12734
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
@@ -12514,6 +12749,8 @@ function arrayToObject(arr) {
|
|
|
12514
12749
|
function formDataToJSON(formData) {
|
|
12515
12750
|
function buildPath(path, value, target, index) {
|
|
12516
12751
|
let name = path[index++];
|
|
12752
|
+
if (name === "__proto__")
|
|
12753
|
+
return true;
|
|
12517
12754
|
const isNumericKey = Number.isFinite(+name);
|
|
12518
12755
|
const isLast = index >= path.length;
|
|
12519
12756
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
@@ -12545,10 +12782,7 @@ function formDataToJSON(formData) {
|
|
|
12545
12782
|
}
|
|
12546
12783
|
var formDataToJSON_default = formDataToJSON;
|
|
12547
12784
|
|
|
12548
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12549
|
-
var DEFAULT_CONTENT_TYPE = {
|
|
12550
|
-
"Content-Type": void 0
|
|
12551
|
-
};
|
|
12785
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/defaults/index.js
|
|
12552
12786
|
function stringifySafely(rawValue, parser, encoder) {
|
|
12553
12787
|
if (utils_default.isString(rawValue)) {
|
|
12554
12788
|
try {
|
|
@@ -12564,7 +12798,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
12564
12798
|
}
|
|
12565
12799
|
var defaults = {
|
|
12566
12800
|
transitional: transitional_default,
|
|
12567
|
-
adapter: ["xhr", "http"],
|
|
12801
|
+
adapter: ["xhr", "http", "fetch"],
|
|
12568
12802
|
transformRequest: [function transformRequest(data, headers) {
|
|
12569
12803
|
const contentType = headers.getContentType() || "";
|
|
12570
12804
|
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
@@ -12574,12 +12808,9 @@ var defaults = {
|
|
|
12574
12808
|
}
|
|
12575
12809
|
const isFormData2 = utils_default.isFormData(data);
|
|
12576
12810
|
if (isFormData2) {
|
|
12577
|
-
if (!hasJSONContentType) {
|
|
12578
|
-
return data;
|
|
12579
|
-
}
|
|
12580
12811
|
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
12581
12812
|
}
|
|
12582
|
-
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
|
|
12813
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
|
12583
12814
|
return data;
|
|
12584
12815
|
}
|
|
12585
12816
|
if (utils_default.isArrayBufferView(data)) {
|
|
@@ -12613,6 +12844,9 @@ var defaults = {
|
|
|
12613
12844
|
const transitional2 = this.transitional || defaults.transitional;
|
|
12614
12845
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
12615
12846
|
const JSONRequested = this.responseType === "json";
|
|
12847
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
12848
|
+
return data;
|
|
12849
|
+
}
|
|
12616
12850
|
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
12617
12851
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
12618
12852
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
@@ -12639,27 +12873,25 @@ var defaults = {
|
|
|
12639
12873
|
maxContentLength: -1,
|
|
12640
12874
|
maxBodyLength: -1,
|
|
12641
12875
|
env: {
|
|
12642
|
-
FormData:
|
|
12643
|
-
Blob:
|
|
12876
|
+
FormData: platform_default.classes.FormData,
|
|
12877
|
+
Blob: platform_default.classes.Blob
|
|
12644
12878
|
},
|
|
12645
12879
|
validateStatus: function validateStatus(status) {
|
|
12646
12880
|
return status >= 200 && status < 300;
|
|
12647
12881
|
},
|
|
12648
12882
|
headers: {
|
|
12649
12883
|
common: {
|
|
12650
|
-
"Accept": "application/json, text/plain, */*"
|
|
12884
|
+
"Accept": "application/json, text/plain, */*",
|
|
12885
|
+
"Content-Type": void 0
|
|
12651
12886
|
}
|
|
12652
12887
|
}
|
|
12653
12888
|
};
|
|
12654
|
-
utils_default.forEach(["delete", "get", "head"],
|
|
12889
|
+
utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
12655
12890
|
defaults.headers[method] = {};
|
|
12656
12891
|
});
|
|
12657
|
-
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
12658
|
-
defaults.headers[method] = utils_default.merge(DEFAULT_CONTENT_TYPE);
|
|
12659
|
-
});
|
|
12660
12892
|
var defaults_default = defaults;
|
|
12661
12893
|
|
|
12662
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12894
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/parseHeaders.js
|
|
12663
12895
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
12664
12896
|
"age",
|
|
12665
12897
|
"authorization",
|
|
@@ -12704,7 +12936,7 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
12704
12936
|
return parsed;
|
|
12705
12937
|
};
|
|
12706
12938
|
|
|
12707
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12939
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/AxiosHeaders.js
|
|
12708
12940
|
var $internals = Symbol("internals");
|
|
12709
12941
|
function normalizeHeader(header) {
|
|
12710
12942
|
return header && String(header).trim().toLowerCase();
|
|
@@ -12724,13 +12956,14 @@ function parseTokens(str) {
|
|
|
12724
12956
|
}
|
|
12725
12957
|
return tokens;
|
|
12726
12958
|
}
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
}
|
|
12730
|
-
function matchHeaderValue(context, value, header, filter2) {
|
|
12959
|
+
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
12960
|
+
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
12731
12961
|
if (utils_default.isFunction(filter2)) {
|
|
12732
12962
|
return filter2.call(this, value, header);
|
|
12733
12963
|
}
|
|
12964
|
+
if (isHeaderNameFilter) {
|
|
12965
|
+
value = header;
|
|
12966
|
+
}
|
|
12734
12967
|
if (!utils_default.isString(value))
|
|
12735
12968
|
return;
|
|
12736
12969
|
if (utils_default.isString(filter2)) {
|
|
@@ -12777,6 +13010,15 @@ var AxiosHeaders = class {
|
|
|
12777
13010
|
setHeaders(header, valueOrRewrite);
|
|
12778
13011
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
12779
13012
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
13013
|
+
} else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
|
|
13014
|
+
let obj = {}, dest, key;
|
|
13015
|
+
for (const entry of header) {
|
|
13016
|
+
if (!utils_default.isArray(entry)) {
|
|
13017
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
13018
|
+
}
|
|
13019
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
13020
|
+
}
|
|
13021
|
+
setHeaders(obj, valueOrRewrite);
|
|
12780
13022
|
} else {
|
|
12781
13023
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
12782
13024
|
}
|
|
@@ -12808,7 +13050,7 @@ var AxiosHeaders = class {
|
|
|
12808
13050
|
header = normalizeHeader(header);
|
|
12809
13051
|
if (header) {
|
|
12810
13052
|
const key = utils_default.findKey(this, header);
|
|
12811
|
-
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
13053
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
12812
13054
|
}
|
|
12813
13055
|
return false;
|
|
12814
13056
|
}
|
|
@@ -12832,8 +13074,18 @@ var AxiosHeaders = class {
|
|
|
12832
13074
|
}
|
|
12833
13075
|
return deleted;
|
|
12834
13076
|
}
|
|
12835
|
-
clear() {
|
|
12836
|
-
|
|
13077
|
+
clear(matcher) {
|
|
13078
|
+
const keys = Object.keys(this);
|
|
13079
|
+
let i = keys.length;
|
|
13080
|
+
let deleted = false;
|
|
13081
|
+
while (i--) {
|
|
13082
|
+
const key = keys[i];
|
|
13083
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
13084
|
+
delete this[key];
|
|
13085
|
+
deleted = true;
|
|
13086
|
+
}
|
|
13087
|
+
}
|
|
13088
|
+
return deleted;
|
|
12837
13089
|
}
|
|
12838
13090
|
normalize(format) {
|
|
12839
13091
|
const self2 = this;
|
|
@@ -12870,6 +13122,9 @@ var AxiosHeaders = class {
|
|
|
12870
13122
|
toString() {
|
|
12871
13123
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
12872
13124
|
}
|
|
13125
|
+
getSetCookie() {
|
|
13126
|
+
return this.get("set-cookie") || [];
|
|
13127
|
+
}
|
|
12873
13128
|
get [Symbol.toStringTag]() {
|
|
12874
13129
|
return "AxiosHeaders";
|
|
12875
13130
|
}
|
|
@@ -12898,12 +13153,20 @@ var AxiosHeaders = class {
|
|
|
12898
13153
|
return this;
|
|
12899
13154
|
}
|
|
12900
13155
|
};
|
|
12901
|
-
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent"]);
|
|
12902
|
-
utils_default.
|
|
13156
|
+
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
13157
|
+
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
13158
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
13159
|
+
return {
|
|
13160
|
+
get: () => value,
|
|
13161
|
+
set(headerValue) {
|
|
13162
|
+
this[mapped] = headerValue;
|
|
13163
|
+
}
|
|
13164
|
+
};
|
|
13165
|
+
});
|
|
12903
13166
|
utils_default.freezeMethods(AxiosHeaders);
|
|
12904
13167
|
var AxiosHeaders_default = AxiosHeaders;
|
|
12905
13168
|
|
|
12906
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13169
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/transformData.js
|
|
12907
13170
|
function transformData(fns, response) {
|
|
12908
13171
|
const config = this || defaults_default;
|
|
12909
13172
|
const context = response || config;
|
|
@@ -12916,12 +13179,12 @@ function transformData(fns, response) {
|
|
|
12916
13179
|
return data;
|
|
12917
13180
|
}
|
|
12918
13181
|
|
|
12919
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13182
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/cancel/isCancel.js
|
|
12920
13183
|
function isCancel(value) {
|
|
12921
13184
|
return !!(value && value.__CANCEL__);
|
|
12922
13185
|
}
|
|
12923
13186
|
|
|
12924
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13187
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/cancel/CanceledError.js
|
|
12925
13188
|
function CanceledError(message, config, request) {
|
|
12926
13189
|
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
12927
13190
|
this.name = "CanceledError";
|
|
@@ -12931,7 +13194,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
|
12931
13194
|
});
|
|
12932
13195
|
var CanceledError_default = CanceledError;
|
|
12933
13196
|
|
|
12934
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13197
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/settle.js
|
|
12935
13198
|
function settle(resolve, reject, response) {
|
|
12936
13199
|
const validateStatus2 = response.config.validateStatus;
|
|
12937
13200
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
@@ -12947,44 +13210,46 @@ function settle(resolve, reject, response) {
|
|
|
12947
13210
|
}
|
|
12948
13211
|
}
|
|
12949
13212
|
|
|
12950
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13213
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
12951
13214
|
function isAbsoluteURL(url2) {
|
|
12952
13215
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
12953
13216
|
}
|
|
12954
13217
|
|
|
12955
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13218
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/combineURLs.js
|
|
12956
13219
|
function combineURLs(baseURL, relativeURL) {
|
|
12957
|
-
return relativeURL ? baseURL.replace(
|
|
13220
|
+
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
12958
13221
|
}
|
|
12959
13222
|
|
|
12960
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12961
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
12962
|
-
|
|
13223
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/buildFullPath.js
|
|
13224
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
13225
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
13226
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
12963
13227
|
return combineURLs(baseURL, requestedURL);
|
|
12964
13228
|
}
|
|
12965
13229
|
return requestedURL;
|
|
12966
13230
|
}
|
|
12967
13231
|
|
|
12968
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13232
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/http.js
|
|
12969
13233
|
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
12970
13234
|
var import_http = __toESM(require("http"), 1);
|
|
12971
13235
|
var import_https = __toESM(require("https"), 1);
|
|
13236
|
+
var import_util2 = __toESM(require("util"), 1);
|
|
12972
13237
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
12973
13238
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
12974
13239
|
|
|
12975
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12976
|
-
var VERSION = "1.
|
|
13240
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/env/data.js
|
|
13241
|
+
var VERSION = "1.9.0";
|
|
12977
13242
|
|
|
12978
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13243
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/parseProtocol.js
|
|
12979
13244
|
function parseProtocol(url2) {
|
|
12980
13245
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
|
12981
13246
|
return match && match[1] || "";
|
|
12982
13247
|
}
|
|
12983
13248
|
|
|
12984
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13249
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/fromDataURI.js
|
|
12985
13250
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
12986
13251
|
function fromDataURI(uri, asBlob, options) {
|
|
12987
|
-
const _Blob = options && options.Blob ||
|
|
13252
|
+
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
12988
13253
|
const protocol = parseProtocol(uri);
|
|
12989
13254
|
if (asBlob === void 0 && _Blob) {
|
|
12990
13255
|
asBlob = true;
|
|
@@ -13010,75 +13275,11 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
13010
13275
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
13011
13276
|
}
|
|
13012
13277
|
|
|
13013
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13014
|
-
var
|
|
13278
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/http.js
|
|
13279
|
+
var import_stream4 = __toESM(require("stream"), 1);
|
|
13015
13280
|
|
|
13016
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13281
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
13017
13282
|
var import_stream = __toESM(require("stream"), 1);
|
|
13018
|
-
|
|
13019
|
-
// ../../node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/helpers/throttle.js
|
|
13020
|
-
function throttle(fn, freq) {
|
|
13021
|
-
let timestamp = 0;
|
|
13022
|
-
const threshold = 1e3 / freq;
|
|
13023
|
-
let timer = null;
|
|
13024
|
-
return function throttled(force, args) {
|
|
13025
|
-
const now = Date.now();
|
|
13026
|
-
if (force || now - timestamp > threshold) {
|
|
13027
|
-
if (timer) {
|
|
13028
|
-
clearTimeout(timer);
|
|
13029
|
-
timer = null;
|
|
13030
|
-
}
|
|
13031
|
-
timestamp = now;
|
|
13032
|
-
return fn.apply(null, args);
|
|
13033
|
-
}
|
|
13034
|
-
if (!timer) {
|
|
13035
|
-
timer = setTimeout(() => {
|
|
13036
|
-
timer = null;
|
|
13037
|
-
timestamp = Date.now();
|
|
13038
|
-
return fn.apply(null, args);
|
|
13039
|
-
}, threshold - (now - timestamp));
|
|
13040
|
-
}
|
|
13041
|
-
};
|
|
13042
|
-
}
|
|
13043
|
-
var throttle_default = throttle;
|
|
13044
|
-
|
|
13045
|
-
// ../../node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/helpers/speedometer.js
|
|
13046
|
-
function speedometer(samplesCount, min) {
|
|
13047
|
-
samplesCount = samplesCount || 10;
|
|
13048
|
-
const bytes = new Array(samplesCount);
|
|
13049
|
-
const timestamps = new Array(samplesCount);
|
|
13050
|
-
let head = 0;
|
|
13051
|
-
let tail = 0;
|
|
13052
|
-
let firstSampleTS;
|
|
13053
|
-
min = min !== void 0 ? min : 1e3;
|
|
13054
|
-
return function push(chunkLength) {
|
|
13055
|
-
const now = Date.now();
|
|
13056
|
-
const startedAt = timestamps[tail];
|
|
13057
|
-
if (!firstSampleTS) {
|
|
13058
|
-
firstSampleTS = now;
|
|
13059
|
-
}
|
|
13060
|
-
bytes[head] = chunkLength;
|
|
13061
|
-
timestamps[head] = now;
|
|
13062
|
-
let i = tail;
|
|
13063
|
-
let bytesCount = 0;
|
|
13064
|
-
while (i !== head) {
|
|
13065
|
-
bytesCount += bytes[i++];
|
|
13066
|
-
i = i % samplesCount;
|
|
13067
|
-
}
|
|
13068
|
-
head = (head + 1) % samplesCount;
|
|
13069
|
-
if (head === tail) {
|
|
13070
|
-
tail = (tail + 1) % samplesCount;
|
|
13071
|
-
}
|
|
13072
|
-
if (now - firstSampleTS < min) {
|
|
13073
|
-
return;
|
|
13074
|
-
}
|
|
13075
|
-
const passed = startedAt && now - startedAt;
|
|
13076
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
13077
|
-
};
|
|
13078
|
-
}
|
|
13079
|
-
var speedometer_default = speedometer;
|
|
13080
|
-
|
|
13081
|
-
// ../../node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
13082
13283
|
var kInternals = Symbol("internals");
|
|
13083
13284
|
var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
13084
13285
|
constructor(options) {
|
|
@@ -13095,11 +13296,8 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13095
13296
|
super({
|
|
13096
13297
|
readableHighWaterMark: options.chunkSize
|
|
13097
13298
|
});
|
|
13098
|
-
const self2 = this;
|
|
13099
13299
|
const internals = this[kInternals] = {
|
|
13100
|
-
length: options.length,
|
|
13101
13300
|
timeWindow: options.timeWindow,
|
|
13102
|
-
ticksRate: options.ticksRate,
|
|
13103
13301
|
chunkSize: options.chunkSize,
|
|
13104
13302
|
maxRate: options.maxRate,
|
|
13105
13303
|
minChunkSize: options.minChunkSize,
|
|
@@ -13110,7 +13308,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13110
13308
|
bytes: 0,
|
|
13111
13309
|
onReadCallback: null
|
|
13112
13310
|
};
|
|
13113
|
-
const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
|
|
13114
13311
|
this.on("newListener", (event) => {
|
|
13115
13312
|
if (event === "progress") {
|
|
13116
13313
|
if (!internals.isCaptured) {
|
|
@@ -13118,31 +13315,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13118
13315
|
}
|
|
13119
13316
|
}
|
|
13120
13317
|
});
|
|
13121
|
-
let bytesNotified = 0;
|
|
13122
|
-
internals.updateProgress = throttle_default(function throttledHandler() {
|
|
13123
|
-
const totalBytes = internals.length;
|
|
13124
|
-
const bytesTransferred = internals.bytesSeen;
|
|
13125
|
-
const progressBytes = bytesTransferred - bytesNotified;
|
|
13126
|
-
if (!progressBytes || self2.destroyed)
|
|
13127
|
-
return;
|
|
13128
|
-
const rate = _speedometer(progressBytes);
|
|
13129
|
-
bytesNotified = bytesTransferred;
|
|
13130
|
-
process.nextTick(() => {
|
|
13131
|
-
self2.emit("progress", {
|
|
13132
|
-
"loaded": bytesTransferred,
|
|
13133
|
-
"total": totalBytes,
|
|
13134
|
-
"progress": totalBytes ? bytesTransferred / totalBytes : void 0,
|
|
13135
|
-
"bytes": progressBytes,
|
|
13136
|
-
"rate": rate ? rate : void 0,
|
|
13137
|
-
"estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
|
|
13138
|
-
});
|
|
13139
|
-
});
|
|
13140
|
-
}, internals.ticksRate);
|
|
13141
|
-
const onFinish = () => {
|
|
13142
|
-
internals.updateProgress(true);
|
|
13143
|
-
};
|
|
13144
|
-
this.once("end", onFinish);
|
|
13145
|
-
this.once("error", onFinish);
|
|
13146
13318
|
}
|
|
13147
13319
|
_read(size) {
|
|
13148
13320
|
const internals = this[kInternals];
|
|
@@ -13152,7 +13324,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13152
13324
|
return super._read(size);
|
|
13153
13325
|
}
|
|
13154
13326
|
_transform(chunk, encoding, callback) {
|
|
13155
|
-
const self2 = this;
|
|
13156
13327
|
const internals = this[kInternals];
|
|
13157
13328
|
const maxRate = internals.maxRate;
|
|
13158
13329
|
const readableHighWaterMark = this.readableHighWaterMark;
|
|
@@ -13160,14 +13331,12 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13160
13331
|
const divider = 1e3 / timeWindow;
|
|
13161
13332
|
const bytesThreshold = maxRate / divider;
|
|
13162
13333
|
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
|
13163
|
-
|
|
13334
|
+
const pushChunk = (_chunk, _callback) => {
|
|
13164
13335
|
const bytes = Buffer.byteLength(_chunk);
|
|
13165
13336
|
internals.bytesSeen += bytes;
|
|
13166
13337
|
internals.bytes += bytes;
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
}
|
|
13170
|
-
if (self2.push(_chunk)) {
|
|
13338
|
+
internals.isCaptured && this.emit("progress", internals.bytesSeen);
|
|
13339
|
+
if (this.push(_chunk)) {
|
|
13171
13340
|
process.nextTick(_callback);
|
|
13172
13341
|
} else {
|
|
13173
13342
|
internals.onReadCallback = () => {
|
|
@@ -13175,7 +13344,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13175
13344
|
process.nextTick(_callback);
|
|
13176
13345
|
};
|
|
13177
13346
|
}
|
|
13178
|
-
}
|
|
13347
|
+
};
|
|
13179
13348
|
const transformChunk = (_chunk, _callback) => {
|
|
13180
13349
|
const chunkSize = Buffer.byteLength(_chunk);
|
|
13181
13350
|
let chunkRemainder = null;
|
|
@@ -13221,82 +13390,367 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
13221
13390
|
}
|
|
13222
13391
|
});
|
|
13223
13392
|
}
|
|
13224
|
-
setLength(length) {
|
|
13225
|
-
this[kInternals].length = +length;
|
|
13226
|
-
return this;
|
|
13227
|
-
}
|
|
13228
13393
|
};
|
|
13229
13394
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
13230
13395
|
|
|
13231
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13232
|
-
var import_events2 =
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13396
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/http.js
|
|
13397
|
+
var import_events2 = require("events");
|
|
13398
|
+
|
|
13399
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/formDataToStream.js
|
|
13400
|
+
var import_util = __toESM(require("util"), 1);
|
|
13401
|
+
var import_stream2 = require("stream");
|
|
13402
|
+
|
|
13403
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/readBlob.js
|
|
13404
|
+
var { asyncIterator } = Symbol;
|
|
13405
|
+
var readBlob = async function* (blob) {
|
|
13406
|
+
if (blob.stream) {
|
|
13407
|
+
yield* blob.stream();
|
|
13408
|
+
} else if (blob.arrayBuffer) {
|
|
13409
|
+
yield await blob.arrayBuffer();
|
|
13410
|
+
} else if (blob[asyncIterator]) {
|
|
13411
|
+
yield* blob[asyncIterator]();
|
|
13412
|
+
} else {
|
|
13413
|
+
yield blob;
|
|
13414
|
+
}
|
|
13236
13415
|
};
|
|
13237
|
-
var
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
var
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13416
|
+
var readBlob_default = readBlob;
|
|
13417
|
+
|
|
13418
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/formDataToStream.js
|
|
13419
|
+
var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
13420
|
+
var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new import_util.default.TextEncoder();
|
|
13421
|
+
var CRLF = "\r\n";
|
|
13422
|
+
var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
13423
|
+
var CRLF_BYTES_COUNT = 2;
|
|
13424
|
+
var FormDataPart = class {
|
|
13425
|
+
constructor(name, value) {
|
|
13426
|
+
const { escapeName } = this.constructor;
|
|
13427
|
+
const isStringValue = utils_default.isString(value);
|
|
13428
|
+
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
|
|
13429
|
+
if (isStringValue) {
|
|
13430
|
+
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
13431
|
+
} else {
|
|
13432
|
+
headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
|
|
13433
|
+
}
|
|
13434
|
+
this.headers = textEncoder.encode(headers + CRLF);
|
|
13435
|
+
this.contentLength = isStringValue ? value.byteLength : value.size;
|
|
13436
|
+
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
|
13437
|
+
this.name = name;
|
|
13438
|
+
this.value = value;
|
|
13439
|
+
}
|
|
13440
|
+
async *encode() {
|
|
13441
|
+
yield this.headers;
|
|
13442
|
+
const { value } = this;
|
|
13443
|
+
if (utils_default.isTypedArray(value)) {
|
|
13444
|
+
yield value;
|
|
13445
|
+
} else {
|
|
13446
|
+
yield* readBlob_default(value);
|
|
13447
|
+
}
|
|
13448
|
+
yield CRLF_BYTES;
|
|
13246
13449
|
}
|
|
13247
|
-
|
|
13248
|
-
|
|
13450
|
+
static escapeName(name) {
|
|
13451
|
+
return String(name).replace(/[\r\n"]/g, (match) => ({
|
|
13452
|
+
"\r": "%0D",
|
|
13453
|
+
"\n": "%0A",
|
|
13454
|
+
'"': "%22"
|
|
13455
|
+
})[match]);
|
|
13249
13456
|
}
|
|
13250
|
-
}
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13457
|
+
};
|
|
13458
|
+
var formDataToStream = (form, headersHandler, options) => {
|
|
13459
|
+
const {
|
|
13460
|
+
tag = "form-data-boundary",
|
|
13461
|
+
size = 25,
|
|
13462
|
+
boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
|
|
13463
|
+
} = options || {};
|
|
13464
|
+
if (!utils_default.isFormData(form)) {
|
|
13465
|
+
throw TypeError("FormData instance required");
|
|
13466
|
+
}
|
|
13467
|
+
if (boundary.length < 1 || boundary.length > 70) {
|
|
13468
|
+
throw Error("boundary must be 10-70 characters long");
|
|
13469
|
+
}
|
|
13470
|
+
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
13471
|
+
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
13472
|
+
let contentLength = footerBytes.byteLength;
|
|
13473
|
+
const parts = Array.from(form.entries()).map(([name, value]) => {
|
|
13474
|
+
const part = new FormDataPart(name, value);
|
|
13475
|
+
contentLength += part.size;
|
|
13476
|
+
return part;
|
|
13477
|
+
});
|
|
13478
|
+
contentLength += boundaryBytes.byteLength * parts.length;
|
|
13479
|
+
contentLength = utils_default.toFiniteNumber(contentLength);
|
|
13480
|
+
const computedHeaders = {
|
|
13481
|
+
"Content-Type": `multipart/form-data; boundary=${boundary}`
|
|
13482
|
+
};
|
|
13483
|
+
if (Number.isFinite(contentLength)) {
|
|
13484
|
+
computedHeaders["Content-Length"] = contentLength;
|
|
13485
|
+
}
|
|
13486
|
+
headersHandler && headersHandler(computedHeaders);
|
|
13487
|
+
return import_stream2.Readable.from(async function* () {
|
|
13488
|
+
for (const part of parts) {
|
|
13489
|
+
yield boundaryBytes;
|
|
13490
|
+
yield* part.encode();
|
|
13257
13491
|
}
|
|
13492
|
+
yield footerBytes;
|
|
13493
|
+
}());
|
|
13494
|
+
};
|
|
13495
|
+
var formDataToStream_default = formDataToStream;
|
|
13496
|
+
|
|
13497
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
13498
|
+
var import_stream3 = __toESM(require("stream"), 1);
|
|
13499
|
+
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
13500
|
+
__transform(chunk, encoding, callback) {
|
|
13501
|
+
this.push(chunk);
|
|
13502
|
+
callback();
|
|
13258
13503
|
}
|
|
13259
|
-
|
|
13260
|
-
if (
|
|
13261
|
-
|
|
13504
|
+
_transform(chunk, encoding, callback) {
|
|
13505
|
+
if (chunk.length !== 0) {
|
|
13506
|
+
this._transform = this.__transform;
|
|
13507
|
+
if (chunk[0] !== 120) {
|
|
13508
|
+
const header = Buffer.alloc(2);
|
|
13509
|
+
header[0] = 120;
|
|
13510
|
+
header[1] = 156;
|
|
13511
|
+
this.push(header, encoding);
|
|
13512
|
+
}
|
|
13262
13513
|
}
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13514
|
+
this.__transform(chunk, encoding, callback);
|
|
13515
|
+
}
|
|
13516
|
+
};
|
|
13517
|
+
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
13518
|
+
|
|
13519
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/callbackify.js
|
|
13520
|
+
var callbackify = (fn, reducer) => {
|
|
13521
|
+
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
13522
|
+
const cb = args.pop();
|
|
13523
|
+
fn.apply(this, args).then((value) => {
|
|
13524
|
+
try {
|
|
13525
|
+
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
|
13526
|
+
} catch (err) {
|
|
13527
|
+
cb(err);
|
|
13266
13528
|
}
|
|
13267
|
-
|
|
13268
|
-
|
|
13529
|
+
}, cb);
|
|
13530
|
+
} : fn;
|
|
13531
|
+
};
|
|
13532
|
+
var callbackify_default = callbackify;
|
|
13533
|
+
|
|
13534
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/speedometer.js
|
|
13535
|
+
function speedometer(samplesCount, min) {
|
|
13536
|
+
samplesCount = samplesCount || 10;
|
|
13537
|
+
const bytes = new Array(samplesCount);
|
|
13538
|
+
const timestamps = new Array(samplesCount);
|
|
13539
|
+
let head = 0;
|
|
13540
|
+
let tail = 0;
|
|
13541
|
+
let firstSampleTS;
|
|
13542
|
+
min = min !== void 0 ? min : 1e3;
|
|
13543
|
+
return function push(chunkLength) {
|
|
13544
|
+
const now = Date.now();
|
|
13545
|
+
const startedAt = timestamps[tail];
|
|
13546
|
+
if (!firstSampleTS) {
|
|
13547
|
+
firstSampleTS = now;
|
|
13269
13548
|
}
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
|
|
13549
|
+
bytes[head] = chunkLength;
|
|
13550
|
+
timestamps[head] = now;
|
|
13551
|
+
let i = tail;
|
|
13552
|
+
let bytesCount = 0;
|
|
13553
|
+
while (i !== head) {
|
|
13554
|
+
bytesCount += bytes[i++];
|
|
13555
|
+
i = i % samplesCount;
|
|
13278
13556
|
}
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13557
|
+
head = (head + 1) % samplesCount;
|
|
13558
|
+
if (head === tail) {
|
|
13559
|
+
tail = (tail + 1) % samplesCount;
|
|
13560
|
+
}
|
|
13561
|
+
if (now - firstSampleTS < min) {
|
|
13562
|
+
return;
|
|
13563
|
+
}
|
|
13564
|
+
const passed = startedAt && now - startedAt;
|
|
13565
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
13282
13566
|
};
|
|
13283
13567
|
}
|
|
13284
|
-
var
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13568
|
+
var speedometer_default = speedometer;
|
|
13569
|
+
|
|
13570
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/throttle.js
|
|
13571
|
+
function throttle(fn, freq) {
|
|
13572
|
+
let timestamp = 0;
|
|
13573
|
+
let threshold = 1e3 / freq;
|
|
13574
|
+
let lastArgs;
|
|
13575
|
+
let timer;
|
|
13576
|
+
const invoke = (args, now = Date.now()) => {
|
|
13577
|
+
timestamp = now;
|
|
13578
|
+
lastArgs = null;
|
|
13579
|
+
if (timer) {
|
|
13580
|
+
clearTimeout(timer);
|
|
13581
|
+
timer = null;
|
|
13582
|
+
}
|
|
13583
|
+
fn.apply(null, args);
|
|
13584
|
+
};
|
|
13585
|
+
const throttled = (...args) => {
|
|
13586
|
+
const now = Date.now();
|
|
13587
|
+
const passed = now - timestamp;
|
|
13588
|
+
if (passed >= threshold) {
|
|
13589
|
+
invoke(args, now);
|
|
13590
|
+
} else {
|
|
13591
|
+
lastArgs = args;
|
|
13592
|
+
if (!timer) {
|
|
13593
|
+
timer = setTimeout(() => {
|
|
13594
|
+
timer = null;
|
|
13595
|
+
invoke(lastArgs);
|
|
13596
|
+
}, threshold - passed);
|
|
13597
|
+
}
|
|
13598
|
+
}
|
|
13599
|
+
};
|
|
13600
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
|
13601
|
+
return [throttled, flush];
|
|
13602
|
+
}
|
|
13603
|
+
var throttle_default = throttle;
|
|
13604
|
+
|
|
13605
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
13606
|
+
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
13607
|
+
let bytesNotified = 0;
|
|
13608
|
+
const _speedometer = speedometer_default(50, 250);
|
|
13609
|
+
return throttle_default((e) => {
|
|
13610
|
+
const loaded = e.loaded;
|
|
13611
|
+
const total = e.lengthComputable ? e.total : void 0;
|
|
13612
|
+
const progressBytes = loaded - bytesNotified;
|
|
13613
|
+
const rate = _speedometer(progressBytes);
|
|
13614
|
+
const inRange = loaded <= total;
|
|
13615
|
+
bytesNotified = loaded;
|
|
13616
|
+
const data = {
|
|
13617
|
+
loaded,
|
|
13618
|
+
total,
|
|
13619
|
+
progress: total ? loaded / total : void 0,
|
|
13620
|
+
bytes: progressBytes,
|
|
13621
|
+
rate: rate ? rate : void 0,
|
|
13622
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
13623
|
+
event: e,
|
|
13624
|
+
lengthComputable: total != null,
|
|
13625
|
+
[isDownloadStream ? "download" : "upload"]: true
|
|
13626
|
+
};
|
|
13627
|
+
listener(data);
|
|
13628
|
+
}, freq);
|
|
13629
|
+
};
|
|
13630
|
+
var progressEventDecorator = (total, throttled) => {
|
|
13631
|
+
const lengthComputable = total != null;
|
|
13632
|
+
return [(loaded) => throttled[0]({
|
|
13633
|
+
lengthComputable,
|
|
13634
|
+
total,
|
|
13635
|
+
loaded
|
|
13636
|
+
}), throttled[1]];
|
|
13637
|
+
};
|
|
13638
|
+
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
13639
|
+
|
|
13640
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/http.js
|
|
13641
|
+
var zlibOptions = {
|
|
13642
|
+
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
|
13643
|
+
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
|
13644
|
+
};
|
|
13645
|
+
var brotliOptions = {
|
|
13646
|
+
flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH,
|
|
13647
|
+
finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH
|
|
13648
|
+
};
|
|
13649
|
+
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
13650
|
+
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
13651
|
+
var isHttps = /https:?/;
|
|
13652
|
+
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
13653
|
+
return protocol + ":";
|
|
13654
|
+
});
|
|
13655
|
+
var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
13656
|
+
stream4.on("end", flush).on("error", flush);
|
|
13657
|
+
return throttled;
|
|
13658
|
+
};
|
|
13659
|
+
function dispatchBeforeRedirect(options, responseDetails) {
|
|
13660
|
+
if (options.beforeRedirects.proxy) {
|
|
13661
|
+
options.beforeRedirects.proxy(options);
|
|
13662
|
+
}
|
|
13663
|
+
if (options.beforeRedirects.config) {
|
|
13664
|
+
options.beforeRedirects.config(options, responseDetails);
|
|
13665
|
+
}
|
|
13666
|
+
}
|
|
13667
|
+
function setProxy(options, configProxy, location2) {
|
|
13668
|
+
let proxy = configProxy;
|
|
13669
|
+
if (!proxy && proxy !== false) {
|
|
13670
|
+
const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location2);
|
|
13671
|
+
if (proxyUrl) {
|
|
13672
|
+
proxy = new URL(proxyUrl);
|
|
13673
|
+
}
|
|
13674
|
+
}
|
|
13675
|
+
if (proxy) {
|
|
13676
|
+
if (proxy.username) {
|
|
13677
|
+
proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
13678
|
+
}
|
|
13679
|
+
if (proxy.auth) {
|
|
13680
|
+
if (proxy.auth.username || proxy.auth.password) {
|
|
13681
|
+
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
13682
|
+
}
|
|
13683
|
+
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
13684
|
+
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
13685
|
+
}
|
|
13686
|
+
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
13687
|
+
const proxyHost = proxy.hostname || proxy.host;
|
|
13688
|
+
options.hostname = proxyHost;
|
|
13689
|
+
options.host = proxyHost;
|
|
13690
|
+
options.port = proxy.port;
|
|
13691
|
+
options.path = location2;
|
|
13692
|
+
if (proxy.protocol) {
|
|
13693
|
+
options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
|
|
13694
|
+
}
|
|
13695
|
+
}
|
|
13696
|
+
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
13697
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
13698
|
+
};
|
|
13699
|
+
}
|
|
13700
|
+
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
13701
|
+
var wrapAsync = (asyncExecutor) => {
|
|
13702
|
+
return new Promise((resolve, reject) => {
|
|
13703
|
+
let onDone;
|
|
13704
|
+
let isDone;
|
|
13705
|
+
const done = (value, isRejected) => {
|
|
13706
|
+
if (isDone)
|
|
13707
|
+
return;
|
|
13708
|
+
isDone = true;
|
|
13709
|
+
onDone && onDone(value, isRejected);
|
|
13710
|
+
};
|
|
13711
|
+
const _resolve = (value) => {
|
|
13712
|
+
done(value);
|
|
13713
|
+
resolve(value);
|
|
13714
|
+
};
|
|
13715
|
+
const _reject = (reason) => {
|
|
13716
|
+
done(reason, true);
|
|
13717
|
+
reject(reason);
|
|
13718
|
+
};
|
|
13719
|
+
asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
|
|
13720
|
+
});
|
|
13721
|
+
};
|
|
13722
|
+
var resolveFamily = ({ address, family }) => {
|
|
13723
|
+
if (!utils_default.isString(address)) {
|
|
13724
|
+
throw TypeError("address must be a string");
|
|
13725
|
+
}
|
|
13726
|
+
return {
|
|
13727
|
+
address,
|
|
13728
|
+
family: family || (address.indexOf(".") < 0 ? 6 : 4)
|
|
13729
|
+
};
|
|
13730
|
+
};
|
|
13731
|
+
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
13732
|
+
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
13733
|
+
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
13734
|
+
let { data, lookup, family } = config;
|
|
13735
|
+
const { responseType, responseEncoding } = config;
|
|
13290
13736
|
const method = config.method.toUpperCase();
|
|
13291
|
-
let isFinished;
|
|
13292
13737
|
let isDone;
|
|
13293
13738
|
let rejected = false;
|
|
13294
13739
|
let req;
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13740
|
+
if (lookup) {
|
|
13741
|
+
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
13742
|
+
lookup = (hostname, opt, cb) => {
|
|
13743
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
13744
|
+
if (err) {
|
|
13745
|
+
return cb(err);
|
|
13746
|
+
}
|
|
13747
|
+
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
13748
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
13749
|
+
});
|
|
13750
|
+
};
|
|
13751
|
+
}
|
|
13752
|
+
const emitter = new import_events2.EventEmitter();
|
|
13753
|
+
const onFinished = () => {
|
|
13300
13754
|
if (config.cancelToken) {
|
|
13301
13755
|
config.cancelToken.unsubscribe(abort);
|
|
13302
13756
|
}
|
|
@@ -13304,23 +13758,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13304
13758
|
config.signal.removeEventListener("abort", abort);
|
|
13305
13759
|
}
|
|
13306
13760
|
emitter.removeAllListeners();
|
|
13307
|
-
}
|
|
13308
|
-
|
|
13309
|
-
if (isDone)
|
|
13310
|
-
return;
|
|
13761
|
+
};
|
|
13762
|
+
onDone((value, isRejected) => {
|
|
13311
13763
|
isDone = true;
|
|
13312
13764
|
if (isRejected) {
|
|
13313
13765
|
rejected = true;
|
|
13314
13766
|
onFinished();
|
|
13315
13767
|
}
|
|
13316
|
-
|
|
13317
|
-
}
|
|
13318
|
-
const resolve = function resolve2(value) {
|
|
13319
|
-
done(value);
|
|
13320
|
-
};
|
|
13321
|
-
const reject = function reject2(value) {
|
|
13322
|
-
done(value, true);
|
|
13323
|
-
};
|
|
13768
|
+
});
|
|
13324
13769
|
function abort(reason) {
|
|
13325
13770
|
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
13326
13771
|
}
|
|
@@ -13331,8 +13776,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13331
13776
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
13332
13777
|
}
|
|
13333
13778
|
}
|
|
13334
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
13335
|
-
const parsed = new URL(fullPath);
|
|
13779
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
13780
|
+
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
13336
13781
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
13337
13782
|
if (protocol === "data:") {
|
|
13338
13783
|
let convertedData;
|
|
@@ -13354,10 +13799,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13354
13799
|
if (responseType === "text") {
|
|
13355
13800
|
convertedData = convertedData.toString(responseEncoding);
|
|
13356
13801
|
if (!responseEncoding || responseEncoding === "utf8") {
|
|
13357
|
-
|
|
13802
|
+
convertedData = utils_default.stripBOM(convertedData);
|
|
13358
13803
|
}
|
|
13359
13804
|
} else if (responseType === "stream") {
|
|
13360
|
-
convertedData =
|
|
13805
|
+
convertedData = import_stream4.default.Readable.from(convertedData);
|
|
13361
13806
|
}
|
|
13362
13807
|
return settle(resolve, reject, {
|
|
13363
13808
|
data: convertedData,
|
|
@@ -13376,13 +13821,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13376
13821
|
}
|
|
13377
13822
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
13378
13823
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
13379
|
-
const onDownloadProgress = config
|
|
13380
|
-
const onUploadProgress = config.onUploadProgress;
|
|
13824
|
+
const { onUploadProgress, onDownloadProgress } = config;
|
|
13381
13825
|
const maxRate = config.maxRate;
|
|
13382
13826
|
let maxUploadRate = void 0;
|
|
13383
13827
|
let maxDownloadRate = void 0;
|
|
13384
|
-
if (utils_default.
|
|
13828
|
+
if (utils_default.isSpecCompliantForm(data)) {
|
|
13829
|
+
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
13830
|
+
data = formDataToStream_default(data, (formHeaders) => {
|
|
13831
|
+
headers.set(formHeaders);
|
|
13832
|
+
}, {
|
|
13833
|
+
tag: `axios-${VERSION}-boundary`,
|
|
13834
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
13835
|
+
});
|
|
13836
|
+
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
|
|
13385
13837
|
headers.set(data.getHeaders());
|
|
13838
|
+
if (!headers.hasContentLength()) {
|
|
13839
|
+
try {
|
|
13840
|
+
const knownLength = await import_util2.default.promisify(data.getLength).call(data);
|
|
13841
|
+
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
13842
|
+
} catch (e) {
|
|
13843
|
+
}
|
|
13844
|
+
}
|
|
13845
|
+
} else if (utils_default.isBlob(data) || utils_default.isFile(data)) {
|
|
13846
|
+
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
13847
|
+
headers.setContentLength(data.size || 0);
|
|
13848
|
+
data = import_stream4.default.Readable.from(readBlob_default(data));
|
|
13386
13849
|
} else if (data && !utils_default.isStream(data)) {
|
|
13387
13850
|
if (Buffer.isBuffer(data)) {
|
|
13388
13851
|
} else if (utils_default.isArrayBuffer(data)) {
|
|
@@ -13396,7 +13859,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13396
13859
|
config
|
|
13397
13860
|
));
|
|
13398
13861
|
}
|
|
13399
|
-
headers.
|
|
13862
|
+
headers.setContentLength(data.length, false);
|
|
13400
13863
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
13401
13864
|
return reject(new AxiosError_default(
|
|
13402
13865
|
"Request body larger than maxBodyLength limit",
|
|
@@ -13414,17 +13877,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13414
13877
|
}
|
|
13415
13878
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
13416
13879
|
if (!utils_default.isStream(data)) {
|
|
13417
|
-
data =
|
|
13880
|
+
data = import_stream4.default.Readable.from(data, { objectMode: false });
|
|
13418
13881
|
}
|
|
13419
|
-
data =
|
|
13420
|
-
length: contentLength,
|
|
13882
|
+
data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
|
|
13421
13883
|
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
13422
13884
|
})], utils_default.noop);
|
|
13423
|
-
onUploadProgress && data.on("progress", (
|
|
13424
|
-
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
|
|
13885
|
+
onUploadProgress && data.on("progress", flushOnFinish(
|
|
13886
|
+
data,
|
|
13887
|
+
progressEventDecorator(
|
|
13888
|
+
contentLength,
|
|
13889
|
+
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
13890
|
+
)
|
|
13891
|
+
));
|
|
13428
13892
|
}
|
|
13429
13893
|
let auth = void 0;
|
|
13430
13894
|
if (config.auth) {
|
|
@@ -13464,13 +13928,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13464
13928
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
13465
13929
|
auth,
|
|
13466
13930
|
protocol,
|
|
13931
|
+
family,
|
|
13467
13932
|
beforeRedirect: dispatchBeforeRedirect,
|
|
13468
13933
|
beforeRedirects: {}
|
|
13469
13934
|
};
|
|
13935
|
+
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
13470
13936
|
if (config.socketPath) {
|
|
13471
13937
|
options.socketPath = config.socketPath;
|
|
13472
13938
|
} else {
|
|
13473
|
-
options.hostname = parsed.hostname;
|
|
13939
|
+
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
13474
13940
|
options.port = parsed.port;
|
|
13475
13941
|
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
13476
13942
|
}
|
|
@@ -13503,16 +13969,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13503
13969
|
return;
|
|
13504
13970
|
const streams = [res];
|
|
13505
13971
|
const responseLength = +res.headers["content-length"];
|
|
13506
|
-
if (onDownloadProgress) {
|
|
13972
|
+
if (onDownloadProgress || maxDownloadRate) {
|
|
13507
13973
|
const transformStream = new AxiosTransformStream_default({
|
|
13508
|
-
length: utils_default.toFiniteNumber(responseLength),
|
|
13509
13974
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
13510
13975
|
});
|
|
13511
|
-
onDownloadProgress && transformStream.on("progress", (
|
|
13512
|
-
|
|
13513
|
-
|
|
13514
|
-
|
|
13515
|
-
|
|
13976
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(
|
|
13977
|
+
transformStream,
|
|
13978
|
+
progressEventDecorator(
|
|
13979
|
+
responseLength,
|
|
13980
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
13981
|
+
)
|
|
13982
|
+
));
|
|
13516
13983
|
streams.push(transformStream);
|
|
13517
13984
|
}
|
|
13518
13985
|
let responseStream = res;
|
|
@@ -13521,22 +13988,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13521
13988
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
13522
13989
|
delete res.headers["content-encoding"];
|
|
13523
13990
|
}
|
|
13524
|
-
switch (res.headers["content-encoding"]) {
|
|
13991
|
+
switch ((res.headers["content-encoding"] || "").toLowerCase()) {
|
|
13525
13992
|
case "gzip":
|
|
13993
|
+
case "x-gzip":
|
|
13526
13994
|
case "compress":
|
|
13995
|
+
case "x-compress":
|
|
13996
|
+
streams.push(import_zlib.default.createUnzip(zlibOptions));
|
|
13997
|
+
delete res.headers["content-encoding"];
|
|
13998
|
+
break;
|
|
13527
13999
|
case "deflate":
|
|
14000
|
+
streams.push(new ZlibHeaderTransformStream_default());
|
|
13528
14001
|
streams.push(import_zlib.default.createUnzip(zlibOptions));
|
|
13529
14002
|
delete res.headers["content-encoding"];
|
|
13530
14003
|
break;
|
|
13531
14004
|
case "br":
|
|
13532
14005
|
if (isBrotliSupported) {
|
|
13533
|
-
streams.push(import_zlib.default.createBrotliDecompress(
|
|
14006
|
+
streams.push(import_zlib.default.createBrotliDecompress(brotliOptions));
|
|
13534
14007
|
delete res.headers["content-encoding"];
|
|
13535
14008
|
}
|
|
13536
14009
|
}
|
|
13537
14010
|
}
|
|
13538
|
-
responseStream = streams.length > 1 ?
|
|
13539
|
-
const offListeners =
|
|
14011
|
+
responseStream = streams.length > 1 ? import_stream4.default.pipeline(streams, utils_default.noop) : streams[0];
|
|
14012
|
+
const offListeners = import_stream4.default.finished(responseStream, () => {
|
|
13540
14013
|
offListeners();
|
|
13541
14014
|
onFinished();
|
|
13542
14015
|
});
|
|
@@ -13572,7 +14045,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13572
14045
|
return;
|
|
13573
14046
|
}
|
|
13574
14047
|
const err = new AxiosError_default(
|
|
13575
|
-
"
|
|
14048
|
+
"stream has been aborted",
|
|
13576
14049
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
13577
14050
|
config,
|
|
13578
14051
|
lastRequest
|
|
@@ -13596,7 +14069,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13596
14069
|
}
|
|
13597
14070
|
response.data = responseData;
|
|
13598
14071
|
} catch (err) {
|
|
13599
|
-
reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
14072
|
+
return reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
13600
14073
|
}
|
|
13601
14074
|
settle(resolve, reject, response);
|
|
13602
14075
|
});
|
|
@@ -13620,7 +14093,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13620
14093
|
});
|
|
13621
14094
|
if (config.timeout) {
|
|
13622
14095
|
const timeout = parseInt(config.timeout, 10);
|
|
13623
|
-
if (isNaN(timeout)) {
|
|
14096
|
+
if (Number.isNaN(timeout)) {
|
|
13624
14097
|
reject(new AxiosError_default(
|
|
13625
14098
|
"error trying to parse `config.timeout` to int",
|
|
13626
14099
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
@@ -13668,144 +14141,181 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
13668
14141
|
});
|
|
13669
14142
|
};
|
|
13670
14143
|
|
|
13671
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13672
|
-
var
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
|
|
13677
|
-
|
|
13678
|
-
|
|
13679
|
-
if (utils_default.isNumber(expires)) {
|
|
13680
|
-
cookie.push("expires=" + new Date(expires).toGMTString());
|
|
13681
|
-
}
|
|
13682
|
-
if (utils_default.isString(path)) {
|
|
13683
|
-
cookie.push("path=" + path);
|
|
13684
|
-
}
|
|
13685
|
-
if (utils_default.isString(domain)) {
|
|
13686
|
-
cookie.push("domain=" + domain);
|
|
13687
|
-
}
|
|
13688
|
-
if (secure === true) {
|
|
13689
|
-
cookie.push("secure");
|
|
13690
|
-
}
|
|
13691
|
-
document.cookie = cookie.join("; ");
|
|
13692
|
-
},
|
|
13693
|
-
read: function read(name) {
|
|
13694
|
-
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
13695
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
13696
|
-
},
|
|
13697
|
-
remove: function remove(name) {
|
|
13698
|
-
this.write(name, "", Date.now() - 864e5);
|
|
13699
|
-
}
|
|
13700
|
-
};
|
|
13701
|
-
}()
|
|
13702
|
-
) : (
|
|
13703
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
13704
|
-
function nonStandardBrowserEnv() {
|
|
13705
|
-
return {
|
|
13706
|
-
write: function write() {
|
|
13707
|
-
},
|
|
13708
|
-
read: function read() {
|
|
13709
|
-
return null;
|
|
13710
|
-
},
|
|
13711
|
-
remove: function remove() {
|
|
13712
|
-
}
|
|
13713
|
-
};
|
|
13714
|
-
}()
|
|
13715
|
-
);
|
|
14144
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
14145
|
+
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url2) => {
|
|
14146
|
+
url2 = new URL(url2, platform_default.origin);
|
|
14147
|
+
return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
|
|
14148
|
+
})(
|
|
14149
|
+
new URL(platform_default.origin),
|
|
14150
|
+
platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
|
|
14151
|
+
) : () => true;
|
|
13716
14152
|
|
|
13717
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13718
|
-
var
|
|
13719
|
-
// Standard browser envs
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
host: urlParsingNode.host,
|
|
13736
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
13737
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
13738
|
-
hostname: urlParsingNode.hostname,
|
|
13739
|
-
port: urlParsingNode.port,
|
|
13740
|
-
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
13741
|
-
};
|
|
14153
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/cookies.js
|
|
14154
|
+
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
14155
|
+
// Standard browser envs support document.cookie
|
|
14156
|
+
{
|
|
14157
|
+
write(name, value, expires, path, domain, secure) {
|
|
14158
|
+
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
14159
|
+
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
14160
|
+
utils_default.isString(path) && cookie.push("path=" + path);
|
|
14161
|
+
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
|
14162
|
+
secure === true && cookie.push("secure");
|
|
14163
|
+
document.cookie = cookie.join("; ");
|
|
14164
|
+
},
|
|
14165
|
+
read(name) {
|
|
14166
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
14167
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
14168
|
+
},
|
|
14169
|
+
remove(name) {
|
|
14170
|
+
this.write(name, "", Date.now() - 864e5);
|
|
13742
14171
|
}
|
|
13743
|
-
|
|
13744
|
-
return function isURLSameOrigin(requestURL) {
|
|
13745
|
-
const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
13746
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
13747
|
-
};
|
|
13748
|
-
}()
|
|
14172
|
+
}
|
|
13749
14173
|
) : (
|
|
13750
|
-
// Non
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
14174
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
14175
|
+
{
|
|
14176
|
+
write() {
|
|
14177
|
+
},
|
|
14178
|
+
read() {
|
|
14179
|
+
return null;
|
|
14180
|
+
},
|
|
14181
|
+
remove() {
|
|
14182
|
+
}
|
|
14183
|
+
}
|
|
13756
14184
|
);
|
|
13757
14185
|
|
|
13758
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
14186
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/mergeConfig.js
|
|
14187
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
14188
|
+
function mergeConfig(config1, config2) {
|
|
14189
|
+
config2 = config2 || {};
|
|
14190
|
+
const config = {};
|
|
14191
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
14192
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
14193
|
+
return utils_default.merge.call({ caseless }, target, source);
|
|
14194
|
+
} else if (utils_default.isPlainObject(source)) {
|
|
14195
|
+
return utils_default.merge({}, source);
|
|
14196
|
+
} else if (utils_default.isArray(source)) {
|
|
14197
|
+
return source.slice();
|
|
14198
|
+
}
|
|
14199
|
+
return source;
|
|
14200
|
+
}
|
|
14201
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
14202
|
+
if (!utils_default.isUndefined(b)) {
|
|
14203
|
+
return getMergedValue(a, b, prop, caseless);
|
|
14204
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
14205
|
+
return getMergedValue(void 0, a, prop, caseless);
|
|
14206
|
+
}
|
|
14207
|
+
}
|
|
14208
|
+
function valueFromConfig2(a, b) {
|
|
14209
|
+
if (!utils_default.isUndefined(b)) {
|
|
14210
|
+
return getMergedValue(void 0, b);
|
|
14211
|
+
}
|
|
14212
|
+
}
|
|
14213
|
+
function defaultToConfig2(a, b) {
|
|
14214
|
+
if (!utils_default.isUndefined(b)) {
|
|
14215
|
+
return getMergedValue(void 0, b);
|
|
14216
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
14217
|
+
return getMergedValue(void 0, a);
|
|
14218
|
+
}
|
|
14219
|
+
}
|
|
14220
|
+
function mergeDirectKeys(a, b, prop) {
|
|
14221
|
+
if (prop in config2) {
|
|
14222
|
+
return getMergedValue(a, b);
|
|
14223
|
+
} else if (prop in config1) {
|
|
14224
|
+
return getMergedValue(void 0, a);
|
|
14225
|
+
}
|
|
14226
|
+
}
|
|
14227
|
+
const mergeMap = {
|
|
14228
|
+
url: valueFromConfig2,
|
|
14229
|
+
method: valueFromConfig2,
|
|
14230
|
+
data: valueFromConfig2,
|
|
14231
|
+
baseURL: defaultToConfig2,
|
|
14232
|
+
transformRequest: defaultToConfig2,
|
|
14233
|
+
transformResponse: defaultToConfig2,
|
|
14234
|
+
paramsSerializer: defaultToConfig2,
|
|
14235
|
+
timeout: defaultToConfig2,
|
|
14236
|
+
timeoutMessage: defaultToConfig2,
|
|
14237
|
+
withCredentials: defaultToConfig2,
|
|
14238
|
+
withXSRFToken: defaultToConfig2,
|
|
14239
|
+
adapter: defaultToConfig2,
|
|
14240
|
+
responseType: defaultToConfig2,
|
|
14241
|
+
xsrfCookieName: defaultToConfig2,
|
|
14242
|
+
xsrfHeaderName: defaultToConfig2,
|
|
14243
|
+
onUploadProgress: defaultToConfig2,
|
|
14244
|
+
onDownloadProgress: defaultToConfig2,
|
|
14245
|
+
decompress: defaultToConfig2,
|
|
14246
|
+
maxContentLength: defaultToConfig2,
|
|
14247
|
+
maxBodyLength: defaultToConfig2,
|
|
14248
|
+
beforeRedirect: defaultToConfig2,
|
|
14249
|
+
transport: defaultToConfig2,
|
|
14250
|
+
httpAgent: defaultToConfig2,
|
|
14251
|
+
httpsAgent: defaultToConfig2,
|
|
14252
|
+
cancelToken: defaultToConfig2,
|
|
14253
|
+
socketPath: defaultToConfig2,
|
|
14254
|
+
responseEncoding: defaultToConfig2,
|
|
14255
|
+
validateStatus: mergeDirectKeys,
|
|
14256
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
13780
14257
|
};
|
|
14258
|
+
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
14259
|
+
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
14260
|
+
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
14261
|
+
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
14262
|
+
});
|
|
14263
|
+
return config;
|
|
13781
14264
|
}
|
|
14265
|
+
|
|
14266
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/resolveConfig.js
|
|
14267
|
+
var resolveConfig_default = (config) => {
|
|
14268
|
+
const newConfig = mergeConfig({}, config);
|
|
14269
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
14270
|
+
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
14271
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
14272
|
+
if (auth) {
|
|
14273
|
+
headers.set(
|
|
14274
|
+
"Authorization",
|
|
14275
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
14276
|
+
);
|
|
14277
|
+
}
|
|
14278
|
+
let contentType;
|
|
14279
|
+
if (utils_default.isFormData(data)) {
|
|
14280
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
|
14281
|
+
headers.setContentType(void 0);
|
|
14282
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
|
14283
|
+
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
14284
|
+
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
14285
|
+
}
|
|
14286
|
+
}
|
|
14287
|
+
if (platform_default.hasStandardBrowserEnv) {
|
|
14288
|
+
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
14289
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
|
14290
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
14291
|
+
if (xsrfValue) {
|
|
14292
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
|
14293
|
+
}
|
|
14294
|
+
}
|
|
14295
|
+
}
|
|
14296
|
+
return newConfig;
|
|
14297
|
+
};
|
|
14298
|
+
|
|
14299
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/xhr.js
|
|
13782
14300
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
13783
14301
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
13784
14302
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
const
|
|
14303
|
+
const _config = resolveConfig_default(config);
|
|
14304
|
+
let requestData = _config.data;
|
|
14305
|
+
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
14306
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
13788
14307
|
let onCanceled;
|
|
14308
|
+
let uploadThrottled, downloadThrottled;
|
|
14309
|
+
let flushUpload, flushDownload;
|
|
13789
14310
|
function done() {
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
config.signal.removeEventListener("abort", onCanceled);
|
|
13795
|
-
}
|
|
13796
|
-
}
|
|
13797
|
-
if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) {
|
|
13798
|
-
requestHeaders.setContentType(false);
|
|
14311
|
+
flushUpload && flushUpload();
|
|
14312
|
+
flushDownload && flushDownload();
|
|
14313
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
14314
|
+
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
13799
14315
|
}
|
|
13800
14316
|
let request = new XMLHttpRequest();
|
|
13801
|
-
|
|
13802
|
-
|
|
13803
|
-
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
13804
|
-
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
|
13805
|
-
}
|
|
13806
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
13807
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
13808
|
-
request.timeout = config.timeout;
|
|
14317
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
14318
|
+
request.timeout = _config.timeout;
|
|
13809
14319
|
function onloadend() {
|
|
13810
14320
|
if (!request) {
|
|
13811
14321
|
return;
|
|
@@ -13856,10 +14366,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
13856
14366
|
request = null;
|
|
13857
14367
|
};
|
|
13858
14368
|
request.ontimeout = function handleTimeout() {
|
|
13859
|
-
let timeoutErrorMessage =
|
|
13860
|
-
const transitional2 =
|
|
13861
|
-
if (
|
|
13862
|
-
timeoutErrorMessage =
|
|
14369
|
+
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
14370
|
+
const transitional2 = _config.transitional || transitional_default;
|
|
14371
|
+
if (_config.timeoutErrorMessage) {
|
|
14372
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
13863
14373
|
}
|
|
13864
14374
|
reject(new AxiosError_default(
|
|
13865
14375
|
timeoutErrorMessage,
|
|
@@ -13869,31 +14379,28 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
13869
14379
|
));
|
|
13870
14380
|
request = null;
|
|
13871
14381
|
};
|
|
13872
|
-
if (node_default.isStandardBrowserEnv) {
|
|
13873
|
-
const xsrfValue = (config.withCredentials || isURLSameOrigin_default(fullPath)) && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
|
|
13874
|
-
if (xsrfValue) {
|
|
13875
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
13876
|
-
}
|
|
13877
|
-
}
|
|
13878
14382
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
13879
14383
|
if ("setRequestHeader" in request) {
|
|
13880
14384
|
utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
13881
14385
|
request.setRequestHeader(key, val);
|
|
13882
14386
|
});
|
|
13883
14387
|
}
|
|
13884
|
-
if (!utils_default.isUndefined(
|
|
13885
|
-
request.withCredentials = !!
|
|
14388
|
+
if (!utils_default.isUndefined(_config.withCredentials)) {
|
|
14389
|
+
request.withCredentials = !!_config.withCredentials;
|
|
13886
14390
|
}
|
|
13887
14391
|
if (responseType && responseType !== "json") {
|
|
13888
|
-
request.responseType =
|
|
14392
|
+
request.responseType = _config.responseType;
|
|
13889
14393
|
}
|
|
13890
|
-
if (
|
|
13891
|
-
|
|
14394
|
+
if (onDownloadProgress) {
|
|
14395
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
14396
|
+
request.addEventListener("progress", downloadThrottled);
|
|
13892
14397
|
}
|
|
13893
|
-
if (
|
|
13894
|
-
|
|
14398
|
+
if (onUploadProgress && request.upload) {
|
|
14399
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
14400
|
+
request.upload.addEventListener("progress", uploadThrottled);
|
|
14401
|
+
request.upload.addEventListener("loadend", flushUpload);
|
|
13895
14402
|
}
|
|
13896
|
-
if (
|
|
14403
|
+
if (_config.cancelToken || _config.signal) {
|
|
13897
14404
|
onCanceled = (cancel) => {
|
|
13898
14405
|
if (!request) {
|
|
13899
14406
|
return;
|
|
@@ -13902,13 +14409,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
13902
14409
|
request.abort();
|
|
13903
14410
|
request = null;
|
|
13904
14411
|
};
|
|
13905
|
-
|
|
13906
|
-
if (
|
|
13907
|
-
|
|
14412
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
14413
|
+
if (_config.signal) {
|
|
14414
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
13908
14415
|
}
|
|
13909
14416
|
}
|
|
13910
|
-
const protocol = parseProtocol(
|
|
13911
|
-
if (protocol &&
|
|
14417
|
+
const protocol = parseProtocol(_config.url);
|
|
14418
|
+
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
13912
14419
|
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
13913
14420
|
return;
|
|
13914
14421
|
}
|
|
@@ -13916,10 +14423,288 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
13916
14423
|
});
|
|
13917
14424
|
};
|
|
13918
14425
|
|
|
13919
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14426
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/composeSignals.js
|
|
14427
|
+
var composeSignals = (signals, timeout) => {
|
|
14428
|
+
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
14429
|
+
if (timeout || length) {
|
|
14430
|
+
let controller = new AbortController();
|
|
14431
|
+
let aborted;
|
|
14432
|
+
const onabort = function(reason) {
|
|
14433
|
+
if (!aborted) {
|
|
14434
|
+
aborted = true;
|
|
14435
|
+
unsubscribe();
|
|
14436
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
14437
|
+
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
|
14438
|
+
}
|
|
14439
|
+
};
|
|
14440
|
+
let timer = timeout && setTimeout(() => {
|
|
14441
|
+
timer = null;
|
|
14442
|
+
onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
14443
|
+
}, timeout);
|
|
14444
|
+
const unsubscribe = () => {
|
|
14445
|
+
if (signals) {
|
|
14446
|
+
timer && clearTimeout(timer);
|
|
14447
|
+
timer = null;
|
|
14448
|
+
signals.forEach((signal2) => {
|
|
14449
|
+
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
14450
|
+
});
|
|
14451
|
+
signals = null;
|
|
14452
|
+
}
|
|
14453
|
+
};
|
|
14454
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
14455
|
+
const { signal } = controller;
|
|
14456
|
+
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
14457
|
+
return signal;
|
|
14458
|
+
}
|
|
14459
|
+
};
|
|
14460
|
+
var composeSignals_default = composeSignals;
|
|
14461
|
+
|
|
14462
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/trackStream.js
|
|
14463
|
+
var streamChunk = function* (chunk, chunkSize) {
|
|
14464
|
+
let len = chunk.byteLength;
|
|
14465
|
+
if (!chunkSize || len < chunkSize) {
|
|
14466
|
+
yield chunk;
|
|
14467
|
+
return;
|
|
14468
|
+
}
|
|
14469
|
+
let pos = 0;
|
|
14470
|
+
let end;
|
|
14471
|
+
while (pos < len) {
|
|
14472
|
+
end = pos + chunkSize;
|
|
14473
|
+
yield chunk.slice(pos, end);
|
|
14474
|
+
pos = end;
|
|
14475
|
+
}
|
|
14476
|
+
};
|
|
14477
|
+
var readBytes = async function* (iterable, chunkSize) {
|
|
14478
|
+
for await (const chunk of readStream(iterable)) {
|
|
14479
|
+
yield* streamChunk(chunk, chunkSize);
|
|
14480
|
+
}
|
|
14481
|
+
};
|
|
14482
|
+
var readStream = async function* (stream4) {
|
|
14483
|
+
if (stream4[Symbol.asyncIterator]) {
|
|
14484
|
+
yield* stream4;
|
|
14485
|
+
return;
|
|
14486
|
+
}
|
|
14487
|
+
const reader = stream4.getReader();
|
|
14488
|
+
try {
|
|
14489
|
+
for (; ; ) {
|
|
14490
|
+
const { done, value } = await reader.read();
|
|
14491
|
+
if (done) {
|
|
14492
|
+
break;
|
|
14493
|
+
}
|
|
14494
|
+
yield value;
|
|
14495
|
+
}
|
|
14496
|
+
} finally {
|
|
14497
|
+
await reader.cancel();
|
|
14498
|
+
}
|
|
14499
|
+
};
|
|
14500
|
+
var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
14501
|
+
const iterator3 = readBytes(stream4, chunkSize);
|
|
14502
|
+
let bytes = 0;
|
|
14503
|
+
let done;
|
|
14504
|
+
let _onFinish = (e) => {
|
|
14505
|
+
if (!done) {
|
|
14506
|
+
done = true;
|
|
14507
|
+
onFinish && onFinish(e);
|
|
14508
|
+
}
|
|
14509
|
+
};
|
|
14510
|
+
return new ReadableStream({
|
|
14511
|
+
async pull(controller) {
|
|
14512
|
+
try {
|
|
14513
|
+
const { done: done2, value } = await iterator3.next();
|
|
14514
|
+
if (done2) {
|
|
14515
|
+
_onFinish();
|
|
14516
|
+
controller.close();
|
|
14517
|
+
return;
|
|
14518
|
+
}
|
|
14519
|
+
let len = value.byteLength;
|
|
14520
|
+
if (onProgress) {
|
|
14521
|
+
let loadedBytes = bytes += len;
|
|
14522
|
+
onProgress(loadedBytes);
|
|
14523
|
+
}
|
|
14524
|
+
controller.enqueue(new Uint8Array(value));
|
|
14525
|
+
} catch (err) {
|
|
14526
|
+
_onFinish(err);
|
|
14527
|
+
throw err;
|
|
14528
|
+
}
|
|
14529
|
+
},
|
|
14530
|
+
cancel(reason) {
|
|
14531
|
+
_onFinish(reason);
|
|
14532
|
+
return iterator3.return();
|
|
14533
|
+
}
|
|
14534
|
+
}, {
|
|
14535
|
+
highWaterMark: 2
|
|
14536
|
+
});
|
|
14537
|
+
};
|
|
14538
|
+
|
|
14539
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/fetch.js
|
|
14540
|
+
var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
14541
|
+
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
14542
|
+
var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
14543
|
+
var test = (fn, ...args) => {
|
|
14544
|
+
try {
|
|
14545
|
+
return !!fn(...args);
|
|
14546
|
+
} catch (e) {
|
|
14547
|
+
return false;
|
|
14548
|
+
}
|
|
14549
|
+
};
|
|
14550
|
+
var supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
14551
|
+
let duplexAccessed = false;
|
|
14552
|
+
const hasContentType = new Request(platform_default.origin, {
|
|
14553
|
+
body: new ReadableStream(),
|
|
14554
|
+
method: "POST",
|
|
14555
|
+
get duplex() {
|
|
14556
|
+
duplexAccessed = true;
|
|
14557
|
+
return "half";
|
|
14558
|
+
}
|
|
14559
|
+
}).headers.has("Content-Type");
|
|
14560
|
+
return duplexAccessed && !hasContentType;
|
|
14561
|
+
});
|
|
14562
|
+
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
14563
|
+
var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
14564
|
+
var resolvers = {
|
|
14565
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
14566
|
+
};
|
|
14567
|
+
isFetchSupported && ((res) => {
|
|
14568
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
14569
|
+
!resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
14570
|
+
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
|
|
14571
|
+
});
|
|
14572
|
+
});
|
|
14573
|
+
})(new Response());
|
|
14574
|
+
var getBodyLength = async (body) => {
|
|
14575
|
+
if (body == null) {
|
|
14576
|
+
return 0;
|
|
14577
|
+
}
|
|
14578
|
+
if (utils_default.isBlob(body)) {
|
|
14579
|
+
return body.size;
|
|
14580
|
+
}
|
|
14581
|
+
if (utils_default.isSpecCompliantForm(body)) {
|
|
14582
|
+
const _request = new Request(platform_default.origin, {
|
|
14583
|
+
method: "POST",
|
|
14584
|
+
body
|
|
14585
|
+
});
|
|
14586
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
14587
|
+
}
|
|
14588
|
+
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
|
14589
|
+
return body.byteLength;
|
|
14590
|
+
}
|
|
14591
|
+
if (utils_default.isURLSearchParams(body)) {
|
|
14592
|
+
body = body + "";
|
|
14593
|
+
}
|
|
14594
|
+
if (utils_default.isString(body)) {
|
|
14595
|
+
return (await encodeText(body)).byteLength;
|
|
14596
|
+
}
|
|
14597
|
+
};
|
|
14598
|
+
var resolveBodyLength = async (headers, body) => {
|
|
14599
|
+
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
|
14600
|
+
return length == null ? getBodyLength(body) : length;
|
|
14601
|
+
};
|
|
14602
|
+
var fetch_default = isFetchSupported && (async (config) => {
|
|
14603
|
+
let {
|
|
14604
|
+
url: url2,
|
|
14605
|
+
method,
|
|
14606
|
+
data,
|
|
14607
|
+
signal,
|
|
14608
|
+
cancelToken,
|
|
14609
|
+
timeout,
|
|
14610
|
+
onDownloadProgress,
|
|
14611
|
+
onUploadProgress,
|
|
14612
|
+
responseType,
|
|
14613
|
+
headers,
|
|
14614
|
+
withCredentials = "same-origin",
|
|
14615
|
+
fetchOptions
|
|
14616
|
+
} = resolveConfig_default(config);
|
|
14617
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
14618
|
+
let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
14619
|
+
let request;
|
|
14620
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
14621
|
+
composedSignal.unsubscribe();
|
|
14622
|
+
});
|
|
14623
|
+
let requestContentLength;
|
|
14624
|
+
try {
|
|
14625
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
14626
|
+
let _request = new Request(url2, {
|
|
14627
|
+
method: "POST",
|
|
14628
|
+
body: data,
|
|
14629
|
+
duplex: "half"
|
|
14630
|
+
});
|
|
14631
|
+
let contentTypeHeader;
|
|
14632
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
14633
|
+
headers.setContentType(contentTypeHeader);
|
|
14634
|
+
}
|
|
14635
|
+
if (_request.body) {
|
|
14636
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
14637
|
+
requestContentLength,
|
|
14638
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
14639
|
+
);
|
|
14640
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
14641
|
+
}
|
|
14642
|
+
}
|
|
14643
|
+
if (!utils_default.isString(withCredentials)) {
|
|
14644
|
+
withCredentials = withCredentials ? "include" : "omit";
|
|
14645
|
+
}
|
|
14646
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
14647
|
+
request = new Request(url2, {
|
|
14648
|
+
...fetchOptions,
|
|
14649
|
+
signal: composedSignal,
|
|
14650
|
+
method: method.toUpperCase(),
|
|
14651
|
+
headers: headers.normalize().toJSON(),
|
|
14652
|
+
body: data,
|
|
14653
|
+
duplex: "half",
|
|
14654
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
14655
|
+
});
|
|
14656
|
+
let response = await fetch(request);
|
|
14657
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
14658
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
14659
|
+
const options = {};
|
|
14660
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
|
14661
|
+
options[prop] = response[prop];
|
|
14662
|
+
});
|
|
14663
|
+
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
|
14664
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
14665
|
+
responseContentLength,
|
|
14666
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
14667
|
+
) || [];
|
|
14668
|
+
response = new Response(
|
|
14669
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
14670
|
+
flush && flush();
|
|
14671
|
+
unsubscribe && unsubscribe();
|
|
14672
|
+
}),
|
|
14673
|
+
options
|
|
14674
|
+
);
|
|
14675
|
+
}
|
|
14676
|
+
responseType = responseType || "text";
|
|
14677
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
|
|
14678
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
14679
|
+
return await new Promise((resolve, reject) => {
|
|
14680
|
+
settle(resolve, reject, {
|
|
14681
|
+
data: responseData,
|
|
14682
|
+
headers: AxiosHeaders_default.from(response.headers),
|
|
14683
|
+
status: response.status,
|
|
14684
|
+
statusText: response.statusText,
|
|
14685
|
+
config,
|
|
14686
|
+
request
|
|
14687
|
+
});
|
|
14688
|
+
});
|
|
14689
|
+
} catch (err) {
|
|
14690
|
+
unsubscribe && unsubscribe();
|
|
14691
|
+
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
14692
|
+
throw Object.assign(
|
|
14693
|
+
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
|
|
14694
|
+
{
|
|
14695
|
+
cause: err.cause || err
|
|
14696
|
+
}
|
|
14697
|
+
);
|
|
14698
|
+
}
|
|
14699
|
+
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
14700
|
+
}
|
|
14701
|
+
});
|
|
14702
|
+
|
|
14703
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/adapters.js
|
|
13920
14704
|
var knownAdapters = {
|
|
13921
14705
|
http: http_default,
|
|
13922
|
-
xhr: xhr_default
|
|
14706
|
+
xhr: xhr_default,
|
|
14707
|
+
fetch: fetch_default
|
|
13923
14708
|
};
|
|
13924
14709
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
|
13925
14710
|
if (fn) {
|
|
@@ -13930,38 +14715,46 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
13930
14715
|
Object.defineProperty(fn, "adapterName", { value });
|
|
13931
14716
|
}
|
|
13932
14717
|
});
|
|
14718
|
+
var renderReason = (reason) => `- ${reason}`;
|
|
14719
|
+
var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
|
|
13933
14720
|
var adapters_default = {
|
|
13934
14721
|
getAdapter: (adapters) => {
|
|
13935
14722
|
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
13936
14723
|
const { length } = adapters;
|
|
13937
14724
|
let nameOrAdapter;
|
|
13938
14725
|
let adapter;
|
|
14726
|
+
const rejectedReasons = {};
|
|
13939
14727
|
for (let i = 0; i < length; i++) {
|
|
13940
14728
|
nameOrAdapter = adapters[i];
|
|
13941
|
-
|
|
14729
|
+
let id;
|
|
14730
|
+
adapter = nameOrAdapter;
|
|
14731
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
14732
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
14733
|
+
if (adapter === void 0) {
|
|
14734
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
14735
|
+
}
|
|
14736
|
+
}
|
|
14737
|
+
if (adapter) {
|
|
13942
14738
|
break;
|
|
13943
14739
|
}
|
|
14740
|
+
rejectedReasons[id || "#" + i] = adapter;
|
|
13944
14741
|
}
|
|
13945
14742
|
if (!adapter) {
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
13949
|
-
|
|
13950
|
-
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
utils_default.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'`
|
|
14743
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
14744
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
14745
|
+
);
|
|
14746
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
14747
|
+
throw new AxiosError_default(
|
|
14748
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
14749
|
+
"ERR_NOT_SUPPORT"
|
|
13954
14750
|
);
|
|
13955
|
-
}
|
|
13956
|
-
if (!utils_default.isFunction(adapter)) {
|
|
13957
|
-
throw new TypeError("adapter is not a function");
|
|
13958
14751
|
}
|
|
13959
14752
|
return adapter;
|
|
13960
14753
|
},
|
|
13961
14754
|
adapters: knownAdapters
|
|
13962
14755
|
};
|
|
13963
14756
|
|
|
13964
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14757
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/dispatchRequest.js
|
|
13965
14758
|
function throwIfCancellationRequested(config) {
|
|
13966
14759
|
if (config.cancelToken) {
|
|
13967
14760
|
config.cancelToken.throwIfRequested();
|
|
@@ -14006,86 +14799,7 @@ function dispatchRequest(config) {
|
|
|
14006
14799
|
});
|
|
14007
14800
|
}
|
|
14008
14801
|
|
|
14009
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14010
|
-
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
|
|
14011
|
-
function mergeConfig(config1, config2) {
|
|
14012
|
-
config2 = config2 || {};
|
|
14013
|
-
const config = {};
|
|
14014
|
-
function getMergedValue(target, source, caseless) {
|
|
14015
|
-
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
14016
|
-
return utils_default.merge.call({ caseless }, target, source);
|
|
14017
|
-
} else if (utils_default.isPlainObject(source)) {
|
|
14018
|
-
return utils_default.merge({}, source);
|
|
14019
|
-
} else if (utils_default.isArray(source)) {
|
|
14020
|
-
return source.slice();
|
|
14021
|
-
}
|
|
14022
|
-
return source;
|
|
14023
|
-
}
|
|
14024
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
14025
|
-
if (!utils_default.isUndefined(b)) {
|
|
14026
|
-
return getMergedValue(a, b, caseless);
|
|
14027
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
14028
|
-
return getMergedValue(void 0, a, caseless);
|
|
14029
|
-
}
|
|
14030
|
-
}
|
|
14031
|
-
function valueFromConfig2(a, b) {
|
|
14032
|
-
if (!utils_default.isUndefined(b)) {
|
|
14033
|
-
return getMergedValue(void 0, b);
|
|
14034
|
-
}
|
|
14035
|
-
}
|
|
14036
|
-
function defaultToConfig2(a, b) {
|
|
14037
|
-
if (!utils_default.isUndefined(b)) {
|
|
14038
|
-
return getMergedValue(void 0, b);
|
|
14039
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
14040
|
-
return getMergedValue(void 0, a);
|
|
14041
|
-
}
|
|
14042
|
-
}
|
|
14043
|
-
function mergeDirectKeys(a, b, prop) {
|
|
14044
|
-
if (prop in config2) {
|
|
14045
|
-
return getMergedValue(a, b);
|
|
14046
|
-
} else if (prop in config1) {
|
|
14047
|
-
return getMergedValue(void 0, a);
|
|
14048
|
-
}
|
|
14049
|
-
}
|
|
14050
|
-
const mergeMap = {
|
|
14051
|
-
url: valueFromConfig2,
|
|
14052
|
-
method: valueFromConfig2,
|
|
14053
|
-
data: valueFromConfig2,
|
|
14054
|
-
baseURL: defaultToConfig2,
|
|
14055
|
-
transformRequest: defaultToConfig2,
|
|
14056
|
-
transformResponse: defaultToConfig2,
|
|
14057
|
-
paramsSerializer: defaultToConfig2,
|
|
14058
|
-
timeout: defaultToConfig2,
|
|
14059
|
-
timeoutMessage: defaultToConfig2,
|
|
14060
|
-
withCredentials: defaultToConfig2,
|
|
14061
|
-
adapter: defaultToConfig2,
|
|
14062
|
-
responseType: defaultToConfig2,
|
|
14063
|
-
xsrfCookieName: defaultToConfig2,
|
|
14064
|
-
xsrfHeaderName: defaultToConfig2,
|
|
14065
|
-
onUploadProgress: defaultToConfig2,
|
|
14066
|
-
onDownloadProgress: defaultToConfig2,
|
|
14067
|
-
decompress: defaultToConfig2,
|
|
14068
|
-
maxContentLength: defaultToConfig2,
|
|
14069
|
-
maxBodyLength: defaultToConfig2,
|
|
14070
|
-
beforeRedirect: defaultToConfig2,
|
|
14071
|
-
transport: defaultToConfig2,
|
|
14072
|
-
httpAgent: defaultToConfig2,
|
|
14073
|
-
httpsAgent: defaultToConfig2,
|
|
14074
|
-
cancelToken: defaultToConfig2,
|
|
14075
|
-
socketPath: defaultToConfig2,
|
|
14076
|
-
responseEncoding: defaultToConfig2,
|
|
14077
|
-
validateStatus: mergeDirectKeys,
|
|
14078
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
14079
|
-
};
|
|
14080
|
-
utils_default.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
14081
|
-
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
14082
|
-
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
14083
|
-
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
14084
|
-
});
|
|
14085
|
-
return config;
|
|
14086
|
-
}
|
|
14087
|
-
|
|
14088
|
-
// ../../node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/helpers/validator.js
|
|
14802
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/validator.js
|
|
14089
14803
|
var validators = {};
|
|
14090
14804
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
14091
14805
|
validators[type] = function validator(thing) {
|
|
@@ -14116,6 +14830,12 @@ validators.transitional = function transitional(validator, version, message) {
|
|
|
14116
14830
|
return validator ? validator(value, opt, opts) : true;
|
|
14117
14831
|
};
|
|
14118
14832
|
};
|
|
14833
|
+
validators.spelling = function spelling(correctSpelling) {
|
|
14834
|
+
return (value, opt) => {
|
|
14835
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
14836
|
+
return true;
|
|
14837
|
+
};
|
|
14838
|
+
};
|
|
14119
14839
|
function assertOptions(options, schema, allowUnknown) {
|
|
14120
14840
|
if (typeof options !== "object") {
|
|
14121
14841
|
throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
@@ -14143,11 +14863,11 @@ var validator_default = {
|
|
|
14143
14863
|
validators
|
|
14144
14864
|
};
|
|
14145
14865
|
|
|
14146
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14866
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/Axios.js
|
|
14147
14867
|
var validators2 = validator_default.validators;
|
|
14148
14868
|
var Axios = class {
|
|
14149
14869
|
constructor(instanceConfig) {
|
|
14150
|
-
this.defaults = instanceConfig;
|
|
14870
|
+
this.defaults = instanceConfig || {};
|
|
14151
14871
|
this.interceptors = {
|
|
14152
14872
|
request: new InterceptorManager_default(),
|
|
14153
14873
|
response: new InterceptorManager_default()
|
|
@@ -14161,7 +14881,27 @@ var Axios = class {
|
|
|
14161
14881
|
*
|
|
14162
14882
|
* @returns {Promise} The Promise to be fulfilled
|
|
14163
14883
|
*/
|
|
14164
|
-
request(configOrUrl, config) {
|
|
14884
|
+
async request(configOrUrl, config) {
|
|
14885
|
+
try {
|
|
14886
|
+
return await this._request(configOrUrl, config);
|
|
14887
|
+
} catch (err) {
|
|
14888
|
+
if (err instanceof Error) {
|
|
14889
|
+
let dummy = {};
|
|
14890
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
14891
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
14892
|
+
try {
|
|
14893
|
+
if (!err.stack) {
|
|
14894
|
+
err.stack = stack;
|
|
14895
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
|
14896
|
+
err.stack += "\n" + stack;
|
|
14897
|
+
}
|
|
14898
|
+
} catch (e) {
|
|
14899
|
+
}
|
|
14900
|
+
}
|
|
14901
|
+
throw err;
|
|
14902
|
+
}
|
|
14903
|
+
}
|
|
14904
|
+
_request(configOrUrl, config) {
|
|
14165
14905
|
if (typeof configOrUrl === "string") {
|
|
14166
14906
|
config = config || {};
|
|
14167
14907
|
config.url = configOrUrl;
|
|
@@ -14177,19 +14917,34 @@ var Axios = class {
|
|
|
14177
14917
|
clarifyTimeoutError: validators2.transitional(validators2.boolean)
|
|
14178
14918
|
}, false);
|
|
14179
14919
|
}
|
|
14180
|
-
if (paramsSerializer
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14920
|
+
if (paramsSerializer != null) {
|
|
14921
|
+
if (utils_default.isFunction(paramsSerializer)) {
|
|
14922
|
+
config.paramsSerializer = {
|
|
14923
|
+
serialize: paramsSerializer
|
|
14924
|
+
};
|
|
14925
|
+
} else {
|
|
14926
|
+
validator_default.assertOptions(paramsSerializer, {
|
|
14927
|
+
encode: validators2.function,
|
|
14928
|
+
serialize: validators2.function
|
|
14929
|
+
}, true);
|
|
14930
|
+
}
|
|
14931
|
+
}
|
|
14932
|
+
if (config.allowAbsoluteUrls !== void 0) {
|
|
14933
|
+
} else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
14934
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
14935
|
+
} else {
|
|
14936
|
+
config.allowAbsoluteUrls = true;
|
|
14185
14937
|
}
|
|
14938
|
+
validator_default.assertOptions(config, {
|
|
14939
|
+
baseUrl: validators2.spelling("baseURL"),
|
|
14940
|
+
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
14941
|
+
}, true);
|
|
14186
14942
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
14187
|
-
let contextHeaders
|
|
14188
|
-
contextHeaders = headers && utils_default.merge(
|
|
14943
|
+
let contextHeaders = headers && utils_default.merge(
|
|
14189
14944
|
headers.common,
|
|
14190
14945
|
headers[config.method]
|
|
14191
14946
|
);
|
|
14192
|
-
|
|
14947
|
+
headers && utils_default.forEach(
|
|
14193
14948
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
14194
14949
|
(method) => {
|
|
14195
14950
|
delete headers[method];
|
|
@@ -14250,11 +15005,11 @@ var Axios = class {
|
|
|
14250
15005
|
}
|
|
14251
15006
|
getUri(config) {
|
|
14252
15007
|
config = mergeConfig(this.defaults, config);
|
|
14253
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
15008
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
14254
15009
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
14255
15010
|
}
|
|
14256
15011
|
};
|
|
14257
|
-
utils_default.forEach(["delete", "get", "head", "options"], function
|
|
15012
|
+
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
14258
15013
|
Axios.prototype[method] = function(url2, config) {
|
|
14259
15014
|
return this.request(mergeConfig(config || {}, {
|
|
14260
15015
|
method,
|
|
@@ -14263,7 +15018,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
|
|
|
14263
15018
|
}));
|
|
14264
15019
|
};
|
|
14265
15020
|
});
|
|
14266
|
-
utils_default.forEach(["post", "put", "patch"], function
|
|
15021
|
+
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
14267
15022
|
function generateHTTPMethod(isForm) {
|
|
14268
15023
|
return function httpMethod(url2, data, config) {
|
|
14269
15024
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -14281,7 +15036,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(
|
|
|
14281
15036
|
});
|
|
14282
15037
|
var Axios_default = Axios;
|
|
14283
15038
|
|
|
14284
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15039
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/cancel/CancelToken.js
|
|
14285
15040
|
var CancelToken = class _CancelToken {
|
|
14286
15041
|
constructor(executor) {
|
|
14287
15042
|
if (typeof executor !== "function") {
|
|
@@ -14354,6 +15109,15 @@ var CancelToken = class _CancelToken {
|
|
|
14354
15109
|
this._listeners.splice(index, 1);
|
|
14355
15110
|
}
|
|
14356
15111
|
}
|
|
15112
|
+
toAbortSignal() {
|
|
15113
|
+
const controller = new AbortController();
|
|
15114
|
+
const abort = (err) => {
|
|
15115
|
+
controller.abort(err);
|
|
15116
|
+
};
|
|
15117
|
+
this.subscribe(abort);
|
|
15118
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
15119
|
+
return controller.signal;
|
|
15120
|
+
}
|
|
14357
15121
|
/**
|
|
14358
15122
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
14359
15123
|
* cancels the `CancelToken`.
|
|
@@ -14371,19 +15135,90 @@ var CancelToken = class _CancelToken {
|
|
|
14371
15135
|
};
|
|
14372
15136
|
var CancelToken_default = CancelToken;
|
|
14373
15137
|
|
|
14374
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15138
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/spread.js
|
|
14375
15139
|
function spread(callback) {
|
|
14376
15140
|
return function wrap(arr) {
|
|
14377
15141
|
return callback.apply(null, arr);
|
|
14378
15142
|
};
|
|
14379
15143
|
}
|
|
14380
15144
|
|
|
14381
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15145
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
14382
15146
|
function isAxiosError(payload) {
|
|
14383
15147
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
14384
15148
|
}
|
|
14385
15149
|
|
|
14386
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15150
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
15151
|
+
var HttpStatusCode = {
|
|
15152
|
+
Continue: 100,
|
|
15153
|
+
SwitchingProtocols: 101,
|
|
15154
|
+
Processing: 102,
|
|
15155
|
+
EarlyHints: 103,
|
|
15156
|
+
Ok: 200,
|
|
15157
|
+
Created: 201,
|
|
15158
|
+
Accepted: 202,
|
|
15159
|
+
NonAuthoritativeInformation: 203,
|
|
15160
|
+
NoContent: 204,
|
|
15161
|
+
ResetContent: 205,
|
|
15162
|
+
PartialContent: 206,
|
|
15163
|
+
MultiStatus: 207,
|
|
15164
|
+
AlreadyReported: 208,
|
|
15165
|
+
ImUsed: 226,
|
|
15166
|
+
MultipleChoices: 300,
|
|
15167
|
+
MovedPermanently: 301,
|
|
15168
|
+
Found: 302,
|
|
15169
|
+
SeeOther: 303,
|
|
15170
|
+
NotModified: 304,
|
|
15171
|
+
UseProxy: 305,
|
|
15172
|
+
Unused: 306,
|
|
15173
|
+
TemporaryRedirect: 307,
|
|
15174
|
+
PermanentRedirect: 308,
|
|
15175
|
+
BadRequest: 400,
|
|
15176
|
+
Unauthorized: 401,
|
|
15177
|
+
PaymentRequired: 402,
|
|
15178
|
+
Forbidden: 403,
|
|
15179
|
+
NotFound: 404,
|
|
15180
|
+
MethodNotAllowed: 405,
|
|
15181
|
+
NotAcceptable: 406,
|
|
15182
|
+
ProxyAuthenticationRequired: 407,
|
|
15183
|
+
RequestTimeout: 408,
|
|
15184
|
+
Conflict: 409,
|
|
15185
|
+
Gone: 410,
|
|
15186
|
+
LengthRequired: 411,
|
|
15187
|
+
PreconditionFailed: 412,
|
|
15188
|
+
PayloadTooLarge: 413,
|
|
15189
|
+
UriTooLong: 414,
|
|
15190
|
+
UnsupportedMediaType: 415,
|
|
15191
|
+
RangeNotSatisfiable: 416,
|
|
15192
|
+
ExpectationFailed: 417,
|
|
15193
|
+
ImATeapot: 418,
|
|
15194
|
+
MisdirectedRequest: 421,
|
|
15195
|
+
UnprocessableEntity: 422,
|
|
15196
|
+
Locked: 423,
|
|
15197
|
+
FailedDependency: 424,
|
|
15198
|
+
TooEarly: 425,
|
|
15199
|
+
UpgradeRequired: 426,
|
|
15200
|
+
PreconditionRequired: 428,
|
|
15201
|
+
TooManyRequests: 429,
|
|
15202
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
15203
|
+
UnavailableForLegalReasons: 451,
|
|
15204
|
+
InternalServerError: 500,
|
|
15205
|
+
NotImplemented: 501,
|
|
15206
|
+
BadGateway: 502,
|
|
15207
|
+
ServiceUnavailable: 503,
|
|
15208
|
+
GatewayTimeout: 504,
|
|
15209
|
+
HttpVersionNotSupported: 505,
|
|
15210
|
+
VariantAlsoNegotiates: 506,
|
|
15211
|
+
InsufficientStorage: 507,
|
|
15212
|
+
LoopDetected: 508,
|
|
15213
|
+
NotExtended: 510,
|
|
15214
|
+
NetworkAuthenticationRequired: 511
|
|
15215
|
+
};
|
|
15216
|
+
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
15217
|
+
HttpStatusCode[value] = key;
|
|
15218
|
+
});
|
|
15219
|
+
var HttpStatusCode_default = HttpStatusCode;
|
|
15220
|
+
|
|
15221
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/axios.js
|
|
14387
15222
|
function createInstance(defaultConfig) {
|
|
14388
15223
|
const context = new Axios_default(defaultConfig);
|
|
14389
15224
|
const instance = bind(Axios_default.prototype.request, context);
|
|
@@ -14411,10 +15246,12 @@ axios.isAxiosError = isAxiosError;
|
|
|
14411
15246
|
axios.mergeConfig = mergeConfig;
|
|
14412
15247
|
axios.AxiosHeaders = AxiosHeaders_default;
|
|
14413
15248
|
axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
15249
|
+
axios.getAdapter = adapters_default.getAdapter;
|
|
15250
|
+
axios.HttpStatusCode = HttpStatusCode_default;
|
|
14414
15251
|
axios.default = axios;
|
|
14415
15252
|
var axios_default = axios;
|
|
14416
15253
|
|
|
14417
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15254
|
+
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/index.js
|
|
14418
15255
|
var {
|
|
14419
15256
|
Axios: Axios2,
|
|
14420
15257
|
AxiosError: AxiosError2,
|
|
@@ -14428,7 +15265,9 @@ var {
|
|
|
14428
15265
|
spread: spread2,
|
|
14429
15266
|
toFormData: toFormData2,
|
|
14430
15267
|
AxiosHeaders: AxiosHeaders2,
|
|
15268
|
+
HttpStatusCode: HttpStatusCode2,
|
|
14431
15269
|
formToJSON,
|
|
15270
|
+
getAdapter,
|
|
14432
15271
|
mergeConfig: mergeConfig2
|
|
14433
15272
|
} = axios_default;
|
|
14434
15273
|
|
|
@@ -14445,7 +15284,6 @@ var AbstractAuthenticationApi = class {
|
|
|
14445
15284
|
};
|
|
14446
15285
|
|
|
14447
15286
|
// src/api/OAuthApi.ts
|
|
14448
|
-
var import_scp_credentials2 = require("@dstny/scp-credentials");
|
|
14449
15287
|
var OAuthApi = class extends AbstractAuthenticationApi {
|
|
14450
15288
|
clientId;
|
|
14451
15289
|
scope;
|
|
@@ -14472,7 +15310,7 @@ var OAuthApi = class extends AbstractAuthenticationApi {
|
|
|
14472
15310
|
redirect_uri: redirectUri
|
|
14473
15311
|
})
|
|
14474
15312
|
);
|
|
14475
|
-
return new
|
|
15313
|
+
return new Credentials(data.access_token, data.refresh_token, data.expires_in);
|
|
14476
15314
|
}
|
|
14477
15315
|
async loginWithUsernamePassword(username, password) {
|
|
14478
15316
|
const { data } = await this.axiosInstance.post(
|
|
@@ -14484,7 +15322,7 @@ var OAuthApi = class extends AbstractAuthenticationApi {
|
|
|
14484
15322
|
password
|
|
14485
15323
|
})
|
|
14486
15324
|
);
|
|
14487
|
-
return new
|
|
15325
|
+
return new Credentials(data.access_token, data.refresh_token, data.expires_in);
|
|
14488
15326
|
}
|
|
14489
15327
|
async refreshToken(refreshToken, accessToken) {
|
|
14490
15328
|
try {
|
|
@@ -14496,7 +15334,7 @@ var OAuthApi = class extends AbstractAuthenticationApi {
|
|
|
14496
15334
|
refresh_token: refreshToken
|
|
14497
15335
|
})
|
|
14498
15336
|
);
|
|
14499
|
-
return new
|
|
15337
|
+
return new Credentials(
|
|
14500
15338
|
response.data.access_token,
|
|
14501
15339
|
response.data.refresh_token,
|
|
14502
15340
|
response.data.expires_in
|
|
@@ -14523,7 +15361,6 @@ var OAuthApi = class extends AbstractAuthenticationApi {
|
|
|
14523
15361
|
};
|
|
14524
15362
|
|
|
14525
15363
|
// src/api/SmgAuthApi.ts
|
|
14526
|
-
var import_scp_credentials3 = require("@dstny/scp-credentials");
|
|
14527
15364
|
var SmgAuthApi = class extends AbstractAuthenticationApi {
|
|
14528
15365
|
clientId;
|
|
14529
15366
|
realm;
|
|
@@ -14558,7 +15395,7 @@ var SmgAuthApi = class extends AbstractAuthenticationApi {
|
|
|
14558
15395
|
const expires_in = exp - iat;
|
|
14559
15396
|
const expires_at = /* @__PURE__ */ new Date();
|
|
14560
15397
|
expires_at.setSeconds(expires_at.getSeconds() + expires_in);
|
|
14561
|
-
return new
|
|
15398
|
+
return new Credentials(accessToken, refreshToken, expires_in);
|
|
14562
15399
|
}
|
|
14563
15400
|
async refreshToken(refreshToken, accessToken) {
|
|
14564
15401
|
try {
|
|
@@ -14574,7 +15411,7 @@ var SmgAuthApi = class extends AbstractAuthenticationApi {
|
|
|
14574
15411
|
const { refreshToken: newRefreshToken, accessToken: newAccessToken } = data;
|
|
14575
15412
|
const { iat = 0, exp = 0 } = decodeToken(newAccessToken);
|
|
14576
15413
|
const expires_in = exp - iat;
|
|
14577
|
-
return new
|
|
15414
|
+
return new Credentials(newAccessToken, newRefreshToken, expires_in);
|
|
14578
15415
|
} catch (error) {
|
|
14579
15416
|
if (axios_default.isAxiosError(error)) {
|
|
14580
15417
|
if (error.message === "Network Error") {
|