@rebilly/instruments 16.169.0 → 16.170.1
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/CHANGELOG.md +1 -6
- package/dist/index.js +431 -174
- package/dist/index.min.js +9 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2340,6 +2340,7 @@ const isReactNativeBlob = (value) => {
|
|
|
2340
2340
|
const isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
2341
2341
|
const isBlob = kindOfTest("Blob");
|
|
2342
2342
|
const isFileList = kindOfTest("FileList");
|
|
2343
|
+
const isSet = kindOfTest("Set");
|
|
2343
2344
|
const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
|
|
2344
2345
|
function getGlobal() {
|
|
2345
2346
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
@@ -2635,11 +2636,20 @@ const toJSONObject = (obj) => {
|
|
|
2635
2636
|
}
|
|
2636
2637
|
if (!("toJSON" in source)) {
|
|
2637
2638
|
visited.add(source);
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2639
|
+
let target;
|
|
2640
|
+
if (isSet(source)) {
|
|
2641
|
+
target = [];
|
|
2642
|
+
for (const value of source) {
|
|
2643
|
+
const reducedValue = visit(value);
|
|
2644
|
+
!isUndefined(reducedValue) && target.push(reducedValue);
|
|
2645
|
+
}
|
|
2646
|
+
} else {
|
|
2647
|
+
target = isArray(source) ? [] : {};
|
|
2648
|
+
forEach(source, (value, key) => {
|
|
2649
|
+
const reducedValue = visit(value);
|
|
2650
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
2651
|
+
});
|
|
2652
|
+
}
|
|
2643
2653
|
visited.delete(source);
|
|
2644
2654
|
return target;
|
|
2645
2655
|
}
|
|
@@ -2766,17 +2776,18 @@ const parseHeaders = (rawHeaders) => {
|
|
|
2766
2776
|
i = line.indexOf(":");
|
|
2767
2777
|
key = line.substring(0, i).trim().toLowerCase();
|
|
2768
2778
|
val = line.substring(i + 1).trim();
|
|
2769
|
-
|
|
2779
|
+
const hasKey = utils$1.hasOwnProp(parsed, key);
|
|
2780
|
+
if (!key || hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key)) {
|
|
2770
2781
|
return;
|
|
2771
2782
|
}
|
|
2772
2783
|
if (key === "set-cookie") {
|
|
2773
|
-
if (
|
|
2784
|
+
if (hasKey) {
|
|
2774
2785
|
parsed[key].push(val);
|
|
2775
2786
|
} else {
|
|
2776
2787
|
parsed[key] = [val];
|
|
2777
2788
|
}
|
|
2778
2789
|
} else {
|
|
2779
|
-
parsed[key] =
|
|
2790
|
+
parsed[key] = hasKey ? parsed[key] + ", " + val : val;
|
|
2780
2791
|
}
|
|
2781
2792
|
});
|
|
2782
2793
|
return parsed;
|
|
@@ -2836,6 +2847,90 @@ function parseTokens(str) {
|
|
|
2836
2847
|
}
|
|
2837
2848
|
return tokens;
|
|
2838
2849
|
}
|
|
2850
|
+
const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
2851
|
+
function trimOWS(value) {
|
|
2852
|
+
let start = 0;
|
|
2853
|
+
let end = value.length;
|
|
2854
|
+
while (start < end) {
|
|
2855
|
+
const code = value.charCodeAt(start);
|
|
2856
|
+
if (code !== 9 && code !== 32) {
|
|
2857
|
+
break;
|
|
2858
|
+
}
|
|
2859
|
+
start += 1;
|
|
2860
|
+
}
|
|
2861
|
+
while (end > start) {
|
|
2862
|
+
const code = value.charCodeAt(end - 1);
|
|
2863
|
+
if (code !== 9 && code !== 32) {
|
|
2864
|
+
break;
|
|
2865
|
+
}
|
|
2866
|
+
end -= 1;
|
|
2867
|
+
}
|
|
2868
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
2869
|
+
}
|
|
2870
|
+
function decodeQuotedString(value) {
|
|
2871
|
+
const last = value.length - 1;
|
|
2872
|
+
if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
|
|
2873
|
+
return value;
|
|
2874
|
+
}
|
|
2875
|
+
let decoded = "";
|
|
2876
|
+
for (let i = 1; i < last; i++) {
|
|
2877
|
+
const code = value.charCodeAt(i);
|
|
2878
|
+
if (code === 34) {
|
|
2879
|
+
return value;
|
|
2880
|
+
}
|
|
2881
|
+
if (code === 92) {
|
|
2882
|
+
i += 1;
|
|
2883
|
+
if (i >= last) {
|
|
2884
|
+
return value;
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
decoded += value[i];
|
|
2888
|
+
}
|
|
2889
|
+
return decoded;
|
|
2890
|
+
}
|
|
2891
|
+
function parseParameters(value) {
|
|
2892
|
+
const parameters = /* @__PURE__ */ Object.create(null);
|
|
2893
|
+
const str = String(value);
|
|
2894
|
+
let start = 0;
|
|
2895
|
+
let quoted = false;
|
|
2896
|
+
let escaped = false;
|
|
2897
|
+
function parseParameter(end) {
|
|
2898
|
+
const part = trimOWS(str.slice(start, end));
|
|
2899
|
+
const equals = part.indexOf("=");
|
|
2900
|
+
if (equals < 1) {
|
|
2901
|
+
return;
|
|
2902
|
+
}
|
|
2903
|
+
const name = trimOWS(part.slice(0, equals));
|
|
2904
|
+
if (!parameterNameRE.test(name)) {
|
|
2905
|
+
return;
|
|
2906
|
+
}
|
|
2907
|
+
const normalizedName = name.toLowerCase();
|
|
2908
|
+
if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
|
|
2909
|
+
return;
|
|
2910
|
+
}
|
|
2911
|
+
const parameterValue = trimOWS(part.slice(equals + 1));
|
|
2912
|
+
parameters[normalizedName] = decodeQuotedString(parameterValue);
|
|
2913
|
+
}
|
|
2914
|
+
for (let i = 0; i < str.length; i++) {
|
|
2915
|
+
const code = str.charCodeAt(i);
|
|
2916
|
+
if (quoted) {
|
|
2917
|
+
if (escaped) {
|
|
2918
|
+
escaped = false;
|
|
2919
|
+
} else if (code === 92) {
|
|
2920
|
+
escaped = true;
|
|
2921
|
+
} else if (code === 34) {
|
|
2922
|
+
quoted = false;
|
|
2923
|
+
}
|
|
2924
|
+
} else if (code === 34) {
|
|
2925
|
+
quoted = true;
|
|
2926
|
+
} else if (code === 44 || code === 59) {
|
|
2927
|
+
parseParameter(i);
|
|
2928
|
+
start = i + 1;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
parseParameter(str.length);
|
|
2932
|
+
return parameters;
|
|
2933
|
+
}
|
|
2839
2934
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
2840
2935
|
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
2841
2936
|
if (utils$1.isFunction(filter2)) {
|
|
@@ -3011,7 +3106,8 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
|
3011
3106
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
3012
3107
|
}
|
|
3013
3108
|
getSetCookie() {
|
|
3014
|
-
|
|
3109
|
+
const value = this.get("set-cookie");
|
|
3110
|
+
return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value];
|
|
3015
3111
|
}
|
|
3016
3112
|
get [Symbol.toStringTag]() {
|
|
3017
3113
|
return "AxiosHeaders";
|
|
@@ -3019,6 +3115,9 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
|
3019
3115
|
static from(thing) {
|
|
3020
3116
|
return thing instanceof this ? thing : new this(thing);
|
|
3021
3117
|
}
|
|
3118
|
+
static parseParameters(value) {
|
|
3119
|
+
return parseParameters(value);
|
|
3120
|
+
}
|
|
3022
3121
|
static concat(first, ...targets) {
|
|
3023
3122
|
const computed = new this(first);
|
|
3024
3123
|
targets.forEach((target) => computed.set(target));
|
|
@@ -3111,10 +3210,37 @@ function redactConfig(config, redactKeys) {
|
|
|
3111
3210
|
};
|
|
3112
3211
|
return visit(config);
|
|
3113
3212
|
}
|
|
3213
|
+
function stringifySafely$1(value) {
|
|
3214
|
+
try {
|
|
3215
|
+
return String(value);
|
|
3216
|
+
} catch (err) {
|
|
3217
|
+
return "";
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
function aggregateErrorMessage(error) {
|
|
3221
|
+
const message = error.errors.map((entry) => {
|
|
3222
|
+
try {
|
|
3223
|
+
return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry);
|
|
3224
|
+
} catch (err) {
|
|
3225
|
+
return "";
|
|
3226
|
+
}
|
|
3227
|
+
}).filter(Boolean).join("; ");
|
|
3228
|
+
return message || error.name || "AggregateError";
|
|
3229
|
+
}
|
|
3114
3230
|
let AxiosError$1 = class AxiosError extends Error {
|
|
3115
3231
|
static from(error, code, config, request, response, customProps) {
|
|
3116
|
-
|
|
3117
|
-
|
|
3232
|
+
let message = error.message;
|
|
3233
|
+
if (!message && utils$1.isArray(error.errors) && error.errors.length) {
|
|
3234
|
+
message = aggregateErrorMessage(error);
|
|
3235
|
+
}
|
|
3236
|
+
const axiosError = new AxiosError(message, code || error.code, config, request, response);
|
|
3237
|
+
Object.defineProperty(axiosError, "cause", {
|
|
3238
|
+
__proto__: null,
|
|
3239
|
+
value: error,
|
|
3240
|
+
writable: true,
|
|
3241
|
+
enumerable: false,
|
|
3242
|
+
configurable: true
|
|
3243
|
+
});
|
|
3118
3244
|
axiosError.name = error.name;
|
|
3119
3245
|
if (error.status != null && axiosError.status == null) {
|
|
3120
3246
|
axiosError.status = error.status;
|
|
@@ -3252,7 +3378,10 @@ function toFormData$1(obj, formData, options) {
|
|
|
3252
3378
|
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
3253
3379
|
}
|
|
3254
3380
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
3255
|
-
|
|
3381
|
+
if (useBlob && typeof _Blob === "function") {
|
|
3382
|
+
return new _Blob([value]);
|
|
3383
|
+
}
|
|
3384
|
+
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.", AxiosError$1.ERR_NOT_SUPPORT);
|
|
3256
3385
|
}
|
|
3257
3386
|
return value;
|
|
3258
3387
|
}
|
|
@@ -3357,9 +3486,7 @@ prototype.append = function append(name, value) {
|
|
|
3357
3486
|
this._pairs.push([name, value]);
|
|
3358
3487
|
};
|
|
3359
3488
|
prototype.toString = function toString2(encoder) {
|
|
3360
|
-
const _encode = encoder ?
|
|
3361
|
-
return encoder.call(this, value, encode$1);
|
|
3362
|
-
} : encode$1;
|
|
3489
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
|
|
3363
3490
|
return this._pairs.map(function each(pair) {
|
|
3364
3491
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
3365
3492
|
}, "").join("&");
|
|
@@ -3371,6 +3498,7 @@ function buildURL(url, params, options) {
|
|
|
3371
3498
|
if (!params) {
|
|
3372
3499
|
return url;
|
|
3373
3500
|
}
|
|
3501
|
+
url = url || "";
|
|
3374
3502
|
const _options = utils$1.isFunction(options) ? {
|
|
3375
3503
|
serialize: options
|
|
3376
3504
|
} : options;
|
|
@@ -3516,7 +3644,7 @@ function throwIfDepthExceeded(index2) {
|
|
|
3516
3644
|
}
|
|
3517
3645
|
function parsePropPath(name) {
|
|
3518
3646
|
const path = [];
|
|
3519
|
-
const pattern2 =
|
|
3647
|
+
const pattern2 = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
3520
3648
|
let match;
|
|
3521
3649
|
while ((match = pattern2.exec(name)) !== null) {
|
|
3522
3650
|
throwIfDepthExceeded(path.length);
|
|
@@ -3806,7 +3934,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
3806
3934
|
}
|
|
3807
3935
|
const rawLoaded = e2.loaded;
|
|
3808
3936
|
const total = e2.lengthComputable ? e2.total : void 0;
|
|
3809
|
-
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
3937
|
+
const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
|
|
3810
3938
|
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
3811
3939
|
const rate = _speedometer(progressBytes);
|
|
3812
3940
|
bytesNotified = Math.max(bytesNotified, loaded);
|
|
@@ -3835,7 +3963,7 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
3835
3963
|
throttled[1]
|
|
3836
3964
|
];
|
|
3837
3965
|
};
|
|
3838
|
-
const asyncDecorator = (fn) => (...args) =>
|
|
3966
|
+
const asyncDecorator = (fn, scheduler = utils$1.asap) => (...args) => scheduler(() => fn(...args));
|
|
3839
3967
|
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
|
|
3840
3968
|
url = new URL(url, platform.origin);
|
|
3841
3969
|
return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
|
|
@@ -3873,7 +4001,11 @@ const cookies = platform.hasStandardBrowserEnv ? (
|
|
|
3873
4001
|
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
3874
4002
|
const eq = cookie.indexOf("=");
|
|
3875
4003
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
3876
|
-
|
|
4004
|
+
try {
|
|
4005
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
4006
|
+
} catch (e2) {
|
|
4007
|
+
return cookie.slice(eq + 1);
|
|
4008
|
+
}
|
|
3877
4009
|
}
|
|
3878
4010
|
}
|
|
3879
4011
|
return null;
|
|
@@ -3901,7 +4033,14 @@ function isAbsoluteURL(url) {
|
|
|
3901
4033
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
3902
4034
|
}
|
|
3903
4035
|
function combineURLs(baseURL, relativeURL) {
|
|
3904
|
-
|
|
4036
|
+
if (!relativeURL) {
|
|
4037
|
+
return baseURL;
|
|
4038
|
+
}
|
|
4039
|
+
let end = baseURL.length;
|
|
4040
|
+
while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
|
|
4041
|
+
end--;
|
|
4042
|
+
}
|
|
4043
|
+
return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
|
|
3905
4044
|
}
|
|
3906
4045
|
const malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
3907
4046
|
const httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
@@ -3915,13 +4054,37 @@ function stripLeadingC0ControlOrSpace(url) {
|
|
|
3915
4054
|
function normalizeURLForProtocolCheck(url) {
|
|
3916
4055
|
return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, "");
|
|
3917
4056
|
}
|
|
4057
|
+
function redactFragment(fragment) {
|
|
4058
|
+
if (!fragment) {
|
|
4059
|
+
return fragment;
|
|
4060
|
+
}
|
|
4061
|
+
return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
|
|
4062
|
+
return `${separator}${parameterName}${REDACTED}`;
|
|
4063
|
+
});
|
|
4064
|
+
}
|
|
4065
|
+
function redactSensitiveURLParts(url) {
|
|
4066
|
+
const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
|
|
4067
|
+
const fragmentIndex = redactedURL.indexOf("#");
|
|
4068
|
+
const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
|
|
4069
|
+
const redactedURLWithoutFragment = urlWithoutFragment.replace(
|
|
4070
|
+
/([?&][^=&#]*=)[^&#]*/g,
|
|
4071
|
+
`$1${REDACTED}`
|
|
4072
|
+
);
|
|
4073
|
+
if (fragmentIndex === -1) {
|
|
4074
|
+
return redactedURLWithoutFragment;
|
|
4075
|
+
}
|
|
4076
|
+
return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
|
|
4077
|
+
}
|
|
3918
4078
|
function assertValidHttpProtocolURL(url, config) {
|
|
3919
|
-
if (typeof url === "string"
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
AxiosError$1
|
|
3923
|
-
|
|
3924
|
-
|
|
4079
|
+
if (typeof url === "string") {
|
|
4080
|
+
const normalizedURL = normalizeURLForProtocolCheck(url);
|
|
4081
|
+
if (malformedHttpProtocol.test(normalizedURL)) {
|
|
4082
|
+
throw new AxiosError$1(
|
|
4083
|
+
`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
|
|
4084
|
+
AxiosError$1.ERR_INVALID_URL,
|
|
4085
|
+
config
|
|
4086
|
+
);
|
|
4087
|
+
}
|
|
3925
4088
|
}
|
|
3926
4089
|
}
|
|
3927
4090
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
@@ -3934,7 +4097,18 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
|
3934
4097
|
return requestedURL;
|
|
3935
4098
|
}
|
|
3936
4099
|
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
4100
|
+
const ownEnumerableKeys = (thing) => {
|
|
4101
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
4102
|
+
return Object.keys(thing).concat(
|
|
4103
|
+
Object.getOwnPropertySymbols(thing).filter(
|
|
4104
|
+
(symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
|
|
4105
|
+
)
|
|
4106
|
+
);
|
|
4107
|
+
}
|
|
4108
|
+
return Object.keys(thing);
|
|
4109
|
+
};
|
|
3937
4110
|
function mergeConfig$1(config1, config2) {
|
|
4111
|
+
config1 = config1 || {};
|
|
3938
4112
|
config2 = config2 || {};
|
|
3939
4113
|
const config = /* @__PURE__ */ Object.create(null);
|
|
3940
4114
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
@@ -4031,7 +4205,7 @@ function mergeConfig$1(config1, config2) {
|
|
|
4031
4205
|
validateStatus: mergeDirectKeys,
|
|
4032
4206
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
4033
4207
|
};
|
|
4034
|
-
utils$1.forEach(
|
|
4208
|
+
utils$1.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
4035
4209
|
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
4036
4210
|
const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
4037
4211
|
const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : void 0;
|
|
@@ -4054,7 +4228,7 @@ function setFormDataHeaders(headers, formHeaders, policy) {
|
|
|
4054
4228
|
headers.set(formHeaders);
|
|
4055
4229
|
return;
|
|
4056
4230
|
}
|
|
4057
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
4231
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
4058
4232
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
4059
4233
|
headers.set(key, val);
|
|
4060
4234
|
}
|
|
@@ -4085,10 +4259,14 @@ function resolveConfig(config) {
|
|
|
4085
4259
|
if (auth) {
|
|
4086
4260
|
const username = utils$1.getSafeProp(auth, "username") || "";
|
|
4087
4261
|
const password = utils$1.getSafeProp(auth, "password") || "";
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4262
|
+
try {
|
|
4263
|
+
headers.set(
|
|
4264
|
+
"Authorization",
|
|
4265
|
+
"Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : ""))
|
|
4266
|
+
);
|
|
4267
|
+
} catch (e2) {
|
|
4268
|
+
throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_OPTION_VALUE, config);
|
|
4269
|
+
}
|
|
4092
4270
|
}
|
|
4093
4271
|
if (utils$1.isFormData(data)) {
|
|
4094
4272
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
@@ -4250,6 +4428,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
4250
4428
|
config
|
|
4251
4429
|
)
|
|
4252
4430
|
);
|
|
4431
|
+
done();
|
|
4253
4432
|
return;
|
|
4254
4433
|
}
|
|
4255
4434
|
request.send(requestData || null);
|
|
@@ -4287,7 +4466,16 @@ const composeSignals = (signals, timeout) => {
|
|
|
4287
4466
|
});
|
|
4288
4467
|
signals = null;
|
|
4289
4468
|
};
|
|
4290
|
-
signals.forEach((signal2) =>
|
|
4469
|
+
signals.forEach((signal2) => {
|
|
4470
|
+
if (aborted) {
|
|
4471
|
+
return;
|
|
4472
|
+
}
|
|
4473
|
+
if (signal2.aborted) {
|
|
4474
|
+
onabort.call(signal2);
|
|
4475
|
+
return;
|
|
4476
|
+
}
|
|
4477
|
+
signal2.addEventListener("abort", onabort, { once: true });
|
|
4478
|
+
});
|
|
4291
4479
|
const { signal } = controller;
|
|
4292
4480
|
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
4293
4481
|
return signal;
|
|
@@ -4372,7 +4560,61 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
4372
4560
|
};
|
|
4373
4561
|
const isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
4374
4562
|
const isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
4375
|
-
|
|
4563
|
+
const hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
|
|
4564
|
+
const isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
|
|
4565
|
+
charCode >= 97 && charCode <= 122 || // a-z
|
|
4566
|
+
charCode >= 48 && charCode <= 57 || // 0-9
|
|
4567
|
+
charCode === 43 || // +
|
|
4568
|
+
charCode === 47 || // /
|
|
4569
|
+
charCode === 45 || // - (base64url)
|
|
4570
|
+
charCode === 95;
|
|
4571
|
+
const isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
|
|
4572
|
+
const base64Bytes = (significant) => {
|
|
4573
|
+
const groups = Math.floor(significant / 4);
|
|
4574
|
+
const remainder = significant % 4;
|
|
4575
|
+
return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
|
|
4576
|
+
};
|
|
4577
|
+
const estimateBase64BufferAllocation = (body) => {
|
|
4578
|
+
const len = body.length;
|
|
4579
|
+
let padding = 0;
|
|
4580
|
+
if (len > 0 && body.charCodeAt(len - 1) === 61) {
|
|
4581
|
+
padding++;
|
|
4582
|
+
if (len > 1 && body.charCodeAt(len - 2) === 61) {
|
|
4583
|
+
padding++;
|
|
4584
|
+
}
|
|
4585
|
+
}
|
|
4586
|
+
return Math.floor((len - padding) * 3 / 4);
|
|
4587
|
+
};
|
|
4588
|
+
const estimatePercentDecodedBase64Bytes = (body) => {
|
|
4589
|
+
const len = body.length;
|
|
4590
|
+
let significant = 0;
|
|
4591
|
+
let padding = 0;
|
|
4592
|
+
let invalid = false;
|
|
4593
|
+
for (let i = 0; i < len; i++) {
|
|
4594
|
+
let code = body.charCodeAt(i);
|
|
4595
|
+
if (code === 37 && isPercentEncodedByte(body, i, len)) {
|
|
4596
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
4597
|
+
i += 2;
|
|
4598
|
+
}
|
|
4599
|
+
if (isBase64Whitespace(code)) {
|
|
4600
|
+
continue;
|
|
4601
|
+
}
|
|
4602
|
+
if (code === 61) {
|
|
4603
|
+
padding++;
|
|
4604
|
+
continue;
|
|
4605
|
+
}
|
|
4606
|
+
if (!isBase64Char(code) || padding > 0) {
|
|
4607
|
+
invalid = true;
|
|
4608
|
+
continue;
|
|
4609
|
+
}
|
|
4610
|
+
significant++;
|
|
4611
|
+
}
|
|
4612
|
+
if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
|
|
4613
|
+
return estimateBase64BufferAllocation(body);
|
|
4614
|
+
}
|
|
4615
|
+
return base64Bytes(significant);
|
|
4616
|
+
};
|
|
4617
|
+
const estimateDataURLBytes = (url, estimateBase64) => {
|
|
4376
4618
|
if (!url || typeof url !== "string") return 0;
|
|
4377
4619
|
if (!url.startsWith("data:")) return 0;
|
|
4378
4620
|
const comma = url.indexOf(",");
|
|
@@ -4381,43 +4623,7 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
4381
4623
|
const body = url.slice(comma + 1);
|
|
4382
4624
|
const isBase64 = /;base64/i.test(meta);
|
|
4383
4625
|
if (isBase64) {
|
|
4384
|
-
|
|
4385
|
-
const len = body.length;
|
|
4386
|
-
for (let i = 0; i < len; i++) {
|
|
4387
|
-
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
4388
|
-
const a = body.charCodeAt(i + 1);
|
|
4389
|
-
const b = body.charCodeAt(i + 2);
|
|
4390
|
-
const isHex = isHexDigit(a) && isHexDigit(b);
|
|
4391
|
-
if (isHex) {
|
|
4392
|
-
effectiveLen -= 2;
|
|
4393
|
-
i += 2;
|
|
4394
|
-
}
|
|
4395
|
-
}
|
|
4396
|
-
}
|
|
4397
|
-
let pad = 0;
|
|
4398
|
-
let idx = len - 1;
|
|
4399
|
-
const tailIsPct3D = (j2) => j2 >= 2 && body.charCodeAt(j2 - 2) === 37 && // '%'
|
|
4400
|
-
body.charCodeAt(j2 - 1) === 51 && // '3'
|
|
4401
|
-
(body.charCodeAt(j2) === 68 || body.charCodeAt(j2) === 100);
|
|
4402
|
-
if (idx >= 0) {
|
|
4403
|
-
if (body.charCodeAt(idx) === 61) {
|
|
4404
|
-
pad++;
|
|
4405
|
-
idx--;
|
|
4406
|
-
} else if (tailIsPct3D(idx)) {
|
|
4407
|
-
pad++;
|
|
4408
|
-
idx -= 3;
|
|
4409
|
-
}
|
|
4410
|
-
}
|
|
4411
|
-
if (pad === 1 && idx >= 0) {
|
|
4412
|
-
if (body.charCodeAt(idx) === 61) {
|
|
4413
|
-
pad++;
|
|
4414
|
-
} else if (tailIsPct3D(idx)) {
|
|
4415
|
-
pad++;
|
|
4416
|
-
}
|
|
4417
|
-
}
|
|
4418
|
-
const groups = Math.floor(effectiveLen / 4);
|
|
4419
|
-
const bytes2 = groups * 3 - (pad || 0);
|
|
4420
|
-
return bytes2 > 0 ? bytes2 : 0;
|
|
4626
|
+
return estimateBase64(body);
|
|
4421
4627
|
}
|
|
4422
4628
|
let bytes = 0;
|
|
4423
4629
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
@@ -4442,8 +4648,15 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
4442
4648
|
}
|
|
4443
4649
|
}
|
|
4444
4650
|
return bytes;
|
|
4651
|
+
};
|
|
4652
|
+
function estimateDataURLDecodedBytes(url) {
|
|
4653
|
+
const fragmentIndex = typeof url === "string" ? url.indexOf("#") : -1;
|
|
4654
|
+
return estimateDataURLBytes(
|
|
4655
|
+
fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
|
|
4656
|
+
estimatePercentDecodedBase64Bytes
|
|
4657
|
+
);
|
|
4445
4658
|
}
|
|
4446
|
-
const VERSION$1 = "1.
|
|
4659
|
+
const VERSION$1 = "1.19.0";
|
|
4447
4660
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
4448
4661
|
const { isFunction } = utils$1;
|
|
4449
4662
|
const encodeUTF8 = (str) => encodeURIComponent(str).replace(
|
|
@@ -4804,7 +5017,15 @@ const factory = (env) => {
|
|
|
4804
5017
|
const canceledError = composedSignal.reason;
|
|
4805
5018
|
canceledError.config = config;
|
|
4806
5019
|
request && (canceledError.request = request);
|
|
4807
|
-
err !== canceledError
|
|
5020
|
+
if (err !== canceledError) {
|
|
5021
|
+
Object.defineProperty(canceledError, "cause", {
|
|
5022
|
+
__proto__: null,
|
|
5023
|
+
value: err,
|
|
5024
|
+
writable: true,
|
|
5025
|
+
enumerable: false,
|
|
5026
|
+
configurable: true
|
|
5027
|
+
});
|
|
5028
|
+
}
|
|
4808
5029
|
throw canceledError;
|
|
4809
5030
|
}
|
|
4810
5031
|
if (pendingBodyError) {
|
|
@@ -4816,18 +5037,21 @@ const factory = (env) => {
|
|
|
4816
5037
|
throw err;
|
|
4817
5038
|
}
|
|
4818
5039
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
err && err.response
|
|
4826
|
-
),
|
|
4827
|
-
{
|
|
4828
|
-
cause: err.cause || err
|
|
4829
|
-
}
|
|
5040
|
+
const networkError = new AxiosError$1(
|
|
5041
|
+
"Network Error",
|
|
5042
|
+
AxiosError$1.ERR_NETWORK,
|
|
5043
|
+
config,
|
|
5044
|
+
request,
|
|
5045
|
+
err && err.response
|
|
4830
5046
|
);
|
|
5047
|
+
Object.defineProperty(networkError, "cause", {
|
|
5048
|
+
__proto__: null,
|
|
5049
|
+
value: err.cause || err,
|
|
5050
|
+
writable: true,
|
|
5051
|
+
enumerable: false,
|
|
5052
|
+
configurable: true
|
|
5053
|
+
});
|
|
5054
|
+
throw networkError;
|
|
4831
5055
|
}
|
|
4832
5056
|
throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
|
|
4833
5057
|
}
|
|
@@ -4894,7 +5118,7 @@ function getAdapter$1(adapters2, config) {
|
|
|
4894
5118
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
4895
5119
|
throw new AxiosError$1(
|
|
4896
5120
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
4897
|
-
|
|
5121
|
+
AxiosError$1.ERR_NOT_SUPPORT
|
|
4898
5122
|
);
|
|
4899
5123
|
}
|
|
4900
5124
|
return adapter;
|
|
@@ -4997,7 +5221,7 @@ validators$1.spelling = function spelling(correctSpelling) {
|
|
|
4997
5221
|
};
|
|
4998
5222
|
};
|
|
4999
5223
|
function assertOptions(options, schema, allowUnknown) {
|
|
5000
|
-
if (typeof options !== "object") {
|
|
5224
|
+
if (typeof options !== "object" || options === null) {
|
|
5001
5225
|
throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
5002
5226
|
}
|
|
5003
5227
|
const keys = Object.keys(options);
|
|
@@ -5171,16 +5395,31 @@ let Axios$1 = class Axios {
|
|
|
5171
5395
|
const onFulfilled = requestInterceptorChain[i++];
|
|
5172
5396
|
const onRejected = requestInterceptorChain[i++];
|
|
5173
5397
|
try {
|
|
5174
|
-
newConfig = onFulfilled(newConfig);
|
|
5398
|
+
newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
|
|
5175
5399
|
} catch (error) {
|
|
5176
|
-
onRejected
|
|
5400
|
+
if (!onRejected) {
|
|
5401
|
+
promise = Promise.reject(error);
|
|
5402
|
+
break;
|
|
5403
|
+
}
|
|
5404
|
+
try {
|
|
5405
|
+
const rejectedResult = onRejected.call(this, error);
|
|
5406
|
+
if (utils$1.isThenable(rejectedResult)) {
|
|
5407
|
+
promise = Promise.resolve(rejectedResult).then(
|
|
5408
|
+
() => dispatchRequest.call(this, newConfig)
|
|
5409
|
+
);
|
|
5410
|
+
}
|
|
5411
|
+
} catch (rejectedError) {
|
|
5412
|
+
promise = Promise.reject(rejectedError);
|
|
5413
|
+
}
|
|
5177
5414
|
break;
|
|
5178
5415
|
}
|
|
5179
5416
|
}
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5417
|
+
if (!promise) {
|
|
5418
|
+
try {
|
|
5419
|
+
promise = dispatchRequest.call(this, newConfig);
|
|
5420
|
+
} catch (error) {
|
|
5421
|
+
promise = Promise.reject(error);
|
|
5422
|
+
}
|
|
5184
5423
|
}
|
|
5185
5424
|
i = 0;
|
|
5186
5425
|
len = responseInterceptorChain.length;
|
|
@@ -5393,6 +5632,7 @@ const HttpStatusCode$1 = {
|
|
|
5393
5632
|
LoopDetected: 508,
|
|
5394
5633
|
NotExtended: 510,
|
|
5395
5634
|
NetworkAuthenticationRequired: 511,
|
|
5635
|
+
WebServerReturnsAnUnknownError: 520,
|
|
5396
5636
|
WebServerIsDown: 521,
|
|
5397
5637
|
ConnectionTimedOut: 522,
|
|
5398
5638
|
OriginIsUnreachable: 523,
|
|
@@ -5649,30 +5889,30 @@ function st$1() {
|
|
|
5649
5889
|
}
|
|
5650
5890
|
return h2.slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
5651
5891
|
};
|
|
5652
|
-
function t2(
|
|
5653
|
-
return typeof
|
|
5892
|
+
function t2(g) {
|
|
5893
|
+
return typeof g.constructor == "function" ? g.constructor.name : null;
|
|
5654
5894
|
}
|
|
5655
|
-
function s(
|
|
5656
|
-
return Array.isArray ? Array.isArray(
|
|
5895
|
+
function s(g) {
|
|
5896
|
+
return Array.isArray ? Array.isArray(g) : g instanceof Array;
|
|
5657
5897
|
}
|
|
5658
|
-
function r2(
|
|
5659
|
-
return
|
|
5898
|
+
function r2(g) {
|
|
5899
|
+
return g instanceof Error || typeof g.message == "string" && g.constructor && typeof g.constructor.stackTraceLimit == "number";
|
|
5660
5900
|
}
|
|
5661
|
-
function n2(
|
|
5662
|
-
return
|
|
5901
|
+
function n2(g) {
|
|
5902
|
+
return g instanceof Date ? true : typeof g.toDateString == "function" && typeof g.getDate == "function" && typeof g.setDate == "function";
|
|
5663
5903
|
}
|
|
5664
|
-
function u(
|
|
5665
|
-
return
|
|
5904
|
+
function u(g) {
|
|
5905
|
+
return g instanceof RegExp ? true : typeof g.flags == "string" && typeof g.ignoreCase == "boolean" && typeof g.multiline == "boolean" && typeof g.global == "boolean";
|
|
5666
5906
|
}
|
|
5667
|
-
function o2(
|
|
5668
|
-
return t2(
|
|
5907
|
+
function o2(g, p) {
|
|
5908
|
+
return t2(g) === "GeneratorFunction";
|
|
5669
5909
|
}
|
|
5670
|
-
function l(
|
|
5671
|
-
return typeof
|
|
5910
|
+
function l(g) {
|
|
5911
|
+
return typeof g.throw == "function" && typeof g.return == "function" && typeof g.next == "function";
|
|
5672
5912
|
}
|
|
5673
|
-
function i(
|
|
5913
|
+
function i(g) {
|
|
5674
5914
|
try {
|
|
5675
|
-
if (typeof
|
|
5915
|
+
if (typeof g.length == "number" && typeof g.callee == "function")
|
|
5676
5916
|
return true;
|
|
5677
5917
|
} catch (p) {
|
|
5678
5918
|
if (p.message.indexOf("callee") !== -1)
|
|
@@ -5680,8 +5920,8 @@ function st$1() {
|
|
|
5680
5920
|
}
|
|
5681
5921
|
return false;
|
|
5682
5922
|
}
|
|
5683
|
-
function f(
|
|
5684
|
-
return
|
|
5923
|
+
function f(g) {
|
|
5924
|
+
return g.constructor && typeof g.constructor.isBuffer == "function" ? g.constructor.isBuffer(g) : false;
|
|
5685
5925
|
}
|
|
5686
5926
|
return x$1;
|
|
5687
5927
|
}
|
|
@@ -5733,8 +5973,8 @@ function St$1() {
|
|
|
5733
5973
|
}
|
|
5734
5974
|
}
|
|
5735
5975
|
function r2(i) {
|
|
5736
|
-
const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0,
|
|
5737
|
-
return
|
|
5976
|
+
const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, g = new i.constructor(i.source, f);
|
|
5977
|
+
return g.lastIndex = i.lastIndex, g;
|
|
5738
5978
|
}
|
|
5739
5979
|
function n2(i) {
|
|
5740
5980
|
const f = new i.constructor(i.byteLength);
|
|
@@ -5744,8 +5984,8 @@ function St$1() {
|
|
|
5744
5984
|
return new i.constructor(i.buffer, i.byteOffset, i.length);
|
|
5745
5985
|
}
|
|
5746
5986
|
function o2(i) {
|
|
5747
|
-
const f = i.length,
|
|
5748
|
-
return i.copy(
|
|
5987
|
+
const f = i.length, g = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
|
|
5988
|
+
return i.copy(g), g;
|
|
5749
5989
|
}
|
|
5750
5990
|
function l(i) {
|
|
5751
5991
|
return e2 ? Object(e2.call(i)) : {};
|
|
@@ -5934,10 +6174,10 @@ function O$1({ options: e2 }) {
|
|
|
5934
6174
|
return e2.apiVersion && (c = `${c}/${e2.apiVersion}`), e2.organizationId && (c = `${c}/organizations/${e2.organizationId}`), `${c}`;
|
|
5935
6175
|
}
|
|
5936
6176
|
function o2() {
|
|
5937
|
-
const
|
|
5938
|
-
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((m2) => m2).join("/")}@
|
|
6177
|
+
const a = {
|
|
6178
|
+
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((m2) => m2).join("/")}@c1aeb51`
|
|
5939
6179
|
};
|
|
5940
|
-
return e2.apiKey && (
|
|
6180
|
+
return e2.apiKey && (a["REB-APIKEY"] = e2.apiKey), a;
|
|
5941
6181
|
}
|
|
5942
6182
|
function l() {
|
|
5943
6183
|
return Dt$1(t2.defaults.headers);
|
|
@@ -5946,38 +6186,38 @@ function O$1({ options: e2 }) {
|
|
|
5946
6186
|
e2.requestTimeout = Number(c), t2.defaults.timeout = e2.requestTimeout;
|
|
5947
6187
|
}
|
|
5948
6188
|
function f(c = e2.jwt) {
|
|
5949
|
-
const
|
|
5950
|
-
e2.apiKey = null, e2.jwt = c, delete
|
|
6189
|
+
const a = l();
|
|
6190
|
+
e2.apiKey = null, e2.jwt = c, delete a.common["REB-APIKEY"], a.common.Authorization = `Bearer ${c}`, t2.defaults.headers = a;
|
|
5951
6191
|
}
|
|
5952
|
-
function
|
|
5953
|
-
const
|
|
5954
|
-
e2.publishableKey = c,
|
|
6192
|
+
function g(c = e2.publishableKey) {
|
|
6193
|
+
const a = l();
|
|
6194
|
+
e2.publishableKey = c, a.common.Authorization = `${c}`, t2.defaults.headers = a;
|
|
5955
6195
|
}
|
|
5956
|
-
function p({ host: c, port:
|
|
6196
|
+
function p({ host: c, port: a, auth: m2 }) {
|
|
5957
6197
|
t2.defaults.proxy = {
|
|
5958
6198
|
host: c,
|
|
5959
|
-
port:
|
|
6199
|
+
port: a,
|
|
5960
6200
|
auth: m2
|
|
5961
6201
|
};
|
|
5962
6202
|
}
|
|
5963
|
-
function h2({ live: c = null, sandbox:
|
|
5964
|
-
c && (e2.apiEndpoints.live = c),
|
|
6203
|
+
function h2({ live: c = null, sandbox: a = null }) {
|
|
6204
|
+
c && (e2.apiEndpoints.live = c), a && (e2.apiEndpoints.sandbox = a), t2.defaults.baseURL = u();
|
|
5965
6205
|
}
|
|
5966
|
-
function K2(c, { thenDelegate:
|
|
6206
|
+
function K2(c, { thenDelegate: a, catchDelegate: m2 = () => {
|
|
5967
6207
|
} }) {
|
|
5968
6208
|
return tt$1(c) && t2.interceptors[w[c]].use(
|
|
5969
|
-
|
|
6209
|
+
a,
|
|
5970
6210
|
m2
|
|
5971
6211
|
);
|
|
5972
6212
|
}
|
|
5973
|
-
function N2(c,
|
|
5974
|
-
return tt$1(c) && t2.interceptors[w[c]].eject(
|
|
6213
|
+
function N2(c, a) {
|
|
6214
|
+
return tt$1(c) && t2.interceptors[w[c]].eject(a);
|
|
5975
6215
|
}
|
|
5976
|
-
function rt2({ thenDelegate: c, catchDelegate:
|
|
6216
|
+
function rt2({ thenDelegate: c, catchDelegate: a = () => {
|
|
5977
6217
|
} }) {
|
|
5978
6218
|
return K2(w.request, {
|
|
5979
6219
|
thenDelegate: c,
|
|
5980
|
-
catchDelegate:
|
|
6220
|
+
catchDelegate: a
|
|
5981
6221
|
});
|
|
5982
6222
|
}
|
|
5983
6223
|
function nt2(c) {
|
|
@@ -5985,18 +6225,18 @@ function O$1({ options: e2 }) {
|
|
|
5985
6225
|
}
|
|
5986
6226
|
function ut2({
|
|
5987
6227
|
thenDelegate: c,
|
|
5988
|
-
catchDelegate:
|
|
6228
|
+
catchDelegate: a = () => {
|
|
5989
6229
|
}
|
|
5990
6230
|
}) {
|
|
5991
6231
|
return K2(w.response, {
|
|
5992
6232
|
thenDelegate: c,
|
|
5993
|
-
catchDelegate:
|
|
6233
|
+
catchDelegate: a
|
|
5994
6234
|
});
|
|
5995
6235
|
}
|
|
5996
6236
|
function ot2(c) {
|
|
5997
6237
|
N2(w.response, c);
|
|
5998
6238
|
}
|
|
5999
|
-
function v({ request: c, isCollection:
|
|
6239
|
+
function v({ request: c, isCollection: a, config: m2 }) {
|
|
6000
6240
|
const $2 = z2(m2), { id: b, cancelToken: $t2 } = q$1.save();
|
|
6001
6241
|
$2.cancelToken = $t2;
|
|
6002
6242
|
const G2 = (async function() {
|
|
@@ -6004,7 +6244,7 @@ function O$1({ options: e2 }) {
|
|
|
6004
6244
|
const T = await c($2);
|
|
6005
6245
|
return lt2({
|
|
6006
6246
|
response: T,
|
|
6007
|
-
isCollection:
|
|
6247
|
+
isCollection: a,
|
|
6008
6248
|
config: $2
|
|
6009
6249
|
});
|
|
6010
6250
|
} catch (T) {
|
|
@@ -6015,8 +6255,8 @@ function O$1({ options: e2 }) {
|
|
|
6015
6255
|
})();
|
|
6016
6256
|
return G2.cancel = (T) => I$1.cancelById(b, T), G2;
|
|
6017
6257
|
}
|
|
6018
|
-
function lt2({ response: c, isCollection:
|
|
6019
|
-
return
|
|
6258
|
+
function lt2({ response: c, isCollection: a, config: m2 }) {
|
|
6259
|
+
return a ? new yt$1(c, m2) : new et$1(c, m2);
|
|
6020
6260
|
}
|
|
6021
6261
|
function L2({ error: c }) {
|
|
6022
6262
|
if (axios.isCancel(c))
|
|
@@ -6040,61 +6280,61 @@ function O$1({ options: e2 }) {
|
|
|
6040
6280
|
}
|
|
6041
6281
|
function ct2(c) {
|
|
6042
6282
|
return c.params !== void 0 && (c.params = Object.keys(c.params).filter(
|
|
6043
|
-
(
|
|
6283
|
+
(a) => {
|
|
6044
6284
|
var m2;
|
|
6045
|
-
return c.params[
|
|
6285
|
+
return c.params[a] !== null && c.params[a] !== "" && !(a === "sort" && ((m2 = c.params[a]) == null ? void 0 : m2.length) === 0);
|
|
6046
6286
|
}
|
|
6047
|
-
).reduce((
|
|
6287
|
+
).reduce((a, m2) => {
|
|
6048
6288
|
const $2 = c.params[m2];
|
|
6049
|
-
return
|
|
6289
|
+
return a[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, a;
|
|
6050
6290
|
}, {})), c;
|
|
6051
6291
|
}
|
|
6052
6292
|
function z2(c = {}) {
|
|
6053
6293
|
return { ...ct2(c) };
|
|
6054
6294
|
}
|
|
6055
|
-
function U2(c,
|
|
6295
|
+
function U2(c, a = {}) {
|
|
6056
6296
|
return v({
|
|
6057
6297
|
request: (m2) => t2.get(c, m2),
|
|
6058
|
-
config: { params:
|
|
6298
|
+
config: { params: a }
|
|
6059
6299
|
});
|
|
6060
6300
|
}
|
|
6061
|
-
function it2(c,
|
|
6301
|
+
function it2(c, a) {
|
|
6062
6302
|
return v({
|
|
6063
6303
|
request: (m2) => t2.get(c, m2),
|
|
6064
|
-
config: { params:
|
|
6304
|
+
config: { params: a },
|
|
6065
6305
|
isCollection: true
|
|
6066
6306
|
});
|
|
6067
6307
|
}
|
|
6068
|
-
function V2(c,
|
|
6308
|
+
function V2(c, a, m2 = {}) {
|
|
6069
6309
|
let $2 = {};
|
|
6070
6310
|
return m2.authenticate === false && ($2 = { headers: l() }, delete $2.headers.common["REB-APIKEY"], delete $2.headers.common.Authorization), m2.params && ($2.params = { ...m2.params }), v({
|
|
6071
|
-
request: (b) => t2.post(c,
|
|
6311
|
+
request: (b) => t2.post(c, a, b),
|
|
6072
6312
|
config: $2
|
|
6073
6313
|
});
|
|
6074
6314
|
}
|
|
6075
|
-
function J2(c,
|
|
6315
|
+
function J2(c, a, m2 = {}) {
|
|
6076
6316
|
return v({
|
|
6077
|
-
request: ($2) => t2.put(c,
|
|
6317
|
+
request: ($2) => t2.put(c, a, $2),
|
|
6078
6318
|
config: { params: m2 }
|
|
6079
6319
|
});
|
|
6080
6320
|
}
|
|
6081
|
-
function
|
|
6321
|
+
function at2(c, a) {
|
|
6082
6322
|
return v({
|
|
6083
|
-
request: (m2) => t2.patch(c,
|
|
6323
|
+
request: (m2) => t2.patch(c, a, m2),
|
|
6084
6324
|
config: {}
|
|
6085
6325
|
});
|
|
6086
6326
|
}
|
|
6087
|
-
function W2(c,
|
|
6327
|
+
function W2(c, a = null) {
|
|
6088
6328
|
return v({
|
|
6089
6329
|
request: (m2) => t2.delete(c, m2),
|
|
6090
|
-
config:
|
|
6330
|
+
config: a != null ? { data: a } : {}
|
|
6091
6331
|
});
|
|
6092
6332
|
}
|
|
6093
|
-
function
|
|
6094
|
-
return W2(c,
|
|
6333
|
+
function gt2(c, a) {
|
|
6334
|
+
return W2(c, a);
|
|
6095
6335
|
}
|
|
6096
|
-
async function mt2(c,
|
|
6097
|
-
if (
|
|
6336
|
+
async function mt2(c, a, m2, $2 = {}) {
|
|
6337
|
+
if (a === "")
|
|
6098
6338
|
return V2(c, m2, { params: $2 });
|
|
6099
6339
|
try {
|
|
6100
6340
|
if ((await U2(c)).response.status === 200)
|
|
@@ -6107,8 +6347,8 @@ function O$1({ options: e2 }) {
|
|
|
6107
6347
|
throw b;
|
|
6108
6348
|
}
|
|
6109
6349
|
}
|
|
6110
|
-
async function ft2(c,
|
|
6111
|
-
const m2 = z2(
|
|
6350
|
+
async function ft2(c, a) {
|
|
6351
|
+
const m2 = z2(a);
|
|
6112
6352
|
try {
|
|
6113
6353
|
const $2 = await t2.get(c, m2);
|
|
6114
6354
|
return new At$1($2, m2);
|
|
@@ -6125,15 +6365,15 @@ function O$1({ options: e2 }) {
|
|
|
6125
6365
|
setTimeout: i,
|
|
6126
6366
|
setProxyAgent: p,
|
|
6127
6367
|
setSessionToken: f,
|
|
6128
|
-
setPublishableKey:
|
|
6368
|
+
setPublishableKey: g,
|
|
6129
6369
|
setEndpoints: h2,
|
|
6130
6370
|
get: U2,
|
|
6131
6371
|
getAll: it2,
|
|
6132
6372
|
post: V2,
|
|
6133
6373
|
put: J2,
|
|
6134
|
-
patch:
|
|
6374
|
+
patch: at2,
|
|
6135
6375
|
delete: W2,
|
|
6136
|
-
deleteAll:
|
|
6376
|
+
deleteAll: gt2,
|
|
6137
6377
|
create: mt2,
|
|
6138
6378
|
download: ft2
|
|
6139
6379
|
};
|
|
@@ -7165,7 +7405,7 @@ function ie$1({ apiHandler: e2 }) {
|
|
|
7165
7405
|
}
|
|
7166
7406
|
};
|
|
7167
7407
|
}
|
|
7168
|
-
function
|
|
7408
|
+
function ae$1({ apiHandler: e2 }) {
|
|
7169
7409
|
return {
|
|
7170
7410
|
/**
|
|
7171
7411
|
* @param { rebilly.GetEmailNotificationCollectionRequest } request
|
|
@@ -7177,7 +7417,7 @@ function ge({ apiHandler: e2 }) {
|
|
|
7177
7417
|
}
|
|
7178
7418
|
};
|
|
7179
7419
|
}
|
|
7180
|
-
function
|
|
7420
|
+
function ge({ apiHandler: e2 }) {
|
|
7181
7421
|
return {
|
|
7182
7422
|
/**
|
|
7183
7423
|
* @param { rebilly.GetEventCollectionRequest } request
|
|
@@ -7482,7 +7722,7 @@ function pe$1({ apiHandler: e2 }) {
|
|
|
7482
7722
|
const o2 = this.getAllAttachments(s);
|
|
7483
7723
|
r2.push(o2);
|
|
7484
7724
|
const i = (await o2).items.map(
|
|
7485
|
-
(
|
|
7725
|
+
(g) => this.detach({ id: g.fields.id })
|
|
7486
7726
|
);
|
|
7487
7727
|
r2 = [...r2, i], await Promise.all(i);
|
|
7488
7728
|
const f = e2.delete(`files/${t2}`);
|
|
@@ -9552,7 +9792,7 @@ function is({ apiHandler: e2 }) {
|
|
|
9552
9792
|
}
|
|
9553
9793
|
};
|
|
9554
9794
|
}
|
|
9555
|
-
function
|
|
9795
|
+
function as({ apiHandler: e2 }) {
|
|
9556
9796
|
return {
|
|
9557
9797
|
/**
|
|
9558
9798
|
* @param { rebilly.GetUsageCollectionRequest } request
|
|
@@ -9582,7 +9822,7 @@ function gs({ apiHandler: e2 }) {
|
|
|
9582
9822
|
}
|
|
9583
9823
|
};
|
|
9584
9824
|
}
|
|
9585
|
-
function
|
|
9825
|
+
function gs({ apiHandler: e2 }) {
|
|
9586
9826
|
return {
|
|
9587
9827
|
/**
|
|
9588
9828
|
* @param { rebilly.GetUserCollectionRequest } request
|
|
@@ -9705,7 +9945,7 @@ class $s {
|
|
|
9705
9945
|
apiHandler: t2
|
|
9706
9946
|
}), this.account = Bt$1({ apiHandler: t2 }), this.allowlists = Kt$1({ apiHandler: t2 }), this.amlChecks = Nt$1({ apiHandler: t2 }), this.amlSettings = Lt$1({ apiHandler: t2 }), this.apiKeys = zt$1({ apiHandler: t2 }), this.applicationInstances = Ut$1({ apiHandler: t2 }), this.applications = Vt$1({ apiHandler: t2 }), this.balanceTransactions = Jt$1({ apiHandler: t2 }), this.billingPortals = Wt$1({ apiHandler: t2 }), this.blocklists = Gt$1({ apiHandler: t2 }), this.broadcastMessages = Yt$1({ apiHandler: t2 }), this.cashiers = Qt$1({ apiHandler: t2 }), this.checkoutForms = Xt$1({ apiHandler: t2 }), this.coupons = Zt$1({ apiHandler: t2 }), this.creditMemos = _t$1({ apiHandler: t2 }), this.customDomains = Ht$1({ apiHandler: t2 }), this.customFields = te$1({ apiHandler: t2 }), this.customerAuthentication = ee$1({ apiHandler: t2 }), this.customers = se$1({ apiHandler: t2 }), this.depositCustomPropertySets = re$1({
|
|
9707
9947
|
apiHandler: t2
|
|
9708
|
-
}), this.depositRequests = ne$1({ apiHandler: t2 }), this.depositStrategies = ue$1({ apiHandler: t2 }), this.digitalWallets = oe$1({ apiHandler: t2 }), this.disputes = le$1({ apiHandler: t2 }), this.emailDeliverySettings = ce$1({ apiHandler: t2 }), this.emailMessages = ie$1({ apiHandler: t2 }), this.emailNotifications =
|
|
9948
|
+
}), this.depositRequests = ne$1({ apiHandler: t2 }), this.depositStrategies = ue$1({ apiHandler: t2 }), this.digitalWallets = oe$1({ apiHandler: t2 }), this.disputes = le$1({ apiHandler: t2 }), this.emailDeliverySettings = ce$1({ apiHandler: t2 }), this.emailMessages = ie$1({ apiHandler: t2 }), this.emailNotifications = ae$1({ apiHandler: t2 }), this.events = ge({ apiHandler: t2 }), this.externalIdentifiers = me$1({ apiHandler: t2 }), this.externalServicesSettings = fe$1({
|
|
9709
9949
|
apiHandler: t2
|
|
9710
9950
|
}), this.fees = $e$1({ apiHandler: t2 }), this.files = pe$1({ apiHandler: t2 }), this.gatewayAccounts = he$1({ apiHandler: t2 }), this.integrations = ye$1({ apiHandler: t2 }), this.invoices = Ae$1({ apiHandler: t2 }), this.journalAccounts = be({ apiHandler: t2 }), this.journalEntries = Re$1({ apiHandler: t2 }), this.journalRecords = we$1({ apiHandler: t2 }), this.kycDocuments = ke$1({ apiHandler: t2 }), this.kycRequests = ve$1({ apiHandler: t2 }), this.kycSettings = qe$1({ apiHandler: t2 }), this.lists = Te$1({ apiHandler: t2 }), this.memberships = de$1({ apiHandler: t2 }), this.orderCancellations = Ie$1({ apiHandler: t2 }), this.orderPauses = Se$1({ apiHandler: t2 }), this.orderReactivations = Ee$1({ apiHandler: t2 }), this.orders = xe$1({ apiHandler: t2 }), this.organizationExports = Pe$1({ apiHandler: t2 }), this.organizations = Ce$1({ apiHandler: t2 }), this.paymentCardsBankNames = De$1({ apiHandler: t2 }), this.paymentInstruments = je$1({ apiHandler: t2 }), this.paymentMethods = Me$1({ apiHandler: t2 }), this.paymentTokens = Oe$1({ apiHandler: t2 }), this.payoutRequestAllocations = Fe$1({
|
|
9711
9951
|
apiHandler: t2
|
|
@@ -9713,7 +9953,7 @@ class $s {
|
|
|
9713
9953
|
apiHandler: t2
|
|
9714
9954
|
}), this.subscriptionPauses = rs({ apiHandler: t2 }), this.subscriptionReactivations = ns({
|
|
9715
9955
|
apiHandler: t2
|
|
9716
|
-
}), this.subscriptions = us({ apiHandler: t2 }), this.tags = os({ apiHandler: t2 }), this.tagsRules = ls({ apiHandler: t2 }), this.tracking = cs({ apiHandler: t2 }), this.transactions = is({ apiHandler: t2 }), this.usages =
|
|
9956
|
+
}), this.subscriptions = us({ apiHandler: t2 }), this.tags = os({ apiHandler: t2 }), this.tagsRules = ls({ apiHandler: t2 }), this.tracking = cs({ apiHandler: t2 }), this.transactions = is({ apiHandler: t2 }), this.usages = as({ apiHandler: t2 }), this.users = gs({ apiHandler: t2 }), this.webhooks = ms({ apiHandler: t2 }), this.websites = fs({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setPublishableKey = t2.setPublishableKey, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken, this.generateSignature = t2.generateSignature;
|
|
9717
9957
|
}
|
|
9718
9958
|
}
|
|
9719
9959
|
function ps({ apiHandler: e2 }) {
|
|
@@ -10120,7 +10360,7 @@ function As({ apiHandler: e2 }) {
|
|
|
10120
10360
|
filter: i = null,
|
|
10121
10361
|
criteria: f = null
|
|
10122
10362
|
}) {
|
|
10123
|
-
const
|
|
10363
|
+
const g = {
|
|
10124
10364
|
aggregationField: t2,
|
|
10125
10365
|
aggregationPeriod: s,
|
|
10126
10366
|
includeSwitchedSubscriptions: r2,
|
|
@@ -10131,7 +10371,7 @@ function As({ apiHandler: e2 }) {
|
|
|
10131
10371
|
filter: i,
|
|
10132
10372
|
criteria: f
|
|
10133
10373
|
};
|
|
10134
|
-
return e2.get("reports/retention-percentage",
|
|
10374
|
+
return e2.get("reports/retention-percentage", g);
|
|
10135
10375
|
},
|
|
10136
10376
|
/**
|
|
10137
10377
|
* @returns { rebilly.GetRetentionValueReportResponsePromise } response
|
|
@@ -10146,7 +10386,7 @@ function As({ apiHandler: e2 }) {
|
|
|
10146
10386
|
limit: l = null,
|
|
10147
10387
|
offset: i = null,
|
|
10148
10388
|
filter: f = null,
|
|
10149
|
-
sort:
|
|
10389
|
+
sort: g = null,
|
|
10150
10390
|
criteria: p = null
|
|
10151
10391
|
}) {
|
|
10152
10392
|
const h2 = {
|
|
@@ -10159,7 +10399,7 @@ function As({ apiHandler: e2 }) {
|
|
|
10159
10399
|
limit: l,
|
|
10160
10400
|
offset: i,
|
|
10161
10401
|
filter: f,
|
|
10162
|
-
sort:
|
|
10402
|
+
sort: g,
|
|
10163
10403
|
criteria: p
|
|
10164
10404
|
};
|
|
10165
10405
|
return e2.get("reports/retention-value", h2);
|
|
@@ -11394,32 +11634,46 @@ function we(e2, t2) {
|
|
|
11394
11634
|
switch (o2 = [0, 0], c = [0, 0], n2) {
|
|
11395
11635
|
case 15:
|
|
11396
11636
|
c = h(c, L([0, e2.charCodeAt(u + 14)], 48));
|
|
11637
|
+
// fallthrough
|
|
11397
11638
|
case 14:
|
|
11398
11639
|
c = h(c, L([0, e2.charCodeAt(u + 13)], 40));
|
|
11640
|
+
// fallthrough
|
|
11399
11641
|
case 13:
|
|
11400
11642
|
c = h(c, L([0, e2.charCodeAt(u + 12)], 32));
|
|
11643
|
+
// fallthrough
|
|
11401
11644
|
case 12:
|
|
11402
11645
|
c = h(c, L([0, e2.charCodeAt(u + 11)], 24));
|
|
11646
|
+
// fallthrough
|
|
11403
11647
|
case 11:
|
|
11404
11648
|
c = h(c, L([0, e2.charCodeAt(u + 10)], 16));
|
|
11649
|
+
// fallthrough
|
|
11405
11650
|
case 10:
|
|
11406
11651
|
c = h(c, L([0, e2.charCodeAt(u + 9)], 8));
|
|
11652
|
+
// fallthrough
|
|
11407
11653
|
case 9:
|
|
11408
11654
|
c = h(c, [0, e2.charCodeAt(u + 8)]), c = C(c, s), c = A2(c, 33), c = C(c, l), r2 = h(r2, c);
|
|
11655
|
+
// fallthrough
|
|
11409
11656
|
case 8:
|
|
11410
11657
|
o2 = h(o2, L([0, e2.charCodeAt(u + 7)], 56));
|
|
11658
|
+
// fallthrough
|
|
11411
11659
|
case 7:
|
|
11412
11660
|
o2 = h(o2, L([0, e2.charCodeAt(u + 6)], 48));
|
|
11661
|
+
// fallthrough
|
|
11413
11662
|
case 6:
|
|
11414
11663
|
o2 = h(o2, L([0, e2.charCodeAt(u + 5)], 40));
|
|
11664
|
+
// fallthrough
|
|
11415
11665
|
case 5:
|
|
11416
11666
|
o2 = h(o2, L([0, e2.charCodeAt(u + 4)], 32));
|
|
11667
|
+
// fallthrough
|
|
11417
11668
|
case 4:
|
|
11418
11669
|
o2 = h(o2, L([0, e2.charCodeAt(u + 3)], 24));
|
|
11670
|
+
// fallthrough
|
|
11419
11671
|
case 3:
|
|
11420
11672
|
o2 = h(o2, L([0, e2.charCodeAt(u + 2)], 16));
|
|
11673
|
+
// fallthrough
|
|
11421
11674
|
case 2:
|
|
11422
11675
|
o2 = h(o2, L([0, e2.charCodeAt(u + 1)], 8));
|
|
11676
|
+
// fallthrough
|
|
11423
11677
|
case 1:
|
|
11424
11678
|
o2 = h(o2, [0, e2.charCodeAt(u)]), o2 = C(o2, l), o2 = A2(o2, 31), o2 = C(o2, s), i = h(i, o2);
|
|
11425
11679
|
}
|
|
@@ -11715,6 +11969,9 @@ function Pe(e2) {
|
|
|
11715
11969
|
case "running":
|
|
11716
11970
|
f = Date.now(), s && d2();
|
|
11717
11971
|
break;
|
|
11972
|
+
// Sometimes the audio context doesn't start after calling `startRendering` (in addition to the cases where
|
|
11973
|
+
// audio context doesn't start at all). A known case is starting an audio context when the browser tab is in
|
|
11974
|
+
// background on iPhone. Retries usually help in this case.
|
|
11718
11975
|
case "suspended":
|
|
11719
11976
|
document.hidden || u++, s && u >= t2 ? l(ee(
|
|
11720
11977
|
"suspended"
|