@lodashventure/medusa-membership 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.medusa/server/src/admin/index.js +19 -1170
- package/.medusa/server/src/admin/index.mjs +18 -1170
- package/.medusa/server/src/api/middlewares/consent.js +19 -1
- package/.medusa/server/src/api/middlewares/member-tiers.js +5 -1
- package/.medusa/server/src/api/middlewares/notifications.js +22 -1
- package/.medusa/server/src/api/store/customers/me/consents/[keyId]/route.js +98 -12
- package/.medusa/server/src/api/store/customers/me/consents/route.js +31 -8
- package/.medusa/server/src/api/store/customers/me/consents/settings/route.js +110 -0
- package/.medusa/server/src/api/store/customers/me/notifications/settings/route.js +105 -0
- package/.medusa/server/src/workflows/membership-consent/consent-update-notification.js +62 -0
- package/.medusa/server/src/workflows/membership-consent/retrieve-membership-consent.js +5 -8
- package/package.json +8 -4
- package/.medusa/server/src/api/store/customers/me/notifications/[key]/route.js +0 -21
- package/.medusa/server/src/api/store/promotion-codes/route.js +0 -66
|
@@ -2,1165 +2,14 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const adminSdk = require("@medusajs/admin-sdk");
|
|
4
4
|
const ui = require("@medusajs/ui");
|
|
5
|
+
const axios = require("axios");
|
|
5
6
|
const reactQuery = require("@tanstack/react-query");
|
|
6
7
|
const Medusa = require("@medusajs/js-sdk");
|
|
7
8
|
const icons = require("@medusajs/icons");
|
|
8
9
|
const react = require("react");
|
|
9
10
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
11
|
+
const axios__default = /* @__PURE__ */ _interopDefault(axios);
|
|
10
12
|
const Medusa__default = /* @__PURE__ */ _interopDefault(Medusa);
|
|
11
|
-
function getDefaultExportFromCjs(x) {
|
|
12
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
13
|
-
}
|
|
14
|
-
var axios$3 = { exports: {} };
|
|
15
|
-
var bind$2 = function bind(fn, thisArg) {
|
|
16
|
-
return function wrap() {
|
|
17
|
-
var args = new Array(arguments.length);
|
|
18
|
-
for (var i = 0; i < args.length; i++) {
|
|
19
|
-
args[i] = arguments[i];
|
|
20
|
-
}
|
|
21
|
-
return fn.apply(thisArg, args);
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
var bind$1 = bind$2;
|
|
25
|
-
var toString = Object.prototype.toString;
|
|
26
|
-
function isArray(val) {
|
|
27
|
-
return toString.call(val) === "[object Array]";
|
|
28
|
-
}
|
|
29
|
-
function isUndefined(val) {
|
|
30
|
-
return typeof val === "undefined";
|
|
31
|
-
}
|
|
32
|
-
function isBuffer(val) {
|
|
33
|
-
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
|
|
34
|
-
}
|
|
35
|
-
function isArrayBuffer(val) {
|
|
36
|
-
return toString.call(val) === "[object ArrayBuffer]";
|
|
37
|
-
}
|
|
38
|
-
function isFormData(val) {
|
|
39
|
-
return typeof FormData !== "undefined" && val instanceof FormData;
|
|
40
|
-
}
|
|
41
|
-
function isArrayBufferView(val) {
|
|
42
|
-
var result;
|
|
43
|
-
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
44
|
-
result = ArrayBuffer.isView(val);
|
|
45
|
-
} else {
|
|
46
|
-
result = val && val.buffer && val.buffer instanceof ArrayBuffer;
|
|
47
|
-
}
|
|
48
|
-
return result;
|
|
49
|
-
}
|
|
50
|
-
function isString(val) {
|
|
51
|
-
return typeof val === "string";
|
|
52
|
-
}
|
|
53
|
-
function isNumber(val) {
|
|
54
|
-
return typeof val === "number";
|
|
55
|
-
}
|
|
56
|
-
function isObject(val) {
|
|
57
|
-
return val !== null && typeof val === "object";
|
|
58
|
-
}
|
|
59
|
-
function isPlainObject(val) {
|
|
60
|
-
if (toString.call(val) !== "[object Object]") {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
var prototype = Object.getPrototypeOf(val);
|
|
64
|
-
return prototype === null || prototype === Object.prototype;
|
|
65
|
-
}
|
|
66
|
-
function isDate(val) {
|
|
67
|
-
return toString.call(val) === "[object Date]";
|
|
68
|
-
}
|
|
69
|
-
function isFile(val) {
|
|
70
|
-
return toString.call(val) === "[object File]";
|
|
71
|
-
}
|
|
72
|
-
function isBlob(val) {
|
|
73
|
-
return toString.call(val) === "[object Blob]";
|
|
74
|
-
}
|
|
75
|
-
function isFunction(val) {
|
|
76
|
-
return toString.call(val) === "[object Function]";
|
|
77
|
-
}
|
|
78
|
-
function isStream(val) {
|
|
79
|
-
return isObject(val) && isFunction(val.pipe);
|
|
80
|
-
}
|
|
81
|
-
function isURLSearchParams(val) {
|
|
82
|
-
return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
|
|
83
|
-
}
|
|
84
|
-
function trim(str) {
|
|
85
|
-
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
|
|
86
|
-
}
|
|
87
|
-
function isStandardBrowserEnv() {
|
|
88
|
-
if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
92
|
-
}
|
|
93
|
-
function forEach(obj, fn) {
|
|
94
|
-
if (obj === null || typeof obj === "undefined") {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (typeof obj !== "object") {
|
|
98
|
-
obj = [obj];
|
|
99
|
-
}
|
|
100
|
-
if (isArray(obj)) {
|
|
101
|
-
for (var i = 0, l = obj.length; i < l; i++) {
|
|
102
|
-
fn.call(null, obj[i], i, obj);
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
for (var key in obj) {
|
|
106
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
107
|
-
fn.call(null, obj[key], key, obj);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function merge() {
|
|
113
|
-
var result = {};
|
|
114
|
-
function assignValue(val, key) {
|
|
115
|
-
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
|
116
|
-
result[key] = merge(result[key], val);
|
|
117
|
-
} else if (isPlainObject(val)) {
|
|
118
|
-
result[key] = merge({}, val);
|
|
119
|
-
} else if (isArray(val)) {
|
|
120
|
-
result[key] = val.slice();
|
|
121
|
-
} else {
|
|
122
|
-
result[key] = val;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
126
|
-
forEach(arguments[i], assignValue);
|
|
127
|
-
}
|
|
128
|
-
return result;
|
|
129
|
-
}
|
|
130
|
-
function extend(a, b, thisArg) {
|
|
131
|
-
forEach(b, function assignValue(val, key) {
|
|
132
|
-
if (thisArg && typeof val === "function") {
|
|
133
|
-
a[key] = bind$1(val, thisArg);
|
|
134
|
-
} else {
|
|
135
|
-
a[key] = val;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
return a;
|
|
139
|
-
}
|
|
140
|
-
function stripBOM(content) {
|
|
141
|
-
if (content.charCodeAt(0) === 65279) {
|
|
142
|
-
content = content.slice(1);
|
|
143
|
-
}
|
|
144
|
-
return content;
|
|
145
|
-
}
|
|
146
|
-
var utils$9 = {
|
|
147
|
-
isArray,
|
|
148
|
-
isArrayBuffer,
|
|
149
|
-
isBuffer,
|
|
150
|
-
isFormData,
|
|
151
|
-
isArrayBufferView,
|
|
152
|
-
isString,
|
|
153
|
-
isNumber,
|
|
154
|
-
isObject,
|
|
155
|
-
isPlainObject,
|
|
156
|
-
isUndefined,
|
|
157
|
-
isDate,
|
|
158
|
-
isFile,
|
|
159
|
-
isBlob,
|
|
160
|
-
isFunction,
|
|
161
|
-
isStream,
|
|
162
|
-
isURLSearchParams,
|
|
163
|
-
isStandardBrowserEnv,
|
|
164
|
-
forEach,
|
|
165
|
-
merge,
|
|
166
|
-
extend,
|
|
167
|
-
trim,
|
|
168
|
-
stripBOM
|
|
169
|
-
};
|
|
170
|
-
var utils$8 = utils$9;
|
|
171
|
-
function encode(val) {
|
|
172
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
173
|
-
}
|
|
174
|
-
var buildURL$1 = function buildURL(url, params, paramsSerializer) {
|
|
175
|
-
if (!params) {
|
|
176
|
-
return url;
|
|
177
|
-
}
|
|
178
|
-
var serializedParams;
|
|
179
|
-
if (paramsSerializer) {
|
|
180
|
-
serializedParams = paramsSerializer(params);
|
|
181
|
-
} else if (utils$8.isURLSearchParams(params)) {
|
|
182
|
-
serializedParams = params.toString();
|
|
183
|
-
} else {
|
|
184
|
-
var parts = [];
|
|
185
|
-
utils$8.forEach(params, function serialize(val, key) {
|
|
186
|
-
if (val === null || typeof val === "undefined") {
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
if (utils$8.isArray(val)) {
|
|
190
|
-
key = key + "[]";
|
|
191
|
-
} else {
|
|
192
|
-
val = [val];
|
|
193
|
-
}
|
|
194
|
-
utils$8.forEach(val, function parseValue(v) {
|
|
195
|
-
if (utils$8.isDate(v)) {
|
|
196
|
-
v = v.toISOString();
|
|
197
|
-
} else if (utils$8.isObject(v)) {
|
|
198
|
-
v = JSON.stringify(v);
|
|
199
|
-
}
|
|
200
|
-
parts.push(encode(key) + "=" + encode(v));
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
serializedParams = parts.join("&");
|
|
204
|
-
}
|
|
205
|
-
if (serializedParams) {
|
|
206
|
-
var hashmarkIndex = url.indexOf("#");
|
|
207
|
-
if (hashmarkIndex !== -1) {
|
|
208
|
-
url = url.slice(0, hashmarkIndex);
|
|
209
|
-
}
|
|
210
|
-
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
211
|
-
}
|
|
212
|
-
return url;
|
|
213
|
-
};
|
|
214
|
-
var utils$7 = utils$9;
|
|
215
|
-
function InterceptorManager$1() {
|
|
216
|
-
this.handlers = [];
|
|
217
|
-
}
|
|
218
|
-
InterceptorManager$1.prototype.use = function use(fulfilled, rejected, options) {
|
|
219
|
-
this.handlers.push({
|
|
220
|
-
fulfilled,
|
|
221
|
-
rejected,
|
|
222
|
-
synchronous: options ? options.synchronous : false,
|
|
223
|
-
runWhen: options ? options.runWhen : null
|
|
224
|
-
});
|
|
225
|
-
return this.handlers.length - 1;
|
|
226
|
-
};
|
|
227
|
-
InterceptorManager$1.prototype.eject = function eject(id) {
|
|
228
|
-
if (this.handlers[id]) {
|
|
229
|
-
this.handlers[id] = null;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
InterceptorManager$1.prototype.forEach = function forEach2(fn) {
|
|
233
|
-
utils$7.forEach(this.handlers, function forEachHandler(h) {
|
|
234
|
-
if (h !== null) {
|
|
235
|
-
fn(h);
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
var InterceptorManager_1 = InterceptorManager$1;
|
|
240
|
-
var utils$6 = utils$9;
|
|
241
|
-
var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
|
|
242
|
-
utils$6.forEach(headers, function processHeader(value, name) {
|
|
243
|
-
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
244
|
-
headers[normalizedName] = value;
|
|
245
|
-
delete headers[name];
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
};
|
|
249
|
-
var enhanceError$1 = function enhanceError(error, config2, code, request2, response) {
|
|
250
|
-
error.config = config2;
|
|
251
|
-
if (code) {
|
|
252
|
-
error.code = code;
|
|
253
|
-
}
|
|
254
|
-
error.request = request2;
|
|
255
|
-
error.response = response;
|
|
256
|
-
error.isAxiosError = true;
|
|
257
|
-
error.toJSON = function toJSON() {
|
|
258
|
-
return {
|
|
259
|
-
// Standard
|
|
260
|
-
message: this.message,
|
|
261
|
-
name: this.name,
|
|
262
|
-
// Microsoft
|
|
263
|
-
description: this.description,
|
|
264
|
-
number: this.number,
|
|
265
|
-
// Mozilla
|
|
266
|
-
fileName: this.fileName,
|
|
267
|
-
lineNumber: this.lineNumber,
|
|
268
|
-
columnNumber: this.columnNumber,
|
|
269
|
-
stack: this.stack,
|
|
270
|
-
// Axios
|
|
271
|
-
config: this.config,
|
|
272
|
-
code: this.code
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
return error;
|
|
276
|
-
};
|
|
277
|
-
var createError;
|
|
278
|
-
var hasRequiredCreateError;
|
|
279
|
-
function requireCreateError() {
|
|
280
|
-
if (hasRequiredCreateError) return createError;
|
|
281
|
-
hasRequiredCreateError = 1;
|
|
282
|
-
var enhanceError3 = enhanceError$1;
|
|
283
|
-
createError = function createError2(message, config2, code, request2, response) {
|
|
284
|
-
var error = new Error(message);
|
|
285
|
-
return enhanceError3(error, config2, code, request2, response);
|
|
286
|
-
};
|
|
287
|
-
return createError;
|
|
288
|
-
}
|
|
289
|
-
var settle;
|
|
290
|
-
var hasRequiredSettle;
|
|
291
|
-
function requireSettle() {
|
|
292
|
-
if (hasRequiredSettle) return settle;
|
|
293
|
-
hasRequiredSettle = 1;
|
|
294
|
-
var createError2 = requireCreateError();
|
|
295
|
-
settle = function settle2(resolve, reject, response) {
|
|
296
|
-
var validateStatus2 = response.config.validateStatus;
|
|
297
|
-
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
298
|
-
resolve(response);
|
|
299
|
-
} else {
|
|
300
|
-
reject(createError2(
|
|
301
|
-
"Request failed with status code " + response.status,
|
|
302
|
-
response.config,
|
|
303
|
-
null,
|
|
304
|
-
response.request,
|
|
305
|
-
response
|
|
306
|
-
));
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
return settle;
|
|
310
|
-
}
|
|
311
|
-
var cookies;
|
|
312
|
-
var hasRequiredCookies;
|
|
313
|
-
function requireCookies() {
|
|
314
|
-
if (hasRequiredCookies) return cookies;
|
|
315
|
-
hasRequiredCookies = 1;
|
|
316
|
-
var utils2 = utils$9;
|
|
317
|
-
cookies = utils2.isStandardBrowserEnv() ? (
|
|
318
|
-
// Standard browser envs support document.cookie
|
|
319
|
-
/* @__PURE__ */ function standardBrowserEnv() {
|
|
320
|
-
return {
|
|
321
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
322
|
-
var cookie = [];
|
|
323
|
-
cookie.push(name + "=" + encodeURIComponent(value));
|
|
324
|
-
if (utils2.isNumber(expires)) {
|
|
325
|
-
cookie.push("expires=" + new Date(expires).toGMTString());
|
|
326
|
-
}
|
|
327
|
-
if (utils2.isString(path)) {
|
|
328
|
-
cookie.push("path=" + path);
|
|
329
|
-
}
|
|
330
|
-
if (utils2.isString(domain)) {
|
|
331
|
-
cookie.push("domain=" + domain);
|
|
332
|
-
}
|
|
333
|
-
if (secure === true) {
|
|
334
|
-
cookie.push("secure");
|
|
335
|
-
}
|
|
336
|
-
document.cookie = cookie.join("; ");
|
|
337
|
-
},
|
|
338
|
-
read: function read(name) {
|
|
339
|
-
var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
340
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
341
|
-
},
|
|
342
|
-
remove: function remove(name) {
|
|
343
|
-
this.write(name, "", Date.now() - 864e5);
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
}()
|
|
347
|
-
) : (
|
|
348
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
349
|
-
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
350
|
-
return {
|
|
351
|
-
write: function write() {
|
|
352
|
-
},
|
|
353
|
-
read: function read() {
|
|
354
|
-
return null;
|
|
355
|
-
},
|
|
356
|
-
remove: function remove() {
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
}()
|
|
360
|
-
);
|
|
361
|
-
return cookies;
|
|
362
|
-
}
|
|
363
|
-
var isAbsoluteURL;
|
|
364
|
-
var hasRequiredIsAbsoluteURL;
|
|
365
|
-
function requireIsAbsoluteURL() {
|
|
366
|
-
if (hasRequiredIsAbsoluteURL) return isAbsoluteURL;
|
|
367
|
-
hasRequiredIsAbsoluteURL = 1;
|
|
368
|
-
isAbsoluteURL = function isAbsoluteURL2(url) {
|
|
369
|
-
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
370
|
-
};
|
|
371
|
-
return isAbsoluteURL;
|
|
372
|
-
}
|
|
373
|
-
var combineURLs;
|
|
374
|
-
var hasRequiredCombineURLs;
|
|
375
|
-
function requireCombineURLs() {
|
|
376
|
-
if (hasRequiredCombineURLs) return combineURLs;
|
|
377
|
-
hasRequiredCombineURLs = 1;
|
|
378
|
-
combineURLs = function combineURLs2(baseURL, relativeURL) {
|
|
379
|
-
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
380
|
-
};
|
|
381
|
-
return combineURLs;
|
|
382
|
-
}
|
|
383
|
-
var buildFullPath;
|
|
384
|
-
var hasRequiredBuildFullPath;
|
|
385
|
-
function requireBuildFullPath() {
|
|
386
|
-
if (hasRequiredBuildFullPath) return buildFullPath;
|
|
387
|
-
hasRequiredBuildFullPath = 1;
|
|
388
|
-
var isAbsoluteURL2 = requireIsAbsoluteURL();
|
|
389
|
-
var combineURLs2 = requireCombineURLs();
|
|
390
|
-
buildFullPath = function buildFullPath2(baseURL, requestedURL) {
|
|
391
|
-
if (baseURL && !isAbsoluteURL2(requestedURL)) {
|
|
392
|
-
return combineURLs2(baseURL, requestedURL);
|
|
393
|
-
}
|
|
394
|
-
return requestedURL;
|
|
395
|
-
};
|
|
396
|
-
return buildFullPath;
|
|
397
|
-
}
|
|
398
|
-
var parseHeaders;
|
|
399
|
-
var hasRequiredParseHeaders;
|
|
400
|
-
function requireParseHeaders() {
|
|
401
|
-
if (hasRequiredParseHeaders) return parseHeaders;
|
|
402
|
-
hasRequiredParseHeaders = 1;
|
|
403
|
-
var utils2 = utils$9;
|
|
404
|
-
var ignoreDuplicateOf = [
|
|
405
|
-
"age",
|
|
406
|
-
"authorization",
|
|
407
|
-
"content-length",
|
|
408
|
-
"content-type",
|
|
409
|
-
"etag",
|
|
410
|
-
"expires",
|
|
411
|
-
"from",
|
|
412
|
-
"host",
|
|
413
|
-
"if-modified-since",
|
|
414
|
-
"if-unmodified-since",
|
|
415
|
-
"last-modified",
|
|
416
|
-
"location",
|
|
417
|
-
"max-forwards",
|
|
418
|
-
"proxy-authorization",
|
|
419
|
-
"referer",
|
|
420
|
-
"retry-after",
|
|
421
|
-
"user-agent"
|
|
422
|
-
];
|
|
423
|
-
parseHeaders = function parseHeaders2(headers) {
|
|
424
|
-
var parsed = {};
|
|
425
|
-
var key;
|
|
426
|
-
var val;
|
|
427
|
-
var i;
|
|
428
|
-
if (!headers) {
|
|
429
|
-
return parsed;
|
|
430
|
-
}
|
|
431
|
-
utils2.forEach(headers.split("\n"), function parser(line) {
|
|
432
|
-
i = line.indexOf(":");
|
|
433
|
-
key = utils2.trim(line.substr(0, i)).toLowerCase();
|
|
434
|
-
val = utils2.trim(line.substr(i + 1));
|
|
435
|
-
if (key) {
|
|
436
|
-
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
if (key === "set-cookie") {
|
|
440
|
-
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
441
|
-
} else {
|
|
442
|
-
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
return parsed;
|
|
447
|
-
};
|
|
448
|
-
return parseHeaders;
|
|
449
|
-
}
|
|
450
|
-
var isURLSameOrigin;
|
|
451
|
-
var hasRequiredIsURLSameOrigin;
|
|
452
|
-
function requireIsURLSameOrigin() {
|
|
453
|
-
if (hasRequiredIsURLSameOrigin) return isURLSameOrigin;
|
|
454
|
-
hasRequiredIsURLSameOrigin = 1;
|
|
455
|
-
var utils2 = utils$9;
|
|
456
|
-
isURLSameOrigin = utils2.isStandardBrowserEnv() ? (
|
|
457
|
-
// Standard browser envs have full support of the APIs needed to test
|
|
458
|
-
// whether the request URL is of the same origin as current location.
|
|
459
|
-
function standardBrowserEnv() {
|
|
460
|
-
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
461
|
-
var urlParsingNode = document.createElement("a");
|
|
462
|
-
var originURL;
|
|
463
|
-
function resolveURL(url) {
|
|
464
|
-
var href = url;
|
|
465
|
-
if (msie) {
|
|
466
|
-
urlParsingNode.setAttribute("href", href);
|
|
467
|
-
href = urlParsingNode.href;
|
|
468
|
-
}
|
|
469
|
-
urlParsingNode.setAttribute("href", href);
|
|
470
|
-
return {
|
|
471
|
-
href: urlParsingNode.href,
|
|
472
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
473
|
-
host: urlParsingNode.host,
|
|
474
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
475
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
476
|
-
hostname: urlParsingNode.hostname,
|
|
477
|
-
port: urlParsingNode.port,
|
|
478
|
-
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
originURL = resolveURL(window.location.href);
|
|
482
|
-
return function isURLSameOrigin2(requestURL) {
|
|
483
|
-
var parsed = utils2.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
484
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
485
|
-
};
|
|
486
|
-
}()
|
|
487
|
-
) : (
|
|
488
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
489
|
-
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
490
|
-
return function isURLSameOrigin2() {
|
|
491
|
-
return true;
|
|
492
|
-
};
|
|
493
|
-
}()
|
|
494
|
-
);
|
|
495
|
-
return isURLSameOrigin;
|
|
496
|
-
}
|
|
497
|
-
var xhr;
|
|
498
|
-
var hasRequiredXhr;
|
|
499
|
-
function requireXhr() {
|
|
500
|
-
if (hasRequiredXhr) return xhr;
|
|
501
|
-
hasRequiredXhr = 1;
|
|
502
|
-
var utils2 = utils$9;
|
|
503
|
-
var settle2 = requireSettle();
|
|
504
|
-
var cookies2 = requireCookies();
|
|
505
|
-
var buildURL3 = buildURL$1;
|
|
506
|
-
var buildFullPath2 = requireBuildFullPath();
|
|
507
|
-
var parseHeaders2 = requireParseHeaders();
|
|
508
|
-
var isURLSameOrigin2 = requireIsURLSameOrigin();
|
|
509
|
-
var createError2 = requireCreateError();
|
|
510
|
-
xhr = function xhrAdapter(config2) {
|
|
511
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
512
|
-
var requestData = config2.data;
|
|
513
|
-
var requestHeaders = config2.headers;
|
|
514
|
-
var responseType = config2.responseType;
|
|
515
|
-
if (utils2.isFormData(requestData)) {
|
|
516
|
-
delete requestHeaders["Content-Type"];
|
|
517
|
-
}
|
|
518
|
-
var request2 = new XMLHttpRequest();
|
|
519
|
-
if (config2.auth) {
|
|
520
|
-
var username = config2.auth.username || "";
|
|
521
|
-
var password = config2.auth.password ? unescape(encodeURIComponent(config2.auth.password)) : "";
|
|
522
|
-
requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
|
|
523
|
-
}
|
|
524
|
-
var fullPath = buildFullPath2(config2.baseURL, config2.url);
|
|
525
|
-
request2.open(config2.method.toUpperCase(), buildURL3(fullPath, config2.params, config2.paramsSerializer), true);
|
|
526
|
-
request2.timeout = config2.timeout;
|
|
527
|
-
function onloadend() {
|
|
528
|
-
if (!request2) {
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
var responseHeaders = "getAllResponseHeaders" in request2 ? parseHeaders2(request2.getAllResponseHeaders()) : null;
|
|
532
|
-
var responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response;
|
|
533
|
-
var response = {
|
|
534
|
-
data: responseData,
|
|
535
|
-
status: request2.status,
|
|
536
|
-
statusText: request2.statusText,
|
|
537
|
-
headers: responseHeaders,
|
|
538
|
-
config: config2,
|
|
539
|
-
request: request2
|
|
540
|
-
};
|
|
541
|
-
settle2(resolve, reject, response);
|
|
542
|
-
request2 = null;
|
|
543
|
-
}
|
|
544
|
-
if ("onloadend" in request2) {
|
|
545
|
-
request2.onloadend = onloadend;
|
|
546
|
-
} else {
|
|
547
|
-
request2.onreadystatechange = function handleLoad() {
|
|
548
|
-
if (!request2 || request2.readyState !== 4) {
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) {
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
setTimeout(onloadend);
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
request2.onabort = function handleAbort() {
|
|
558
|
-
if (!request2) {
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
reject(createError2("Request aborted", config2, "ECONNABORTED", request2));
|
|
562
|
-
request2 = null;
|
|
563
|
-
};
|
|
564
|
-
request2.onerror = function handleError() {
|
|
565
|
-
reject(createError2("Network Error", config2, null, request2));
|
|
566
|
-
request2 = null;
|
|
567
|
-
};
|
|
568
|
-
request2.ontimeout = function handleTimeout() {
|
|
569
|
-
var timeoutErrorMessage = "timeout of " + config2.timeout + "ms exceeded";
|
|
570
|
-
if (config2.timeoutErrorMessage) {
|
|
571
|
-
timeoutErrorMessage = config2.timeoutErrorMessage;
|
|
572
|
-
}
|
|
573
|
-
reject(createError2(
|
|
574
|
-
timeoutErrorMessage,
|
|
575
|
-
config2,
|
|
576
|
-
config2.transitional && config2.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
|
|
577
|
-
request2
|
|
578
|
-
));
|
|
579
|
-
request2 = null;
|
|
580
|
-
};
|
|
581
|
-
if (utils2.isStandardBrowserEnv()) {
|
|
582
|
-
var xsrfValue = (config2.withCredentials || isURLSameOrigin2(fullPath)) && config2.xsrfCookieName ? cookies2.read(config2.xsrfCookieName) : void 0;
|
|
583
|
-
if (xsrfValue) {
|
|
584
|
-
requestHeaders[config2.xsrfHeaderName] = xsrfValue;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
if ("setRequestHeader" in request2) {
|
|
588
|
-
utils2.forEach(requestHeaders, function setRequestHeader(val, key) {
|
|
589
|
-
if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
|
|
590
|
-
delete requestHeaders[key];
|
|
591
|
-
} else {
|
|
592
|
-
request2.setRequestHeader(key, val);
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
if (!utils2.isUndefined(config2.withCredentials)) {
|
|
597
|
-
request2.withCredentials = !!config2.withCredentials;
|
|
598
|
-
}
|
|
599
|
-
if (responseType && responseType !== "json") {
|
|
600
|
-
request2.responseType = config2.responseType;
|
|
601
|
-
}
|
|
602
|
-
if (typeof config2.onDownloadProgress === "function") {
|
|
603
|
-
request2.addEventListener("progress", config2.onDownloadProgress);
|
|
604
|
-
}
|
|
605
|
-
if (typeof config2.onUploadProgress === "function" && request2.upload) {
|
|
606
|
-
request2.upload.addEventListener("progress", config2.onUploadProgress);
|
|
607
|
-
}
|
|
608
|
-
if (config2.cancelToken) {
|
|
609
|
-
config2.cancelToken.promise.then(function onCanceled(cancel) {
|
|
610
|
-
if (!request2) {
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
request2.abort();
|
|
614
|
-
reject(cancel);
|
|
615
|
-
request2 = null;
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
if (!requestData) {
|
|
619
|
-
requestData = null;
|
|
620
|
-
}
|
|
621
|
-
request2.send(requestData);
|
|
622
|
-
});
|
|
623
|
-
};
|
|
624
|
-
return xhr;
|
|
625
|
-
}
|
|
626
|
-
var utils$5 = utils$9;
|
|
627
|
-
var normalizeHeaderName2 = normalizeHeaderName$1;
|
|
628
|
-
var enhanceError2 = enhanceError$1;
|
|
629
|
-
var DEFAULT_CONTENT_TYPE = {
|
|
630
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
631
|
-
};
|
|
632
|
-
function setContentTypeIfUnset(headers, value) {
|
|
633
|
-
if (!utils$5.isUndefined(headers) && utils$5.isUndefined(headers["Content-Type"])) {
|
|
634
|
-
headers["Content-Type"] = value;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
function getDefaultAdapter() {
|
|
638
|
-
var adapter;
|
|
639
|
-
if (typeof XMLHttpRequest !== "undefined") {
|
|
640
|
-
adapter = requireXhr();
|
|
641
|
-
} else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
|
|
642
|
-
adapter = requireXhr();
|
|
643
|
-
}
|
|
644
|
-
return adapter;
|
|
645
|
-
}
|
|
646
|
-
function stringifySafely(rawValue, parser, encoder) {
|
|
647
|
-
if (utils$5.isString(rawValue)) {
|
|
648
|
-
try {
|
|
649
|
-
(parser || JSON.parse)(rawValue);
|
|
650
|
-
return utils$5.trim(rawValue);
|
|
651
|
-
} catch (e) {
|
|
652
|
-
if (e.name !== "SyntaxError") {
|
|
653
|
-
throw e;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
658
|
-
}
|
|
659
|
-
var defaults$3 = {
|
|
660
|
-
transitional: {
|
|
661
|
-
silentJSONParsing: true,
|
|
662
|
-
forcedJSONParsing: true,
|
|
663
|
-
clarifyTimeoutError: false
|
|
664
|
-
},
|
|
665
|
-
adapter: getDefaultAdapter(),
|
|
666
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
667
|
-
normalizeHeaderName2(headers, "Accept");
|
|
668
|
-
normalizeHeaderName2(headers, "Content-Type");
|
|
669
|
-
if (utils$5.isFormData(data) || utils$5.isArrayBuffer(data) || utils$5.isBuffer(data) || utils$5.isStream(data) || utils$5.isFile(data) || utils$5.isBlob(data)) {
|
|
670
|
-
return data;
|
|
671
|
-
}
|
|
672
|
-
if (utils$5.isArrayBufferView(data)) {
|
|
673
|
-
return data.buffer;
|
|
674
|
-
}
|
|
675
|
-
if (utils$5.isURLSearchParams(data)) {
|
|
676
|
-
setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
|
|
677
|
-
return data.toString();
|
|
678
|
-
}
|
|
679
|
-
if (utils$5.isObject(data) || headers && headers["Content-Type"] === "application/json") {
|
|
680
|
-
setContentTypeIfUnset(headers, "application/json");
|
|
681
|
-
return stringifySafely(data);
|
|
682
|
-
}
|
|
683
|
-
return data;
|
|
684
|
-
}],
|
|
685
|
-
transformResponse: [function transformResponse(data) {
|
|
686
|
-
var transitional2 = this.transitional;
|
|
687
|
-
var silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
688
|
-
var forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
689
|
-
var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
|
|
690
|
-
if (strictJSONParsing || forcedJSONParsing && utils$5.isString(data) && data.length) {
|
|
691
|
-
try {
|
|
692
|
-
return JSON.parse(data);
|
|
693
|
-
} catch (e) {
|
|
694
|
-
if (strictJSONParsing) {
|
|
695
|
-
if (e.name === "SyntaxError") {
|
|
696
|
-
throw enhanceError2(e, this, "E_JSON_PARSE");
|
|
697
|
-
}
|
|
698
|
-
throw e;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
return data;
|
|
703
|
-
}],
|
|
704
|
-
/**
|
|
705
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
706
|
-
* timeout is not created.
|
|
707
|
-
*/
|
|
708
|
-
timeout: 0,
|
|
709
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
710
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
711
|
-
maxContentLength: -1,
|
|
712
|
-
maxBodyLength: -1,
|
|
713
|
-
validateStatus: function validateStatus(status) {
|
|
714
|
-
return status >= 200 && status < 300;
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
defaults$3.headers = {
|
|
718
|
-
common: {
|
|
719
|
-
"Accept": "application/json, text/plain, */*"
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
utils$5.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
|
|
723
|
-
defaults$3.headers[method] = {};
|
|
724
|
-
});
|
|
725
|
-
utils$5.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
726
|
-
defaults$3.headers[method] = utils$5.merge(DEFAULT_CONTENT_TYPE);
|
|
727
|
-
});
|
|
728
|
-
var defaults_1 = defaults$3;
|
|
729
|
-
var utils$4 = utils$9;
|
|
730
|
-
var defaults$2 = defaults_1;
|
|
731
|
-
var transformData$1 = function transformData(data, headers, fns) {
|
|
732
|
-
var context = this || defaults$2;
|
|
733
|
-
utils$4.forEach(fns, function transform(fn) {
|
|
734
|
-
data = fn.call(context, data, headers);
|
|
735
|
-
});
|
|
736
|
-
return data;
|
|
737
|
-
};
|
|
738
|
-
var isCancel$1;
|
|
739
|
-
var hasRequiredIsCancel;
|
|
740
|
-
function requireIsCancel() {
|
|
741
|
-
if (hasRequiredIsCancel) return isCancel$1;
|
|
742
|
-
hasRequiredIsCancel = 1;
|
|
743
|
-
isCancel$1 = function isCancel2(value) {
|
|
744
|
-
return !!(value && value.__CANCEL__);
|
|
745
|
-
};
|
|
746
|
-
return isCancel$1;
|
|
747
|
-
}
|
|
748
|
-
var utils$3 = utils$9;
|
|
749
|
-
var transformData2 = transformData$1;
|
|
750
|
-
var isCancel = requireIsCancel();
|
|
751
|
-
var defaults$1 = defaults_1;
|
|
752
|
-
function throwIfCancellationRequested(config2) {
|
|
753
|
-
if (config2.cancelToken) {
|
|
754
|
-
config2.cancelToken.throwIfRequested();
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
var dispatchRequest$1 = function dispatchRequest(config2) {
|
|
758
|
-
throwIfCancellationRequested(config2);
|
|
759
|
-
config2.headers = config2.headers || {};
|
|
760
|
-
config2.data = transformData2.call(
|
|
761
|
-
config2,
|
|
762
|
-
config2.data,
|
|
763
|
-
config2.headers,
|
|
764
|
-
config2.transformRequest
|
|
765
|
-
);
|
|
766
|
-
config2.headers = utils$3.merge(
|
|
767
|
-
config2.headers.common || {},
|
|
768
|
-
config2.headers[config2.method] || {},
|
|
769
|
-
config2.headers
|
|
770
|
-
);
|
|
771
|
-
utils$3.forEach(
|
|
772
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
773
|
-
function cleanHeaderConfig(method) {
|
|
774
|
-
delete config2.headers[method];
|
|
775
|
-
}
|
|
776
|
-
);
|
|
777
|
-
var adapter = config2.adapter || defaults$1.adapter;
|
|
778
|
-
return adapter(config2).then(function onAdapterResolution(response) {
|
|
779
|
-
throwIfCancellationRequested(config2);
|
|
780
|
-
response.data = transformData2.call(
|
|
781
|
-
config2,
|
|
782
|
-
response.data,
|
|
783
|
-
response.headers,
|
|
784
|
-
config2.transformResponse
|
|
785
|
-
);
|
|
786
|
-
return response;
|
|
787
|
-
}, function onAdapterRejection(reason) {
|
|
788
|
-
if (!isCancel(reason)) {
|
|
789
|
-
throwIfCancellationRequested(config2);
|
|
790
|
-
if (reason && reason.response) {
|
|
791
|
-
reason.response.data = transformData2.call(
|
|
792
|
-
config2,
|
|
793
|
-
reason.response.data,
|
|
794
|
-
reason.response.headers,
|
|
795
|
-
config2.transformResponse
|
|
796
|
-
);
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
return Promise.reject(reason);
|
|
800
|
-
});
|
|
801
|
-
};
|
|
802
|
-
var utils$2 = utils$9;
|
|
803
|
-
var mergeConfig$2 = function mergeConfig(config1, config2) {
|
|
804
|
-
config2 = config2 || {};
|
|
805
|
-
var config3 = {};
|
|
806
|
-
var valueFromConfig2Keys = ["url", "method", "data"];
|
|
807
|
-
var mergeDeepPropertiesKeys = ["headers", "auth", "proxy", "params"];
|
|
808
|
-
var defaultToConfig2Keys = [
|
|
809
|
-
"baseURL",
|
|
810
|
-
"transformRequest",
|
|
811
|
-
"transformResponse",
|
|
812
|
-
"paramsSerializer",
|
|
813
|
-
"timeout",
|
|
814
|
-
"timeoutMessage",
|
|
815
|
-
"withCredentials",
|
|
816
|
-
"adapter",
|
|
817
|
-
"responseType",
|
|
818
|
-
"xsrfCookieName",
|
|
819
|
-
"xsrfHeaderName",
|
|
820
|
-
"onUploadProgress",
|
|
821
|
-
"onDownloadProgress",
|
|
822
|
-
"decompress",
|
|
823
|
-
"maxContentLength",
|
|
824
|
-
"maxBodyLength",
|
|
825
|
-
"maxRedirects",
|
|
826
|
-
"transport",
|
|
827
|
-
"httpAgent",
|
|
828
|
-
"httpsAgent",
|
|
829
|
-
"cancelToken",
|
|
830
|
-
"socketPath",
|
|
831
|
-
"responseEncoding"
|
|
832
|
-
];
|
|
833
|
-
var directMergeKeys = ["validateStatus"];
|
|
834
|
-
function getMergedValue(target, source) {
|
|
835
|
-
if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
|
|
836
|
-
return utils$2.merge(target, source);
|
|
837
|
-
} else if (utils$2.isPlainObject(source)) {
|
|
838
|
-
return utils$2.merge({}, source);
|
|
839
|
-
} else if (utils$2.isArray(source)) {
|
|
840
|
-
return source.slice();
|
|
841
|
-
}
|
|
842
|
-
return source;
|
|
843
|
-
}
|
|
844
|
-
function mergeDeepProperties(prop) {
|
|
845
|
-
if (!utils$2.isUndefined(config2[prop])) {
|
|
846
|
-
config3[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
847
|
-
} else if (!utils$2.isUndefined(config1[prop])) {
|
|
848
|
-
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
utils$2.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
|
852
|
-
if (!utils$2.isUndefined(config2[prop])) {
|
|
853
|
-
config3[prop] = getMergedValue(void 0, config2[prop]);
|
|
854
|
-
}
|
|
855
|
-
});
|
|
856
|
-
utils$2.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
857
|
-
utils$2.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
|
858
|
-
if (!utils$2.isUndefined(config2[prop])) {
|
|
859
|
-
config3[prop] = getMergedValue(void 0, config2[prop]);
|
|
860
|
-
} else if (!utils$2.isUndefined(config1[prop])) {
|
|
861
|
-
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
|
-
utils$2.forEach(directMergeKeys, function merge2(prop) {
|
|
865
|
-
if (prop in config2) {
|
|
866
|
-
config3[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
867
|
-
} else if (prop in config1) {
|
|
868
|
-
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
869
|
-
}
|
|
870
|
-
});
|
|
871
|
-
var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
|
|
872
|
-
var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
|
|
873
|
-
return axiosKeys.indexOf(key) === -1;
|
|
874
|
-
});
|
|
875
|
-
utils$2.forEach(otherKeys, mergeDeepProperties);
|
|
876
|
-
return config3;
|
|
877
|
-
};
|
|
878
|
-
const version = "0.21.4";
|
|
879
|
-
const require$$0 = {
|
|
880
|
-
version
|
|
881
|
-
};
|
|
882
|
-
var pkg = require$$0;
|
|
883
|
-
var validators$1 = {};
|
|
884
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
|
|
885
|
-
validators$1[type] = function validator2(thing) {
|
|
886
|
-
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
|
|
887
|
-
};
|
|
888
|
-
});
|
|
889
|
-
var deprecatedWarnings = {};
|
|
890
|
-
var currentVerArr = pkg.version.split(".");
|
|
891
|
-
function isOlderVersion(version2, thanVersion) {
|
|
892
|
-
var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
|
|
893
|
-
var destVer = version2.split(".");
|
|
894
|
-
for (var i = 0; i < 3; i++) {
|
|
895
|
-
if (pkgVersionArr[i] > destVer[i]) {
|
|
896
|
-
return true;
|
|
897
|
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
898
|
-
return false;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
return false;
|
|
902
|
-
}
|
|
903
|
-
validators$1.transitional = function transitional(validator2, version2, message) {
|
|
904
|
-
var isDeprecated = version2 && isOlderVersion(version2);
|
|
905
|
-
function formatMessage(opt, desc) {
|
|
906
|
-
return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
907
|
-
}
|
|
908
|
-
return function(value, opt, opts) {
|
|
909
|
-
if (validator2 === false) {
|
|
910
|
-
throw new Error(formatMessage(opt, " has been removed in " + version2));
|
|
911
|
-
}
|
|
912
|
-
if (isDeprecated && !deprecatedWarnings[opt]) {
|
|
913
|
-
deprecatedWarnings[opt] = true;
|
|
914
|
-
console.warn(
|
|
915
|
-
formatMessage(
|
|
916
|
-
opt,
|
|
917
|
-
" has been deprecated since v" + version2 + " and will be removed in the near future"
|
|
918
|
-
)
|
|
919
|
-
);
|
|
920
|
-
}
|
|
921
|
-
return validator2 ? validator2(value, opt, opts) : true;
|
|
922
|
-
};
|
|
923
|
-
};
|
|
924
|
-
function assertOptions(options, schema, allowUnknown) {
|
|
925
|
-
if (typeof options !== "object") {
|
|
926
|
-
throw new TypeError("options must be an object");
|
|
927
|
-
}
|
|
928
|
-
var keys = Object.keys(options);
|
|
929
|
-
var i = keys.length;
|
|
930
|
-
while (i-- > 0) {
|
|
931
|
-
var opt = keys[i];
|
|
932
|
-
var validator2 = schema[opt];
|
|
933
|
-
if (validator2) {
|
|
934
|
-
var value = options[opt];
|
|
935
|
-
var result = value === void 0 || validator2(value, opt, options);
|
|
936
|
-
if (result !== true) {
|
|
937
|
-
throw new TypeError("option " + opt + " must be " + result);
|
|
938
|
-
}
|
|
939
|
-
continue;
|
|
940
|
-
}
|
|
941
|
-
if (allowUnknown !== true) {
|
|
942
|
-
throw Error("Unknown option " + opt);
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
var validator$1 = {
|
|
947
|
-
isOlderVersion,
|
|
948
|
-
assertOptions,
|
|
949
|
-
validators: validators$1
|
|
950
|
-
};
|
|
951
|
-
var utils$1 = utils$9;
|
|
952
|
-
var buildURL2 = buildURL$1;
|
|
953
|
-
var InterceptorManager = InterceptorManager_1;
|
|
954
|
-
var dispatchRequest2 = dispatchRequest$1;
|
|
955
|
-
var mergeConfig$1 = mergeConfig$2;
|
|
956
|
-
var validator = validator$1;
|
|
957
|
-
var validators = validator.validators;
|
|
958
|
-
function Axios$1(instanceConfig) {
|
|
959
|
-
this.defaults = instanceConfig;
|
|
960
|
-
this.interceptors = {
|
|
961
|
-
request: new InterceptorManager(),
|
|
962
|
-
response: new InterceptorManager()
|
|
963
|
-
};
|
|
964
|
-
}
|
|
965
|
-
Axios$1.prototype.request = function request(config2) {
|
|
966
|
-
if (typeof config2 === "string") {
|
|
967
|
-
config2 = arguments[1] || {};
|
|
968
|
-
config2.url = arguments[0];
|
|
969
|
-
} else {
|
|
970
|
-
config2 = config2 || {};
|
|
971
|
-
}
|
|
972
|
-
config2 = mergeConfig$1(this.defaults, config2);
|
|
973
|
-
if (config2.method) {
|
|
974
|
-
config2.method = config2.method.toLowerCase();
|
|
975
|
-
} else if (this.defaults.method) {
|
|
976
|
-
config2.method = this.defaults.method.toLowerCase();
|
|
977
|
-
} else {
|
|
978
|
-
config2.method = "get";
|
|
979
|
-
}
|
|
980
|
-
var transitional2 = config2.transitional;
|
|
981
|
-
if (transitional2 !== void 0) {
|
|
982
|
-
validator.assertOptions(transitional2, {
|
|
983
|
-
silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
|
|
984
|
-
forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
|
|
985
|
-
clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
|
|
986
|
-
}, false);
|
|
987
|
-
}
|
|
988
|
-
var requestInterceptorChain = [];
|
|
989
|
-
var synchronousRequestInterceptors = true;
|
|
990
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
991
|
-
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
995
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
996
|
-
});
|
|
997
|
-
var responseInterceptorChain = [];
|
|
998
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
999
|
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
1000
|
-
});
|
|
1001
|
-
var promise;
|
|
1002
|
-
if (!synchronousRequestInterceptors) {
|
|
1003
|
-
var chain = [dispatchRequest2, void 0];
|
|
1004
|
-
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
|
1005
|
-
chain = chain.concat(responseInterceptorChain);
|
|
1006
|
-
promise = Promise.resolve(config2);
|
|
1007
|
-
while (chain.length) {
|
|
1008
|
-
promise = promise.then(chain.shift(), chain.shift());
|
|
1009
|
-
}
|
|
1010
|
-
return promise;
|
|
1011
|
-
}
|
|
1012
|
-
var newConfig = config2;
|
|
1013
|
-
while (requestInterceptorChain.length) {
|
|
1014
|
-
var onFulfilled = requestInterceptorChain.shift();
|
|
1015
|
-
var onRejected = requestInterceptorChain.shift();
|
|
1016
|
-
try {
|
|
1017
|
-
newConfig = onFulfilled(newConfig);
|
|
1018
|
-
} catch (error) {
|
|
1019
|
-
onRejected(error);
|
|
1020
|
-
break;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
try {
|
|
1024
|
-
promise = dispatchRequest2(newConfig);
|
|
1025
|
-
} catch (error) {
|
|
1026
|
-
return Promise.reject(error);
|
|
1027
|
-
}
|
|
1028
|
-
while (responseInterceptorChain.length) {
|
|
1029
|
-
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
|
|
1030
|
-
}
|
|
1031
|
-
return promise;
|
|
1032
|
-
};
|
|
1033
|
-
Axios$1.prototype.getUri = function getUri(config2) {
|
|
1034
|
-
config2 = mergeConfig$1(this.defaults, config2);
|
|
1035
|
-
return buildURL2(config2.url, config2.params, config2.paramsSerializer).replace(/^\?/, "");
|
|
1036
|
-
};
|
|
1037
|
-
utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) {
|
|
1038
|
-
Axios$1.prototype[method] = function(url, config2) {
|
|
1039
|
-
return this.request(mergeConfig$1(config2 || {}, {
|
|
1040
|
-
method,
|
|
1041
|
-
url,
|
|
1042
|
-
data: (config2 || {}).data
|
|
1043
|
-
}));
|
|
1044
|
-
};
|
|
1045
|
-
});
|
|
1046
|
-
utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
|
|
1047
|
-
Axios$1.prototype[method] = function(url, data, config2) {
|
|
1048
|
-
return this.request(mergeConfig$1(config2 || {}, {
|
|
1049
|
-
method,
|
|
1050
|
-
url,
|
|
1051
|
-
data
|
|
1052
|
-
}));
|
|
1053
|
-
};
|
|
1054
|
-
});
|
|
1055
|
-
var Axios_1 = Axios$1;
|
|
1056
|
-
var Cancel_1;
|
|
1057
|
-
var hasRequiredCancel;
|
|
1058
|
-
function requireCancel() {
|
|
1059
|
-
if (hasRequiredCancel) return Cancel_1;
|
|
1060
|
-
hasRequiredCancel = 1;
|
|
1061
|
-
function Cancel(message) {
|
|
1062
|
-
this.message = message;
|
|
1063
|
-
}
|
|
1064
|
-
Cancel.prototype.toString = function toString2() {
|
|
1065
|
-
return "Cancel" + (this.message ? ": " + this.message : "");
|
|
1066
|
-
};
|
|
1067
|
-
Cancel.prototype.__CANCEL__ = true;
|
|
1068
|
-
Cancel_1 = Cancel;
|
|
1069
|
-
return Cancel_1;
|
|
1070
|
-
}
|
|
1071
|
-
var CancelToken_1;
|
|
1072
|
-
var hasRequiredCancelToken;
|
|
1073
|
-
function requireCancelToken() {
|
|
1074
|
-
if (hasRequiredCancelToken) return CancelToken_1;
|
|
1075
|
-
hasRequiredCancelToken = 1;
|
|
1076
|
-
var Cancel = requireCancel();
|
|
1077
|
-
function CancelToken(executor) {
|
|
1078
|
-
if (typeof executor !== "function") {
|
|
1079
|
-
throw new TypeError("executor must be a function.");
|
|
1080
|
-
}
|
|
1081
|
-
var resolvePromise;
|
|
1082
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
1083
|
-
resolvePromise = resolve;
|
|
1084
|
-
});
|
|
1085
|
-
var token = this;
|
|
1086
|
-
executor(function cancel(message) {
|
|
1087
|
-
if (token.reason) {
|
|
1088
|
-
return;
|
|
1089
|
-
}
|
|
1090
|
-
token.reason = new Cancel(message);
|
|
1091
|
-
resolvePromise(token.reason);
|
|
1092
|
-
});
|
|
1093
|
-
}
|
|
1094
|
-
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
1095
|
-
if (this.reason) {
|
|
1096
|
-
throw this.reason;
|
|
1097
|
-
}
|
|
1098
|
-
};
|
|
1099
|
-
CancelToken.source = function source() {
|
|
1100
|
-
var cancel;
|
|
1101
|
-
var token = new CancelToken(function executor(c) {
|
|
1102
|
-
cancel = c;
|
|
1103
|
-
});
|
|
1104
|
-
return {
|
|
1105
|
-
token,
|
|
1106
|
-
cancel
|
|
1107
|
-
};
|
|
1108
|
-
};
|
|
1109
|
-
CancelToken_1 = CancelToken;
|
|
1110
|
-
return CancelToken_1;
|
|
1111
|
-
}
|
|
1112
|
-
var spread;
|
|
1113
|
-
var hasRequiredSpread;
|
|
1114
|
-
function requireSpread() {
|
|
1115
|
-
if (hasRequiredSpread) return spread;
|
|
1116
|
-
hasRequiredSpread = 1;
|
|
1117
|
-
spread = function spread2(callback) {
|
|
1118
|
-
return function wrap(arr) {
|
|
1119
|
-
return callback.apply(null, arr);
|
|
1120
|
-
};
|
|
1121
|
-
};
|
|
1122
|
-
return spread;
|
|
1123
|
-
}
|
|
1124
|
-
var isAxiosError;
|
|
1125
|
-
var hasRequiredIsAxiosError;
|
|
1126
|
-
function requireIsAxiosError() {
|
|
1127
|
-
if (hasRequiredIsAxiosError) return isAxiosError;
|
|
1128
|
-
hasRequiredIsAxiosError = 1;
|
|
1129
|
-
isAxiosError = function isAxiosError2(payload) {
|
|
1130
|
-
return typeof payload === "object" && payload.isAxiosError === true;
|
|
1131
|
-
};
|
|
1132
|
-
return isAxiosError;
|
|
1133
|
-
}
|
|
1134
|
-
var utils = utils$9;
|
|
1135
|
-
var bind2 = bind$2;
|
|
1136
|
-
var Axios = Axios_1;
|
|
1137
|
-
var mergeConfig2 = mergeConfig$2;
|
|
1138
|
-
var defaults = defaults_1;
|
|
1139
|
-
function createInstance(defaultConfig) {
|
|
1140
|
-
var context = new Axios(defaultConfig);
|
|
1141
|
-
var instance = bind2(Axios.prototype.request, context);
|
|
1142
|
-
utils.extend(instance, Axios.prototype, context);
|
|
1143
|
-
utils.extend(instance, context);
|
|
1144
|
-
return instance;
|
|
1145
|
-
}
|
|
1146
|
-
var axios$2 = createInstance(defaults);
|
|
1147
|
-
axios$2.Axios = Axios;
|
|
1148
|
-
axios$2.create = function create(instanceConfig) {
|
|
1149
|
-
return createInstance(mergeConfig2(axios$2.defaults, instanceConfig));
|
|
1150
|
-
};
|
|
1151
|
-
axios$2.Cancel = requireCancel();
|
|
1152
|
-
axios$2.CancelToken = requireCancelToken();
|
|
1153
|
-
axios$2.isCancel = requireIsCancel();
|
|
1154
|
-
axios$2.all = function all(promises) {
|
|
1155
|
-
return Promise.all(promises);
|
|
1156
|
-
};
|
|
1157
|
-
axios$2.spread = requireSpread();
|
|
1158
|
-
axios$2.isAxiosError = requireIsAxiosError();
|
|
1159
|
-
axios$3.exports = axios$2;
|
|
1160
|
-
axios$3.exports.default = axios$2;
|
|
1161
|
-
var axiosExports = axios$3.exports;
|
|
1162
|
-
var axios = axiosExports;
|
|
1163
|
-
const axios$1 = /* @__PURE__ */ getDefaultExportFromCjs(axios);
|
|
1164
13
|
const useMembershipConfig = (storeId, options) => {
|
|
1165
14
|
return reactQuery.useQuery({
|
|
1166
15
|
...options,
|
|
@@ -1169,7 +18,7 @@ const useMembershipConfig = (storeId, options) => {
|
|
|
1169
18
|
if (!storeId) {
|
|
1170
19
|
throw new Error("No store id found");
|
|
1171
20
|
}
|
|
1172
|
-
const { data: config2 } = await
|
|
21
|
+
const { data: config2 } = await axios__default.default.get(
|
|
1173
22
|
`/admin/membership/config/${storeId}`
|
|
1174
23
|
);
|
|
1175
24
|
return config2;
|
|
@@ -1200,13 +49,13 @@ const useStore = () => {
|
|
|
1200
49
|
const usePromotionCollectable = (id) => {
|
|
1201
50
|
return reactQuery.useQuery({
|
|
1202
51
|
queryKey: ["promotion-collectable", id],
|
|
1203
|
-
queryFn: () =>
|
|
52
|
+
queryFn: () => axios__default.default.get(`/admin/promotions/${id}/update-collectable`)
|
|
1204
53
|
});
|
|
1205
54
|
};
|
|
1206
55
|
const useUpdatePromotionCollectable = (id) => {
|
|
1207
56
|
const queryClient = reactQuery.useQueryClient();
|
|
1208
57
|
return reactQuery.useMutation({
|
|
1209
|
-
mutationFn: (data) =>
|
|
58
|
+
mutationFn: (data) => axios__default.default.patch(`/admin/promotions/${id}/update-collectable`, data),
|
|
1210
59
|
onSuccess: () => {
|
|
1211
60
|
queryClient.invalidateQueries({
|
|
1212
61
|
queryKey: ["promotion-collectable", id]
|
|
@@ -1276,7 +125,7 @@ const useUpdateMembershipConfig = () => {
|
|
|
1276
125
|
if (!storeId) {
|
|
1277
126
|
throw new Error("No store id found");
|
|
1278
127
|
}
|
|
1279
|
-
const response = await
|
|
128
|
+
const response = await axios__default.default.patch(
|
|
1280
129
|
`/admin/membership/config/${storeId}`,
|
|
1281
130
|
config2
|
|
1282
131
|
);
|
|
@@ -1322,7 +171,7 @@ const MembershipPage = () => {
|
|
|
1322
171
|
});
|
|
1323
172
|
await refetch();
|
|
1324
173
|
} catch (error2) {
|
|
1325
|
-
if (
|
|
174
|
+
if (axios__default.default.isAxiosError(error2)) {
|
|
1326
175
|
ui.toast.error("Error saving settings", {
|
|
1327
176
|
description: (_b = (_a = error2.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message,
|
|
1328
177
|
dismissable: true,
|
|
@@ -1429,7 +278,7 @@ const useCreateMembershipConsent = () => {
|
|
|
1429
278
|
const queryClient = reactQuery.useQueryClient();
|
|
1430
279
|
return reactQuery.useMutation({
|
|
1431
280
|
mutationFn: async (data) => {
|
|
1432
|
-
const response = await
|
|
281
|
+
const response = await axios__default.default.post("/admin/membership-consents", data);
|
|
1433
282
|
return response.data;
|
|
1434
283
|
},
|
|
1435
284
|
onSuccess: () => {
|
|
@@ -1441,7 +290,7 @@ const useDeleteMembershipConsent = () => {
|
|
|
1441
290
|
const queryClient = reactQuery.useQueryClient();
|
|
1442
291
|
return reactQuery.useMutation({
|
|
1443
292
|
mutationFn: async (id) => {
|
|
1444
|
-
await
|
|
293
|
+
await axios__default.default.delete(`/admin/membership-consents/${id}`);
|
|
1445
294
|
},
|
|
1446
295
|
onSuccess: () => {
|
|
1447
296
|
queryClient.invalidateQueries({ queryKey: ["membership-consents"] });
|
|
@@ -1453,7 +302,7 @@ const useMembershipConsents = () => {
|
|
|
1453
302
|
return reactQuery.useQuery({
|
|
1454
303
|
queryKey: [...MEMBERSHIP_TIERS_QUERY_KEY$1],
|
|
1455
304
|
queryFn: async () => {
|
|
1456
|
-
const response = await
|
|
305
|
+
const response = await axios__default.default.get("/admin/membership-consents");
|
|
1457
306
|
return response.data;
|
|
1458
307
|
}
|
|
1459
308
|
});
|
|
@@ -1462,7 +311,7 @@ const useUpdateMembershipConsent = () => {
|
|
|
1462
311
|
const queryClient = reactQuery.useQueryClient();
|
|
1463
312
|
return reactQuery.useMutation({
|
|
1464
313
|
mutationFn: async (consentKey) => {
|
|
1465
|
-
const response = await
|
|
314
|
+
const response = await axios__default.default.patch(
|
|
1466
315
|
`/admin/membership-consents/${consentKey.id}`,
|
|
1467
316
|
{
|
|
1468
317
|
name: consentKey.name,
|
|
@@ -1577,7 +426,7 @@ const MembershipConsentsRenderer = () => {
|
|
|
1577
426
|
}
|
|
1578
427
|
closeDrawer();
|
|
1579
428
|
} catch (error) {
|
|
1580
|
-
if (
|
|
429
|
+
if (axios__default.default.isAxiosError(error)) {
|
|
1581
430
|
ui.toast.error("Error saving consent", {
|
|
1582
431
|
description: (_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message,
|
|
1583
432
|
dismissable: true,
|
|
@@ -1608,7 +457,7 @@ const MembershipConsentsRenderer = () => {
|
|
|
1608
457
|
});
|
|
1609
458
|
closeDrawer();
|
|
1610
459
|
} catch (error) {
|
|
1611
|
-
if (
|
|
460
|
+
if (axios__default.default.isAxiosError(error)) {
|
|
1612
461
|
ui.toast.error("Error deleting consent", {
|
|
1613
462
|
description: (_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message,
|
|
1614
463
|
dismissable: true,
|
|
@@ -1689,7 +538,7 @@ const useCreateMembershipTier = () => {
|
|
|
1689
538
|
const queryClient = reactQuery.useQueryClient();
|
|
1690
539
|
return reactQuery.useMutation({
|
|
1691
540
|
mutationFn: async (data) => {
|
|
1692
|
-
const response = await
|
|
541
|
+
const response = await axios__default.default.post("/admin/member-tiers", data);
|
|
1693
542
|
return response.data;
|
|
1694
543
|
},
|
|
1695
544
|
onSuccess: () => {
|
|
@@ -1701,7 +550,7 @@ const useDeleteMembershipTier = () => {
|
|
|
1701
550
|
const queryClient = reactQuery.useQueryClient();
|
|
1702
551
|
return reactQuery.useMutation({
|
|
1703
552
|
mutationFn: async (id) => {
|
|
1704
|
-
await
|
|
553
|
+
await axios__default.default.delete(`/admin/member-tiers/${id}`);
|
|
1705
554
|
},
|
|
1706
555
|
onSuccess: () => {
|
|
1707
556
|
queryClient.invalidateQueries({ queryKey: ["member-tiers"] });
|
|
@@ -1719,7 +568,7 @@ const useMembershipTiers = (params = {
|
|
|
1719
568
|
return reactQuery.useQuery({
|
|
1720
569
|
queryKey: [...MEMBERSHIP_TIERS_QUERY_KEY, params],
|
|
1721
570
|
queryFn: async () => {
|
|
1722
|
-
const response = await
|
|
571
|
+
const response = await axios__default.default.get("/admin/member-tiers", {
|
|
1723
572
|
params
|
|
1724
573
|
});
|
|
1725
574
|
return response.data;
|
|
@@ -1730,7 +579,7 @@ const useUpdateMembershipTier = () => {
|
|
|
1730
579
|
const queryClient = reactQuery.useQueryClient();
|
|
1731
580
|
return reactQuery.useMutation({
|
|
1732
581
|
mutationFn: async (tier) => {
|
|
1733
|
-
const response = await
|
|
582
|
+
const response = await axios__default.default.patch(`/admin/member-tiers/${tier.id}`, {
|
|
1734
583
|
name: tier.name,
|
|
1735
584
|
description: tier.description,
|
|
1736
585
|
privilege_description: tier.privilege_description,
|
|
@@ -1860,7 +709,7 @@ const MembershipTierRenderer = () => {
|
|
|
1860
709
|
}
|
|
1861
710
|
closeDrawer();
|
|
1862
711
|
} catch (error) {
|
|
1863
|
-
if (
|
|
712
|
+
if (axios__default.default.isAxiosError(error)) {
|
|
1864
713
|
ui.toast.error("Error saving tier", {
|
|
1865
714
|
description: (_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message,
|
|
1866
715
|
dismissable: true,
|
|
@@ -1891,7 +740,7 @@ const MembershipTierRenderer = () => {
|
|
|
1891
740
|
});
|
|
1892
741
|
closeDrawer();
|
|
1893
742
|
} catch (error) {
|
|
1894
|
-
if (
|
|
743
|
+
if (axios__default.default.isAxiosError(error)) {
|
|
1895
744
|
ui.toast.error("Error deleting tier", {
|
|
1896
745
|
description: (_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message,
|
|
1897
746
|
dismissable: true,
|