@verdocs/web-sdk 6.1.4 → 6.1.5
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/cjs/verdocs-contact-picker.cjs.entry.js +286 -213
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-contact-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +5 -6
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-status-indicator.entry.cjs.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +2 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/{p-Dt5I6d_s.js → p-6D0qDyV-.js} +7 -8
- package/dist/components/p-6D0qDyV-.js.map +1 -0
- package/dist/components/{p-CSQjgm9n.js → p-CeTLcymJ.js} +288 -215
- package/dist/components/p-CeTLcymJ.js.map +1 -0
- package/dist/components/{p-CSpoYxdI.js → p-DeoKKq-r.js} +3 -3
- package/dist/components/{p-CSpoYxdI.js.map → p-DeoKKq-r.js.map} +1 -1
- package/dist/components/verdocs-build.js +2 -2
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +286 -213
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +5 -6
- package/dist/esm/verdocs-status-indicator.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js.map +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +2 -2
- package/dist/types/components.d.ts +8 -8
- package/dist/verdocs-web-sdk/p-09c1c487.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/p-2514f675.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-2514f675.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-8cf14826.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-8cf14826.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-BR9Rz5QR.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-C5fciylu.system.js.map +1 -1
- package/dist/verdocs-web-sdk/p-PqjR4yYk.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-RlE9Yh59.system.js +1 -1
- package/dist/verdocs-web-sdk/p-f8be4637.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-f8be4637.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-f94dd543.system.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/p-ff46c002.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ff46c002.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-contact-picker.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-status-indicator.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/components/p-CSQjgm9n.js.map +0 -1
- package/dist/components/p-Dt5I6d_s.js.map +0 -1
- package/dist/verdocs-web-sdk/p-21da2b89.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-21da2b89.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-751beab0.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-751beab0.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8835c006.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-8835c006.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Cts9LOkJ.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Dp4d4aXG.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e962f3e2.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-e962f3e2.system.entry.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { d as convertToE164 } from './utils-tbEy96hU.js';
|
|
|
6
6
|
import './index-dzBXqXlK.js';
|
|
7
7
|
import './Types-Dl7Xw8F0.js';
|
|
8
8
|
|
|
9
|
-
/*! Axios v1.
|
|
9
|
+
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
|
|
10
10
|
|
|
11
11
|
var axios_1;
|
|
12
12
|
var hasRequiredAxios;
|
|
@@ -66,7 +66,7 @@ function requireAxios () {
|
|
|
66
66
|
*/
|
|
67
67
|
function isBuffer(val) {
|
|
68
68
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
69
|
-
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
69
|
+
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
@@ -111,7 +111,7 @@ function requireAxios () {
|
|
|
111
111
|
* @param {*} val The value to test
|
|
112
112
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
113
113
|
*/
|
|
114
|
-
const isFunction = typeOfTest('function');
|
|
114
|
+
const isFunction$1 = typeOfTest('function');
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Determine if a value is a Number
|
|
@@ -167,7 +167,7 @@ function requireAxios () {
|
|
|
167
167
|
if (!isObject(val) || isBuffer(val)) {
|
|
168
168
|
return false;
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
|
|
171
171
|
try {
|
|
172
172
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
173
173
|
} catch (e) {
|
|
@@ -219,7 +219,7 @@ function requireAxios () {
|
|
|
219
219
|
*
|
|
220
220
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
221
221
|
*/
|
|
222
|
-
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
222
|
+
const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* Determine if a value is a FormData
|
|
@@ -232,10 +232,10 @@ function requireAxios () {
|
|
|
232
232
|
let kind;
|
|
233
233
|
return thing && (
|
|
234
234
|
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
235
|
-
isFunction(thing.append) && (
|
|
235
|
+
isFunction$1(thing.append) && (
|
|
236
236
|
(kind = kindOf(thing)) === 'formdata' ||
|
|
237
237
|
// detect form-data instance
|
|
238
|
-
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
238
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
|
239
239
|
)
|
|
240
240
|
)
|
|
241
241
|
)
|
|
@@ -360,7 +360,7 @@ function requireAxios () {
|
|
|
360
360
|
* @returns {Object} Result of all merge properties
|
|
361
361
|
*/
|
|
362
362
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
363
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
363
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
364
364
|
const result = {};
|
|
365
365
|
const assignValue = (val, key) => {
|
|
366
366
|
const targetKey = caseless && findKey(result, key) || key;
|
|
@@ -370,7 +370,7 @@ function requireAxios () {
|
|
|
370
370
|
result[targetKey] = merge({}, val);
|
|
371
371
|
} else if (isArray(val)) {
|
|
372
372
|
result[targetKey] = val.slice();
|
|
373
|
-
} else {
|
|
373
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
374
374
|
result[targetKey] = val;
|
|
375
375
|
}
|
|
376
376
|
};
|
|
@@ -393,7 +393,7 @@ function requireAxios () {
|
|
|
393
393
|
*/
|
|
394
394
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
395
395
|
forEach(b, (val, key) => {
|
|
396
|
-
if (thisArg && isFunction(val)) {
|
|
396
|
+
if (thisArg && isFunction$1(val)) {
|
|
397
397
|
a[key] = bind(val, thisArg);
|
|
398
398
|
} else {
|
|
399
399
|
a[key] = val;
|
|
@@ -609,13 +609,13 @@ function requireAxios () {
|
|
|
609
609
|
const freezeMethods = (obj) => {
|
|
610
610
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
611
611
|
// skip restricted props in strict mode
|
|
612
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
612
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
613
613
|
return false;
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
const value = obj[name];
|
|
617
617
|
|
|
618
|
-
if (!isFunction(value)) return;
|
|
618
|
+
if (!isFunction$1(value)) return;
|
|
619
619
|
|
|
620
620
|
descriptor.enumerable = false;
|
|
621
621
|
|
|
@@ -652,6 +652,8 @@ function requireAxios () {
|
|
|
652
652
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
653
653
|
};
|
|
654
654
|
|
|
655
|
+
|
|
656
|
+
|
|
655
657
|
/**
|
|
656
658
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
657
659
|
*
|
|
@@ -660,7 +662,7 @@ function requireAxios () {
|
|
|
660
662
|
* @returns {boolean}
|
|
661
663
|
*/
|
|
662
664
|
function isSpecCompliantForm(thing) {
|
|
663
|
-
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
665
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
664
666
|
}
|
|
665
667
|
|
|
666
668
|
const toJSONObject = (obj) => {
|
|
@@ -702,7 +704,7 @@ function requireAxios () {
|
|
|
702
704
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
703
705
|
|
|
704
706
|
const isThenable = (thing) =>
|
|
705
|
-
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
707
|
+
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
706
708
|
|
|
707
709
|
// original code
|
|
708
710
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -726,7 +728,7 @@ function requireAxios () {
|
|
|
726
728
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
727
729
|
})(
|
|
728
730
|
typeof setImmediate === 'function',
|
|
729
|
-
isFunction(_global.postMessage)
|
|
731
|
+
isFunction$1(_global.postMessage)
|
|
730
732
|
);
|
|
731
733
|
|
|
732
734
|
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
@@ -735,7 +737,7 @@ function requireAxios () {
|
|
|
735
737
|
// *********************
|
|
736
738
|
|
|
737
739
|
|
|
738
|
-
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
740
|
+
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
739
741
|
|
|
740
742
|
|
|
741
743
|
var utils$1 = {
|
|
@@ -759,7 +761,7 @@ function requireAxios () {
|
|
|
759
761
|
isFile,
|
|
760
762
|
isBlob,
|
|
761
763
|
isRegExp,
|
|
762
|
-
isFunction,
|
|
764
|
+
isFunction: isFunction$1,
|
|
763
765
|
isStream,
|
|
764
766
|
isURLSearchParams,
|
|
765
767
|
isTypedArray,
|
|
@@ -885,11 +887,18 @@ function requireAxios () {
|
|
|
885
887
|
return prop !== 'isAxiosError';
|
|
886
888
|
});
|
|
887
889
|
|
|
888
|
-
|
|
890
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
891
|
+
|
|
892
|
+
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
|
893
|
+
const errCode = code == null && error ? error.code : code;
|
|
894
|
+
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
889
895
|
|
|
890
|
-
|
|
896
|
+
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
|
897
|
+
if (error && axiosError.cause == null) {
|
|
898
|
+
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
|
899
|
+
}
|
|
891
900
|
|
|
892
|
-
axiosError.name = error.name;
|
|
901
|
+
axiosError.name = (error && error.name) || 'Error';
|
|
893
902
|
|
|
894
903
|
customProps && Object.assign(axiosError, customProps);
|
|
895
904
|
|
|
@@ -1180,9 +1189,7 @@ function requireAxios () {
|
|
|
1180
1189
|
replace(/%3A/gi, ':').
|
|
1181
1190
|
replace(/%24/g, '$').
|
|
1182
1191
|
replace(/%2C/gi, ',').
|
|
1183
|
-
replace(/%20/g, '+')
|
|
1184
|
-
replace(/%5B/gi, '[').
|
|
1185
|
-
replace(/%5D/gi, ']');
|
|
1192
|
+
replace(/%20/g, '+');
|
|
1186
1193
|
}
|
|
1187
1194
|
|
|
1188
1195
|
/**
|
|
@@ -1587,7 +1594,7 @@ function requireAxios () {
|
|
|
1587
1594
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
1588
1595
|
|
|
1589
1596
|
try {
|
|
1590
|
-
return JSON.parse(data);
|
|
1597
|
+
return JSON.parse(data, this.parseReviver);
|
|
1591
1598
|
} catch (e) {
|
|
1592
1599
|
if (strictJSONParsing) {
|
|
1593
1600
|
if (e.name === 'SyntaxError') {
|
|
@@ -2412,7 +2419,7 @@ function requireAxios () {
|
|
|
2412
2419
|
var resolveConfig = (config) => {
|
|
2413
2420
|
const newConfig = mergeConfig({}, config);
|
|
2414
2421
|
|
|
2415
|
-
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
2422
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
2416
2423
|
|
|
2417
2424
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
2418
2425
|
|
|
@@ -2425,17 +2432,21 @@ function requireAxios () {
|
|
|
2425
2432
|
);
|
|
2426
2433
|
}
|
|
2427
2434
|
|
|
2428
|
-
let contentType;
|
|
2429
|
-
|
|
2430
2435
|
if (utils$1.isFormData(data)) {
|
|
2431
2436
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
2432
|
-
headers.setContentType(undefined); //
|
|
2433
|
-
} else if ((
|
|
2434
|
-
//
|
|
2435
|
-
const
|
|
2436
|
-
headers
|
|
2437
|
+
headers.setContentType(undefined); // browser handles it
|
|
2438
|
+
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
2439
|
+
// Node.js FormData (like form-data package)
|
|
2440
|
+
const formHeaders = data.getHeaders();
|
|
2441
|
+
// Only set safe headers to avoid overwriting security headers
|
|
2442
|
+
const allowedHeaders = ['content-type', 'content-length'];
|
|
2443
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
2444
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
2445
|
+
headers.set(key, val);
|
|
2446
|
+
}
|
|
2447
|
+
});
|
|
2437
2448
|
}
|
|
2438
|
-
}
|
|
2449
|
+
}
|
|
2439
2450
|
|
|
2440
2451
|
// Add xsrf header
|
|
2441
2452
|
// This is only done if running in a standard browser environment.
|
|
@@ -2552,15 +2563,18 @@ function requireAxios () {
|
|
|
2552
2563
|
};
|
|
2553
2564
|
|
|
2554
2565
|
// Handle low level network errors
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2566
|
+
request.onerror = function handleError(event) {
|
|
2567
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
2568
|
+
// (message may be empty; when present, surface it)
|
|
2569
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
2570
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
2571
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
2572
|
+
// attach the underlying event for consumers who want details
|
|
2573
|
+
err.event = event || null;
|
|
2574
|
+
reject(err);
|
|
2575
|
+
request = null;
|
|
2562
2576
|
};
|
|
2563
|
-
|
|
2577
|
+
|
|
2564
2578
|
// Handle timeout
|
|
2565
2579
|
request.ontimeout = function handleTimeout() {
|
|
2566
2580
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
@@ -2776,14 +2790,18 @@ function requireAxios () {
|
|
|
2776
2790
|
})
|
|
2777
2791
|
};
|
|
2778
2792
|
|
|
2779
|
-
const
|
|
2780
|
-
|
|
2793
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
2794
|
+
|
|
2795
|
+
const {isFunction} = utils$1;
|
|
2796
|
+
|
|
2797
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
2798
|
+
Request, Response
|
|
2799
|
+
}))(utils$1.global);
|
|
2800
|
+
|
|
2801
|
+
const {
|
|
2802
|
+
ReadableStream: ReadableStream$1, TextEncoder
|
|
2803
|
+
} = utils$1.global;
|
|
2781
2804
|
|
|
2782
|
-
// used only inside the fetch adapter
|
|
2783
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
2784
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
2785
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
2786
|
-
);
|
|
2787
2805
|
|
|
2788
2806
|
const test = (fn, ...args) => {
|
|
2789
2807
|
try {
|
|
@@ -2793,211 +2811,268 @@ function requireAxios () {
|
|
|
2793
2811
|
}
|
|
2794
2812
|
};
|
|
2795
2813
|
|
|
2796
|
-
const
|
|
2797
|
-
|
|
2814
|
+
const factory = (env) => {
|
|
2815
|
+
env = utils$1.merge.call({
|
|
2816
|
+
skipUndefined: true
|
|
2817
|
+
}, globalFetchAPI, env);
|
|
2798
2818
|
|
|
2799
|
-
const
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
duplexAccessed = true;
|
|
2804
|
-
return 'half';
|
|
2805
|
-
},
|
|
2806
|
-
}).headers.has('Content-Type');
|
|
2819
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
2820
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
2821
|
+
const isRequestSupported = isFunction(Request);
|
|
2822
|
+
const isResponseSupported = isFunction(Response);
|
|
2807
2823
|
|
|
2808
|
-
|
|
2809
|
-
|
|
2824
|
+
if (!isFetchSupported) {
|
|
2825
|
+
return false;
|
|
2826
|
+
}
|
|
2810
2827
|
|
|
2811
|
-
|
|
2828
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
2812
2829
|
|
|
2813
|
-
|
|
2814
|
-
|
|
2830
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
2831
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
2832
|
+
async (str) => new Uint8Array(await new Request(str).arrayBuffer())
|
|
2833
|
+
);
|
|
2815
2834
|
|
|
2835
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
2836
|
+
let duplexAccessed = false;
|
|
2816
2837
|
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2838
|
+
const hasContentType = new Request(platform.origin, {
|
|
2839
|
+
body: new ReadableStream$1(),
|
|
2840
|
+
method: 'POST',
|
|
2841
|
+
get duplex() {
|
|
2842
|
+
duplexAccessed = true;
|
|
2843
|
+
return 'half';
|
|
2844
|
+
},
|
|
2845
|
+
}).headers.has('Content-Type');
|
|
2820
2846
|
|
|
2821
|
-
|
|
2822
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
2823
|
-
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
|
2824
|
-
(_, config) => {
|
|
2825
|
-
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
2826
|
-
});
|
|
2847
|
+
return duplexAccessed && !hasContentType;
|
|
2827
2848
|
});
|
|
2828
|
-
})(new Response));
|
|
2829
2849
|
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
return 0;
|
|
2833
|
-
}
|
|
2850
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
|
|
2851
|
+
test(() => utils$1.isReadableStream(new Response('').body));
|
|
2834
2852
|
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
}
|
|
2853
|
+
const resolvers = {
|
|
2854
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
2855
|
+
};
|
|
2838
2856
|
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2857
|
+
isFetchSupported && ((() => {
|
|
2858
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
2859
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
2860
|
+
let method = res && res[type];
|
|
2861
|
+
|
|
2862
|
+
if (method) {
|
|
2863
|
+
return method.call(res);
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
2867
|
+
});
|
|
2843
2868
|
});
|
|
2844
|
-
|
|
2845
|
-
}
|
|
2869
|
+
})());
|
|
2846
2870
|
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2871
|
+
const getBodyLength = async (body) => {
|
|
2872
|
+
if (body == null) {
|
|
2873
|
+
return 0;
|
|
2874
|
+
}
|
|
2850
2875
|
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2876
|
+
if (utils$1.isBlob(body)) {
|
|
2877
|
+
return body.size;
|
|
2878
|
+
}
|
|
2854
2879
|
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2880
|
+
if (utils$1.isSpecCompliantForm(body)) {
|
|
2881
|
+
const _request = new Request(platform.origin, {
|
|
2882
|
+
method: 'POST',
|
|
2883
|
+
body,
|
|
2884
|
+
});
|
|
2885
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
2886
|
+
}
|
|
2859
2887
|
|
|
2860
|
-
|
|
2861
|
-
|
|
2888
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
2889
|
+
return body.byteLength;
|
|
2890
|
+
}
|
|
2862
2891
|
|
|
2863
|
-
|
|
2864
|
-
|
|
2892
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
2893
|
+
body = body + '';
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
if (utils$1.isString(body)) {
|
|
2897
|
+
return (await encodeText(body)).byteLength;
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
|
|
2901
|
+
const resolveBodyLength = async (headers, body) => {
|
|
2902
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
2903
|
+
|
|
2904
|
+
return length == null ? getBodyLength(body) : length;
|
|
2905
|
+
};
|
|
2906
|
+
|
|
2907
|
+
return async (config) => {
|
|
2908
|
+
let {
|
|
2909
|
+
url,
|
|
2910
|
+
method,
|
|
2911
|
+
data,
|
|
2912
|
+
signal,
|
|
2913
|
+
cancelToken,
|
|
2914
|
+
timeout,
|
|
2915
|
+
onDownloadProgress,
|
|
2916
|
+
onUploadProgress,
|
|
2917
|
+
responseType,
|
|
2918
|
+
headers,
|
|
2919
|
+
withCredentials = 'same-origin',
|
|
2920
|
+
fetchOptions
|
|
2921
|
+
} = resolveConfig(config);
|
|
2922
|
+
|
|
2923
|
+
let _fetch = envFetch || fetch;
|
|
2924
|
+
|
|
2925
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
2926
|
+
|
|
2927
|
+
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
2865
2928
|
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
method,
|
|
2870
|
-
data,
|
|
2871
|
-
signal,
|
|
2872
|
-
cancelToken,
|
|
2873
|
-
timeout,
|
|
2874
|
-
onDownloadProgress,
|
|
2875
|
-
onUploadProgress,
|
|
2876
|
-
responseType,
|
|
2877
|
-
headers,
|
|
2878
|
-
withCredentials = 'same-origin',
|
|
2879
|
-
fetchOptions
|
|
2880
|
-
} = resolveConfig(config);
|
|
2881
|
-
|
|
2882
|
-
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
2883
|
-
|
|
2884
|
-
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
2885
|
-
|
|
2886
|
-
let request;
|
|
2887
|
-
|
|
2888
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
2929
|
+
let request = null;
|
|
2930
|
+
|
|
2931
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
2889
2932
|
composedSignal.unsubscribe();
|
|
2890
|
-
|
|
2933
|
+
});
|
|
2891
2934
|
|
|
2892
|
-
|
|
2935
|
+
let requestContentLength;
|
|
2893
2936
|
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2937
|
+
try {
|
|
2938
|
+
if (
|
|
2939
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
2940
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
2941
|
+
) {
|
|
2942
|
+
let _request = new Request(url, {
|
|
2943
|
+
method: 'POST',
|
|
2944
|
+
body: data,
|
|
2945
|
+
duplex: "half"
|
|
2946
|
+
});
|
|
2904
2947
|
|
|
2905
|
-
|
|
2948
|
+
let contentTypeHeader;
|
|
2906
2949
|
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2950
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
2951
|
+
headers.setContentType(contentTypeHeader);
|
|
2952
|
+
}
|
|
2910
2953
|
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2954
|
+
if (_request.body) {
|
|
2955
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
2956
|
+
requestContentLength,
|
|
2957
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
2958
|
+
);
|
|
2916
2959
|
|
|
2917
|
-
|
|
2960
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
2961
|
+
}
|
|
2918
2962
|
}
|
|
2919
|
-
}
|
|
2920
2963
|
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2964
|
+
if (!utils$1.isString(withCredentials)) {
|
|
2965
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
2966
|
+
}
|
|
2924
2967
|
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
request = new Request(url, {
|
|
2929
|
-
...fetchOptions,
|
|
2930
|
-
signal: composedSignal,
|
|
2931
|
-
method: method.toUpperCase(),
|
|
2932
|
-
headers: headers.normalize().toJSON(),
|
|
2933
|
-
body: data,
|
|
2934
|
-
duplex: "half",
|
|
2935
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
2936
|
-
});
|
|
2968
|
+
// Cloudflare Workers throws when credentials are defined
|
|
2969
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
2970
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
2937
2971
|
|
|
2938
|
-
|
|
2972
|
+
const resolvedOptions = {
|
|
2973
|
+
...fetchOptions,
|
|
2974
|
+
signal: composedSignal,
|
|
2975
|
+
method: method.toUpperCase(),
|
|
2976
|
+
headers: headers.normalize().toJSON(),
|
|
2977
|
+
body: data,
|
|
2978
|
+
duplex: "half",
|
|
2979
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
2980
|
+
};
|
|
2939
2981
|
|
|
2940
|
-
|
|
2982
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
2941
2983
|
|
|
2942
|
-
|
|
2943
|
-
const options = {};
|
|
2984
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
2944
2985
|
|
|
2945
|
-
|
|
2946
|
-
options[prop] = response[prop];
|
|
2947
|
-
});
|
|
2986
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
2948
2987
|
|
|
2949
|
-
|
|
2988
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
2989
|
+
const options = {};
|
|
2950
2990
|
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
) || [];
|
|
2991
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
2992
|
+
options[prop] = response[prop];
|
|
2993
|
+
});
|
|
2955
2994
|
|
|
2956
|
-
|
|
2957
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
2958
|
-
flush && flush();
|
|
2959
|
-
unsubscribe && unsubscribe();
|
|
2960
|
-
}),
|
|
2961
|
-
options
|
|
2962
|
-
);
|
|
2963
|
-
}
|
|
2995
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
2964
2996
|
|
|
2965
|
-
|
|
2997
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
2998
|
+
responseContentLength,
|
|
2999
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
3000
|
+
) || [];
|
|
2966
3001
|
|
|
2967
|
-
|
|
3002
|
+
response = new Response(
|
|
3003
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
3004
|
+
flush && flush();
|
|
3005
|
+
unsubscribe && unsubscribe();
|
|
3006
|
+
}),
|
|
3007
|
+
options
|
|
3008
|
+
);
|
|
3009
|
+
}
|
|
2968
3010
|
|
|
2969
|
-
|
|
3011
|
+
responseType = responseType || 'text';
|
|
2970
3012
|
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
3013
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
3014
|
+
|
|
3015
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
3016
|
+
|
|
3017
|
+
return await new Promise((resolve, reject) => {
|
|
3018
|
+
settle(resolve, reject, {
|
|
3019
|
+
data: responseData,
|
|
3020
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
3021
|
+
status: response.status,
|
|
3022
|
+
statusText: response.statusText,
|
|
3023
|
+
config,
|
|
3024
|
+
request
|
|
3025
|
+
});
|
|
3026
|
+
})
|
|
3027
|
+
} catch (err) {
|
|
3028
|
+
unsubscribe && unsubscribe();
|
|
3029
|
+
|
|
3030
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
3031
|
+
throw Object.assign(
|
|
3032
|
+
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
|
3033
|
+
{
|
|
3034
|
+
cause: err.cause || err
|
|
3035
|
+
}
|
|
3036
|
+
)
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
2991
3040
|
}
|
|
3041
|
+
}
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3044
|
+
const seedCache = new Map();
|
|
3045
|
+
|
|
3046
|
+
const getFetch = (config) => {
|
|
3047
|
+
let env = config ? config.env : {};
|
|
3048
|
+
const {fetch, Request, Response} = env;
|
|
3049
|
+
const seeds = [
|
|
3050
|
+
Request, Response, fetch
|
|
3051
|
+
];
|
|
3052
|
+
|
|
3053
|
+
let len = seeds.length, i = len,
|
|
3054
|
+
seed, target, map = seedCache;
|
|
3055
|
+
|
|
3056
|
+
while (i--) {
|
|
3057
|
+
seed = seeds[i];
|
|
3058
|
+
target = map.get(seed);
|
|
3059
|
+
|
|
3060
|
+
target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
|
|
2992
3061
|
|
|
2993
|
-
|
|
3062
|
+
map = target;
|
|
2994
3063
|
}
|
|
2995
|
-
|
|
3064
|
+
|
|
3065
|
+
return target;
|
|
3066
|
+
};
|
|
3067
|
+
|
|
3068
|
+
getFetch();
|
|
2996
3069
|
|
|
2997
3070
|
const knownAdapters = {
|
|
2998
3071
|
http: httpAdapter,
|
|
2999
3072
|
xhr: xhrAdapter,
|
|
3000
|
-
fetch:
|
|
3073
|
+
fetch: {
|
|
3074
|
+
get: getFetch,
|
|
3075
|
+
}
|
|
3001
3076
|
};
|
|
3002
3077
|
|
|
3003
3078
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
@@ -3016,7 +3091,7 @@ function requireAxios () {
|
|
|
3016
3091
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
3017
3092
|
|
|
3018
3093
|
var adapters = {
|
|
3019
|
-
getAdapter: (adapters) => {
|
|
3094
|
+
getAdapter: (adapters, config) => {
|
|
3020
3095
|
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
3021
3096
|
|
|
3022
3097
|
const {length} = adapters;
|
|
@@ -3039,7 +3114,7 @@ function requireAxios () {
|
|
|
3039
3114
|
}
|
|
3040
3115
|
}
|
|
3041
3116
|
|
|
3042
|
-
if (adapter) {
|
|
3117
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
3043
3118
|
break;
|
|
3044
3119
|
}
|
|
3045
3120
|
|
|
@@ -3107,7 +3182,7 @@ function requireAxios () {
|
|
|
3107
3182
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
3108
3183
|
}
|
|
3109
3184
|
|
|
3110
|
-
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
|
|
3185
|
+
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
|
|
3111
3186
|
|
|
3112
3187
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
3113
3188
|
throwIfCancellationRequested(config);
|
|
@@ -3141,7 +3216,7 @@ function requireAxios () {
|
|
|
3141
3216
|
});
|
|
3142
3217
|
}
|
|
3143
3218
|
|
|
3144
|
-
const VERSION = "1.
|
|
3219
|
+
const VERSION = "1.12.2";
|
|
3145
3220
|
|
|
3146
3221
|
const validators$1 = {};
|
|
3147
3222
|
|
|
@@ -3397,8 +3472,6 @@ function requireAxios () {
|
|
|
3397
3472
|
|
|
3398
3473
|
let newConfig = config;
|
|
3399
3474
|
|
|
3400
|
-
i = 0;
|
|
3401
|
-
|
|
3402
3475
|
while (i < len) {
|
|
3403
3476
|
const onFulfilled = requestInterceptorChain[i++];
|
|
3404
3477
|
const onRejected = requestInterceptorChain[i++];
|