@haus-storefront-react/vendure-plugin-configs 0.0.14 → 0.0.16
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 +16 -0
- package/badge.js +13 -13
- package/badge.mjs +675 -652
- package/package.json +4 -4
package/badge.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { V as
|
|
2
|
-
import { c as X, j
|
|
1
|
+
import { V as mn, l as Ct } from "./index-Wcc0o6jA.mjs";
|
|
2
|
+
import { c as X, j, b as ee, t as hn, r as qt } from "./index-DZ5mwdPZ.mjs";
|
|
3
3
|
import * as A from "react";
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { initReactI18next as
|
|
6
|
-
import
|
|
7
|
-
import { QueryClient as
|
|
8
|
-
import { StyleSheet as
|
|
9
|
-
const V = new
|
|
4
|
+
import { createContext as ye, useContext as yn, useRef as bn } from "react";
|
|
5
|
+
import { initReactI18next as Ze } from "react-i18next";
|
|
6
|
+
import et from "i18next";
|
|
7
|
+
import { QueryClient as Ue } from "@tanstack/react-query";
|
|
8
|
+
import { StyleSheet as ae } from "react-native";
|
|
9
|
+
const V = new mn({
|
|
10
10
|
name: "badges",
|
|
11
11
|
enableFeatures: {
|
|
12
12
|
showBadges: ({
|
|
@@ -15,7 +15,7 @@ const V = new pn({
|
|
|
15
15
|
}) => {
|
|
16
16
|
const r = e ? V.getSettings().availablePositions[e] : V.getSettings().defaultPositions;
|
|
17
17
|
return {
|
|
18
|
-
badges:
|
|
18
|
+
badges: Ct.filter(t, (i) => r ? r.includes(i.position) : !0),
|
|
19
19
|
availablePositions: r
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -93,31 +93,31 @@ V.setRequests({
|
|
|
93
93
|
errorCode: t.code || "unknown"
|
|
94
94
|
}))
|
|
95
95
|
});
|
|
96
|
-
function
|
|
96
|
+
function gn(t) {
|
|
97
97
|
const e = [];
|
|
98
98
|
function r(i, o) {
|
|
99
99
|
const a = A.createContext(o), s = e.length;
|
|
100
100
|
e.push(a);
|
|
101
101
|
const u = (l) => {
|
|
102
102
|
const d = X.c(8);
|
|
103
|
-
let m,
|
|
103
|
+
let m, y, p;
|
|
104
104
|
d[0] !== l ? ({
|
|
105
105
|
scope: p,
|
|
106
106
|
children: m,
|
|
107
|
-
...
|
|
108
|
-
} = l, d[0] = l, d[1] = m, d[2] =
|
|
109
|
-
const
|
|
107
|
+
...y
|
|
108
|
+
} = l, d[0] = l, d[1] = m, d[2] = y, d[3] = p) : (m = d[1], y = d[2], p = d[3]);
|
|
109
|
+
const b = p?.[t]?.[s] || a;
|
|
110
110
|
let h;
|
|
111
|
-
h =
|
|
111
|
+
h = y;
|
|
112
112
|
const v = h;
|
|
113
113
|
let w;
|
|
114
|
-
return d[4] !==
|
|
114
|
+
return d[4] !== b.Provider || d[5] !== m || d[6] !== v ? (w = /* @__PURE__ */ j.jsx(b.Provider, { value: v, children: m }), d[4] = b.Provider, d[5] = m, d[6] = v, d[7] = w) : w = d[7], w;
|
|
115
115
|
};
|
|
116
116
|
u.displayName = i + "Provider";
|
|
117
117
|
function c(l, d) {
|
|
118
|
-
const m = d?.[t]?.[s] || a,
|
|
119
|
-
if (
|
|
120
|
-
return
|
|
118
|
+
const m = d?.[t]?.[s] || a, y = A.useContext(m);
|
|
119
|
+
if (y)
|
|
120
|
+
return y;
|
|
121
121
|
if (o !== void 0)
|
|
122
122
|
return o;
|
|
123
123
|
throw new Error(`\`${l}\` must be used within \`${i}\``);
|
|
@@ -138,13 +138,13 @@ function bn(t) {
|
|
|
138
138
|
}
|
|
139
139
|
return n.scopeName = t, [r, n];
|
|
140
140
|
}
|
|
141
|
-
const
|
|
142
|
-
function
|
|
141
|
+
const vn = Symbol("radix.slottable");
|
|
142
|
+
function wn(...t) {
|
|
143
143
|
return (e) => t.forEach((r) => {
|
|
144
144
|
typeof r == "function" ? r(e) : r != null && (r.current = e);
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Sn(t, e) {
|
|
148
148
|
const r = {
|
|
149
149
|
...e
|
|
150
150
|
};
|
|
@@ -153,66 +153,68 @@ function wn(t, e) {
|
|
|
153
153
|
/^on[A-Z]/.test(n) ? i && o ? r[n] = (...s) => {
|
|
154
154
|
const u = o(...s);
|
|
155
155
|
return i(...s), u;
|
|
156
|
-
} : i && (r[n] = i) : n === "style" ? r[n] =
|
|
156
|
+
} : i && (r[n] = i) : n === "style" ? r[n] = On(i, o) : n === "className" && (r[n] = [i, o].filter(Boolean).join(" "));
|
|
157
157
|
}
|
|
158
158
|
return {
|
|
159
159
|
...t,
|
|
160
160
|
...r
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return typeof t == "function" && typeof e == "function" ? (r) =>
|
|
165
|
-
}
|
|
166
|
-
function On(t) {
|
|
167
|
-
return A.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === gn;
|
|
163
|
+
function On(t, e) {
|
|
164
|
+
return typeof t == "function" && typeof e == "function" ? (r) => ae.flatten([t(r), e(r)]) : typeof t == "function" ? (r) => e ? ae.flatten([t(r), e]) : t(r) : typeof e == "function" ? (r) => t ? ae.flatten([t, e(r)]) : e(r) : ae.flatten([t, e].filter(Boolean));
|
|
168
165
|
}
|
|
169
166
|
function An(t) {
|
|
167
|
+
return A.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === vn;
|
|
168
|
+
}
|
|
169
|
+
function En(t) {
|
|
170
170
|
let e = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
171
171
|
return r ? t.ref : (e = Object.getOwnPropertyDescriptor(t, "ref")?.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Tn(t, e) {
|
|
174
174
|
const r = A.forwardRef((n, i) => {
|
|
175
175
|
const {
|
|
176
176
|
children: o,
|
|
177
177
|
...a
|
|
178
178
|
} = n;
|
|
179
179
|
if (A.isValidElement(o)) {
|
|
180
|
-
const s =
|
|
181
|
-
return o.type !== A.Fragment && (u.ref = i ?
|
|
180
|
+
const s = En(o), u = Sn(a, o.props);
|
|
181
|
+
return o.type !== A.Fragment && (u.ref = i ? wn(i, s) : s), A.cloneElement(o, u);
|
|
182
182
|
}
|
|
183
183
|
return A.Children.count(o) > 1 ? A.Children.only(null) : null;
|
|
184
184
|
});
|
|
185
185
|
return r.displayName = `${t}.SlotClone`, r;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
187
|
+
function we(t, e = !1, r = "div") {
|
|
188
|
+
if (!e)
|
|
189
|
+
return ee(r, t);
|
|
190
|
+
const n = Tn("Slot"), i = A.forwardRef((o, a) => {
|
|
191
|
+
const s = X.c(15);
|
|
192
|
+
let u, c;
|
|
193
|
+
s[0] !== o ? ({
|
|
194
|
+
children: u,
|
|
195
|
+
...c
|
|
196
|
+
} = o, s[0] = o, s[1] = u, s[2] = c) : (u = s[1], c = s[2]);
|
|
197
|
+
let l;
|
|
198
|
+
if (s[3] !== u || s[4] !== a || s[5] !== c) {
|
|
199
|
+
l = Symbol.for("react.early_return_sentinel");
|
|
198
200
|
e: {
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
201
|
-
const
|
|
202
|
-
let
|
|
203
|
-
|
|
201
|
+
const m = A.Children.toArray(u), y = m.find(An);
|
|
202
|
+
if (y) {
|
|
203
|
+
const p = y.props.children, b = m.map((w) => w === y ? A.Children.count(p) > 1 ? A.Children.only(null) : A.isValidElement(p) ? p.props.children : null : w), h = A.isValidElement(p) ? A.cloneElement(p, void 0, b) : null;
|
|
204
|
+
let v;
|
|
205
|
+
s[7] !== a || s[8] !== c || s[9] !== h ? (v = /* @__PURE__ */ j.jsx(n, { ...c, ref: a, children: h }), s[7] = a, s[8] = c, s[9] = h, s[10] = v) : v = s[10], l = v;
|
|
204
206
|
break e;
|
|
205
207
|
}
|
|
206
208
|
}
|
|
207
|
-
|
|
209
|
+
s[3] = u, s[4] = a, s[5] = c, s[6] = l;
|
|
208
210
|
} else
|
|
209
|
-
|
|
210
|
-
if (
|
|
211
|
-
return
|
|
212
|
-
let
|
|
213
|
-
return
|
|
211
|
+
l = s[6];
|
|
212
|
+
if (l !== Symbol.for("react.early_return_sentinel"))
|
|
213
|
+
return l;
|
|
214
|
+
let d;
|
|
215
|
+
return s[11] !== u || s[12] !== a || s[13] !== c ? (d = /* @__PURE__ */ j.jsx(n, { ...c, ref: a, children: u }), s[11] = u, s[12] = a, s[13] = c, s[14] = d) : d = s[14], d;
|
|
214
216
|
});
|
|
215
|
-
return
|
|
217
|
+
return i.displayName = "Slot", i;
|
|
216
218
|
}
|
|
217
219
|
let H;
|
|
218
220
|
try {
|
|
@@ -220,47 +222,68 @@ try {
|
|
|
220
222
|
} catch {
|
|
221
223
|
H = null;
|
|
222
224
|
}
|
|
223
|
-
const
|
|
224
|
-
getItem: async (t) =>
|
|
225
|
+
const Ce = typeof window < "u" && typeof window.localStorage < "u", qe = !!H, je = {}, se = {}, G = {
|
|
226
|
+
getItem: async (t) => qe ? H.getItem(t) : Ce ? new Promise((e) => {
|
|
227
|
+
Promise.resolve().then(() => {
|
|
228
|
+
const r = window.localStorage.getItem(t), n = se[t];
|
|
229
|
+
r !== n && (se[t] = r || ""), e(r);
|
|
230
|
+
});
|
|
231
|
+
}) : je[t] || null,
|
|
225
232
|
setItem: async (t, e) => {
|
|
226
|
-
if (
|
|
233
|
+
if (qe)
|
|
227
234
|
return H.setItem(t, e);
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
235
|
+
if (Ce)
|
|
236
|
+
return new Promise((r, n) => {
|
|
237
|
+
Promise.resolve().then(() => {
|
|
238
|
+
try {
|
|
239
|
+
window.localStorage.setItem(t, e);
|
|
240
|
+
const i = window.localStorage.getItem(t);
|
|
241
|
+
i === e ? (se[t] = e, r()) : n(new Error(`Failed to set localStorage item: expected "${e}", got "${i}"`));
|
|
242
|
+
} catch (i) {
|
|
243
|
+
n(i);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
je[t] = e;
|
|
233
248
|
},
|
|
234
249
|
removeItem: async (t) => {
|
|
235
|
-
if (
|
|
250
|
+
if (qe)
|
|
236
251
|
return H.removeItem(t);
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
252
|
+
if (Ce)
|
|
253
|
+
return new Promise((e, r) => {
|
|
254
|
+
Promise.resolve().then(() => {
|
|
255
|
+
try {
|
|
256
|
+
window.localStorage.removeItem(t);
|
|
257
|
+
const n = window.localStorage.getItem(t);
|
|
258
|
+
n === null ? (delete se[t], e()) : r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${n}"`));
|
|
259
|
+
} catch (n) {
|
|
260
|
+
r(n);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
delete je[t];
|
|
242
265
|
}
|
|
243
266
|
};
|
|
244
|
-
let
|
|
245
|
-
typeof window < "u" ? (window.__STORE_I18N_INSTANCE__ || (window.__STORE_I18N_INSTANCE__ =
|
|
246
|
-
function
|
|
267
|
+
let De;
|
|
268
|
+
typeof window < "u" ? (window.__STORE_I18N_INSTANCE__ || (window.__STORE_I18N_INSTANCE__ = et.createInstance()), window.__STORE_I18N_INSTANCE__.use(Ze), De = window.__STORE_I18N_INSTANCE__) : (De = et.createInstance(), De.use(Ze));
|
|
269
|
+
function Ie(t) {
|
|
247
270
|
"@babel/helpers - typeof";
|
|
248
|
-
return
|
|
271
|
+
return Ie = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
249
272
|
return typeof e;
|
|
250
273
|
} : function(e) {
|
|
251
274
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
252
|
-
},
|
|
275
|
+
}, Ie(t);
|
|
253
276
|
}
|
|
254
277
|
function jt() {
|
|
255
|
-
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" :
|
|
278
|
+
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : Ie(XMLHttpRequest)) === "object";
|
|
256
279
|
}
|
|
257
|
-
function
|
|
280
|
+
function _n(t) {
|
|
258
281
|
return !!t && typeof t.then == "function";
|
|
259
282
|
}
|
|
260
|
-
function
|
|
261
|
-
return
|
|
283
|
+
function Rn(t) {
|
|
284
|
+
return _n(t) ? t : Promise.resolve(t);
|
|
262
285
|
}
|
|
263
|
-
function
|
|
286
|
+
function tt(t, e) {
|
|
264
287
|
var r = Object.keys(t);
|
|
265
288
|
if (Object.getOwnPropertySymbols) {
|
|
266
289
|
var n = Object.getOwnPropertySymbols(t);
|
|
@@ -270,25 +293,25 @@ function et(t, e) {
|
|
|
270
293
|
}
|
|
271
294
|
return r;
|
|
272
295
|
}
|
|
273
|
-
function
|
|
296
|
+
function nt(t) {
|
|
274
297
|
for (var e = 1; e < arguments.length; e++) {
|
|
275
298
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
276
|
-
e % 2 ?
|
|
277
|
-
|
|
278
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
299
|
+
e % 2 ? tt(Object(r), !0).forEach(function(n) {
|
|
300
|
+
Nn(t, n, r[n]);
|
|
301
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : tt(Object(r)).forEach(function(n) {
|
|
279
302
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
280
303
|
});
|
|
281
304
|
}
|
|
282
305
|
return t;
|
|
283
306
|
}
|
|
284
|
-
function
|
|
285
|
-
return (e =
|
|
307
|
+
function Nn(t, e, r) {
|
|
308
|
+
return (e = Pn(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
286
309
|
}
|
|
287
|
-
function
|
|
288
|
-
var e =
|
|
310
|
+
function Pn(t) {
|
|
311
|
+
var e = kn(t, "string");
|
|
289
312
|
return B(e) == "symbol" ? e : e + "";
|
|
290
313
|
}
|
|
291
|
-
function
|
|
314
|
+
function kn(t, e) {
|
|
292
315
|
if (B(t) != "object" || !t) return t;
|
|
293
316
|
var r = t[Symbol.toPrimitive];
|
|
294
317
|
if (r !== void 0) {
|
|
@@ -308,12 +331,12 @@ function B(t) {
|
|
|
308
331
|
}
|
|
309
332
|
var D = typeof fetch == "function" ? fetch : void 0;
|
|
310
333
|
typeof global < "u" && global.fetch ? D = global.fetch : typeof window < "u" && window.fetch && (D = window.fetch);
|
|
311
|
-
var
|
|
312
|
-
jt() && (typeof global < "u" && global.XMLHttpRequest ?
|
|
313
|
-
var
|
|
314
|
-
typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ?
|
|
334
|
+
var Y;
|
|
335
|
+
jt() && (typeof global < "u" && global.XMLHttpRequest ? Y = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (Y = window.XMLHttpRequest));
|
|
336
|
+
var be;
|
|
337
|
+
typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? be = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (be = window.ActiveXObject));
|
|
315
338
|
typeof D != "function" && (D = void 0);
|
|
316
|
-
if (!D && !
|
|
339
|
+
if (!D && !Y && !be)
|
|
317
340
|
try {
|
|
318
341
|
import("./browser-ponyfill-DYgay_ta.mjs").then((t) => t.b).then(function(t) {
|
|
319
342
|
D = t.default;
|
|
@@ -330,7 +353,7 @@ var Le = function(e, r) {
|
|
|
330
353
|
e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1);
|
|
331
354
|
}
|
|
332
355
|
return e;
|
|
333
|
-
},
|
|
356
|
+
}, rt = function(e, r, n, i) {
|
|
334
357
|
var o = function(u) {
|
|
335
358
|
if (!u.ok) return n(u.statusText || "Error", {
|
|
336
359
|
status: u.status
|
|
@@ -350,24 +373,24 @@ var Le = function(e, r) {
|
|
|
350
373
|
}
|
|
351
374
|
}
|
|
352
375
|
typeof fetch == "function" ? fetch(e, r).then(o).catch(n) : D(e, r).then(o).catch(n);
|
|
353
|
-
},
|
|
376
|
+
}, it = !1, Cn = function(e, r, n, i) {
|
|
354
377
|
e.queryStringParams && (r = Le(r, e.queryStringParams));
|
|
355
|
-
var o =
|
|
378
|
+
var o = nt({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
|
|
356
379
|
typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), n && (o["Content-Type"] = "application/json");
|
|
357
|
-
var a = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, s =
|
|
380
|
+
var a = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, s = nt({
|
|
358
381
|
method: n ? "POST" : "GET",
|
|
359
382
|
body: n ? e.stringify(n) : void 0,
|
|
360
383
|
headers: o
|
|
361
|
-
},
|
|
384
|
+
}, it ? {} : a), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
|
|
362
385
|
try {
|
|
363
|
-
|
|
386
|
+
rt(r, s, i, u);
|
|
364
387
|
} catch (c) {
|
|
365
388
|
if (!a || Object.keys(a).length === 0 || !c.message || c.message.indexOf("not implemented") < 0)
|
|
366
389
|
return i(c);
|
|
367
390
|
try {
|
|
368
391
|
Object.keys(a).forEach(function(l) {
|
|
369
392
|
delete s[l];
|
|
370
|
-
}),
|
|
393
|
+
}), rt(r, s, i, u), it = !0;
|
|
371
394
|
} catch (l) {
|
|
372
395
|
i(l);
|
|
373
396
|
}
|
|
@@ -375,7 +398,7 @@ var Le = function(e, r) {
|
|
|
375
398
|
}, qn = function(e, r, n, i) {
|
|
376
399
|
n && B(n) === "object" && (n = Le("", n).slice(1)), e.queryStringParams && (r = Le(r, e.queryStringParams));
|
|
377
400
|
try {
|
|
378
|
-
var o =
|
|
401
|
+
var o = Y ? new Y() : new be("MSXML2.XMLHTTP.3.0");
|
|
379
402
|
o.open(n ? "POST" : "GET", r, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, n && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
|
|
380
403
|
var a = e.customHeaders;
|
|
381
404
|
if (a = typeof a == "function" ? a() : a, a)
|
|
@@ -393,7 +416,7 @@ var Le = function(e, r) {
|
|
|
393
416
|
}, jn = function(e, r, n, i) {
|
|
394
417
|
if (typeof n == "function" && (i = n, n = void 0), i = i || function() {
|
|
395
418
|
}, D && r.indexOf("file:") !== 0)
|
|
396
|
-
return
|
|
419
|
+
return Cn(e, r, n, i);
|
|
397
420
|
if (jt() || typeof ActiveXObject == "function")
|
|
398
421
|
return qn(e, r, n, i);
|
|
399
422
|
i(new Error("No fetch and no xhr implementation found!"));
|
|
@@ -406,7 +429,7 @@ function W(t) {
|
|
|
406
429
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
407
430
|
}, W(t);
|
|
408
431
|
}
|
|
409
|
-
function
|
|
432
|
+
function ot(t, e) {
|
|
410
433
|
var r = Object.keys(t);
|
|
411
434
|
if (Object.getOwnPropertySymbols) {
|
|
412
435
|
var n = Object.getOwnPropertySymbols(t);
|
|
@@ -416,37 +439,37 @@ function it(t, e) {
|
|
|
416
439
|
}
|
|
417
440
|
return r;
|
|
418
441
|
}
|
|
419
|
-
function
|
|
442
|
+
function Fe(t) {
|
|
420
443
|
for (var e = 1; e < arguments.length; e++) {
|
|
421
444
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
422
|
-
e % 2 ?
|
|
423
|
-
|
|
424
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
445
|
+
e % 2 ? ot(Object(r), !0).forEach(function(n) {
|
|
446
|
+
Dt(t, n, r[n]);
|
|
447
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : ot(Object(r)).forEach(function(n) {
|
|
425
448
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
426
449
|
});
|
|
427
450
|
}
|
|
428
451
|
return t;
|
|
429
452
|
}
|
|
430
|
-
function
|
|
453
|
+
function Dn(t, e) {
|
|
431
454
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
432
455
|
}
|
|
433
|
-
function
|
|
456
|
+
function Fn(t, e) {
|
|
434
457
|
for (var r = 0; r < e.length; r++) {
|
|
435
458
|
var n = e[r];
|
|
436
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t,
|
|
459
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, Ft(n.key), n);
|
|
437
460
|
}
|
|
438
461
|
}
|
|
439
|
-
function
|
|
440
|
-
return e &&
|
|
462
|
+
function xn(t, e, r) {
|
|
463
|
+
return e && Fn(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
441
464
|
}
|
|
442
|
-
function
|
|
443
|
-
return (e =
|
|
465
|
+
function Dt(t, e, r) {
|
|
466
|
+
return (e = Ft(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
444
467
|
}
|
|
445
|
-
function
|
|
446
|
-
var e =
|
|
468
|
+
function Ft(t) {
|
|
469
|
+
var e = Mn(t, "string");
|
|
447
470
|
return W(e) == "symbol" ? e : e + "";
|
|
448
471
|
}
|
|
449
|
-
function
|
|
472
|
+
function Mn(t, e) {
|
|
450
473
|
if (W(t) != "object" || !t) return t;
|
|
451
474
|
var r = t[Symbol.toPrimitive];
|
|
452
475
|
if (r !== void 0) {
|
|
@@ -456,7 +479,7 @@ function xn(t, e) {
|
|
|
456
479
|
}
|
|
457
480
|
return String(t);
|
|
458
481
|
}
|
|
459
|
-
var
|
|
482
|
+
var Bn = function() {
|
|
460
483
|
return {
|
|
461
484
|
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
462
485
|
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
@@ -465,7 +488,7 @@ var Mn = function() {
|
|
|
465
488
|
},
|
|
466
489
|
stringify: JSON.stringify,
|
|
467
490
|
parsePayload: function(r, n, i) {
|
|
468
|
-
return
|
|
491
|
+
return Dt({}, n, i || "");
|
|
469
492
|
},
|
|
470
493
|
parseLoadPayload: function(r, n) {
|
|
471
494
|
},
|
|
@@ -482,16 +505,16 @@ var Mn = function() {
|
|
|
482
505
|
cache: "default"
|
|
483
506
|
}
|
|
484
507
|
};
|
|
485
|
-
},
|
|
508
|
+
}, Un = function() {
|
|
486
509
|
function t(e) {
|
|
487
510
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
488
|
-
|
|
511
|
+
Dn(this, t), this.services = e, this.options = r, this.allOptions = n, this.type = "backend", this.init(e, r, n);
|
|
489
512
|
}
|
|
490
|
-
return
|
|
513
|
+
return xn(t, [{
|
|
491
514
|
key: "init",
|
|
492
515
|
value: function(r) {
|
|
493
516
|
var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
494
|
-
if (this.services = r, this.options =
|
|
517
|
+
if (this.services = r, this.options = Fe(Fe(Fe({}, Bn()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
|
|
495
518
|
var a = setInterval(function() {
|
|
496
519
|
return n.reload();
|
|
497
520
|
}, this.options.reloadInterval);
|
|
@@ -512,7 +535,7 @@ var Mn = function() {
|
|
|
512
535
|
key: "_readAny",
|
|
513
536
|
value: function(r, n, i, o, a) {
|
|
514
537
|
var s = this, u = this.options.loadPath;
|
|
515
|
-
typeof this.options.loadPath == "function" && (u = this.options.loadPath(r, i)), u =
|
|
538
|
+
typeof this.options.loadPath == "function" && (u = this.options.loadPath(r, i)), u = Rn(u), u.then(function(c) {
|
|
516
539
|
if (!c) return a(null, {});
|
|
517
540
|
var l = s.services.interpolator.interpolate(c, {
|
|
518
541
|
lng: r.join("+"),
|
|
@@ -529,20 +552,20 @@ var Mn = function() {
|
|
|
529
552
|
if (d && (d.status >= 500 && d.status < 600 || !d.status)) return n("failed loading " + r + "; status code: " + d.status, !0);
|
|
530
553
|
if (d && d.status >= 400 && d.status < 500) return n("failed loading " + r + "; status code: " + d.status, !1);
|
|
531
554
|
if (!d && l && l.message) {
|
|
532
|
-
var m = l.message.toLowerCase(),
|
|
555
|
+
var m = l.message.toLowerCase(), y = ["failed", "fetch", "network", "load"].find(function(h) {
|
|
533
556
|
return m.indexOf(h) > -1;
|
|
534
557
|
});
|
|
535
|
-
if (
|
|
558
|
+
if (y)
|
|
536
559
|
return n("failed loading " + r + ": " + l.message, !0);
|
|
537
560
|
}
|
|
538
561
|
if (l) return n(l, !1);
|
|
539
|
-
var p,
|
|
562
|
+
var p, b;
|
|
540
563
|
try {
|
|
541
564
|
typeof d.data == "string" ? p = a.options.parse(d.data, i, o) : p = d.data;
|
|
542
565
|
} catch {
|
|
543
|
-
|
|
566
|
+
b = "failed parsing " + r + " to json";
|
|
544
567
|
}
|
|
545
|
-
if (
|
|
568
|
+
if (b) return n(b, !1);
|
|
546
569
|
n(null, p);
|
|
547
570
|
});
|
|
548
571
|
}
|
|
@@ -554,14 +577,14 @@ var Mn = function() {
|
|
|
554
577
|
typeof r == "string" && (r = [r]);
|
|
555
578
|
var u = this.options.parsePayload(n, i, o), c = 0, l = [], d = [];
|
|
556
579
|
r.forEach(function(m) {
|
|
557
|
-
var
|
|
558
|
-
typeof s.options.addPath == "function" && (
|
|
559
|
-
var p = s.services.interpolator.interpolate(
|
|
580
|
+
var y = s.options.addPath;
|
|
581
|
+
typeof s.options.addPath == "function" && (y = s.options.addPath(m, n));
|
|
582
|
+
var p = s.services.interpolator.interpolate(y, {
|
|
560
583
|
lng: m,
|
|
561
584
|
ns: n
|
|
562
585
|
});
|
|
563
|
-
s.options.request(s.options, p, u, function(
|
|
564
|
-
c += 1, l.push(
|
|
586
|
+
s.options.request(s.options, p, u, function(b, h) {
|
|
587
|
+
c += 1, l.push(b), d.push(h), c === r.length && typeof a == "function" && a(l, d);
|
|
565
588
|
});
|
|
566
589
|
});
|
|
567
590
|
}
|
|
@@ -573,16 +596,16 @@ var Mn = function() {
|
|
|
573
596
|
if (!(s && s.toLowerCase() === "cimode")) {
|
|
574
597
|
var u = [], c = function(d) {
|
|
575
598
|
var m = o.toResolveHierarchy(d);
|
|
576
|
-
m.forEach(function(
|
|
577
|
-
u.indexOf(
|
|
599
|
+
m.forEach(function(y) {
|
|
600
|
+
u.indexOf(y) < 0 && u.push(y);
|
|
578
601
|
});
|
|
579
602
|
};
|
|
580
603
|
c(s), this.allOptions.preload && this.allOptions.preload.forEach(function(l) {
|
|
581
604
|
return c(l);
|
|
582
605
|
}), u.forEach(function(l) {
|
|
583
606
|
r.allOptions.ns.forEach(function(d) {
|
|
584
|
-
i.read(l, d, "read", null, null, function(m,
|
|
585
|
-
m && a.warn("loading namespace ".concat(d, " for language ").concat(l, " failed"), m), !m &&
|
|
607
|
+
i.read(l, d, "read", null, null, function(m, y) {
|
|
608
|
+
m && a.warn("loading namespace ".concat(d, " for language ").concat(l, " failed"), m), !m && y && a.log("loaded namespace ".concat(d, " for language ").concat(l), y), i.loaded("".concat(l, "|").concat(d), m, y);
|
|
586
609
|
});
|
|
587
610
|
});
|
|
588
611
|
});
|
|
@@ -590,42 +613,42 @@ var Mn = function() {
|
|
|
590
613
|
}
|
|
591
614
|
}]);
|
|
592
615
|
}();
|
|
593
|
-
|
|
594
|
-
let
|
|
595
|
-
typeof window < "u" ? (window.__STORE_SDK_CONTEXT__ || (window.__STORE_SDK_CONTEXT__ =
|
|
596
|
-
const
|
|
597
|
-
const t =
|
|
616
|
+
Un.type = "backend";
|
|
617
|
+
let $e;
|
|
618
|
+
typeof window < "u" ? (window.__STORE_SDK_CONTEXT__ || (window.__STORE_SDK_CONTEXT__ = ye(void 0)), $e = window.__STORE_SDK_CONTEXT__) : $e = ye(void 0);
|
|
619
|
+
const In = () => {
|
|
620
|
+
const t = yn($e);
|
|
598
621
|
return t || console.error("You must wrap your component in a <DataProvider>"), t?.sdkType === "dummy" || t?.sdkType === "vendure", t;
|
|
599
622
|
};
|
|
600
|
-
new
|
|
601
|
-
function
|
|
623
|
+
new Ue();
|
|
624
|
+
function xt(t, e) {
|
|
602
625
|
return function() {
|
|
603
626
|
return t.apply(e, arguments);
|
|
604
627
|
};
|
|
605
628
|
}
|
|
606
|
-
const { toString: Ln } = Object.prototype, { getPrototypeOf:
|
|
629
|
+
const { toString: Ln } = Object.prototype, { getPrototypeOf: Ke } = Object, { iterator: Se, toStringTag: Mt } = Symbol, Oe = /* @__PURE__ */ ((t) => (e) => {
|
|
607
630
|
const r = Ln.call(e);
|
|
608
631
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
609
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
610
|
-
function In(t) {
|
|
611
|
-
return t !== null && !Y(t) && t.constructor !== null && !Y(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
612
|
-
}
|
|
613
|
-
const Mt = N("ArrayBuffer");
|
|
632
|
+
})(/* @__PURE__ */ Object.create(null)), P = (t) => (t = t.toLowerCase(), (e) => Oe(e) === t), Ae = (t) => (e) => typeof e === t, { isArray: z } = Array, Z = Ae("undefined");
|
|
614
633
|
function $n(t) {
|
|
634
|
+
return t !== null && !Z(t) && t.constructor !== null && !Z(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
635
|
+
}
|
|
636
|
+
const Bt = P("ArrayBuffer");
|
|
637
|
+
function Hn(t) {
|
|
615
638
|
let e;
|
|
616
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
639
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Bt(t.buffer), e;
|
|
617
640
|
}
|
|
618
|
-
const
|
|
619
|
-
if (
|
|
641
|
+
const Vn = Ae("string"), _ = Ae("function"), Ut = Ae("number"), Ee = (t) => t !== null && typeof t == "object", Wn = (t) => t === !0 || t === !1, pe = (t) => {
|
|
642
|
+
if (Oe(t) !== "object")
|
|
620
643
|
return !1;
|
|
621
|
-
const e =
|
|
622
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
623
|
-
},
|
|
644
|
+
const e = Ke(t);
|
|
645
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Mt in t) && !(Se in t);
|
|
646
|
+
}, Xn = P("Date"), zn = P("File"), Jn = P("Blob"), Kn = P("FileList"), Qn = (t) => Ee(t) && _(t.pipe), Gn = (t) => {
|
|
624
647
|
let e;
|
|
625
|
-
return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e =
|
|
648
|
+
return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e = Oe(t)) === "formdata" || // detect form-data instance
|
|
626
649
|
e === "object" && _(t.toString) && t.toString() === "[object FormData]"));
|
|
627
|
-
},
|
|
628
|
-
function
|
|
650
|
+
}, Yn = P("URLSearchParams"), [Zn, er, tr, nr] = ["ReadableStream", "Request", "Response", "Headers"].map(P), rr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
651
|
+
function te(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
629
652
|
if (t === null || typeof t > "u")
|
|
630
653
|
return;
|
|
631
654
|
let n, i;
|
|
@@ -639,7 +662,7 @@ function Z(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
639
662
|
s = o[n], e.call(null, t[s], s, t);
|
|
640
663
|
}
|
|
641
664
|
}
|
|
642
|
-
function
|
|
665
|
+
function It(t, e) {
|
|
643
666
|
e = e.toLowerCase();
|
|
644
667
|
const r = Object.keys(t);
|
|
645
668
|
let n = r.length, i;
|
|
@@ -648,71 +671,71 @@ function Ut(t, e) {
|
|
|
648
671
|
return i;
|
|
649
672
|
return null;
|
|
650
673
|
}
|
|
651
|
-
const x = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Lt = (t) => !
|
|
652
|
-
function
|
|
674
|
+
const x = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Lt = (t) => !Z(t) && t !== x;
|
|
675
|
+
function He() {
|
|
653
676
|
const { caseless: t } = Lt(this) && this || {}, e = {}, r = (n, i) => {
|
|
654
|
-
const o = t &&
|
|
655
|
-
|
|
677
|
+
const o = t && It(e, i) || i;
|
|
678
|
+
pe(e[o]) && pe(n) ? e[o] = He(e[o], n) : pe(n) ? e[o] = He({}, n) : z(n) ? e[o] = n.slice() : e[o] = n;
|
|
656
679
|
};
|
|
657
680
|
for (let n = 0, i = arguments.length; n < i; n++)
|
|
658
|
-
arguments[n] &&
|
|
681
|
+
arguments[n] && te(arguments[n], r);
|
|
659
682
|
return e;
|
|
660
683
|
}
|
|
661
|
-
const
|
|
662
|
-
r && _(i) ? t[o] =
|
|
663
|
-
}, { allOwnKeys: n }), t),
|
|
684
|
+
const ir = (t, e, r, { allOwnKeys: n } = {}) => (te(e, (i, o) => {
|
|
685
|
+
r && _(i) ? t[o] = xt(i, r) : t[o] = i;
|
|
686
|
+
}, { allOwnKeys: n }), t), or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), ar = (t, e, r, n) => {
|
|
664
687
|
t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
665
688
|
value: e.prototype
|
|
666
689
|
}), r && Object.assign(t.prototype, r);
|
|
667
|
-
},
|
|
690
|
+
}, sr = (t, e, r, n) => {
|
|
668
691
|
let i, o, a;
|
|
669
692
|
const s = {};
|
|
670
693
|
if (e = e || {}, t == null) return e;
|
|
671
694
|
do {
|
|
672
695
|
for (i = Object.getOwnPropertyNames(t), o = i.length; o-- > 0; )
|
|
673
696
|
a = i[o], (!n || n(a, t, e)) && !s[a] && (e[a] = t[a], s[a] = !0);
|
|
674
|
-
t = r !== !1 &&
|
|
697
|
+
t = r !== !1 && Ke(t);
|
|
675
698
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
676
699
|
return e;
|
|
677
|
-
},
|
|
700
|
+
}, ur = (t, e, r) => {
|
|
678
701
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
679
702
|
const n = t.indexOf(e, r);
|
|
680
703
|
return n !== -1 && n === r;
|
|
681
|
-
},
|
|
704
|
+
}, cr = (t) => {
|
|
682
705
|
if (!t) return null;
|
|
683
706
|
if (z(t)) return t;
|
|
684
707
|
let e = t.length;
|
|
685
|
-
if (!
|
|
708
|
+
if (!Ut(e)) return null;
|
|
686
709
|
const r = new Array(e);
|
|
687
710
|
for (; e-- > 0; )
|
|
688
711
|
r[e] = t[e];
|
|
689
712
|
return r;
|
|
690
|
-
},
|
|
691
|
-
const n = (t && t[
|
|
713
|
+
}, lr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Ke(Uint8Array)), fr = (t, e) => {
|
|
714
|
+
const n = (t && t[Se]).call(t);
|
|
692
715
|
let i;
|
|
693
716
|
for (; (i = n.next()) && !i.done; ) {
|
|
694
717
|
const o = i.value;
|
|
695
718
|
e.call(t, o[0], o[1]);
|
|
696
719
|
}
|
|
697
|
-
},
|
|
720
|
+
}, dr = (t, e) => {
|
|
698
721
|
let r;
|
|
699
722
|
const n = [];
|
|
700
723
|
for (; (r = t.exec(e)) !== null; )
|
|
701
724
|
n.push(r);
|
|
702
725
|
return n;
|
|
703
|
-
},
|
|
726
|
+
}, pr = P("HTMLFormElement"), mr = (t) => t.toLowerCase().replace(
|
|
704
727
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
705
728
|
function(r, n, i) {
|
|
706
729
|
return n.toUpperCase() + i;
|
|
707
730
|
}
|
|
708
|
-
),
|
|
731
|
+
), at = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), hr = P("RegExp"), $t = (t, e) => {
|
|
709
732
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
710
|
-
|
|
733
|
+
te(r, (i, o) => {
|
|
711
734
|
let a;
|
|
712
735
|
(a = e(i, o, t)) !== !1 && (n[o] = a || i);
|
|
713
736
|
}), Object.defineProperties(t, n);
|
|
714
|
-
},
|
|
715
|
-
|
|
737
|
+
}, yr = (t) => {
|
|
738
|
+
$t(t, (e, r) => {
|
|
716
739
|
if (_(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
717
740
|
return !1;
|
|
718
741
|
const n = t[r];
|
|
@@ -726,100 +749,100 @@ const rr = (t, e, r, { allOwnKeys: n } = {}) => (Z(e, (i, o) => {
|
|
|
726
749
|
});
|
|
727
750
|
}
|
|
728
751
|
});
|
|
729
|
-
},
|
|
752
|
+
}, br = (t, e) => {
|
|
730
753
|
const r = {}, n = (i) => {
|
|
731
754
|
i.forEach((o) => {
|
|
732
755
|
r[o] = !0;
|
|
733
756
|
});
|
|
734
757
|
};
|
|
735
758
|
return z(t) ? n(t) : n(String(t).split(e)), r;
|
|
736
|
-
},
|
|
737
|
-
},
|
|
738
|
-
function
|
|
739
|
-
return !!(t && _(t.append) && t[
|
|
759
|
+
}, gr = () => {
|
|
760
|
+
}, vr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
761
|
+
function wr(t) {
|
|
762
|
+
return !!(t && _(t.append) && t[Mt] === "FormData" && t[Se]);
|
|
740
763
|
}
|
|
741
|
-
const
|
|
764
|
+
const Sr = (t) => {
|
|
742
765
|
const e = new Array(10), r = (n, i) => {
|
|
743
|
-
if (
|
|
766
|
+
if (Ee(n)) {
|
|
744
767
|
if (e.indexOf(n) >= 0)
|
|
745
768
|
return;
|
|
746
769
|
if (!("toJSON" in n)) {
|
|
747
770
|
e[i] = n;
|
|
748
771
|
const o = z(n) ? [] : {};
|
|
749
|
-
return
|
|
772
|
+
return te(n, (a, s) => {
|
|
750
773
|
const u = r(a, i + 1);
|
|
751
|
-
!
|
|
774
|
+
!Z(u) && (o[s] = u);
|
|
752
775
|
}), e[i] = void 0, o;
|
|
753
776
|
}
|
|
754
777
|
}
|
|
755
778
|
return n;
|
|
756
779
|
};
|
|
757
780
|
return r(t, 0);
|
|
758
|
-
},
|
|
781
|
+
}, Or = P("AsyncFunction"), Ar = (t) => t && (Ee(t) || _(t)) && _(t.then) && _(t.catch), Ht = ((t, e) => t ? setImmediate : e ? ((r, n) => (x.addEventListener("message", ({ source: i, data: o }) => {
|
|
759
782
|
i === x && o === r && n.length && n.shift()();
|
|
760
783
|
}, !1), (i) => {
|
|
761
784
|
n.push(i), x.postMessage(r, "*");
|
|
762
785
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
763
786
|
typeof setImmediate == "function",
|
|
764
787
|
_(x.postMessage)
|
|
765
|
-
),
|
|
788
|
+
), Er = typeof queueMicrotask < "u" ? queueMicrotask.bind(x) : typeof process < "u" && process.nextTick || Ht, Tr = (t) => t != null && _(t[Se]), f = {
|
|
766
789
|
isArray: z,
|
|
767
|
-
isArrayBuffer:
|
|
768
|
-
isBuffer:
|
|
769
|
-
isFormData:
|
|
770
|
-
isArrayBufferView:
|
|
771
|
-
isString:
|
|
772
|
-
isNumber:
|
|
773
|
-
isBoolean:
|
|
774
|
-
isObject:
|
|
775
|
-
isPlainObject:
|
|
776
|
-
isReadableStream:
|
|
777
|
-
isRequest:
|
|
778
|
-
isResponse:
|
|
779
|
-
isHeaders:
|
|
780
|
-
isUndefined:
|
|
781
|
-
isDate:
|
|
782
|
-
isFile:
|
|
783
|
-
isBlob:
|
|
784
|
-
isRegExp:
|
|
790
|
+
isArrayBuffer: Bt,
|
|
791
|
+
isBuffer: $n,
|
|
792
|
+
isFormData: Gn,
|
|
793
|
+
isArrayBufferView: Hn,
|
|
794
|
+
isString: Vn,
|
|
795
|
+
isNumber: Ut,
|
|
796
|
+
isBoolean: Wn,
|
|
797
|
+
isObject: Ee,
|
|
798
|
+
isPlainObject: pe,
|
|
799
|
+
isReadableStream: Zn,
|
|
800
|
+
isRequest: er,
|
|
801
|
+
isResponse: tr,
|
|
802
|
+
isHeaders: nr,
|
|
803
|
+
isUndefined: Z,
|
|
804
|
+
isDate: Xn,
|
|
805
|
+
isFile: zn,
|
|
806
|
+
isBlob: Jn,
|
|
807
|
+
isRegExp: hr,
|
|
785
808
|
isFunction: _,
|
|
786
|
-
isStream:
|
|
787
|
-
isURLSearchParams:
|
|
788
|
-
isTypedArray:
|
|
789
|
-
isFileList:
|
|
790
|
-
forEach:
|
|
791
|
-
merge:
|
|
792
|
-
extend:
|
|
793
|
-
trim:
|
|
794
|
-
stripBOM:
|
|
795
|
-
inherits:
|
|
796
|
-
toFlatObject:
|
|
797
|
-
kindOf:
|
|
798
|
-
kindOfTest:
|
|
799
|
-
endsWith:
|
|
800
|
-
toArray:
|
|
801
|
-
forEachEntry:
|
|
802
|
-
matchAll:
|
|
803
|
-
isHTMLForm:
|
|
804
|
-
hasOwnProperty:
|
|
805
|
-
hasOwnProp:
|
|
809
|
+
isStream: Qn,
|
|
810
|
+
isURLSearchParams: Yn,
|
|
811
|
+
isTypedArray: lr,
|
|
812
|
+
isFileList: Kn,
|
|
813
|
+
forEach: te,
|
|
814
|
+
merge: He,
|
|
815
|
+
extend: ir,
|
|
816
|
+
trim: rr,
|
|
817
|
+
stripBOM: or,
|
|
818
|
+
inherits: ar,
|
|
819
|
+
toFlatObject: sr,
|
|
820
|
+
kindOf: Oe,
|
|
821
|
+
kindOfTest: P,
|
|
822
|
+
endsWith: ur,
|
|
823
|
+
toArray: cr,
|
|
824
|
+
forEachEntry: fr,
|
|
825
|
+
matchAll: dr,
|
|
826
|
+
isHTMLForm: pr,
|
|
827
|
+
hasOwnProperty: at,
|
|
828
|
+
hasOwnProp: at,
|
|
806
829
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
807
|
-
reduceDescriptors:
|
|
808
|
-
freezeMethods:
|
|
809
|
-
toObjectSet:
|
|
810
|
-
toCamelCase:
|
|
811
|
-
noop:
|
|
812
|
-
toFiniteNumber:
|
|
813
|
-
findKey:
|
|
830
|
+
reduceDescriptors: $t,
|
|
831
|
+
freezeMethods: yr,
|
|
832
|
+
toObjectSet: br,
|
|
833
|
+
toCamelCase: mr,
|
|
834
|
+
noop: gr,
|
|
835
|
+
toFiniteNumber: vr,
|
|
836
|
+
findKey: It,
|
|
814
837
|
global: x,
|
|
815
838
|
isContextDefined: Lt,
|
|
816
|
-
isSpecCompliantForm:
|
|
817
|
-
toJSONObject:
|
|
818
|
-
isAsyncFn:
|
|
819
|
-
isThenable:
|
|
820
|
-
setImmediate:
|
|
821
|
-
asap:
|
|
822
|
-
isIterable:
|
|
839
|
+
isSpecCompliantForm: wr,
|
|
840
|
+
toJSONObject: Sr,
|
|
841
|
+
isAsyncFn: Or,
|
|
842
|
+
isThenable: Ar,
|
|
843
|
+
setImmediate: Ht,
|
|
844
|
+
asap: Er,
|
|
845
|
+
isIterable: Tr
|
|
823
846
|
};
|
|
824
847
|
function g(t, e, r, n, i) {
|
|
825
848
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), i && (this.response = i, this.status = i.status ? i.status : null);
|
|
@@ -845,7 +868,7 @@ f.inherits(g, Error, {
|
|
|
845
868
|
};
|
|
846
869
|
}
|
|
847
870
|
});
|
|
848
|
-
const
|
|
871
|
+
const Vt = g.prototype, Wt = {};
|
|
849
872
|
[
|
|
850
873
|
"ERR_BAD_OPTION_VALUE",
|
|
851
874
|
"ERR_BAD_OPTION",
|
|
@@ -861,43 +884,43 @@ const Ht = g.prototype, Vt = {};
|
|
|
861
884
|
"ERR_INVALID_URL"
|
|
862
885
|
// eslint-disable-next-line func-names
|
|
863
886
|
].forEach((t) => {
|
|
864
|
-
|
|
887
|
+
Wt[t] = { value: t };
|
|
865
888
|
});
|
|
866
|
-
Object.defineProperties(g,
|
|
867
|
-
Object.defineProperty(
|
|
889
|
+
Object.defineProperties(g, Wt);
|
|
890
|
+
Object.defineProperty(Vt, "isAxiosError", { value: !0 });
|
|
868
891
|
g.from = (t, e, r, n, i, o) => {
|
|
869
|
-
const a = Object.create(
|
|
892
|
+
const a = Object.create(Vt);
|
|
870
893
|
return f.toFlatObject(t, a, function(u) {
|
|
871
894
|
return u !== Error.prototype;
|
|
872
895
|
}, (s) => s !== "isAxiosError"), g.call(a, t.message, e, r, n, i), a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
873
896
|
};
|
|
874
|
-
const
|
|
875
|
-
function
|
|
897
|
+
const _r = null;
|
|
898
|
+
function Ve(t) {
|
|
876
899
|
return f.isPlainObject(t) || f.isArray(t);
|
|
877
900
|
}
|
|
878
|
-
function
|
|
901
|
+
function Xt(t) {
|
|
879
902
|
return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
880
903
|
}
|
|
881
|
-
function
|
|
904
|
+
function st(t, e, r) {
|
|
882
905
|
return t ? t.concat(e).map(function(i, o) {
|
|
883
|
-
return i =
|
|
906
|
+
return i = Xt(i), !r && o ? "[" + i + "]" : i;
|
|
884
907
|
}).join(r ? "." : "") : e;
|
|
885
908
|
}
|
|
886
|
-
function
|
|
887
|
-
return f.isArray(t) && !t.some(
|
|
909
|
+
function Rr(t) {
|
|
910
|
+
return f.isArray(t) && !t.some(Ve);
|
|
888
911
|
}
|
|
889
|
-
const
|
|
912
|
+
const Nr = f.toFlatObject(f, {}, null, function(e) {
|
|
890
913
|
return /^is[A-Z]/.test(e);
|
|
891
914
|
});
|
|
892
|
-
function
|
|
915
|
+
function Te(t, e, r) {
|
|
893
916
|
if (!f.isObject(t))
|
|
894
917
|
throw new TypeError("target must be an object");
|
|
895
918
|
e = e || new FormData(), r = f.toFlatObject(r, {
|
|
896
919
|
metaTokens: !0,
|
|
897
920
|
dots: !1,
|
|
898
921
|
indexes: !1
|
|
899
|
-
}, !1, function(
|
|
900
|
-
return !f.isUndefined(h[
|
|
922
|
+
}, !1, function(b, h) {
|
|
923
|
+
return !f.isUndefined(h[b]);
|
|
901
924
|
});
|
|
902
925
|
const n = r.metaTokens, i = r.visitor || l, o = r.dots, a = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
|
|
903
926
|
if (!f.isFunction(i))
|
|
@@ -912,47 +935,47 @@ function Ae(t, e, r) {
|
|
|
912
935
|
throw new g("Blob is not supported. Use a Buffer instead.");
|
|
913
936
|
return f.isArrayBuffer(p) || f.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
914
937
|
}
|
|
915
|
-
function l(p,
|
|
938
|
+
function l(p, b, h) {
|
|
916
939
|
let v = p;
|
|
917
940
|
if (p && !h && typeof p == "object") {
|
|
918
|
-
if (f.endsWith(
|
|
919
|
-
|
|
920
|
-
else if (f.isArray(p) &&
|
|
921
|
-
return
|
|
941
|
+
if (f.endsWith(b, "{}"))
|
|
942
|
+
b = n ? b : b.slice(0, -2), p = JSON.stringify(p);
|
|
943
|
+
else if (f.isArray(p) && Rr(p) || (f.isFileList(p) || f.endsWith(b, "[]")) && (v = f.toArray(p)))
|
|
944
|
+
return b = Xt(b), v.forEach(function(O, C) {
|
|
922
945
|
!(f.isUndefined(O) || O === null) && e.append(
|
|
923
946
|
// eslint-disable-next-line no-nested-ternary
|
|
924
|
-
a === !0 ?
|
|
947
|
+
a === !0 ? st([b], C, o) : a === null ? b : b + "[]",
|
|
925
948
|
c(O)
|
|
926
949
|
);
|
|
927
950
|
}), !1;
|
|
928
951
|
}
|
|
929
|
-
return
|
|
952
|
+
return Ve(p) ? !0 : (e.append(st(h, b, o), c(p)), !1);
|
|
930
953
|
}
|
|
931
|
-
const d = [], m = Object.assign(
|
|
954
|
+
const d = [], m = Object.assign(Nr, {
|
|
932
955
|
defaultVisitor: l,
|
|
933
956
|
convertValue: c,
|
|
934
|
-
isVisitable:
|
|
957
|
+
isVisitable: Ve
|
|
935
958
|
});
|
|
936
|
-
function
|
|
959
|
+
function y(p, b) {
|
|
937
960
|
if (!f.isUndefined(p)) {
|
|
938
961
|
if (d.indexOf(p) !== -1)
|
|
939
|
-
throw Error("Circular reference detected in " +
|
|
962
|
+
throw Error("Circular reference detected in " + b.join("."));
|
|
940
963
|
d.push(p), f.forEach(p, function(v, w) {
|
|
941
964
|
(!(f.isUndefined(v) || v === null) && i.call(
|
|
942
965
|
e,
|
|
943
966
|
v,
|
|
944
967
|
f.isString(w) ? w.trim() : w,
|
|
945
|
-
|
|
968
|
+
b,
|
|
946
969
|
m
|
|
947
|
-
)) === !0 &&
|
|
970
|
+
)) === !0 && y(v, b ? b.concat(w) : [w]);
|
|
948
971
|
}), d.pop();
|
|
949
972
|
}
|
|
950
973
|
}
|
|
951
974
|
if (!f.isObject(t))
|
|
952
975
|
throw new TypeError("data must be an object");
|
|
953
|
-
return
|
|
976
|
+
return y(t), e;
|
|
954
977
|
}
|
|
955
|
-
function
|
|
978
|
+
function ut(t) {
|
|
956
979
|
const e = {
|
|
957
980
|
"!": "%21",
|
|
958
981
|
"'": "%27",
|
|
@@ -966,40 +989,40 @@ function st(t) {
|
|
|
966
989
|
return e[n];
|
|
967
990
|
});
|
|
968
991
|
}
|
|
969
|
-
function
|
|
970
|
-
this._pairs = [], t &&
|
|
992
|
+
function Qe(t, e) {
|
|
993
|
+
this._pairs = [], t && Te(t, this, e);
|
|
971
994
|
}
|
|
972
|
-
const
|
|
973
|
-
|
|
995
|
+
const zt = Qe.prototype;
|
|
996
|
+
zt.append = function(e, r) {
|
|
974
997
|
this._pairs.push([e, r]);
|
|
975
998
|
};
|
|
976
|
-
|
|
999
|
+
zt.toString = function(e) {
|
|
977
1000
|
const r = e ? function(n) {
|
|
978
|
-
return e.call(this, n,
|
|
979
|
-
} :
|
|
1001
|
+
return e.call(this, n, ut);
|
|
1002
|
+
} : ut;
|
|
980
1003
|
return this._pairs.map(function(i) {
|
|
981
1004
|
return r(i[0]) + "=" + r(i[1]);
|
|
982
1005
|
}, "").join("&");
|
|
983
1006
|
};
|
|
984
|
-
function
|
|
1007
|
+
function Pr(t) {
|
|
985
1008
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
986
1009
|
}
|
|
987
|
-
function
|
|
1010
|
+
function Jt(t, e, r) {
|
|
988
1011
|
if (!e)
|
|
989
1012
|
return t;
|
|
990
|
-
const n = r && r.encode ||
|
|
1013
|
+
const n = r && r.encode || Pr;
|
|
991
1014
|
f.isFunction(r) && (r = {
|
|
992
1015
|
serialize: r
|
|
993
1016
|
});
|
|
994
1017
|
const i = r && r.serialize;
|
|
995
1018
|
let o;
|
|
996
|
-
if (i ? o = i(e, r) : o = f.isURLSearchParams(e) ? e.toString() : new
|
|
1019
|
+
if (i ? o = i(e, r) : o = f.isURLSearchParams(e) ? e.toString() : new Qe(e, r).toString(n), o) {
|
|
997
1020
|
const a = t.indexOf("#");
|
|
998
1021
|
a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
999
1022
|
}
|
|
1000
1023
|
return t;
|
|
1001
1024
|
}
|
|
1002
|
-
class
|
|
1025
|
+
class ct {
|
|
1003
1026
|
constructor() {
|
|
1004
1027
|
this.handlers = [];
|
|
1005
1028
|
}
|
|
@@ -1053,41 +1076,41 @@ class ut {
|
|
|
1053
1076
|
});
|
|
1054
1077
|
}
|
|
1055
1078
|
}
|
|
1056
|
-
const
|
|
1079
|
+
const Kt = {
|
|
1057
1080
|
silentJSONParsing: !0,
|
|
1058
1081
|
forcedJSONParsing: !0,
|
|
1059
1082
|
clarifyTimeoutError: !1
|
|
1060
|
-
},
|
|
1083
|
+
}, kr = typeof URLSearchParams < "u" ? URLSearchParams : Qe, Cr = typeof FormData < "u" ? FormData : null, qr = typeof Blob < "u" ? Blob : null, jr = {
|
|
1061
1084
|
isBrowser: !0,
|
|
1062
1085
|
classes: {
|
|
1063
|
-
URLSearchParams:
|
|
1064
|
-
FormData:
|
|
1086
|
+
URLSearchParams: kr,
|
|
1087
|
+
FormData: Cr,
|
|
1065
1088
|
Blob: qr
|
|
1066
1089
|
},
|
|
1067
1090
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1068
|
-
},
|
|
1069
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1091
|
+
}, Ge = typeof window < "u" && typeof document < "u", We = typeof navigator == "object" && navigator || void 0, Dr = Ge && (!We || ["ReactNative", "NativeScript", "NS"].indexOf(We.product) < 0), Fr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1092
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xr = Ge && window.location.href || "http://localhost", Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1070
1093
|
__proto__: null,
|
|
1071
|
-
hasBrowserEnv:
|
|
1072
|
-
hasStandardBrowserEnv:
|
|
1073
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1074
|
-
navigator:
|
|
1075
|
-
origin:
|
|
1094
|
+
hasBrowserEnv: Ge,
|
|
1095
|
+
hasStandardBrowserEnv: Dr,
|
|
1096
|
+
hasStandardBrowserWebWorkerEnv: Fr,
|
|
1097
|
+
navigator: We,
|
|
1098
|
+
origin: xr
|
|
1076
1099
|
}, Symbol.toStringTag, { value: "Module" })), E = {
|
|
1077
|
-
...
|
|
1100
|
+
...Mr,
|
|
1078
1101
|
...jr
|
|
1079
1102
|
};
|
|
1080
|
-
function
|
|
1081
|
-
return
|
|
1103
|
+
function Br(t, e) {
|
|
1104
|
+
return Te(t, new E.classes.URLSearchParams(), Object.assign({
|
|
1082
1105
|
visitor: function(r, n, i, o) {
|
|
1083
1106
|
return E.isNode && f.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1084
1107
|
}
|
|
1085
1108
|
}, e));
|
|
1086
1109
|
}
|
|
1087
|
-
function
|
|
1110
|
+
function Ur(t) {
|
|
1088
1111
|
return f.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1089
1112
|
}
|
|
1090
|
-
function
|
|
1113
|
+
function Ir(t) {
|
|
1091
1114
|
const e = {}, r = Object.keys(t);
|
|
1092
1115
|
let n;
|
|
1093
1116
|
const i = r.length;
|
|
@@ -1096,17 +1119,17 @@ function Ur(t) {
|
|
|
1096
1119
|
o = r[n], e[o] = t[o];
|
|
1097
1120
|
return e;
|
|
1098
1121
|
}
|
|
1099
|
-
function
|
|
1122
|
+
function Qt(t) {
|
|
1100
1123
|
function e(r, n, i, o) {
|
|
1101
1124
|
let a = r[o++];
|
|
1102
1125
|
if (a === "__proto__") return !0;
|
|
1103
1126
|
const s = Number.isFinite(+a), u = o >= r.length;
|
|
1104
|
-
return a = !a && f.isArray(i) ? i.length : a, u ? (f.hasOwnProp(i, a) ? i[a] = [i[a], n] : i[a] = n, !s) : ((!i[a] || !f.isObject(i[a])) && (i[a] = []), e(r, n, i[a], o) && f.isArray(i[a]) && (i[a] =
|
|
1127
|
+
return a = !a && f.isArray(i) ? i.length : a, u ? (f.hasOwnProp(i, a) ? i[a] = [i[a], n] : i[a] = n, !s) : ((!i[a] || !f.isObject(i[a])) && (i[a] = []), e(r, n, i[a], o) && f.isArray(i[a]) && (i[a] = Ir(i[a])), !s);
|
|
1105
1128
|
}
|
|
1106
1129
|
if (f.isFormData(t) && f.isFunction(t.entries)) {
|
|
1107
1130
|
const r = {};
|
|
1108
1131
|
return f.forEachEntry(t, (n, i) => {
|
|
1109
|
-
e(
|
|
1132
|
+
e(Ur(n), i, r, 0);
|
|
1110
1133
|
}), r;
|
|
1111
1134
|
}
|
|
1112
1135
|
return null;
|
|
@@ -1121,13 +1144,13 @@ function Lr(t, e, r) {
|
|
|
1121
1144
|
}
|
|
1122
1145
|
return (r || JSON.stringify)(t);
|
|
1123
1146
|
}
|
|
1124
|
-
const
|
|
1125
|
-
transitional:
|
|
1147
|
+
const ne = {
|
|
1148
|
+
transitional: Kt,
|
|
1126
1149
|
adapter: ["xhr", "http", "fetch"],
|
|
1127
1150
|
transformRequest: [function(e, r) {
|
|
1128
1151
|
const n = r.getContentType() || "", i = n.indexOf("application/json") > -1, o = f.isObject(e);
|
|
1129
1152
|
if (o && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
|
|
1130
|
-
return i ? JSON.stringify(
|
|
1153
|
+
return i ? JSON.stringify(Qt(e)) : e;
|
|
1131
1154
|
if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) || f.isReadableStream(e))
|
|
1132
1155
|
return e;
|
|
1133
1156
|
if (f.isArrayBufferView(e))
|
|
@@ -1137,10 +1160,10 @@ const ee = {
|
|
|
1137
1160
|
let s;
|
|
1138
1161
|
if (o) {
|
|
1139
1162
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1140
|
-
return
|
|
1163
|
+
return Br(e, this.formSerializer).toString();
|
|
1141
1164
|
if ((s = f.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
1142
1165
|
const u = this.env && this.env.FormData;
|
|
1143
|
-
return
|
|
1166
|
+
return Te(
|
|
1144
1167
|
s ? { "files[]": e } : e,
|
|
1145
1168
|
u && new u(),
|
|
1146
1169
|
this.formSerializer
|
|
@@ -1150,7 +1173,7 @@ const ee = {
|
|
|
1150
1173
|
return o || i ? (r.setContentType("application/json", !1), Lr(e)) : e;
|
|
1151
1174
|
}],
|
|
1152
1175
|
transformResponse: [function(e) {
|
|
1153
|
-
const r = this.transitional ||
|
|
1176
|
+
const r = this.transitional || ne.transitional, n = r && r.forcedJSONParsing, i = this.responseType === "json";
|
|
1154
1177
|
if (f.isResponse(e) || f.isReadableStream(e))
|
|
1155
1178
|
return e;
|
|
1156
1179
|
if (e && f.isString(e) && (n && !this.responseType || i)) {
|
|
@@ -1188,9 +1211,9 @@ const ee = {
|
|
|
1188
1211
|
}
|
|
1189
1212
|
};
|
|
1190
1213
|
f.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1191
|
-
|
|
1214
|
+
ne.headers[t] = {};
|
|
1192
1215
|
});
|
|
1193
|
-
const
|
|
1216
|
+
const $r = f.toObjectSet([
|
|
1194
1217
|
"age",
|
|
1195
1218
|
"authorization",
|
|
1196
1219
|
"content-length",
|
|
@@ -1208,29 +1231,29 @@ const Ir = f.toObjectSet([
|
|
|
1208
1231
|
"referer",
|
|
1209
1232
|
"retry-after",
|
|
1210
1233
|
"user-agent"
|
|
1211
|
-
]),
|
|
1234
|
+
]), Hr = (t) => {
|
|
1212
1235
|
const e = {};
|
|
1213
1236
|
let r, n, i;
|
|
1214
1237
|
return t && t.split(`
|
|
1215
1238
|
`).forEach(function(a) {
|
|
1216
|
-
i = a.indexOf(":"), r = a.substring(0, i).trim().toLowerCase(), n = a.substring(i + 1).trim(), !(!r || e[r] &&
|
|
1239
|
+
i = a.indexOf(":"), r = a.substring(0, i).trim().toLowerCase(), n = a.substring(i + 1).trim(), !(!r || e[r] && $r[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
1217
1240
|
}), e;
|
|
1218
|
-
},
|
|
1241
|
+
}, lt = Symbol("internals");
|
|
1219
1242
|
function K(t) {
|
|
1220
1243
|
return t && String(t).trim().toLowerCase();
|
|
1221
1244
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return t === !1 || t == null ? t : f.isArray(t) ? t.map(
|
|
1245
|
+
function me(t) {
|
|
1246
|
+
return t === !1 || t == null ? t : f.isArray(t) ? t.map(me) : String(t);
|
|
1224
1247
|
}
|
|
1225
|
-
function
|
|
1248
|
+
function Vr(t) {
|
|
1226
1249
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1227
1250
|
let n;
|
|
1228
1251
|
for (; n = r.exec(t); )
|
|
1229
1252
|
e[n[1]] = n[2];
|
|
1230
1253
|
return e;
|
|
1231
1254
|
}
|
|
1232
|
-
const
|
|
1233
|
-
function
|
|
1255
|
+
const Wr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1256
|
+
function xe(t, e, r, n, i) {
|
|
1234
1257
|
if (f.isFunction(n))
|
|
1235
1258
|
return n.call(this, e, r);
|
|
1236
1259
|
if (i && (e = r), !!f.isString(e)) {
|
|
@@ -1240,10 +1263,10 @@ function De(t, e, r, n, i) {
|
|
|
1240
1263
|
return n.test(e);
|
|
1241
1264
|
}
|
|
1242
1265
|
}
|
|
1243
|
-
function
|
|
1266
|
+
function Xr(t) {
|
|
1244
1267
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
1245
1268
|
}
|
|
1246
|
-
function
|
|
1269
|
+
function zr(t, e) {
|
|
1247
1270
|
const r = f.toCamelCase(" " + e);
|
|
1248
1271
|
["get", "set", "has"].forEach((n) => {
|
|
1249
1272
|
Object.defineProperty(t, n + r, {
|
|
@@ -1265,13 +1288,13 @@ let R = class {
|
|
|
1265
1288
|
if (!l)
|
|
1266
1289
|
throw new Error("header name must be a non-empty string");
|
|
1267
1290
|
const d = f.findKey(i, l);
|
|
1268
|
-
(!d || i[d] === void 0 || c === !0 || c === void 0 && i[d] !== !1) && (i[d || u] =
|
|
1291
|
+
(!d || i[d] === void 0 || c === !0 || c === void 0 && i[d] !== !1) && (i[d || u] = me(s));
|
|
1269
1292
|
}
|
|
1270
1293
|
const a = (s, u) => f.forEach(s, (c, l) => o(c, l, u));
|
|
1271
1294
|
if (f.isPlainObject(e) || e instanceof this.constructor)
|
|
1272
1295
|
a(e, r);
|
|
1273
|
-
else if (f.isString(e) && (e = e.trim()) && !
|
|
1274
|
-
a(
|
|
1296
|
+
else if (f.isString(e) && (e = e.trim()) && !Wr(e))
|
|
1297
|
+
a(Hr(e), r);
|
|
1275
1298
|
else if (f.isObject(e) && f.isIterable(e)) {
|
|
1276
1299
|
let s = {}, u, c;
|
|
1277
1300
|
for (const l of e) {
|
|
@@ -1292,7 +1315,7 @@ let R = class {
|
|
|
1292
1315
|
if (!r)
|
|
1293
1316
|
return i;
|
|
1294
1317
|
if (r === !0)
|
|
1295
|
-
return
|
|
1318
|
+
return Vr(i);
|
|
1296
1319
|
if (f.isFunction(r))
|
|
1297
1320
|
return r.call(this, i, n);
|
|
1298
1321
|
if (f.isRegExp(r))
|
|
@@ -1304,7 +1327,7 @@ let R = class {
|
|
|
1304
1327
|
has(e, r) {
|
|
1305
1328
|
if (e = K(e), e) {
|
|
1306
1329
|
const n = f.findKey(this, e);
|
|
1307
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1330
|
+
return !!(n && this[n] !== void 0 && (!r || xe(this, this[n], n, r)));
|
|
1308
1331
|
}
|
|
1309
1332
|
return !1;
|
|
1310
1333
|
}
|
|
@@ -1314,7 +1337,7 @@ let R = class {
|
|
|
1314
1337
|
function o(a) {
|
|
1315
1338
|
if (a = K(a), a) {
|
|
1316
1339
|
const s = f.findKey(n, a);
|
|
1317
|
-
s && (!r ||
|
|
1340
|
+
s && (!r || xe(n, n[s], s, r)) && (delete n[s], i = !0);
|
|
1318
1341
|
}
|
|
1319
1342
|
}
|
|
1320
1343
|
return f.isArray(e) ? e.forEach(o) : o(e), i;
|
|
@@ -1324,7 +1347,7 @@ let R = class {
|
|
|
1324
1347
|
let n = r.length, i = !1;
|
|
1325
1348
|
for (; n--; ) {
|
|
1326
1349
|
const o = r[n];
|
|
1327
|
-
(!e ||
|
|
1350
|
+
(!e || xe(this, this[o], o, e, !0)) && (delete this[o], i = !0);
|
|
1328
1351
|
}
|
|
1329
1352
|
return i;
|
|
1330
1353
|
}
|
|
@@ -1333,11 +1356,11 @@ let R = class {
|
|
|
1333
1356
|
return f.forEach(this, (i, o) => {
|
|
1334
1357
|
const a = f.findKey(n, o);
|
|
1335
1358
|
if (a) {
|
|
1336
|
-
r[a] =
|
|
1359
|
+
r[a] = me(i), delete r[o];
|
|
1337
1360
|
return;
|
|
1338
1361
|
}
|
|
1339
|
-
const s = e ?
|
|
1340
|
-
s !== o && delete r[o], r[s] =
|
|
1362
|
+
const s = e ? Xr(o) : String(o).trim();
|
|
1363
|
+
s !== o && delete r[o], r[s] = me(i), n[s] = !0;
|
|
1341
1364
|
}), this;
|
|
1342
1365
|
}
|
|
1343
1366
|
concat(...e) {
|
|
@@ -1370,12 +1393,12 @@ let R = class {
|
|
|
1370
1393
|
return r.forEach((i) => n.set(i)), n;
|
|
1371
1394
|
}
|
|
1372
1395
|
static accessor(e) {
|
|
1373
|
-
const n = (this[
|
|
1396
|
+
const n = (this[lt] = this[lt] = {
|
|
1374
1397
|
accessors: {}
|
|
1375
1398
|
}).accessors, i = this.prototype;
|
|
1376
1399
|
function o(a) {
|
|
1377
1400
|
const s = K(a);
|
|
1378
|
-
n[s] || (
|
|
1401
|
+
n[s] || (zr(i, a), n[s] = !0);
|
|
1379
1402
|
}
|
|
1380
1403
|
return f.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1381
1404
|
}
|
|
@@ -1391,14 +1414,14 @@ f.reduceDescriptors(R.prototype, ({ value: t }, e) => {
|
|
|
1391
1414
|
};
|
|
1392
1415
|
});
|
|
1393
1416
|
f.freezeMethods(R);
|
|
1394
|
-
function
|
|
1395
|
-
const r = this ||
|
|
1417
|
+
function Me(t, e) {
|
|
1418
|
+
const r = this || ne, n = e || r, i = R.from(n.headers);
|
|
1396
1419
|
let o = n.data;
|
|
1397
1420
|
return f.forEach(t, function(s) {
|
|
1398
1421
|
o = s.call(r, o, i.normalize(), e ? e.status : void 0);
|
|
1399
1422
|
}), i.normalize(), o;
|
|
1400
1423
|
}
|
|
1401
|
-
function
|
|
1424
|
+
function Gt(t) {
|
|
1402
1425
|
return !!(t && t.__CANCEL__);
|
|
1403
1426
|
}
|
|
1404
1427
|
function J(t, e, r) {
|
|
@@ -1407,7 +1430,7 @@ function J(t, e, r) {
|
|
|
1407
1430
|
f.inherits(J, g, {
|
|
1408
1431
|
__CANCEL__: !0
|
|
1409
1432
|
});
|
|
1410
|
-
function
|
|
1433
|
+
function Yt(t, e, r) {
|
|
1411
1434
|
const n = r.config.validateStatus;
|
|
1412
1435
|
!r.status || !n || n(r.status) ? t(r) : e(new g(
|
|
1413
1436
|
"Request failed with status code " + r.status,
|
|
@@ -1417,11 +1440,11 @@ function Gt(t, e, r) {
|
|
|
1417
1440
|
r
|
|
1418
1441
|
));
|
|
1419
1442
|
}
|
|
1420
|
-
function
|
|
1443
|
+
function Jr(t) {
|
|
1421
1444
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1422
1445
|
return e && e[1] || "";
|
|
1423
1446
|
}
|
|
1424
|
-
function
|
|
1447
|
+
function Kr(t, e) {
|
|
1425
1448
|
t = t || 10;
|
|
1426
1449
|
const r = new Array(t), n = new Array(t);
|
|
1427
1450
|
let i = 0, o = 0, a;
|
|
@@ -1433,11 +1456,11 @@ function Jr(t, e) {
|
|
|
1433
1456
|
m += r[d++], d = d % t;
|
|
1434
1457
|
if (i = (i + 1) % t, i === o && (o = (o + 1) % t), c - a < e)
|
|
1435
1458
|
return;
|
|
1436
|
-
const
|
|
1437
|
-
return
|
|
1459
|
+
const y = l && c - l;
|
|
1460
|
+
return y ? Math.round(m * 1e3 / y) : void 0;
|
|
1438
1461
|
};
|
|
1439
1462
|
}
|
|
1440
|
-
function
|
|
1463
|
+
function Qr(t, e) {
|
|
1441
1464
|
let r = 0, n = 1e3 / e, i, o;
|
|
1442
1465
|
const a = (c, l = Date.now()) => {
|
|
1443
1466
|
r = l, i = null, o && (clearTimeout(o), o = null), t.apply(null, c);
|
|
@@ -1449,10 +1472,10 @@ function Kr(t, e) {
|
|
|
1449
1472
|
}, n - d)));
|
|
1450
1473
|
}, () => i && a(i)];
|
|
1451
1474
|
}
|
|
1452
|
-
const
|
|
1475
|
+
const ge = (t, e, r = 3) => {
|
|
1453
1476
|
let n = 0;
|
|
1454
|
-
const i =
|
|
1455
|
-
return
|
|
1477
|
+
const i = Kr(50, 250);
|
|
1478
|
+
return Qr((o) => {
|
|
1456
1479
|
const a = o.loaded, s = o.lengthComputable ? o.total : void 0, u = a - n, c = i(u), l = a <= s;
|
|
1457
1480
|
n = a;
|
|
1458
1481
|
const d = {
|
|
@@ -1468,17 +1491,17 @@ const he = (t, e, r = 3) => {
|
|
|
1468
1491
|
};
|
|
1469
1492
|
t(d);
|
|
1470
1493
|
}, r);
|
|
1471
|
-
},
|
|
1494
|
+
}, ft = (t, e) => {
|
|
1472
1495
|
const r = t != null;
|
|
1473
1496
|
return [(n) => e[0]({
|
|
1474
1497
|
lengthComputable: r,
|
|
1475
1498
|
total: t,
|
|
1476
1499
|
loaded: n
|
|
1477
1500
|
}), e[1]];
|
|
1478
|
-
},
|
|
1501
|
+
}, dt = (t) => (...e) => f.asap(() => t(...e)), Gr = E.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, E.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
1479
1502
|
new URL(E.origin),
|
|
1480
1503
|
E.navigator && /(msie|trident)/i.test(E.navigator.userAgent)
|
|
1481
|
-
) : () => !0,
|
|
1504
|
+
) : () => !0, Yr = E.hasStandardBrowserEnv ? (
|
|
1482
1505
|
// Standard browser envs support document.cookie
|
|
1483
1506
|
{
|
|
1484
1507
|
write(t, e, r, n, i, o) {
|
|
@@ -1505,17 +1528,17 @@ const he = (t, e, r = 3) => {
|
|
|
1505
1528
|
}
|
|
1506
1529
|
}
|
|
1507
1530
|
);
|
|
1508
|
-
function
|
|
1531
|
+
function Zr(t) {
|
|
1509
1532
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1510
1533
|
}
|
|
1511
|
-
function
|
|
1534
|
+
function ei(t, e) {
|
|
1512
1535
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1513
1536
|
}
|
|
1514
|
-
function
|
|
1515
|
-
let n = !
|
|
1516
|
-
return t && (n || r == !1) ?
|
|
1537
|
+
function Zt(t, e, r) {
|
|
1538
|
+
let n = !Zr(e);
|
|
1539
|
+
return t && (n || r == !1) ? ei(t, e) : e;
|
|
1517
1540
|
}
|
|
1518
|
-
const
|
|
1541
|
+
const pt = (t) => t instanceof R ? { ...t } : t;
|
|
1519
1542
|
function U(t, e) {
|
|
1520
1543
|
e = e || {};
|
|
1521
1544
|
const r = {};
|
|
@@ -1573,17 +1596,17 @@ function U(t, e) {
|
|
|
1573
1596
|
socketPath: a,
|
|
1574
1597
|
responseEncoding: a,
|
|
1575
1598
|
validateStatus: s,
|
|
1576
|
-
headers: (c, l, d) => i(
|
|
1599
|
+
headers: (c, l, d) => i(pt(c), pt(l), d, !0)
|
|
1577
1600
|
};
|
|
1578
1601
|
return f.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
|
1579
1602
|
const d = u[l] || i, m = d(t[l], e[l], l);
|
|
1580
1603
|
f.isUndefined(m) && d !== s || (r[l] = m);
|
|
1581
1604
|
}), r;
|
|
1582
1605
|
}
|
|
1583
|
-
const
|
|
1606
|
+
const en = (t) => {
|
|
1584
1607
|
const e = U({}, t);
|
|
1585
1608
|
let { data: r, withXSRFToken: n, xsrfHeaderName: i, xsrfCookieName: o, headers: a, auth: s } = e;
|
|
1586
|
-
e.headers = a = R.from(a), e.url =
|
|
1609
|
+
e.headers = a = R.from(a), e.url = Jt(Zt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), s && a.set(
|
|
1587
1610
|
"Authorization",
|
|
1588
1611
|
"Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
|
|
1589
1612
|
);
|
|
@@ -1596,19 +1619,19 @@ const Zt = (t) => {
|
|
|
1596
1619
|
a.setContentType([c || "multipart/form-data", ...l].join("; "));
|
|
1597
1620
|
}
|
|
1598
1621
|
}
|
|
1599
|
-
if (E.hasStandardBrowserEnv && (n && f.isFunction(n) && (n = n(e)), n || n !== !1 &&
|
|
1600
|
-
const c = i && o &&
|
|
1622
|
+
if (E.hasStandardBrowserEnv && (n && f.isFunction(n) && (n = n(e)), n || n !== !1 && Gr(e.url))) {
|
|
1623
|
+
const c = i && o && Yr.read(o);
|
|
1601
1624
|
c && a.set(i, c);
|
|
1602
1625
|
}
|
|
1603
1626
|
return e;
|
|
1604
|
-
},
|
|
1627
|
+
}, ti = typeof XMLHttpRequest < "u", ni = ti && function(t) {
|
|
1605
1628
|
return new Promise(function(r, n) {
|
|
1606
|
-
const i =
|
|
1629
|
+
const i = en(t);
|
|
1607
1630
|
let o = i.data;
|
|
1608
1631
|
const a = R.from(i.headers).normalize();
|
|
1609
|
-
let { responseType: s, onUploadProgress: u, onDownloadProgress: c } = i, l, d, m,
|
|
1610
|
-
function
|
|
1611
|
-
|
|
1632
|
+
let { responseType: s, onUploadProgress: u, onDownloadProgress: c } = i, l, d, m, y, p;
|
|
1633
|
+
function b() {
|
|
1634
|
+
y && y(), p && p(), i.cancelToken && i.cancelToken.unsubscribe(l), i.signal && i.signal.removeEventListener("abort", l);
|
|
1612
1635
|
}
|
|
1613
1636
|
let h = new XMLHttpRequest();
|
|
1614
1637
|
h.open(i.method.toUpperCase(), i.url, !0), h.timeout = i.timeout;
|
|
@@ -1625,10 +1648,10 @@ const Zt = (t) => {
|
|
|
1625
1648
|
config: t,
|
|
1626
1649
|
request: h
|
|
1627
1650
|
};
|
|
1628
|
-
|
|
1629
|
-
r(F),
|
|
1651
|
+
Yt(function(F) {
|
|
1652
|
+
r(F), b();
|
|
1630
1653
|
}, function(F) {
|
|
1631
|
-
n(F),
|
|
1654
|
+
n(F), b();
|
|
1632
1655
|
}, T), h = null;
|
|
1633
1656
|
}
|
|
1634
1657
|
"onloadend" in h ? h.onloadend = v : h.onreadystatechange = function() {
|
|
@@ -1638,27 +1661,27 @@ const Zt = (t) => {
|
|
|
1638
1661
|
}, h.onerror = function() {
|
|
1639
1662
|
n(new g("Network Error", g.ERR_NETWORK, t, h)), h = null;
|
|
1640
1663
|
}, h.ontimeout = function() {
|
|
1641
|
-
let
|
|
1642
|
-
const T = i.transitional ||
|
|
1643
|
-
i.timeoutErrorMessage && (
|
|
1644
|
-
|
|
1664
|
+
let C = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
|
|
1665
|
+
const T = i.transitional || Kt;
|
|
1666
|
+
i.timeoutErrorMessage && (C = i.timeoutErrorMessage), n(new g(
|
|
1667
|
+
C,
|
|
1645
1668
|
T.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
|
|
1646
1669
|
t,
|
|
1647
1670
|
h
|
|
1648
1671
|
)), h = null;
|
|
1649
|
-
}, o === void 0 && a.setContentType(null), "setRequestHeader" in h && f.forEach(a.toJSON(), function(
|
|
1650
|
-
h.setRequestHeader(T,
|
|
1651
|
-
}), f.isUndefined(i.withCredentials) || (h.withCredentials = !!i.withCredentials), s && s !== "json" && (h.responseType = i.responseType), c && ([m, p] =
|
|
1672
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in h && f.forEach(a.toJSON(), function(C, T) {
|
|
1673
|
+
h.setRequestHeader(T, C);
|
|
1674
|
+
}), f.isUndefined(i.withCredentials) || (h.withCredentials = !!i.withCredentials), s && s !== "json" && (h.responseType = i.responseType), c && ([m, p] = ge(c, !0), h.addEventListener("progress", m)), u && h.upload && ([d, y] = ge(u), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", y)), (i.cancelToken || i.signal) && (l = (O) => {
|
|
1652
1675
|
h && (n(!O || O.type ? new J(null, t, h) : O), h.abort(), h = null);
|
|
1653
1676
|
}, i.cancelToken && i.cancelToken.subscribe(l), i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
|
|
1654
|
-
const w =
|
|
1677
|
+
const w = Jr(i.url);
|
|
1655
1678
|
if (w && E.protocols.indexOf(w) === -1) {
|
|
1656
1679
|
n(new g("Unsupported protocol " + w + ":", g.ERR_BAD_REQUEST, t));
|
|
1657
1680
|
return;
|
|
1658
1681
|
}
|
|
1659
1682
|
h.send(o || null);
|
|
1660
1683
|
});
|
|
1661
|
-
},
|
|
1684
|
+
}, ri = (t, e) => {
|
|
1662
1685
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1663
1686
|
if (e || r) {
|
|
1664
1687
|
let n = new AbortController(), i;
|
|
@@ -1681,7 +1704,7 @@ const Zt = (t) => {
|
|
|
1681
1704
|
const { signal: u } = n;
|
|
1682
1705
|
return u.unsubscribe = () => f.asap(s), u;
|
|
1683
1706
|
}
|
|
1684
|
-
},
|
|
1707
|
+
}, ii = function* (t, e) {
|
|
1685
1708
|
let r = t.byteLength;
|
|
1686
1709
|
if (r < e) {
|
|
1687
1710
|
yield t;
|
|
@@ -1690,10 +1713,10 @@ const Zt = (t) => {
|
|
|
1690
1713
|
let n = 0, i;
|
|
1691
1714
|
for (; n < r; )
|
|
1692
1715
|
i = n + e, yield t.slice(n, i), n = i;
|
|
1693
|
-
},
|
|
1694
|
-
for await (const r of
|
|
1695
|
-
yield*
|
|
1696
|
-
},
|
|
1716
|
+
}, oi = async function* (t, e) {
|
|
1717
|
+
for await (const r of ai(t))
|
|
1718
|
+
yield* ii(r, e);
|
|
1719
|
+
}, ai = async function* (t) {
|
|
1697
1720
|
if (t[Symbol.asyncIterator]) {
|
|
1698
1721
|
yield* t;
|
|
1699
1722
|
return;
|
|
@@ -1709,8 +1732,8 @@ const Zt = (t) => {
|
|
|
1709
1732
|
} finally {
|
|
1710
1733
|
await e.cancel();
|
|
1711
1734
|
}
|
|
1712
|
-
},
|
|
1713
|
-
const i =
|
|
1735
|
+
}, mt = (t, e, r, n) => {
|
|
1736
|
+
const i = oi(t, e);
|
|
1714
1737
|
let o = 0, a, s = (u) => {
|
|
1715
1738
|
a || (a = !0, n && n(u));
|
|
1716
1739
|
};
|
|
@@ -1738,13 +1761,13 @@ const Zt = (t) => {
|
|
|
1738
1761
|
}, {
|
|
1739
1762
|
highWaterMark: 2
|
|
1740
1763
|
});
|
|
1741
|
-
},
|
|
1764
|
+
}, _e = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", tn = _e && typeof ReadableStream == "function", si = _e && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), nn = (t, ...e) => {
|
|
1742
1765
|
try {
|
|
1743
1766
|
return !!t(...e);
|
|
1744
1767
|
} catch {
|
|
1745
1768
|
return !1;
|
|
1746
1769
|
}
|
|
1747
|
-
},
|
|
1770
|
+
}, ui = tn && nn(() => {
|
|
1748
1771
|
let t = !1;
|
|
1749
1772
|
const e = new Request(E.origin, {
|
|
1750
1773
|
body: new ReadableStream(),
|
|
@@ -1754,17 +1777,17 @@ const Zt = (t) => {
|
|
|
1754
1777
|
}
|
|
1755
1778
|
}).headers.has("Content-Type");
|
|
1756
1779
|
return t && !e;
|
|
1757
|
-
}),
|
|
1758
|
-
stream:
|
|
1780
|
+
}), ht = 64 * 1024, Xe = tn && nn(() => f.isReadableStream(new Response("").body)), ve = {
|
|
1781
|
+
stream: Xe && ((t) => t.body)
|
|
1759
1782
|
};
|
|
1760
|
-
|
|
1783
|
+
_e && ((t) => {
|
|
1761
1784
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1762
|
-
!
|
|
1785
|
+
!ve[e] && (ve[e] = f.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
|
|
1763
1786
|
throw new g(`Response type '${e}' is not supported`, g.ERR_NOT_SUPPORT, n);
|
|
1764
1787
|
});
|
|
1765
1788
|
});
|
|
1766
1789
|
})(new Response());
|
|
1767
|
-
const
|
|
1790
|
+
const ci = async (t) => {
|
|
1768
1791
|
if (t == null)
|
|
1769
1792
|
return 0;
|
|
1770
1793
|
if (f.isBlob(t))
|
|
@@ -1777,11 +1800,11 @@ const ui = async (t) => {
|
|
|
1777
1800
|
if (f.isArrayBufferView(t) || f.isArrayBuffer(t))
|
|
1778
1801
|
return t.byteLength;
|
|
1779
1802
|
if (f.isURLSearchParams(t) && (t = t + ""), f.isString(t))
|
|
1780
|
-
return (await
|
|
1781
|
-
},
|
|
1803
|
+
return (await si(t)).byteLength;
|
|
1804
|
+
}, li = async (t, e) => {
|
|
1782
1805
|
const r = f.toFiniteNumber(t.getContentLength());
|
|
1783
|
-
return r ??
|
|
1784
|
-
},
|
|
1806
|
+
return r ?? ci(e);
|
|
1807
|
+
}, fi = _e && (async (t) => {
|
|
1785
1808
|
let {
|
|
1786
1809
|
url: e,
|
|
1787
1810
|
method: r,
|
|
@@ -1795,33 +1818,33 @@ const ui = async (t) => {
|
|
|
1795
1818
|
headers: l,
|
|
1796
1819
|
withCredentials: d = "same-origin",
|
|
1797
1820
|
fetchOptions: m
|
|
1798
|
-
} =
|
|
1821
|
+
} = en(t);
|
|
1799
1822
|
c = c ? (c + "").toLowerCase() : "text";
|
|
1800
|
-
let
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1823
|
+
let y = ri([i, o && o.toAbortSignal()], a), p;
|
|
1824
|
+
const b = y && y.unsubscribe && (() => {
|
|
1825
|
+
y.unsubscribe();
|
|
1803
1826
|
});
|
|
1804
1827
|
let h;
|
|
1805
1828
|
try {
|
|
1806
|
-
if (u &&
|
|
1829
|
+
if (u && ui && r !== "get" && r !== "head" && (h = await li(l, n)) !== 0) {
|
|
1807
1830
|
let T = new Request(e, {
|
|
1808
1831
|
method: "POST",
|
|
1809
1832
|
body: n,
|
|
1810
1833
|
duplex: "half"
|
|
1811
|
-
}),
|
|
1812
|
-
if (f.isFormData(n) && (
|
|
1813
|
-
const [F,
|
|
1834
|
+
}), q;
|
|
1835
|
+
if (f.isFormData(n) && (q = T.headers.get("content-type")) && l.setContentType(q), T.body) {
|
|
1836
|
+
const [F, oe] = ft(
|
|
1814
1837
|
h,
|
|
1815
|
-
|
|
1838
|
+
ge(dt(u))
|
|
1816
1839
|
);
|
|
1817
|
-
n =
|
|
1840
|
+
n = mt(T.body, ht, F, oe);
|
|
1818
1841
|
}
|
|
1819
1842
|
}
|
|
1820
1843
|
f.isString(d) || (d = d ? "include" : "omit");
|
|
1821
1844
|
const v = "credentials" in Request.prototype;
|
|
1822
1845
|
p = new Request(e, {
|
|
1823
1846
|
...m,
|
|
1824
|
-
signal:
|
|
1847
|
+
signal: y,
|
|
1825
1848
|
method: r.toUpperCase(),
|
|
1826
1849
|
headers: l.normalize().toJSON(),
|
|
1827
1850
|
body: n,
|
|
@@ -1829,28 +1852,28 @@ const ui = async (t) => {
|
|
|
1829
1852
|
credentials: v ? d : void 0
|
|
1830
1853
|
});
|
|
1831
1854
|
let w = await fetch(p, m);
|
|
1832
|
-
const O =
|
|
1833
|
-
if (
|
|
1855
|
+
const O = Xe && (c === "stream" || c === "response");
|
|
1856
|
+
if (Xe && (s || O && b)) {
|
|
1834
1857
|
const T = {};
|
|
1835
|
-
["status", "statusText", "headers"].forEach((
|
|
1836
|
-
T[
|
|
1858
|
+
["status", "statusText", "headers"].forEach((Ye) => {
|
|
1859
|
+
T[Ye] = w[Ye];
|
|
1837
1860
|
});
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1840
|
-
|
|
1861
|
+
const q = f.toFiniteNumber(w.headers.get("content-length")), [F, oe] = s && ft(
|
|
1862
|
+
q,
|
|
1863
|
+
ge(dt(s), !0)
|
|
1841
1864
|
) || [];
|
|
1842
1865
|
w = new Response(
|
|
1843
|
-
|
|
1844
|
-
|
|
1866
|
+
mt(w.body, ht, F, () => {
|
|
1867
|
+
oe && oe(), b && b();
|
|
1845
1868
|
}),
|
|
1846
1869
|
T
|
|
1847
1870
|
);
|
|
1848
1871
|
}
|
|
1849
1872
|
c = c || "text";
|
|
1850
|
-
let
|
|
1851
|
-
return !O &&
|
|
1852
|
-
|
|
1853
|
-
data:
|
|
1873
|
+
let C = await ve[f.findKey(ve, c) || "text"](w, t);
|
|
1874
|
+
return !O && b && b(), await new Promise((T, q) => {
|
|
1875
|
+
Yt(T, q, {
|
|
1876
|
+
data: C,
|
|
1854
1877
|
headers: R.from(w.headers),
|
|
1855
1878
|
status: w.status,
|
|
1856
1879
|
statusText: w.statusText,
|
|
@@ -1859,19 +1882,19 @@ const ui = async (t) => {
|
|
|
1859
1882
|
});
|
|
1860
1883
|
});
|
|
1861
1884
|
} catch (v) {
|
|
1862
|
-
throw
|
|
1885
|
+
throw b && b(), v && v.name === "TypeError" && /Load failed|fetch/i.test(v.message) ? Object.assign(
|
|
1863
1886
|
new g("Network Error", g.ERR_NETWORK, t, p),
|
|
1864
1887
|
{
|
|
1865
1888
|
cause: v.cause || v
|
|
1866
1889
|
}
|
|
1867
1890
|
) : g.from(v, v && v.code, t, p);
|
|
1868
1891
|
}
|
|
1869
|
-
}),
|
|
1870
|
-
http:
|
|
1871
|
-
xhr:
|
|
1872
|
-
fetch:
|
|
1892
|
+
}), ze = {
|
|
1893
|
+
http: _r,
|
|
1894
|
+
xhr: ni,
|
|
1895
|
+
fetch: fi
|
|
1873
1896
|
};
|
|
1874
|
-
f.forEach(
|
|
1897
|
+
f.forEach(ze, (t, e) => {
|
|
1875
1898
|
if (t) {
|
|
1876
1899
|
try {
|
|
1877
1900
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1880,7 +1903,7 @@ f.forEach(Xe, (t, e) => {
|
|
|
1880
1903
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1881
1904
|
}
|
|
1882
1905
|
});
|
|
1883
|
-
const
|
|
1906
|
+
const yt = (t) => `- ${t}`, di = (t) => f.isFunction(t) || t === null || t === !1, rn = {
|
|
1884
1907
|
getAdapter: (t) => {
|
|
1885
1908
|
t = f.isArray(t) ? t : [t];
|
|
1886
1909
|
const { length: e } = t;
|
|
@@ -1889,7 +1912,7 @@ const ht = (t) => `- ${t}`, fi = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1889
1912
|
for (let o = 0; o < e; o++) {
|
|
1890
1913
|
r = t[o];
|
|
1891
1914
|
let a;
|
|
1892
|
-
if (n = r, !
|
|
1915
|
+
if (n = r, !di(r) && (n = ze[(a = String(r)).toLowerCase()], n === void 0))
|
|
1893
1916
|
throw new g(`Unknown adapter '${a}'`);
|
|
1894
1917
|
if (n)
|
|
1895
1918
|
break;
|
|
@@ -1900,8 +1923,8 @@ const ht = (t) => `- ${t}`, fi = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1900
1923
|
([s, u]) => `adapter ${s} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1901
1924
|
);
|
|
1902
1925
|
let a = e ? o.length > 1 ? `since :
|
|
1903
|
-
` + o.map(
|
|
1904
|
-
`) : " " +
|
|
1926
|
+
` + o.map(yt).join(`
|
|
1927
|
+
`) : " " + yt(o[0]) : "as no adapter specified";
|
|
1905
1928
|
throw new g(
|
|
1906
1929
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1907
1930
|
"ERR_NOT_SUPPORT"
|
|
@@ -1909,40 +1932,40 @@ const ht = (t) => `- ${t}`, fi = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1909
1932
|
}
|
|
1910
1933
|
return n;
|
|
1911
1934
|
},
|
|
1912
|
-
adapters:
|
|
1935
|
+
adapters: ze
|
|
1913
1936
|
};
|
|
1914
|
-
function
|
|
1937
|
+
function Be(t) {
|
|
1915
1938
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1916
1939
|
throw new J(null, t);
|
|
1917
1940
|
}
|
|
1918
|
-
function
|
|
1919
|
-
return
|
|
1941
|
+
function bt(t) {
|
|
1942
|
+
return Be(t), t.headers = R.from(t.headers), t.data = Me.call(
|
|
1920
1943
|
t,
|
|
1921
1944
|
t.transformRequest
|
|
1922
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1923
|
-
return
|
|
1945
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), rn.getAdapter(t.adapter || ne.adapter)(t).then(function(n) {
|
|
1946
|
+
return Be(t), n.data = Me.call(
|
|
1924
1947
|
t,
|
|
1925
1948
|
t.transformResponse,
|
|
1926
1949
|
n
|
|
1927
1950
|
), n.headers = R.from(n.headers), n;
|
|
1928
1951
|
}, function(n) {
|
|
1929
|
-
return
|
|
1952
|
+
return Gt(n) || (Be(t), n && n.response && (n.response.data = Me.call(
|
|
1930
1953
|
t,
|
|
1931
1954
|
t.transformResponse,
|
|
1932
1955
|
n.response
|
|
1933
1956
|
), n.response.headers = R.from(n.response.headers))), Promise.reject(n);
|
|
1934
1957
|
});
|
|
1935
1958
|
}
|
|
1936
|
-
const
|
|
1959
|
+
const on = "1.10.0", Re = {};
|
|
1937
1960
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1938
|
-
|
|
1961
|
+
Re[t] = function(n) {
|
|
1939
1962
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1940
1963
|
};
|
|
1941
1964
|
});
|
|
1942
|
-
const
|
|
1943
|
-
|
|
1965
|
+
const gt = {};
|
|
1966
|
+
Re.transitional = function(e, r, n) {
|
|
1944
1967
|
function i(o, a) {
|
|
1945
|
-
return "[Axios v" +
|
|
1968
|
+
return "[Axios v" + on + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
|
|
1946
1969
|
}
|
|
1947
1970
|
return (o, a, s) => {
|
|
1948
1971
|
if (e === !1)
|
|
@@ -1950,7 +1973,7 @@ Te.transitional = function(e, r, n) {
|
|
|
1950
1973
|
i(a, " has been removed" + (r ? " in " + r : "")),
|
|
1951
1974
|
g.ERR_DEPRECATED
|
|
1952
1975
|
);
|
|
1953
|
-
return r && !
|
|
1976
|
+
return r && !gt[a] && (gt[a] = !0, console.warn(
|
|
1954
1977
|
i(
|
|
1955
1978
|
a,
|
|
1956
1979
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1958,10 +1981,10 @@ Te.transitional = function(e, r, n) {
|
|
|
1958
1981
|
)), e ? e(o, a, s) : !0;
|
|
1959
1982
|
};
|
|
1960
1983
|
};
|
|
1961
|
-
|
|
1984
|
+
Re.spelling = function(e) {
|
|
1962
1985
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1963
1986
|
};
|
|
1964
|
-
function
|
|
1987
|
+
function pi(t, e, r) {
|
|
1965
1988
|
if (typeof t != "object")
|
|
1966
1989
|
throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
|
|
1967
1990
|
const n = Object.keys(t);
|
|
@@ -1978,15 +2001,15 @@ function di(t, e, r) {
|
|
|
1978
2001
|
throw new g("Unknown option " + o, g.ERR_BAD_OPTION);
|
|
1979
2002
|
}
|
|
1980
2003
|
}
|
|
1981
|
-
const
|
|
1982
|
-
assertOptions:
|
|
1983
|
-
validators:
|
|
1984
|
-
},
|
|
2004
|
+
const he = {
|
|
2005
|
+
assertOptions: pi,
|
|
2006
|
+
validators: Re
|
|
2007
|
+
}, k = he.validators;
|
|
1985
2008
|
let M = class {
|
|
1986
2009
|
constructor(e) {
|
|
1987
2010
|
this.defaults = e || {}, this.interceptors = {
|
|
1988
|
-
request: new
|
|
1989
|
-
response: new
|
|
2011
|
+
request: new ct(),
|
|
2012
|
+
response: new ct()
|
|
1990
2013
|
};
|
|
1991
2014
|
}
|
|
1992
2015
|
/**
|
|
@@ -2017,18 +2040,18 @@ let M = class {
|
|
|
2017
2040
|
_request(e, r) {
|
|
2018
2041
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = U(this.defaults, r);
|
|
2019
2042
|
const { transitional: n, paramsSerializer: i, headers: o } = r;
|
|
2020
|
-
n !== void 0 &&
|
|
2021
|
-
silentJSONParsing:
|
|
2022
|
-
forcedJSONParsing:
|
|
2023
|
-
clarifyTimeoutError:
|
|
2043
|
+
n !== void 0 && he.assertOptions(n, {
|
|
2044
|
+
silentJSONParsing: k.transitional(k.boolean),
|
|
2045
|
+
forcedJSONParsing: k.transitional(k.boolean),
|
|
2046
|
+
clarifyTimeoutError: k.transitional(k.boolean)
|
|
2024
2047
|
}, !1), i != null && (f.isFunction(i) ? r.paramsSerializer = {
|
|
2025
2048
|
serialize: i
|
|
2026
|
-
} :
|
|
2027
|
-
encode:
|
|
2028
|
-
serialize:
|
|
2029
|
-
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
2030
|
-
baseUrl:
|
|
2031
|
-
withXsrfToken:
|
|
2049
|
+
} : he.assertOptions(i, {
|
|
2050
|
+
encode: k.function,
|
|
2051
|
+
serialize: k.function
|
|
2052
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), he.assertOptions(r, {
|
|
2053
|
+
baseUrl: k.spelling("baseURL"),
|
|
2054
|
+
withXsrfToken: k.spelling("withXSRFToken")
|
|
2032
2055
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2033
2056
|
let a = o && f.merge(
|
|
2034
2057
|
o.common,
|
|
@@ -2042,33 +2065,33 @@ let M = class {
|
|
|
2042
2065
|
), r.headers = R.concat(a, o);
|
|
2043
2066
|
const s = [];
|
|
2044
2067
|
let u = !0;
|
|
2045
|
-
this.interceptors.request.forEach(function(
|
|
2046
|
-
typeof
|
|
2068
|
+
this.interceptors.request.forEach(function(b) {
|
|
2069
|
+
typeof b.runWhen == "function" && b.runWhen(r) === !1 || (u = u && b.synchronous, s.unshift(b.fulfilled, b.rejected));
|
|
2047
2070
|
});
|
|
2048
2071
|
const c = [];
|
|
2049
|
-
this.interceptors.response.forEach(function(
|
|
2050
|
-
c.push(
|
|
2072
|
+
this.interceptors.response.forEach(function(b) {
|
|
2073
|
+
c.push(b.fulfilled, b.rejected);
|
|
2051
2074
|
});
|
|
2052
2075
|
let l, d = 0, m;
|
|
2053
2076
|
if (!u) {
|
|
2054
|
-
const p = [
|
|
2077
|
+
const p = [bt.bind(this), void 0];
|
|
2055
2078
|
for (p.unshift.apply(p, s), p.push.apply(p, c), m = p.length, l = Promise.resolve(r); d < m; )
|
|
2056
2079
|
l = l.then(p[d++], p[d++]);
|
|
2057
2080
|
return l;
|
|
2058
2081
|
}
|
|
2059
2082
|
m = s.length;
|
|
2060
|
-
let
|
|
2083
|
+
let y = r;
|
|
2061
2084
|
for (d = 0; d < m; ) {
|
|
2062
|
-
const p = s[d++],
|
|
2085
|
+
const p = s[d++], b = s[d++];
|
|
2063
2086
|
try {
|
|
2064
|
-
|
|
2087
|
+
y = p(y);
|
|
2065
2088
|
} catch (h) {
|
|
2066
|
-
|
|
2089
|
+
b.call(this, h);
|
|
2067
2090
|
break;
|
|
2068
2091
|
}
|
|
2069
2092
|
}
|
|
2070
2093
|
try {
|
|
2071
|
-
l =
|
|
2094
|
+
l = bt.call(this, y);
|
|
2072
2095
|
} catch (p) {
|
|
2073
2096
|
return Promise.reject(p);
|
|
2074
2097
|
}
|
|
@@ -2078,8 +2101,8 @@ let M = class {
|
|
|
2078
2101
|
}
|
|
2079
2102
|
getUri(e) {
|
|
2080
2103
|
e = U(this.defaults, e);
|
|
2081
|
-
const r =
|
|
2082
|
-
return
|
|
2104
|
+
const r = Zt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
2105
|
+
return Jt(r, e.params, e.paramsSerializer);
|
|
2083
2106
|
}
|
|
2084
2107
|
};
|
|
2085
2108
|
f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -2106,7 +2129,7 @@ f.forEach(["post", "put", "patch"], function(e) {
|
|
|
2106
2129
|
}
|
|
2107
2130
|
M.prototype[e] = r(), M.prototype[e + "Form"] = r(!0);
|
|
2108
2131
|
});
|
|
2109
|
-
let
|
|
2132
|
+
let mi = class an {
|
|
2110
2133
|
constructor(e) {
|
|
2111
2134
|
if (typeof e != "function")
|
|
2112
2135
|
throw new TypeError("executor must be a function.");
|
|
@@ -2172,22 +2195,22 @@ let pi = class on {
|
|
|
2172
2195
|
static source() {
|
|
2173
2196
|
let e;
|
|
2174
2197
|
return {
|
|
2175
|
-
token: new
|
|
2198
|
+
token: new an(function(i) {
|
|
2176
2199
|
e = i;
|
|
2177
2200
|
}),
|
|
2178
2201
|
cancel: e
|
|
2179
2202
|
};
|
|
2180
2203
|
}
|
|
2181
2204
|
};
|
|
2182
|
-
function
|
|
2205
|
+
function hi(t) {
|
|
2183
2206
|
return function(r) {
|
|
2184
2207
|
return t.apply(null, r);
|
|
2185
2208
|
};
|
|
2186
2209
|
}
|
|
2187
|
-
function
|
|
2210
|
+
function yi(t) {
|
|
2188
2211
|
return f.isObject(t) && t.isAxiosError === !0;
|
|
2189
2212
|
}
|
|
2190
|
-
const
|
|
2213
|
+
const Je = {
|
|
2191
2214
|
Continue: 100,
|
|
2192
2215
|
SwitchingProtocols: 101,
|
|
2193
2216
|
Processing: 102,
|
|
@@ -2252,54 +2275,54 @@ const ze = {
|
|
|
2252
2275
|
NotExtended: 510,
|
|
2253
2276
|
NetworkAuthenticationRequired: 511
|
|
2254
2277
|
};
|
|
2255
|
-
Object.entries(
|
|
2256
|
-
|
|
2278
|
+
Object.entries(Je).forEach(([t, e]) => {
|
|
2279
|
+
Je[e] = t;
|
|
2257
2280
|
});
|
|
2258
|
-
function
|
|
2259
|
-
const e = new M(t), r =
|
|
2281
|
+
function sn(t) {
|
|
2282
|
+
const e = new M(t), r = xt(M.prototype.request, e);
|
|
2260
2283
|
return f.extend(r, M.prototype, e, { allOwnKeys: !0 }), f.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(i) {
|
|
2261
|
-
return
|
|
2284
|
+
return sn(U(t, i));
|
|
2262
2285
|
}, r;
|
|
2263
2286
|
}
|
|
2264
|
-
const S =
|
|
2287
|
+
const S = sn(ne);
|
|
2265
2288
|
S.Axios = M;
|
|
2266
2289
|
S.CanceledError = J;
|
|
2267
|
-
S.CancelToken =
|
|
2268
|
-
S.isCancel =
|
|
2269
|
-
S.VERSION =
|
|
2270
|
-
S.toFormData =
|
|
2290
|
+
S.CancelToken = mi;
|
|
2291
|
+
S.isCancel = Gt;
|
|
2292
|
+
S.VERSION = on;
|
|
2293
|
+
S.toFormData = Te;
|
|
2271
2294
|
S.AxiosError = g;
|
|
2272
2295
|
S.Cancel = S.CanceledError;
|
|
2273
2296
|
S.all = function(e) {
|
|
2274
2297
|
return Promise.all(e);
|
|
2275
2298
|
};
|
|
2276
|
-
S.spread =
|
|
2277
|
-
S.isAxiosError =
|
|
2299
|
+
S.spread = hi;
|
|
2300
|
+
S.isAxiosError = yi;
|
|
2278
2301
|
S.mergeConfig = U;
|
|
2279
2302
|
S.AxiosHeaders = R;
|
|
2280
|
-
S.formToJSON = (t) =>
|
|
2281
|
-
S.getAdapter =
|
|
2282
|
-
S.HttpStatusCode =
|
|
2303
|
+
S.formToJSON = (t) => Qt(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
2304
|
+
S.getAdapter = rn.getAdapter;
|
|
2305
|
+
S.HttpStatusCode = Je;
|
|
2283
2306
|
S.default = S;
|
|
2284
2307
|
const {
|
|
2285
|
-
Axios:
|
|
2286
|
-
AxiosError:
|
|
2287
|
-
CanceledError:
|
|
2288
|
-
isCancel:
|
|
2289
|
-
CancelToken:
|
|
2290
|
-
VERSION:
|
|
2291
|
-
all:
|
|
2292
|
-
Cancel:
|
|
2293
|
-
isAxiosError:
|
|
2294
|
-
spread:
|
|
2295
|
-
toFormData:
|
|
2296
|
-
AxiosHeaders:
|
|
2297
|
-
HttpStatusCode:
|
|
2298
|
-
formToJSON:
|
|
2299
|
-
getAdapter:
|
|
2300
|
-
mergeConfig:
|
|
2301
|
-
} = S,
|
|
2302
|
-
typeof window < "u" ? window.__STORE_QUERY_CLIENT__ || (window.__STORE_QUERY_CLIENT__ = new
|
|
2308
|
+
Axios: Qi,
|
|
2309
|
+
AxiosError: vt,
|
|
2310
|
+
CanceledError: Gi,
|
|
2311
|
+
isCancel: Yi,
|
|
2312
|
+
CancelToken: Zi,
|
|
2313
|
+
VERSION: eo,
|
|
2314
|
+
all: to,
|
|
2315
|
+
Cancel: no,
|
|
2316
|
+
isAxiosError: ro,
|
|
2317
|
+
spread: io,
|
|
2318
|
+
toFormData: oo,
|
|
2319
|
+
AxiosHeaders: ao,
|
|
2320
|
+
HttpStatusCode: so,
|
|
2321
|
+
formToJSON: uo,
|
|
2322
|
+
getAdapter: co,
|
|
2323
|
+
mergeConfig: lo
|
|
2324
|
+
} = S, bi = (t) => Ct.some(t, (e) => e && e.errorCode !== void 0) || t?.errorCode !== void 0;
|
|
2325
|
+
typeof window < "u" ? window.__STORE_QUERY_CLIENT__ || (window.__STORE_QUERY_CLIENT__ = new Ue({
|
|
2303
2326
|
defaultOptions: {
|
|
2304
2327
|
queries: {
|
|
2305
2328
|
refetchOnWindowFocus: !0,
|
|
@@ -2308,7 +2331,7 @@ typeof window < "u" ? window.__STORE_QUERY_CLIENT__ || (window.__STORE_QUERY_CLI
|
|
|
2308
2331
|
staleTime: 1e3 * 60 * 5
|
|
2309
2332
|
}
|
|
2310
2333
|
}
|
|
2311
|
-
})) : new
|
|
2334
|
+
})) : new Ue({
|
|
2312
2335
|
defaultOptions: {
|
|
2313
2336
|
queries: {
|
|
2314
2337
|
refetchOnWindowFocus: !0,
|
|
@@ -2318,8 +2341,8 @@ typeof window < "u" ? window.__STORE_QUERY_CLIENT__ || (window.__STORE_QUERY_CLI
|
|
|
2318
2341
|
}
|
|
2319
2342
|
}
|
|
2320
2343
|
});
|
|
2321
|
-
const
|
|
2322
|
-
baseURL:
|
|
2344
|
+
const un = "auth_token", gi = "https://localhost:3000/shop-api", vi = "lang", wi = "currencyCode", cn = S.create({
|
|
2345
|
+
baseURL: gi,
|
|
2323
2346
|
withCredentials: !0,
|
|
2324
2347
|
// Required for cookie-based sessions
|
|
2325
2348
|
headers: {
|
|
@@ -2327,48 +2350,48 @@ const sn = "auth_token", bi = "https://localhost:3000/shop-api", un = S.create({
|
|
|
2327
2350
|
// We'll set this in the request interceptor
|
|
2328
2351
|
}
|
|
2329
2352
|
});
|
|
2330
|
-
let
|
|
2353
|
+
let Si = async (t, e) => {
|
|
2331
2354
|
await e(t);
|
|
2332
2355
|
};
|
|
2333
|
-
|
|
2334
|
-
const n = await
|
|
2335
|
-
n && (r.headers.Authorization = `Bearer ${n}`), i && (r.headers["vendure-token"] = i);
|
|
2356
|
+
cn.interceptors.request.use(async (t) => (await Si(t, async (r) => {
|
|
2357
|
+
const n = await G.getItem(un), i = await G.getItem("channelToken"), o = await G.getItem(wi), a = await G.getItem(vi);
|
|
2358
|
+
n && (r.headers.Authorization = `Bearer ${n}`), i && (r.headers["vendure-token"] = i), r.params = r.params || {}, o && (r.params.currencyCode = o), a && (r.params.languageCode = a);
|
|
2336
2359
|
}), t));
|
|
2337
|
-
|
|
2360
|
+
cn.interceptors.response.use((t) => {
|
|
2338
2361
|
const e = t.headers["vendure-auth-token"];
|
|
2339
|
-
if (e &&
|
|
2340
|
-
const r = Object.values(t.data.data)[0], n = new
|
|
2362
|
+
if (e && G.setItem(un, e), bi(t.data.data)) {
|
|
2363
|
+
const r = Object.values(t.data.data)[0], n = new vt(r.errorCode);
|
|
2341
2364
|
return n.response = t, n.request = t.request, n.config = t.config, Promise.reject(n);
|
|
2342
2365
|
}
|
|
2343
2366
|
if (t.data.errors?.length > 0) {
|
|
2344
|
-
const r = t.data.errors[0], n = new
|
|
2367
|
+
const r = t.data.errors[0], n = new vt(r.message);
|
|
2345
2368
|
return n.response = t, n.request = t.request, n.config = t.config, Promise.reject(n);
|
|
2346
2369
|
}
|
|
2347
2370
|
return t;
|
|
2348
2371
|
}, (t) => Promise.reject(t));
|
|
2349
|
-
var
|
|
2350
|
-
function
|
|
2351
|
-
if (
|
|
2352
|
-
|
|
2372
|
+
var N = {}, ue = {}, ce = {}, le = {}, wt;
|
|
2373
|
+
function re() {
|
|
2374
|
+
if (wt) return le;
|
|
2375
|
+
wt = 1, Object.defineProperty(le, "__esModule", { value: !0 });
|
|
2353
2376
|
var t;
|
|
2354
2377
|
return function(e) {
|
|
2355
2378
|
e.Mutation = "mutation", e.Query = "query", e.Subscription = "subscription";
|
|
2356
|
-
}(t || (t = {})),
|
|
2379
|
+
}(t || (t = {})), le.default = t, le;
|
|
2357
2380
|
}
|
|
2358
|
-
var
|
|
2359
|
-
function
|
|
2360
|
-
if (
|
|
2361
|
-
|
|
2381
|
+
var I = {}, Q = {}, St;
|
|
2382
|
+
function Oi() {
|
|
2383
|
+
if (St) return Q;
|
|
2384
|
+
St = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.isNestedField = void 0;
|
|
2362
2385
|
function t(e) {
|
|
2363
2386
|
return typeof e == "object" && e.hasOwnProperty("operation") && e.hasOwnProperty("variables") && e.hasOwnProperty("fields") || typeof e == "object" && e.hasOwnProperty("operation") && e.hasOwnProperty("fragment") && e.hasOwnProperty("fields");
|
|
2364
2387
|
}
|
|
2365
2388
|
return Q.isNestedField = t, Q;
|
|
2366
2389
|
}
|
|
2367
|
-
var
|
|
2368
|
-
function
|
|
2369
|
-
if (
|
|
2370
|
-
|
|
2371
|
-
var t =
|
|
2390
|
+
var Ot;
|
|
2391
|
+
function ie() {
|
|
2392
|
+
if (Ot) return I;
|
|
2393
|
+
Ot = 1;
|
|
2394
|
+
var t = I && I.__assign || function() {
|
|
2372
2395
|
return t = Object.assign || function(n) {
|
|
2373
2396
|
for (var i, o = 1, a = arguments.length; o < a; o++) {
|
|
2374
2397
|
i = arguments[o];
|
|
@@ -2377,8 +2400,8 @@ function ne() {
|
|
|
2377
2400
|
return n;
|
|
2378
2401
|
}, t.apply(this, arguments);
|
|
2379
2402
|
};
|
|
2380
|
-
Object.defineProperty(
|
|
2381
|
-
var e =
|
|
2403
|
+
Object.defineProperty(I, "__esModule", { value: !0 });
|
|
2404
|
+
var e = Oi(), r = (
|
|
2382
2405
|
/** @class */
|
|
2383
2406
|
function() {
|
|
2384
2407
|
function n() {
|
|
@@ -2462,13 +2485,13 @@ function ne() {
|
|
|
2462
2485
|
}, n;
|
|
2463
2486
|
}()
|
|
2464
2487
|
);
|
|
2465
|
-
return
|
|
2488
|
+
return I.default = r, I;
|
|
2466
2489
|
}
|
|
2467
|
-
var
|
|
2468
|
-
function
|
|
2469
|
-
if (
|
|
2470
|
-
|
|
2471
|
-
var t =
|
|
2490
|
+
var At;
|
|
2491
|
+
function Ai() {
|
|
2492
|
+
if (At) return ce;
|
|
2493
|
+
At = 1, Object.defineProperty(ce, "__esModule", { value: !0 });
|
|
2494
|
+
var t = re(), e = ie(), r = (
|
|
2472
2495
|
/** @class */
|
|
2473
2496
|
function() {
|
|
2474
2497
|
function n(i) {
|
|
@@ -2511,13 +2534,13 @@ function wi() {
|
|
|
2511
2534
|
}, n;
|
|
2512
2535
|
}()
|
|
2513
2536
|
);
|
|
2514
|
-
return
|
|
2537
|
+
return ce.default = r, ce;
|
|
2515
2538
|
}
|
|
2516
|
-
var
|
|
2517
|
-
function
|
|
2518
|
-
if (
|
|
2519
|
-
|
|
2520
|
-
var t =
|
|
2539
|
+
var fe = {}, Et;
|
|
2540
|
+
function Ei() {
|
|
2541
|
+
if (Et) return fe;
|
|
2542
|
+
Et = 1, Object.defineProperty(fe, "__esModule", { value: !0 });
|
|
2543
|
+
var t = re(), e = ie(), r = (
|
|
2521
2544
|
/** @class */
|
|
2522
2545
|
function() {
|
|
2523
2546
|
function n(i) {
|
|
@@ -2571,20 +2594,20 @@ function Si() {
|
|
|
2571
2594
|
}, n;
|
|
2572
2595
|
}()
|
|
2573
2596
|
);
|
|
2574
|
-
return
|
|
2597
|
+
return fe.default = r, fe;
|
|
2575
2598
|
}
|
|
2576
|
-
var
|
|
2577
|
-
function
|
|
2578
|
-
if (
|
|
2579
|
-
|
|
2580
|
-
var t =
|
|
2581
|
-
return
|
|
2599
|
+
var Tt;
|
|
2600
|
+
function Ti() {
|
|
2601
|
+
if (Tt) return ue;
|
|
2602
|
+
Tt = 1, Object.defineProperty(ue, "__esModule", { value: !0 });
|
|
2603
|
+
var t = Ai(), e = Ei();
|
|
2604
|
+
return ue.default = { DefaultAppSyncQueryAdapter: e.default, DefaultAppSyncMutationAdapter: t.default }, ue;
|
|
2582
2605
|
}
|
|
2583
|
-
var
|
|
2584
|
-
function
|
|
2585
|
-
if (
|
|
2586
|
-
|
|
2587
|
-
var t =
|
|
2606
|
+
var L = {}, _t;
|
|
2607
|
+
function _i() {
|
|
2608
|
+
if (_t) return L;
|
|
2609
|
+
_t = 1;
|
|
2610
|
+
var t = L && L.__assign || function() {
|
|
2588
2611
|
return t = Object.assign || function(i) {
|
|
2589
2612
|
for (var o, a = 1, s = arguments.length; a < s; a++) {
|
|
2590
2613
|
o = arguments[a];
|
|
@@ -2593,8 +2616,8 @@ function Ai() {
|
|
|
2593
2616
|
return i;
|
|
2594
2617
|
}, t.apply(this, arguments);
|
|
2595
2618
|
};
|
|
2596
|
-
Object.defineProperty(
|
|
2597
|
-
var e =
|
|
2619
|
+
Object.defineProperty(L, "__esModule", { value: !0 });
|
|
2620
|
+
var e = re(), r = ie(), n = (
|
|
2598
2621
|
/** @class */
|
|
2599
2622
|
function() {
|
|
2600
2623
|
function i(o, a) {
|
|
@@ -2634,12 +2657,12 @@ function Ai() {
|
|
|
2634
2657
|
}, i;
|
|
2635
2658
|
}()
|
|
2636
2659
|
);
|
|
2637
|
-
return
|
|
2660
|
+
return L.default = n, L;
|
|
2638
2661
|
}
|
|
2639
|
-
var $ = {},
|
|
2640
|
-
function
|
|
2641
|
-
if (
|
|
2642
|
-
|
|
2662
|
+
var $ = {}, Rt;
|
|
2663
|
+
function Ri() {
|
|
2664
|
+
if (Rt) return $;
|
|
2665
|
+
Rt = 1;
|
|
2643
2666
|
var t = $ && $.__assign || function() {
|
|
2644
2667
|
return t = Object.assign || function(i) {
|
|
2645
2668
|
for (var o, a = 1, s = arguments.length; a < s; a++) {
|
|
@@ -2650,7 +2673,7 @@ function Ei() {
|
|
|
2650
2673
|
}, t.apply(this, arguments);
|
|
2651
2674
|
};
|
|
2652
2675
|
Object.defineProperty($, "__esModule", { value: !0 });
|
|
2653
|
-
var e =
|
|
2676
|
+
var e = re(), r = ie(), n = (
|
|
2654
2677
|
/** @class */
|
|
2655
2678
|
function() {
|
|
2656
2679
|
function i(o, a) {
|
|
@@ -2691,11 +2714,11 @@ function Ei() {
|
|
|
2691
2714
|
);
|
|
2692
2715
|
return $.default = n, $;
|
|
2693
2716
|
}
|
|
2694
|
-
var
|
|
2695
|
-
function
|
|
2696
|
-
if (
|
|
2697
|
-
|
|
2698
|
-
var t =
|
|
2717
|
+
var de = {}, Nt;
|
|
2718
|
+
function Ni() {
|
|
2719
|
+
if (Nt) return de;
|
|
2720
|
+
Nt = 1, Object.defineProperty(de, "__esModule", { value: !0 });
|
|
2721
|
+
var t = re(), e = ie(), r = (
|
|
2699
2722
|
/** @class */
|
|
2700
2723
|
function() {
|
|
2701
2724
|
function n(i) {
|
|
@@ -2737,15 +2760,15 @@ function Ti() {
|
|
|
2737
2760
|
}, n;
|
|
2738
2761
|
}()
|
|
2739
2762
|
);
|
|
2740
|
-
return
|
|
2741
|
-
}
|
|
2742
|
-
var
|
|
2743
|
-
function
|
|
2744
|
-
if (
|
|
2745
|
-
|
|
2746
|
-
var t =
|
|
2747
|
-
|
|
2748
|
-
var e =
|
|
2763
|
+
return de.default = r, de;
|
|
2764
|
+
}
|
|
2765
|
+
var Pt;
|
|
2766
|
+
function Pi() {
|
|
2767
|
+
if (Pt) return N;
|
|
2768
|
+
Pt = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.adapters = N.query = N.mutation = N.subscription = void 0;
|
|
2769
|
+
var t = Ti();
|
|
2770
|
+
N.adapters = t.default;
|
|
2771
|
+
var e = _i(), r = Ri(), n = Ni();
|
|
2749
2772
|
function i(s, u, c) {
|
|
2750
2773
|
var l;
|
|
2751
2774
|
if (Array.isArray(s)) {
|
|
@@ -2761,20 +2784,20 @@ function _i() {
|
|
|
2761
2784
|
}
|
|
2762
2785
|
return l = new r.default(s, c), l.queryBuilder();
|
|
2763
2786
|
}
|
|
2764
|
-
|
|
2787
|
+
N.query = i;
|
|
2765
2788
|
function o(s, u, c) {
|
|
2766
2789
|
var l, d;
|
|
2767
2790
|
return Array.isArray(s) ? u ? (l = new u(s, c), l.mutationsBuilder(s)) : (d = new e.default(s, c), d.mutationsBuilder(s)) : u ? (l = new u(s, c), l.mutationBuilder()) : (d = new e.default(s, c), d.mutationBuilder());
|
|
2768
2791
|
}
|
|
2769
|
-
|
|
2792
|
+
N.mutation = o;
|
|
2770
2793
|
function a(s, u) {
|
|
2771
2794
|
var c, l;
|
|
2772
2795
|
return Array.isArray(s) ? u ? (c = new u(s), c.subscriptionsBuilder(s)) : (l = new n.default(s), l.subscriptionsBuilder(s)) : u ? (c = new u(s), c.subscriptionBuilder()) : (l = new n.default(s), l.subscriptionBuilder());
|
|
2773
2796
|
}
|
|
2774
|
-
return
|
|
2797
|
+
return N.subscription = a, N;
|
|
2775
2798
|
}
|
|
2776
|
-
|
|
2777
|
-
const
|
|
2799
|
+
Pi();
|
|
2800
|
+
const ki = {
|
|
2778
2801
|
kind: "Document",
|
|
2779
2802
|
definitions: [{
|
|
2780
2803
|
kind: "FragmentDefinition",
|
|
@@ -2818,7 +2841,7 @@ const Ri = {
|
|
|
2818
2841
|
}]
|
|
2819
2842
|
}
|
|
2820
2843
|
}]
|
|
2821
|
-
},
|
|
2844
|
+
}, Ci = {
|
|
2822
2845
|
kind: "Document",
|
|
2823
2846
|
definitions: [{
|
|
2824
2847
|
kind: "OperationDefinition",
|
|
@@ -2993,7 +3016,7 @@ const Ri = {
|
|
|
2993
3016
|
}]
|
|
2994
3017
|
}
|
|
2995
3018
|
}]
|
|
2996
|
-
},
|
|
3019
|
+
}, qi = {
|
|
2997
3020
|
kind: "Document",
|
|
2998
3021
|
definitions: [{
|
|
2999
3022
|
kind: "OperationDefinition",
|
|
@@ -3023,7 +3046,7 @@ const Ri = {
|
|
|
3023
3046
|
}]
|
|
3024
3047
|
}
|
|
3025
3048
|
}]
|
|
3026
|
-
},
|
|
3049
|
+
}, ji = {
|
|
3027
3050
|
kind: "Document",
|
|
3028
3051
|
definitions: [{
|
|
3029
3052
|
kind: "OperationDefinition",
|
|
@@ -3053,7 +3076,7 @@ const Ri = {
|
|
|
3053
3076
|
}]
|
|
3054
3077
|
}
|
|
3055
3078
|
}]
|
|
3056
|
-
},
|
|
3079
|
+
}, Di = {
|
|
3057
3080
|
kind: "Document",
|
|
3058
3081
|
definitions: [{
|
|
3059
3082
|
kind: "OperationDefinition",
|
|
@@ -3136,7 +3159,7 @@ const Ri = {
|
|
|
3136
3159
|
}]
|
|
3137
3160
|
}
|
|
3138
3161
|
}]
|
|
3139
|
-
},
|
|
3162
|
+
}, Fi = {
|
|
3140
3163
|
kind: "Document",
|
|
3141
3164
|
definitions: [{
|
|
3142
3165
|
kind: "OperationDefinition",
|
|
@@ -3156,7 +3179,7 @@ const Ri = {
|
|
|
3156
3179
|
}]
|
|
3157
3180
|
}
|
|
3158
3181
|
}]
|
|
3159
|
-
},
|
|
3182
|
+
}, xi = {
|
|
3160
3183
|
kind: "Document",
|
|
3161
3184
|
definitions: [{
|
|
3162
3185
|
kind: "OperationDefinition",
|
|
@@ -3227,19 +3250,19 @@ const Ri = {
|
|
|
3227
3250
|
}]
|
|
3228
3251
|
}
|
|
3229
3252
|
}]
|
|
3230
|
-
},
|
|
3231
|
-
"\n mutation login($email: String!, $password: String!, $rememberMe: Boolean) {\n login(username: $email, password: $password, rememberMe: $rememberMe) {\n __typename\n ... on CurrentUser {\n id\n identifier\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":
|
|
3232
|
-
"\n mutation logout {\n logout {\n success\n }\n }\n":
|
|
3233
|
-
"\n query me {\n me {\n id\n }\n }\n":
|
|
3234
|
-
"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":
|
|
3235
|
-
"\n query nextOrderStates {\n nextOrderStates\n }\n":
|
|
3236
|
-
"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n":
|
|
3237
|
-
"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n":
|
|
3253
|
+
}, Mi = {
|
|
3254
|
+
"\n mutation login($email: String!, $password: String!, $rememberMe: Boolean) {\n login(username: $email, password: $password, rememberMe: $rememberMe) {\n __typename\n ... on CurrentUser {\n id\n identifier\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n": Ci,
|
|
3255
|
+
"\n mutation logout {\n logout {\n success\n }\n }\n": qi,
|
|
3256
|
+
"\n query me {\n me {\n id\n }\n }\n": ji,
|
|
3257
|
+
"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n": Di,
|
|
3258
|
+
"\n query nextOrderStates {\n nextOrderStates\n }\n": Fi,
|
|
3259
|
+
"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n": ki,
|
|
3260
|
+
"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n": xi
|
|
3238
3261
|
};
|
|
3239
|
-
function
|
|
3240
|
-
return
|
|
3262
|
+
function Ne(t) {
|
|
3263
|
+
return Mi[t] ?? {};
|
|
3241
3264
|
}
|
|
3242
|
-
|
|
3265
|
+
Ne(
|
|
3243
3266
|
/* GraphQL */
|
|
3244
3267
|
`
|
|
3245
3268
|
mutation transitionOrderToState($input: String!) {
|
|
@@ -3252,7 +3275,7 @@ _e(
|
|
|
3252
3275
|
}
|
|
3253
3276
|
`
|
|
3254
3277
|
);
|
|
3255
|
-
|
|
3278
|
+
Ne(
|
|
3256
3279
|
/* GraphQL */
|
|
3257
3280
|
`
|
|
3258
3281
|
query nextOrderStates {
|
|
@@ -3260,7 +3283,7 @@ _e(
|
|
|
3260
3283
|
}
|
|
3261
3284
|
`
|
|
3262
3285
|
);
|
|
3263
|
-
|
|
3286
|
+
Ne(
|
|
3264
3287
|
/* GraphQL */
|
|
3265
3288
|
`
|
|
3266
3289
|
fragment EligiblePaymentMethods on PaymentMethodQuote {
|
|
@@ -3271,7 +3294,7 @@ _e(
|
|
|
3271
3294
|
}
|
|
3272
3295
|
`
|
|
3273
3296
|
);
|
|
3274
|
-
|
|
3297
|
+
Ne(
|
|
3275
3298
|
/* GraphQL */
|
|
3276
3299
|
`
|
|
3277
3300
|
query EligiblePaymentMethods {
|
|
@@ -3281,31 +3304,31 @@ _e(
|
|
|
3281
3304
|
}
|
|
3282
3305
|
`
|
|
3283
3306
|
);
|
|
3284
|
-
let
|
|
3307
|
+
let kt = "web";
|
|
3285
3308
|
try {
|
|
3286
3309
|
const {
|
|
3287
3310
|
Platform: t
|
|
3288
3311
|
} = require("react-native");
|
|
3289
|
-
|
|
3312
|
+
kt = t.OS === "web" ? "web" : "native";
|
|
3290
3313
|
} catch {
|
|
3291
|
-
|
|
3314
|
+
kt = "web";
|
|
3292
3315
|
}
|
|
3293
|
-
const
|
|
3316
|
+
const Pe = () => {
|
|
3294
3317
|
const t = X.c(2), {
|
|
3295
3318
|
getPlatform: e
|
|
3296
|
-
} =
|
|
3319
|
+
} = In();
|
|
3297
3320
|
let r;
|
|
3298
3321
|
return t[0] !== e ? (r = e(), t[0] = e, t[1] = r) : r = t[1], r;
|
|
3299
3322
|
};
|
|
3300
|
-
typeof window < "u" ? window.__STORE_COMPONENT_PROVIDER_CONTEXT__ || (window.__STORE_COMPONENT_PROVIDER_CONTEXT__ =
|
|
3301
|
-
const ke = "ProductBadge", [
|
|
3323
|
+
typeof window < "u" ? window.__STORE_COMPONENT_PROVIDER_CONTEXT__ || (window.__STORE_COMPONENT_PROVIDER_CONTEXT__ = ye(void 0)) : ye(void 0);
|
|
3324
|
+
const ke = "ProductBadge", [Bi] = gn(ke), [Ui, Ii] = Bi(ke), ln = ({
|
|
3302
3325
|
children: t,
|
|
3303
3326
|
product: e,
|
|
3304
3327
|
__scopeProductBadge: r,
|
|
3305
3328
|
style: n,
|
|
3306
3329
|
...i
|
|
3307
3330
|
}) => {
|
|
3308
|
-
const o =
|
|
3331
|
+
const o = bn(null), a = Pe(), s = we(a), u = i.asChild ? s : ee("div", a);
|
|
3309
3332
|
if (!V.getEnabled())
|
|
3310
3333
|
return null;
|
|
3311
3334
|
const {
|
|
@@ -3313,16 +3336,16 @@ const ke = "ProductBadge", [Fi] = bn(ke), [xi, Mi] = Fi(ke), cn = ({
|
|
|
3313
3336
|
} = e;
|
|
3314
3337
|
if (!c)
|
|
3315
3338
|
return null;
|
|
3316
|
-
const l = c.reduce((
|
|
3339
|
+
const l = c.reduce((y, p) => (y[p.position] || (y[p.position] = []), y[p.position].push(p), y), {}), d = Object.keys(l), m = {
|
|
3317
3340
|
groupedBadges: l,
|
|
3318
3341
|
badges: c,
|
|
3319
3342
|
badgesRef: o,
|
|
3320
3343
|
positions: d
|
|
3321
3344
|
};
|
|
3322
|
-
return /* @__PURE__ */
|
|
3345
|
+
return /* @__PURE__ */ j.jsx(Ui, { scope: r, ...m, children: /* @__PURE__ */ j.jsx(u, { ...i, style: n, children: qt(t, m) }) });
|
|
3323
3346
|
};
|
|
3324
|
-
|
|
3325
|
-
const
|
|
3347
|
+
ln.displayName = ke;
|
|
3348
|
+
const fn = (t) => {
|
|
3326
3349
|
const e = X.c(21);
|
|
3327
3350
|
let r, n, i, o, a;
|
|
3328
3351
|
e[0] !== t ? ({
|
|
@@ -3332,23 +3355,23 @@ const ln = (t) => {
|
|
|
3332
3355
|
__scopeProductBadge: r,
|
|
3333
3356
|
...a
|
|
3334
3357
|
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] = i, e[4] = o, e[5] = a) : (r = e[1], n = e[2], i = e[3], o = e[4], a = e[5]);
|
|
3335
|
-
const s =
|
|
3358
|
+
const s = Pe();
|
|
3336
3359
|
let u;
|
|
3337
|
-
e[6] !== s ? (u =
|
|
3360
|
+
e[6] !== s ? (u = we(s), e[6] = s, e[7] = u) : u = e[7];
|
|
3338
3361
|
const c = u;
|
|
3339
3362
|
let l;
|
|
3340
|
-
e[8] !== c || e[9] !== n || e[10] !== s ? (l = n ? c :
|
|
3363
|
+
e[8] !== c || e[9] !== n || e[10] !== s ? (l = n ? c : ee("div", s), e[8] = c, e[9] = n, e[10] = s, e[11] = l) : l = e[11];
|
|
3341
3364
|
const d = l, {
|
|
3342
3365
|
groupedBadges: m
|
|
3343
|
-
} =
|
|
3366
|
+
} = Ii(ke, r), y = m[o];
|
|
3344
3367
|
let p;
|
|
3345
|
-
e[12] !==
|
|
3346
|
-
badges:
|
|
3368
|
+
e[12] !== y || e[13] !== i || e[14] !== o ? (p = qt(i, {
|
|
3369
|
+
badges: y,
|
|
3347
3370
|
position: o
|
|
3348
|
-
}), e[12] =
|
|
3349
|
-
let
|
|
3350
|
-
return e[16] !== d || e[17] !== o || e[18] !== a || e[19] !== p ? (
|
|
3351
|
-
},
|
|
3371
|
+
}), e[12] = y, e[13] = i, e[14] = o, e[15] = p) : p = e[15];
|
|
3372
|
+
let b;
|
|
3373
|
+
return e[16] !== d || e[17] !== o || e[18] !== a || e[19] !== p ? (b = /* @__PURE__ */ j.jsx(d, { ...a, "data-position": o, children: p }), e[16] = d, e[17] = o, e[18] = a, e[19] = p, e[20] = b) : b = e[20], b;
|
|
3374
|
+
}, dn = (t) => {
|
|
3352
3375
|
const e = X.c(16);
|
|
3353
3376
|
let r, n, i, o;
|
|
3354
3377
|
e[0] !== t ? ({
|
|
@@ -3357,16 +3380,16 @@ const ln = (t) => {
|
|
|
3357
3380
|
badge: n,
|
|
3358
3381
|
...o
|
|
3359
3382
|
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] = i, e[4] = o) : (r = e[1], n = e[2], i = e[3], o = e[4]);
|
|
3360
|
-
const a =
|
|
3383
|
+
const a = Pe();
|
|
3361
3384
|
let s;
|
|
3362
|
-
e[5] !== a ? (s =
|
|
3385
|
+
e[5] !== a ? (s = we(a), e[5] = a, e[6] = s) : s = e[6];
|
|
3363
3386
|
const u = s;
|
|
3364
3387
|
let c;
|
|
3365
|
-
e[7] !== u || e[8] !== r || e[9] !== a ? (c = r ? u :
|
|
3388
|
+
e[7] !== u || e[8] !== r || e[9] !== a ? (c = r ? u : ee("div", a), e[7] = u, e[8] = r, e[9] = a, e[10] = c) : c = e[10];
|
|
3366
3389
|
const l = c, d = n?.id;
|
|
3367
3390
|
let m;
|
|
3368
|
-
return e[11] !== l || e[12] !== i || e[13] !== o || e[14] !== d ? (m = /* @__PURE__ */
|
|
3369
|
-
},
|
|
3391
|
+
return e[11] !== l || e[12] !== i || e[13] !== o || e[14] !== d ? (m = /* @__PURE__ */ j.jsx(l, { ...o, "data-badge-id": d, children: i }), e[11] = l, e[12] = i, e[13] = o, e[14] = d, e[15] = m) : m = e[15], m;
|
|
3392
|
+
}, pn = (t) => {
|
|
3370
3393
|
const e = X.c(18);
|
|
3371
3394
|
let r, n, i;
|
|
3372
3395
|
e[0] !== t ? ({
|
|
@@ -3374,29 +3397,29 @@ const ln = (t) => {
|
|
|
3374
3397
|
asChild: r,
|
|
3375
3398
|
...i
|
|
3376
3399
|
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] = i) : (r = e[1], n = e[2], i = e[3]);
|
|
3377
|
-
const o =
|
|
3400
|
+
const o = Pe();
|
|
3378
3401
|
let a;
|
|
3379
|
-
e[4] !== o ? (a =
|
|
3402
|
+
e[4] !== o ? (a = we(o), e[4] = o, e[5] = a) : a = e[5];
|
|
3380
3403
|
const s = a;
|
|
3381
3404
|
let u;
|
|
3382
|
-
e[6] !== s || e[7] !== r || e[8] !== o ? (u = r ? s :
|
|
3405
|
+
e[6] !== s || e[7] !== r || e[8] !== o ? (u = r ? s : ee("img", o), e[6] = s, e[7] = r, e[8] = o, e[9] = u) : u = e[9];
|
|
3383
3406
|
const c = u;
|
|
3384
3407
|
let l;
|
|
3385
|
-
e[10] !== o || e[11] !== i ? (l =
|
|
3408
|
+
e[10] !== o || e[11] !== i ? (l = hn(i, o), e[10] = o, e[11] = i, e[12] = l) : l = e[12];
|
|
3386
3409
|
const d = l, m = n.asset?.preview;
|
|
3387
|
-
let
|
|
3388
|
-
return e[13] !== c || e[14] !== n.collection.name || e[15] !== m || e[16] !== d ? (
|
|
3410
|
+
let y;
|
|
3411
|
+
return e[13] !== c || e[14] !== n.collection.name || e[15] !== m || e[16] !== d ? (y = /* @__PURE__ */ j.jsx(c, { src: m, alt: n.collection.name, "data-badge-name": n.collection.name, ...d }), e[13] = c, e[14] = n.collection.name, e[15] = m, e[16] = d, e[17] = y) : y = e[17], y;
|
|
3389
3412
|
};
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
const
|
|
3394
|
-
Root:
|
|
3395
|
-
Group:
|
|
3396
|
-
Item:
|
|
3397
|
-
Image:
|
|
3413
|
+
fn.displayName = "ProductBadgeGroup";
|
|
3414
|
+
dn.displayName = "ProductBadgeItem";
|
|
3415
|
+
pn.displayName = "ProductBadgeImage";
|
|
3416
|
+
const fo = {
|
|
3417
|
+
Root: ln,
|
|
3418
|
+
Group: fn,
|
|
3419
|
+
Item: dn,
|
|
3420
|
+
Image: pn
|
|
3398
3421
|
};
|
|
3399
3422
|
export {
|
|
3400
|
-
|
|
3423
|
+
fo as ProductBadge,
|
|
3401
3424
|
V as VendureBadgePlugin
|
|
3402
3425
|
};
|