@haus-storefront-react/vendure-plugin-configs 0.0.32-1 → 0.0.32-10
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 +81 -0
- package/badge.js +20 -20
- package/badge.mjs +1201 -1568
- package/campaign.js +1 -1
- package/campaign.mjs +2 -2
- package/elastic.d.ts +2 -0
- package/elastic.js +1 -0
- package/elastic.mjs +25 -0
- package/{index-BtCqYPso.js → index-C5vj0ljt.js} +1 -1
- package/index-CzxpJe9c.js +27 -0
- package/{index-Bko_DGaw.mjs → index-DHq-tHrl.mjs} +1 -1
- package/{index-Wcc0o6jA.mjs → index-RBMJ45wv.mjs} +433 -439
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/lib/configs/vendure-elastic-search-plugin.augmentation.d.ts +31 -0
- package/lib/configs/vendure-elastic-search-plugin.d.ts +38 -0
- package/lib/configs/vendure-elastic-search-plugin.types.d.ts +0 -0
- package/lib/exports/augmentations.d.ts +1 -0
- package/lib/exports/elastic.d.ts +1 -0
- package/package.json +10 -4
- package/packagesize.js +1 -1
- package/packagesize.mjs +1 -1
- package/product-popularity.js +1 -1
- package/product-popularity.mjs +1 -1
- package/browser-ponyfill-ByZyuJ42.js +0 -2
- package/browser-ponyfill-DYgay_ta.mjs +0 -341
- package/index-CATkY-bf.js +0 -27
package/badge.mjs
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { V as
|
|
2
|
-
import { c as
|
|
1
|
+
import { V as Kt, l as Be } from "./index-RBMJ45wv.mjs";
|
|
2
|
+
import { c as $, j as D, r as mt } from "./index-DHq-tHrl.mjs";
|
|
3
3
|
import * as E from "react";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { QueryClient as $e } from "@tanstack/react-query";
|
|
8
|
-
const Q = new yn({
|
|
4
|
+
import Xt, { createContext as ht, useContext as Gt, useRef as Yt } from "react";
|
|
5
|
+
import { QueryClient as yt } from "@tanstack/react-query";
|
|
6
|
+
const J = new Kt({
|
|
9
7
|
name: "badges",
|
|
10
8
|
enableFeatures: {
|
|
11
9
|
showBadges: ({
|
|
12
10
|
badges: t = [],
|
|
13
11
|
parentComponent: e
|
|
14
12
|
}) => {
|
|
15
|
-
const r = e ?
|
|
13
|
+
const r = e ? J.getSettings().availablePositions[e] : J.getSettings().defaultPositions;
|
|
16
14
|
return {
|
|
17
|
-
badges:
|
|
15
|
+
badges: Be.filter(t, (o) => r ? r.includes(o.position) : !0),
|
|
18
16
|
availablePositions: r
|
|
19
17
|
};
|
|
20
18
|
}
|
|
@@ -29,7 +27,7 @@ const Q = new yn({
|
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
});
|
|
32
|
-
|
|
30
|
+
J.setQueryUpdates({
|
|
33
31
|
product: {
|
|
34
32
|
fields: [{
|
|
35
33
|
badges: ["id", "position", "assetId", {
|
|
@@ -73,8 +71,8 @@ Q.setQueryUpdates({
|
|
|
73
71
|
}]
|
|
74
72
|
}
|
|
75
73
|
});
|
|
76
|
-
|
|
77
|
-
getBadges: async () =>
|
|
74
|
+
J.setRequests({
|
|
75
|
+
getBadges: async () => J.getSdk().createRequest({
|
|
78
76
|
operation: "badges",
|
|
79
77
|
fields: ["totalItems", {
|
|
80
78
|
items: ["id", "createdAt", "updatedAt", "collectionId", "position", "assetId", {
|
|
@@ -92,13 +90,13 @@ Q.setRequests({
|
|
|
92
90
|
errorCode: t.code || "unknown"
|
|
93
91
|
}))
|
|
94
92
|
});
|
|
95
|
-
function
|
|
93
|
+
function Zt(t) {
|
|
96
94
|
const e = [];
|
|
97
|
-
function r(
|
|
98
|
-
const s = E.createContext(
|
|
95
|
+
function r(o, i) {
|
|
96
|
+
const s = E.createContext(i), a = e.length;
|
|
99
97
|
e.push(s);
|
|
100
|
-
const
|
|
101
|
-
const f =
|
|
98
|
+
const c = (l) => {
|
|
99
|
+
const f = $.c(8);
|
|
102
100
|
let p, y, m;
|
|
103
101
|
f[0] !== l ? ({
|
|
104
102
|
scope: m,
|
|
@@ -109,24 +107,24 @@ function vn(t) {
|
|
|
109
107
|
let h;
|
|
110
108
|
h = y;
|
|
111
109
|
const w = h;
|
|
112
|
-
let
|
|
113
|
-
return f[4] !== g.Provider || f[5] !== p || f[6] !== w ? (
|
|
110
|
+
let S;
|
|
111
|
+
return f[4] !== g.Provider || f[5] !== p || f[6] !== w ? (S = /* @__PURE__ */ D.jsx(g.Provider, { value: w, children: p }), f[4] = g.Provider, f[5] = p, f[6] = w, f[7] = S) : S = f[7], S;
|
|
114
112
|
};
|
|
115
|
-
|
|
116
|
-
function
|
|
113
|
+
c.displayName = o + "Provider";
|
|
114
|
+
function u(l, f) {
|
|
117
115
|
const p = f?.[t]?.[a] || s, y = E.useContext(p);
|
|
118
116
|
if (y)
|
|
119
117
|
return y;
|
|
120
|
-
if (
|
|
121
|
-
return
|
|
122
|
-
throw new Error(`\`${l}\` must be used within \`${
|
|
118
|
+
if (i !== void 0)
|
|
119
|
+
return i;
|
|
120
|
+
throw new Error(`\`${l}\` must be used within \`${o}\``);
|
|
123
121
|
}
|
|
124
|
-
return [
|
|
122
|
+
return [c, u];
|
|
125
123
|
}
|
|
126
124
|
function n() {
|
|
127
|
-
const
|
|
125
|
+
const o = e.map((i) => E.createContext(i));
|
|
128
126
|
return function(s) {
|
|
129
|
-
const a = s?.[t] ||
|
|
127
|
+
const a = s?.[t] || o;
|
|
130
128
|
return E.useMemo(() => ({
|
|
131
129
|
[`__scope${t}`]: {
|
|
132
130
|
...s,
|
|
@@ -137,33 +135,33 @@ function vn(t) {
|
|
|
137
135
|
}
|
|
138
136
|
return n.scopeName = t, [r, n];
|
|
139
137
|
}
|
|
140
|
-
function
|
|
138
|
+
function en(t, e) {
|
|
141
139
|
if (e === "web")
|
|
142
140
|
return t;
|
|
143
141
|
const {
|
|
144
142
|
src: r,
|
|
145
143
|
alt: n,
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
144
|
+
width: o,
|
|
145
|
+
height: i,
|
|
148
146
|
...s
|
|
149
|
-
} = t, a = [typeof
|
|
150
|
-
width:
|
|
151
|
-
} : void 0, typeof
|
|
152
|
-
height:
|
|
147
|
+
} = t, a = [typeof o == "number" ? {
|
|
148
|
+
width: o
|
|
149
|
+
} : void 0, typeof i == "number" ? {
|
|
150
|
+
height: i
|
|
153
151
|
} : void 0].filter(Boolean);
|
|
154
|
-
let
|
|
155
|
-
return a.length === 1 ?
|
|
152
|
+
let c;
|
|
153
|
+
return a.length === 1 ? c = a[0] : a.length > 1 && (c = a), {
|
|
156
154
|
...s,
|
|
157
155
|
source: {
|
|
158
156
|
uri: r
|
|
159
157
|
},
|
|
160
|
-
...
|
|
161
|
-
style:
|
|
158
|
+
...c ? {
|
|
159
|
+
style: c
|
|
162
160
|
} : {}
|
|
163
161
|
// alt tas bort, finns inte i RN
|
|
164
162
|
};
|
|
165
163
|
}
|
|
166
|
-
function
|
|
164
|
+
function tn(t) {
|
|
167
165
|
const {
|
|
168
166
|
src: e,
|
|
169
167
|
alt: r,
|
|
@@ -176,7 +174,7 @@ function On(t) {
|
|
|
176
174
|
}
|
|
177
175
|
} : n;
|
|
178
176
|
}
|
|
179
|
-
const
|
|
177
|
+
const nn = {
|
|
180
178
|
div: "View",
|
|
181
179
|
span: "Text",
|
|
182
180
|
p: "Text",
|
|
@@ -206,7 +204,7 @@ const En = {
|
|
|
206
204
|
select: "Pressable",
|
|
207
205
|
option: "Text"
|
|
208
206
|
};
|
|
209
|
-
function
|
|
207
|
+
function rn(t, e) {
|
|
210
208
|
if (e === "web")
|
|
211
209
|
return t;
|
|
212
210
|
let r = null;
|
|
@@ -217,47 +215,47 @@ function An(t, e) {
|
|
|
217
215
|
}
|
|
218
216
|
if (!r)
|
|
219
217
|
return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`), "div";
|
|
220
|
-
const n =
|
|
218
|
+
const n = nn[t];
|
|
221
219
|
if (!n)
|
|
222
220
|
return console.warn(`No native component mapping found for '${t}', falling back to View`), r.View;
|
|
223
221
|
if (n === "Image") {
|
|
224
|
-
const
|
|
225
|
-
const
|
|
222
|
+
const i = Xt.forwardRef((s, a) => {
|
|
223
|
+
const c = $.c(5);
|
|
226
224
|
if (!s.src)
|
|
227
225
|
return null;
|
|
228
|
-
let
|
|
229
|
-
|
|
226
|
+
let u;
|
|
227
|
+
c[0] !== s ? (u = tn(s), c[0] = s, c[1] = u) : u = c[1];
|
|
230
228
|
let l;
|
|
231
|
-
return
|
|
229
|
+
return c[2] !== a || c[3] !== u ? (l = /* @__PURE__ */ D.jsx(r.Image, { ref: a, ...u }), c[2] = a, c[3] = u, c[4] = l) : l = c[4], l;
|
|
232
230
|
});
|
|
233
|
-
return
|
|
231
|
+
return i.displayName = "PlatformPrimitiveImage", i;
|
|
234
232
|
}
|
|
235
|
-
const
|
|
236
|
-
return
|
|
233
|
+
const o = r[n];
|
|
234
|
+
return o || (console.warn(`Native component '${n}' not found, falling back to View`), r.View);
|
|
237
235
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
236
|
+
const on = Symbol("radix.slottable");
|
|
237
|
+
function sn(...t) {
|
|
240
238
|
return (e) => t.forEach((r) => {
|
|
241
239
|
typeof r == "function" ? r(e) : r != null && (r.current = e);
|
|
242
240
|
});
|
|
243
241
|
}
|
|
244
|
-
function
|
|
242
|
+
function an(t, e) {
|
|
245
243
|
const r = {
|
|
246
244
|
...e
|
|
247
245
|
};
|
|
248
246
|
for (const n in e) {
|
|
249
|
-
const
|
|
250
|
-
/^on[A-Z]/.test(n) ?
|
|
251
|
-
const
|
|
252
|
-
return
|
|
253
|
-
} :
|
|
247
|
+
const o = t[n], i = e[n];
|
|
248
|
+
/^on[A-Z]/.test(n) ? o && i ? r[n] = (...a) => {
|
|
249
|
+
const c = i(...a);
|
|
250
|
+
return o(...a), c;
|
|
251
|
+
} : o && (r[n] = o) : n === "style" ? r[n] = cn(o, i) : n === "className" && (r[n] = [o, i].filter(Boolean).join(" "));
|
|
254
252
|
}
|
|
255
253
|
return {
|
|
256
254
|
...t,
|
|
257
255
|
...r
|
|
258
256
|
};
|
|
259
257
|
}
|
|
260
|
-
function
|
|
258
|
+
function cn(t, e) {
|
|
261
259
|
let r = null;
|
|
262
260
|
try {
|
|
263
261
|
r = require("react-native");
|
|
@@ -266,136 +264,136 @@ function Nn(t, e) {
|
|
|
266
264
|
}
|
|
267
265
|
const n = r?.StyleSheet?.flatten;
|
|
268
266
|
if (typeof t == "function" && typeof e == "function")
|
|
269
|
-
return (
|
|
270
|
-
const s = [t(
|
|
267
|
+
return (i) => {
|
|
268
|
+
const s = [t(i), e(i)];
|
|
271
269
|
return n ? n(s) : s;
|
|
272
270
|
};
|
|
273
271
|
if (typeof t == "function")
|
|
274
|
-
return (
|
|
275
|
-
const s = e ? [t(
|
|
272
|
+
return (i) => {
|
|
273
|
+
const s = e ? [t(i), e] : t(i);
|
|
276
274
|
return n ? n(s) : s;
|
|
277
275
|
};
|
|
278
276
|
if (typeof e == "function")
|
|
279
|
-
return (
|
|
280
|
-
const s = t ? [t, e(
|
|
277
|
+
return (i) => {
|
|
278
|
+
const s = t ? [t, e(i)] : e(i);
|
|
281
279
|
return n ? n(s) : s;
|
|
282
280
|
};
|
|
283
|
-
const
|
|
284
|
-
return n ? n(
|
|
281
|
+
const o = [t, e].filter(Boolean);
|
|
282
|
+
return n ? n(o) : o;
|
|
285
283
|
}
|
|
286
|
-
function
|
|
287
|
-
return E.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId ===
|
|
284
|
+
function un(t) {
|
|
285
|
+
return E.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === on;
|
|
288
286
|
}
|
|
289
|
-
function
|
|
287
|
+
function ln(t) {
|
|
290
288
|
let e = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
291
289
|
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);
|
|
292
290
|
}
|
|
293
|
-
function
|
|
294
|
-
const r = E.forwardRef((n,
|
|
291
|
+
function dn(t, e) {
|
|
292
|
+
const r = E.forwardRef((n, o) => {
|
|
295
293
|
const {
|
|
296
|
-
children:
|
|
294
|
+
children: i,
|
|
297
295
|
...s
|
|
298
296
|
} = n;
|
|
299
|
-
if (E.isValidElement(
|
|
300
|
-
const a =
|
|
301
|
-
return
|
|
297
|
+
if (E.isValidElement(i)) {
|
|
298
|
+
const a = ln(i), c = an(s, i.props);
|
|
299
|
+
return i.type !== E.Fragment && (c.ref = o ? sn(o, a) : a), E.cloneElement(i, c);
|
|
302
300
|
}
|
|
303
|
-
return E.Children.count(
|
|
301
|
+
return E.Children.count(i) > 1 ? E.Children.only(null) : null;
|
|
304
302
|
});
|
|
305
303
|
return r.displayName = `${t}.SlotClone`, r;
|
|
306
304
|
}
|
|
307
|
-
function
|
|
305
|
+
function he(t, e = !1, r = "div") {
|
|
308
306
|
if (!e)
|
|
309
|
-
return
|
|
310
|
-
const n =
|
|
311
|
-
const a =
|
|
312
|
-
let
|
|
313
|
-
a[0] !==
|
|
314
|
-
children:
|
|
315
|
-
...
|
|
316
|
-
} =
|
|
307
|
+
return rn(r, t);
|
|
308
|
+
const n = dn("Slot"), o = E.forwardRef((i, s) => {
|
|
309
|
+
const a = $.c(15);
|
|
310
|
+
let c, u;
|
|
311
|
+
a[0] !== i ? ({
|
|
312
|
+
children: c,
|
|
313
|
+
...u
|
|
314
|
+
} = i, a[0] = i, a[1] = c, a[2] = u) : (c = a[1], u = a[2]);
|
|
317
315
|
let l;
|
|
318
|
-
if (a[3] !==
|
|
316
|
+
if (a[3] !== c || a[4] !== s || a[5] !== u) {
|
|
319
317
|
l = Symbol.for("react.early_return_sentinel");
|
|
320
318
|
e: {
|
|
321
|
-
const p = E.Children.toArray(
|
|
319
|
+
const p = E.Children.toArray(c), y = p.find(un);
|
|
322
320
|
if (y) {
|
|
323
|
-
const m = y.props.children, g = p.map((
|
|
321
|
+
const m = y.props.children, g = p.map((S) => S === y ? E.Children.count(m) > 1 ? E.Children.only(null) : E.isValidElement(m) ? m.props.children : null : S), h = E.isValidElement(m) ? E.cloneElement(m, void 0, g) : null;
|
|
324
322
|
let w;
|
|
325
|
-
a[7] !== s || a[8] !==
|
|
323
|
+
a[7] !== s || a[8] !== u || a[9] !== h ? (w = /* @__PURE__ */ D.jsx(n, { ...u, ref: s, children: h }), a[7] = s, a[8] = u, a[9] = h, a[10] = w) : w = a[10], l = w;
|
|
326
324
|
break e;
|
|
327
325
|
}
|
|
328
326
|
}
|
|
329
|
-
a[3] =
|
|
327
|
+
a[3] = c, a[4] = s, a[5] = u, a[6] = l;
|
|
330
328
|
} else
|
|
331
329
|
l = a[6];
|
|
332
330
|
if (l !== Symbol.for("react.early_return_sentinel"))
|
|
333
331
|
return l;
|
|
334
332
|
let f;
|
|
335
|
-
return a[11] !==
|
|
333
|
+
return a[11] !== c || a[12] !== s || a[13] !== u ? (f = /* @__PURE__ */ D.jsx(n, { ...u, ref: s, children: c }), a[11] = c, a[12] = s, a[13] = u, a[14] = f) : f = a[14], f;
|
|
336
334
|
});
|
|
337
|
-
return
|
|
335
|
+
return o.displayName = "Slot", o;
|
|
338
336
|
}
|
|
339
|
-
const
|
|
337
|
+
const fn = "debug", R = () => {
|
|
340
338
|
try {
|
|
341
339
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
342
340
|
return !1;
|
|
343
|
-
const t = localStorage.getItem(
|
|
341
|
+
const t = localStorage.getItem(fn);
|
|
344
342
|
return t === "true" || t === "1";
|
|
345
343
|
} catch {
|
|
346
344
|
return !1;
|
|
347
345
|
}
|
|
348
|
-
},
|
|
346
|
+
}, pn = () => {
|
|
349
347
|
const t = (e, r, n = []) => r ? typeof e == "string" ? [`<${r}> ${e}`, ...n] : [`<${r}>`, e, ...n] : Array.isArray(e) ? [...e, ...n] : [e, ...n];
|
|
350
348
|
return {
|
|
351
349
|
log: (e, r, ...n) => {
|
|
352
|
-
|
|
350
|
+
R() && console.log(...t(e, r, n));
|
|
353
351
|
},
|
|
354
352
|
info: (e, r, ...n) => {
|
|
355
|
-
|
|
353
|
+
R() && console.info(...t(e, r, n));
|
|
356
354
|
},
|
|
357
355
|
warn: (e, r, ...n) => {
|
|
358
|
-
|
|
356
|
+
R() && console.warn(...t(e, r, n));
|
|
359
357
|
},
|
|
360
358
|
error: (e, r, ...n) => {
|
|
361
|
-
|
|
359
|
+
R() && console.error(...t(e, r, n));
|
|
362
360
|
},
|
|
363
361
|
debug: (e, r, ...n) => {
|
|
364
|
-
|
|
362
|
+
R() && console.debug(...t(e, r, n));
|
|
365
363
|
},
|
|
366
364
|
group: (e, r) => {
|
|
367
|
-
if (
|
|
365
|
+
if (R()) {
|
|
368
366
|
const n = typeof e == "string" ? e : void 0;
|
|
369
367
|
console.group(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
|
|
370
368
|
}
|
|
371
369
|
},
|
|
372
370
|
groupCollapsed: (e, r) => {
|
|
373
|
-
if (
|
|
371
|
+
if (R()) {
|
|
374
372
|
const n = typeof e == "string" ? e : void 0;
|
|
375
373
|
console.groupCollapsed(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
|
|
376
374
|
}
|
|
377
375
|
},
|
|
378
376
|
groupEnd: () => {
|
|
379
|
-
|
|
377
|
+
R() && console.groupEnd();
|
|
380
378
|
},
|
|
381
379
|
table: (e, r, n) => {
|
|
382
|
-
|
|
380
|
+
R() && (r && console.log(`<${r}>`), console.table(e, n));
|
|
383
381
|
},
|
|
384
382
|
time: (e, r) => {
|
|
385
|
-
if (
|
|
383
|
+
if (R()) {
|
|
386
384
|
const n = typeof e == "string" ? e : void 0;
|
|
387
385
|
console.time(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
|
|
388
386
|
}
|
|
389
387
|
},
|
|
390
388
|
timeEnd: (e, r) => {
|
|
391
|
-
if (
|
|
389
|
+
if (R()) {
|
|
392
390
|
const n = typeof e == "string" ? e : void 0;
|
|
393
391
|
console.timeEnd(r ? n ? `<${r}> ${n}` : `<${r}>` : n);
|
|
394
392
|
}
|
|
395
393
|
}
|
|
396
394
|
};
|
|
397
|
-
},
|
|
398
|
-
function
|
|
395
|
+
}, gt = pn();
|
|
396
|
+
function mn(t) {
|
|
399
397
|
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, r) {
|
|
400
398
|
var n = t.get(e);
|
|
401
399
|
n ? n.push(r) : t.set(e, [r]);
|
|
@@ -404,61 +402,61 @@ function Dn(t) {
|
|
|
404
402
|
n && (r ? n.splice(n.indexOf(r) >>> 0, 1) : t.set(e, []));
|
|
405
403
|
}, emit: function(e, r) {
|
|
406
404
|
var n = t.get(e);
|
|
407
|
-
n && n.slice().map(function(
|
|
408
|
-
|
|
409
|
-
}), (n = t.get("*")) && n.slice().map(function(
|
|
410
|
-
|
|
405
|
+
n && n.slice().map(function(o) {
|
|
406
|
+
o(r);
|
|
407
|
+
}), (n = t.get("*")) && n.slice().map(function(o) {
|
|
408
|
+
o(e, r);
|
|
411
409
|
});
|
|
412
410
|
} };
|
|
413
411
|
}
|
|
414
|
-
let
|
|
412
|
+
let z;
|
|
415
413
|
try {
|
|
416
|
-
|
|
414
|
+
z = require("@react-native-async-storage/async-storage").default;
|
|
417
415
|
} catch {
|
|
418
|
-
|
|
416
|
+
z = null;
|
|
419
417
|
}
|
|
420
|
-
const
|
|
421
|
-
getItem: async (t) =>
|
|
418
|
+
const ke = typeof window < "u" && typeof window.localStorage < "u", Ne = !!z, Re = {}, oe = {}, F = {
|
|
419
|
+
getItem: async (t) => Ne ? z.getItem(t) : ke ? new Promise((e) => {
|
|
422
420
|
Promise.resolve().then(() => {
|
|
423
|
-
const r = window.localStorage.getItem(t), n =
|
|
424
|
-
r !== n && (
|
|
421
|
+
const r = window.localStorage.getItem(t), n = oe[t];
|
|
422
|
+
r !== n && (oe[t] = r || ""), e(r);
|
|
425
423
|
});
|
|
426
|
-
}) :
|
|
424
|
+
}) : Re[t] || null,
|
|
427
425
|
setItem: async (t, e) => {
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
430
|
-
if (
|
|
426
|
+
if (Ne)
|
|
427
|
+
return z.setItem(t, e);
|
|
428
|
+
if (ke)
|
|
431
429
|
return new Promise((r, n) => {
|
|
432
430
|
Promise.resolve().then(() => {
|
|
433
431
|
try {
|
|
434
432
|
window.localStorage.setItem(t, e);
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
} catch (
|
|
438
|
-
n(
|
|
433
|
+
const o = window.localStorage.getItem(t);
|
|
434
|
+
o === e ? (oe[t] = e, r()) : n(new Error(`Failed to set localStorage item: expected "${e}", got "${o}"`));
|
|
435
|
+
} catch (o) {
|
|
436
|
+
n(o);
|
|
439
437
|
}
|
|
440
438
|
});
|
|
441
439
|
});
|
|
442
|
-
|
|
440
|
+
Re[t] = e;
|
|
443
441
|
},
|
|
444
442
|
removeItem: async (t) => {
|
|
445
|
-
if (
|
|
446
|
-
return
|
|
447
|
-
if (
|
|
443
|
+
if (Ne)
|
|
444
|
+
return z.removeItem(t);
|
|
445
|
+
if (ke)
|
|
448
446
|
return new Promise((e, r) => {
|
|
449
447
|
Promise.resolve().then(() => {
|
|
450
448
|
try {
|
|
451
449
|
window.localStorage.removeItem(t);
|
|
452
450
|
const n = window.localStorage.getItem(t);
|
|
453
|
-
n === null ? (delete
|
|
451
|
+
n === null ? (delete oe[t], e()) : r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${n}"`));
|
|
454
452
|
} catch (n) {
|
|
455
453
|
r(n);
|
|
456
454
|
}
|
|
457
455
|
});
|
|
458
456
|
});
|
|
459
|
-
delete
|
|
457
|
+
delete Re[t];
|
|
460
458
|
}
|
|
461
|
-
},
|
|
459
|
+
}, Ve = 50, j = {
|
|
462
460
|
get: async () => {
|
|
463
461
|
try {
|
|
464
462
|
const t = await F.getItem("eventHistory");
|
|
@@ -469,7 +467,7 @@ const De = typeof window < "u" && typeof window.localStorage < "u", xe = !!K, Fe
|
|
|
469
467
|
},
|
|
470
468
|
set: async (t) => {
|
|
471
469
|
try {
|
|
472
|
-
await F.setItem("eventHistory", JSON.stringify(t.slice(-
|
|
470
|
+
await F.setItem("eventHistory", JSON.stringify(t.slice(-Ve)));
|
|
473
471
|
} catch (e) {
|
|
474
472
|
console.error("Error setting event history", e);
|
|
475
473
|
}
|
|
@@ -482,32 +480,32 @@ const De = typeof window < "u" && typeof window.localStorage < "u", xe = !!K, Fe
|
|
|
482
480
|
}
|
|
483
481
|
},
|
|
484
482
|
push: async (t) => {
|
|
485
|
-
const e = await
|
|
486
|
-
await
|
|
483
|
+
const e = await j.get();
|
|
484
|
+
await j.set([{
|
|
487
485
|
...t,
|
|
488
486
|
timestamp: Date.now()
|
|
489
|
-
}, ...e].slice(-
|
|
487
|
+
}, ...e].slice(-Ve));
|
|
490
488
|
},
|
|
491
|
-
find: async (t) => (await
|
|
489
|
+
find: async (t) => (await j.get()).find((r) => r.key === t.key && r.identifier === t.identifier),
|
|
492
490
|
filter: async (t, e) => {
|
|
493
|
-
const r = await
|
|
491
|
+
const r = await j.get();
|
|
494
492
|
return e ? r.filter(e) : r.filter(({
|
|
495
493
|
key: n,
|
|
496
|
-
identifier:
|
|
497
|
-
}) => (!n || t.key === n) && (!
|
|
494
|
+
identifier: o
|
|
495
|
+
}) => (!n || t.key === n) && (!o || t.identifier === o));
|
|
498
496
|
}
|
|
499
497
|
};
|
|
500
|
-
function
|
|
498
|
+
function hn() {
|
|
501
499
|
const t = globalThis;
|
|
502
|
-
return t.__HAUS_EVENT_EMITTER__ ||=
|
|
500
|
+
return t.__HAUS_EVENT_EMITTER__ ||= mn(), t.__HAUS_EVENT_EMITTER__;
|
|
503
501
|
}
|
|
504
|
-
function
|
|
505
|
-
const e =
|
|
506
|
-
|
|
507
|
-
const l =
|
|
508
|
-
l && l < Date.now() - 1e3 * 60 * 60 && (
|
|
502
|
+
function L(t) {
|
|
503
|
+
const e = hn(), r = (...c) => console.error(...c);
|
|
504
|
+
j.get().then((c) => {
|
|
505
|
+
const l = Be.first(c)?.timestamp;
|
|
506
|
+
l && l < Date.now() - 1e3 * 60 * 60 && (gt.info("Clearing event history since it is older than 1 hour:", "eventBus", l), j.clear());
|
|
509
507
|
});
|
|
510
|
-
const n = (
|
|
508
|
+
const n = (c, u, l) => {
|
|
511
509
|
const f = (p) => {
|
|
512
510
|
try {
|
|
513
511
|
if (typeof p == "object" && p !== null) {
|
|
@@ -515,31 +513,31 @@ function W(t) {
|
|
|
515
513
|
identifier: y,
|
|
516
514
|
data: m
|
|
517
515
|
} = p;
|
|
518
|
-
(!y || y === l) &&
|
|
516
|
+
(!y || y === l) && u(m);
|
|
519
517
|
} else
|
|
520
|
-
|
|
518
|
+
u(p);
|
|
521
519
|
} catch (y) {
|
|
522
520
|
r(y);
|
|
523
521
|
}
|
|
524
522
|
};
|
|
525
|
-
return e.on(
|
|
526
|
-
|
|
523
|
+
return e.on(c, f), () => {
|
|
524
|
+
o(c, u, l);
|
|
527
525
|
};
|
|
528
|
-
},
|
|
526
|
+
}, o = (c, u, l) => {
|
|
529
527
|
const f = (p) => {
|
|
530
528
|
if (typeof p == "object" && p !== null) {
|
|
531
529
|
const {
|
|
532
530
|
identifier: y
|
|
533
531
|
} = p;
|
|
534
|
-
(!y || y === l) && e.off(
|
|
532
|
+
(!y || y === l) && e.off(c, u);
|
|
535
533
|
}
|
|
536
534
|
};
|
|
537
|
-
e.off(
|
|
535
|
+
e.off(c, f);
|
|
538
536
|
};
|
|
539
537
|
return {
|
|
540
538
|
on: n,
|
|
541
|
-
off:
|
|
542
|
-
once: (
|
|
539
|
+
off: o,
|
|
540
|
+
once: (c, u, l) => {
|
|
543
541
|
const f = (p) => {
|
|
544
542
|
try {
|
|
545
543
|
if (typeof p == "object" && p !== null) {
|
|
@@ -547,515 +545,159 @@ function W(t) {
|
|
|
547
545
|
identifier: y,
|
|
548
546
|
data: m
|
|
549
547
|
} = p;
|
|
550
|
-
(!y || y === l) &&
|
|
548
|
+
(!y || y === l) && u(m);
|
|
551
549
|
} else
|
|
552
|
-
|
|
550
|
+
u(p);
|
|
553
551
|
} finally {
|
|
554
|
-
|
|
552
|
+
o(c, f, l);
|
|
555
553
|
}
|
|
556
554
|
};
|
|
557
|
-
e.on(
|
|
555
|
+
e.on(c, f);
|
|
558
556
|
},
|
|
559
|
-
emit: (
|
|
557
|
+
emit: (c, u, ...l) => {
|
|
560
558
|
const f = {
|
|
561
|
-
identifier:
|
|
559
|
+
identifier: u,
|
|
562
560
|
data: l.length === 1 ? l[0] : l
|
|
563
561
|
};
|
|
564
|
-
|
|
565
|
-
key:
|
|
566
|
-
identifier:
|
|
562
|
+
j.push({
|
|
563
|
+
key: c,
|
|
564
|
+
identifier: u,
|
|
567
565
|
payload: f.data
|
|
568
|
-
}), e.emit(
|
|
566
|
+
}), e.emit(c, f);
|
|
569
567
|
},
|
|
570
|
-
getEventHistory: (
|
|
571
|
-
key:
|
|
572
|
-
identifier:
|
|
568
|
+
getEventHistory: (c, u) => j.filter({
|
|
569
|
+
key: c,
|
|
570
|
+
identifier: u
|
|
573
571
|
})
|
|
574
572
|
};
|
|
575
573
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
function He(t) {
|
|
586
|
-
"@babel/helpers - typeof";
|
|
587
|
-
return He = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
588
|
-
return typeof e;
|
|
589
|
-
} : function(e) {
|
|
590
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
591
|
-
}, He(t);
|
|
592
|
-
}
|
|
593
|
-
function Ft() {
|
|
594
|
-
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : He(XMLHttpRequest)) === "object";
|
|
595
|
-
}
|
|
596
|
-
function Fn(t) {
|
|
597
|
-
return !!t && typeof t.then == "function";
|
|
598
|
-
}
|
|
599
|
-
function Mn(t) {
|
|
600
|
-
return Fn(t) ? t : Promise.resolve(t);
|
|
601
|
-
}
|
|
602
|
-
function st(t, e) {
|
|
603
|
-
var r = Object.keys(t);
|
|
604
|
-
if (Object.getOwnPropertySymbols) {
|
|
605
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
606
|
-
e && (n = n.filter(function(i) {
|
|
607
|
-
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
608
|
-
})), r.push.apply(r, n);
|
|
609
|
-
}
|
|
610
|
-
return r;
|
|
611
|
-
}
|
|
612
|
-
function at(t) {
|
|
613
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
614
|
-
var r = arguments[e] != null ? arguments[e] : {};
|
|
615
|
-
e % 2 ? st(Object(r), !0).forEach(function(n) {
|
|
616
|
-
In(t, n, r[n]);
|
|
617
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : st(Object(r)).forEach(function(n) {
|
|
618
|
-
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
return t;
|
|
622
|
-
}
|
|
623
|
-
function In(t, e, r) {
|
|
624
|
-
return (e = Bn(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
625
|
-
}
|
|
626
|
-
function Bn(t) {
|
|
627
|
-
var e = Un(t, "string");
|
|
628
|
-
return $(e) == "symbol" ? e : e + "";
|
|
629
|
-
}
|
|
630
|
-
function Un(t, e) {
|
|
631
|
-
if ($(t) != "object" || !t) return t;
|
|
632
|
-
var r = t[Symbol.toPrimitive];
|
|
633
|
-
if (r !== void 0) {
|
|
634
|
-
var n = r.call(t, e);
|
|
635
|
-
if ($(n) != "object") return n;
|
|
636
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
637
|
-
}
|
|
638
|
-
return (e === "string" ? String : Number)(t);
|
|
639
|
-
}
|
|
640
|
-
function $(t) {
|
|
641
|
-
"@babel/helpers - typeof";
|
|
642
|
-
return $ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
643
|
-
return typeof e;
|
|
644
|
-
} : function(e) {
|
|
645
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
646
|
-
}, $(t);
|
|
647
|
-
}
|
|
648
|
-
var I = typeof fetch == "function" ? fetch : void 0;
|
|
649
|
-
typeof global < "u" && global.fetch ? I = global.fetch : typeof window < "u" && window.fetch && (I = window.fetch);
|
|
650
|
-
var ne;
|
|
651
|
-
Ft() && (typeof global < "u" && global.XMLHttpRequest ? ne = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (ne = window.XMLHttpRequest));
|
|
652
|
-
var we;
|
|
653
|
-
typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? we = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (we = window.ActiveXObject));
|
|
654
|
-
typeof I != "function" && (I = void 0);
|
|
655
|
-
if (!I && !ne && !we)
|
|
656
|
-
try {
|
|
657
|
-
import("./browser-ponyfill-DYgay_ta.mjs").then((t) => t.b).then(function(t) {
|
|
658
|
-
I = t.default;
|
|
659
|
-
}).catch(function() {
|
|
660
|
-
});
|
|
661
|
-
} catch {
|
|
662
|
-
}
|
|
663
|
-
var Ve = function(e, r) {
|
|
664
|
-
if (r && $(r) === "object") {
|
|
665
|
-
var n = "";
|
|
666
|
-
for (var i in r)
|
|
667
|
-
n += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(r[i]);
|
|
668
|
-
if (!n) return e;
|
|
669
|
-
e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1);
|
|
670
|
-
}
|
|
671
|
-
return e;
|
|
672
|
-
}, ut = function(e, r, n, i) {
|
|
673
|
-
var o = function(u) {
|
|
674
|
-
if (!u.ok) return n(u.statusText || "Error", {
|
|
675
|
-
status: u.status
|
|
676
|
-
});
|
|
677
|
-
u.text().then(function(c) {
|
|
678
|
-
n(null, {
|
|
679
|
-
status: u.status,
|
|
680
|
-
data: c
|
|
681
|
-
});
|
|
682
|
-
}).catch(n);
|
|
683
|
-
};
|
|
684
|
-
if (i) {
|
|
685
|
-
var s = i(e, r);
|
|
686
|
-
if (s instanceof Promise) {
|
|
687
|
-
s.then(o).catch(n);
|
|
688
|
-
return;
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
typeof fetch == "function" ? fetch(e, r).then(o).catch(n) : I(e, r).then(o).catch(n);
|
|
692
|
-
}, ct = !1, Ln = function(e, r, n, i) {
|
|
693
|
-
e.queryStringParams && (r = Ve(r, e.queryStringParams));
|
|
694
|
-
var o = at({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
|
|
695
|
-
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");
|
|
696
|
-
var s = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, a = at({
|
|
697
|
-
method: n ? "POST" : "GET",
|
|
698
|
-
body: n ? e.stringify(n) : void 0,
|
|
699
|
-
headers: o
|
|
700
|
-
}, ct ? {} : s), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
|
|
701
|
-
try {
|
|
702
|
-
ut(r, a, i, u);
|
|
703
|
-
} catch (c) {
|
|
704
|
-
if (!s || Object.keys(s).length === 0 || !c.message || c.message.indexOf("not implemented") < 0)
|
|
705
|
-
return i(c);
|
|
706
|
-
try {
|
|
707
|
-
Object.keys(s).forEach(function(l) {
|
|
708
|
-
delete a[l];
|
|
709
|
-
}), ut(r, a, i, u), ct = !0;
|
|
710
|
-
} catch (l) {
|
|
711
|
-
i(l);
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
}, $n = function(e, r, n, i) {
|
|
715
|
-
n && $(n) === "object" && (n = Ve("", n).slice(1)), e.queryStringParams && (r = Ve(r, e.queryStringParams));
|
|
716
|
-
try {
|
|
717
|
-
var o = ne ? new ne() : new we("MSXML2.XMLHTTP.3.0");
|
|
718
|
-
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");
|
|
719
|
-
var s = e.customHeaders;
|
|
720
|
-
if (s = typeof s == "function" ? s() : s, s)
|
|
721
|
-
for (var a in s)
|
|
722
|
-
o.setRequestHeader(a, s[a]);
|
|
723
|
-
o.onreadystatechange = function() {
|
|
724
|
-
o.readyState > 3 && i(o.status >= 400 ? o.statusText : null, {
|
|
725
|
-
status: o.status,
|
|
726
|
-
data: o.responseText
|
|
727
|
-
});
|
|
728
|
-
}, o.send(n);
|
|
729
|
-
} catch (u) {
|
|
730
|
-
console && console.log(u);
|
|
731
|
-
}
|
|
732
|
-
}, Hn = function(e, r, n, i) {
|
|
733
|
-
if (typeof n == "function" && (i = n, n = void 0), i = i || function() {
|
|
734
|
-
}, I && r.indexOf("file:") !== 0)
|
|
735
|
-
return Ln(e, r, n, i);
|
|
736
|
-
if (Ft() || typeof ActiveXObject == "function")
|
|
737
|
-
return $n(e, r, n, i);
|
|
738
|
-
i(new Error("No fetch and no xhr implementation found!"));
|
|
739
|
-
};
|
|
740
|
-
function G(t) {
|
|
741
|
-
"@babel/helpers - typeof";
|
|
742
|
-
return G = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
743
|
-
return typeof e;
|
|
744
|
-
} : function(e) {
|
|
745
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
746
|
-
}, G(t);
|
|
747
|
-
}
|
|
748
|
-
function lt(t, e) {
|
|
749
|
-
var r = Object.keys(t);
|
|
750
|
-
if (Object.getOwnPropertySymbols) {
|
|
751
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
752
|
-
e && (n = n.filter(function(i) {
|
|
753
|
-
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
754
|
-
})), r.push.apply(r, n);
|
|
755
|
-
}
|
|
756
|
-
return r;
|
|
757
|
-
}
|
|
758
|
-
function Ie(t) {
|
|
759
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
760
|
-
var r = arguments[e] != null ? arguments[e] : {};
|
|
761
|
-
e % 2 ? lt(Object(r), !0).forEach(function(n) {
|
|
762
|
-
Mt(t, n, r[n]);
|
|
763
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : lt(Object(r)).forEach(function(n) {
|
|
764
|
-
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
return t;
|
|
768
|
-
}
|
|
769
|
-
function Vn(t, e) {
|
|
770
|
-
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
771
|
-
}
|
|
772
|
-
function Wn(t, e) {
|
|
773
|
-
for (var r = 0; r < e.length; r++) {
|
|
774
|
-
var n = e[r];
|
|
775
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, It(n.key), n);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
function Xn(t, e, r) {
|
|
779
|
-
return e && Wn(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
780
|
-
}
|
|
781
|
-
function Mt(t, e, r) {
|
|
782
|
-
return (e = It(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
783
|
-
}
|
|
784
|
-
function It(t) {
|
|
785
|
-
var e = zn(t, "string");
|
|
786
|
-
return G(e) == "symbol" ? e : e + "";
|
|
787
|
-
}
|
|
788
|
-
function zn(t, e) {
|
|
789
|
-
if (G(t) != "object" || !t) return t;
|
|
790
|
-
var r = t[Symbol.toPrimitive];
|
|
791
|
-
if (r !== void 0) {
|
|
792
|
-
var n = r.call(t, e);
|
|
793
|
-
if (G(n) != "object") return n;
|
|
794
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
795
|
-
}
|
|
796
|
-
return String(t);
|
|
797
|
-
}
|
|
798
|
-
var Jn = function() {
|
|
799
|
-
return {
|
|
800
|
-
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
801
|
-
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
802
|
-
parse: function(r) {
|
|
803
|
-
return JSON.parse(r);
|
|
804
|
-
},
|
|
805
|
-
stringify: JSON.stringify,
|
|
806
|
-
parsePayload: function(r, n, i) {
|
|
807
|
-
return Mt({}, n, i || "");
|
|
808
|
-
},
|
|
809
|
-
parseLoadPayload: function(r, n) {
|
|
810
|
-
},
|
|
811
|
-
request: Hn,
|
|
812
|
-
reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
|
|
813
|
-
customHeaders: {},
|
|
814
|
-
queryStringParams: {},
|
|
815
|
-
crossDomain: !1,
|
|
816
|
-
withCredentials: !1,
|
|
817
|
-
overrideMimeType: !1,
|
|
818
|
-
requestOptions: {
|
|
819
|
-
mode: "cors",
|
|
820
|
-
credentials: "same-origin",
|
|
821
|
-
cache: "default"
|
|
822
|
-
}
|
|
823
|
-
};
|
|
824
|
-
}, Kn = function() {
|
|
825
|
-
function t(e) {
|
|
826
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
827
|
-
Vn(this, t), this.services = e, this.options = r, this.allOptions = n, this.type = "backend", this.init(e, r, n);
|
|
828
|
-
}
|
|
829
|
-
return Xn(t, [{
|
|
830
|
-
key: "init",
|
|
831
|
-
value: function(r) {
|
|
832
|
-
var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
833
|
-
if (this.services = r, this.options = Ie(Ie(Ie({}, Jn()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
|
|
834
|
-
var s = setInterval(function() {
|
|
835
|
-
return n.reload();
|
|
836
|
-
}, this.options.reloadInterval);
|
|
837
|
-
G(s) === "object" && typeof s.unref == "function" && s.unref();
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
}, {
|
|
841
|
-
key: "readMulti",
|
|
842
|
-
value: function(r, n, i) {
|
|
843
|
-
this._readAny(r, r, n, n, i);
|
|
844
|
-
}
|
|
845
|
-
}, {
|
|
846
|
-
key: "read",
|
|
847
|
-
value: function(r, n, i) {
|
|
848
|
-
this._readAny([r], r, [n], n, i);
|
|
849
|
-
}
|
|
850
|
-
}, {
|
|
851
|
-
key: "_readAny",
|
|
852
|
-
value: function(r, n, i, o, s) {
|
|
853
|
-
var a = this, u = this.options.loadPath;
|
|
854
|
-
typeof this.options.loadPath == "function" && (u = this.options.loadPath(r, i)), u = Mn(u), u.then(function(c) {
|
|
855
|
-
if (!c) return s(null, {});
|
|
856
|
-
var l = a.services.interpolator.interpolate(c, {
|
|
857
|
-
lng: r.join("+"),
|
|
858
|
-
ns: i.join("+")
|
|
859
|
-
});
|
|
860
|
-
a.loadUrl(l, s, n, o);
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
}, {
|
|
864
|
-
key: "loadUrl",
|
|
865
|
-
value: function(r, n, i, o) {
|
|
866
|
-
var s = this, a = typeof i == "string" ? [i] : i, u = typeof o == "string" ? [o] : o, c = this.options.parseLoadPayload(a, u);
|
|
867
|
-
this.options.request(this.options, r, c, function(l, f) {
|
|
868
|
-
if (f && (f.status >= 500 && f.status < 600 || !f.status)) return n("failed loading " + r + "; status code: " + f.status, !0);
|
|
869
|
-
if (f && f.status >= 400 && f.status < 500) return n("failed loading " + r + "; status code: " + f.status, !1);
|
|
870
|
-
if (!f && l && l.message) {
|
|
871
|
-
var p = l.message.toLowerCase(), y = ["failed", "fetch", "network", "load"].find(function(h) {
|
|
872
|
-
return p.indexOf(h) > -1;
|
|
873
|
-
});
|
|
874
|
-
if (y)
|
|
875
|
-
return n("failed loading " + r + ": " + l.message, !0);
|
|
876
|
-
}
|
|
877
|
-
if (l) return n(l, !1);
|
|
878
|
-
var m, g;
|
|
879
|
-
try {
|
|
880
|
-
typeof f.data == "string" ? m = s.options.parse(f.data, i, o) : m = f.data;
|
|
881
|
-
} catch {
|
|
882
|
-
g = "failed parsing " + r + " to json";
|
|
883
|
-
}
|
|
884
|
-
if (g) return n(g, !1);
|
|
885
|
-
n(null, m);
|
|
886
|
-
});
|
|
887
|
-
}
|
|
888
|
-
}, {
|
|
889
|
-
key: "create",
|
|
890
|
-
value: function(r, n, i, o, s) {
|
|
891
|
-
var a = this;
|
|
892
|
-
if (this.options.addPath) {
|
|
893
|
-
typeof r == "string" && (r = [r]);
|
|
894
|
-
var u = this.options.parsePayload(n, i, o), c = 0, l = [], f = [];
|
|
895
|
-
r.forEach(function(p) {
|
|
896
|
-
var y = a.options.addPath;
|
|
897
|
-
typeof a.options.addPath == "function" && (y = a.options.addPath(p, n));
|
|
898
|
-
var m = a.services.interpolator.interpolate(y, {
|
|
899
|
-
lng: p,
|
|
900
|
-
ns: n
|
|
901
|
-
});
|
|
902
|
-
a.options.request(a.options, m, u, function(g, h) {
|
|
903
|
-
c += 1, l.push(g), f.push(h), c === r.length && typeof s == "function" && s(l, f);
|
|
904
|
-
});
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
}, {
|
|
909
|
-
key: "reload",
|
|
910
|
-
value: function() {
|
|
911
|
-
var r = this, n = this.services, i = n.backendConnector, o = n.languageUtils, s = n.logger, a = i.language;
|
|
912
|
-
if (!(a && a.toLowerCase() === "cimode")) {
|
|
913
|
-
var u = [], c = function(f) {
|
|
914
|
-
var p = o.toResolveHierarchy(f);
|
|
915
|
-
p.forEach(function(y) {
|
|
916
|
-
u.indexOf(y) < 0 && u.push(y);
|
|
917
|
-
});
|
|
918
|
-
};
|
|
919
|
-
c(a), this.allOptions.preload && this.allOptions.preload.forEach(function(l) {
|
|
920
|
-
return c(l);
|
|
921
|
-
}), u.forEach(function(l) {
|
|
922
|
-
r.allOptions.ns.forEach(function(f) {
|
|
923
|
-
i.read(l, f, "read", null, null, function(p, y) {
|
|
924
|
-
p && s.warn("loading namespace ".concat(f, " for language ").concat(l, " failed"), p), !p && y && s.log("loaded namespace ".concat(f, " for language ").concat(l), y), i.loaded("".concat(l, "|").concat(f), p, y);
|
|
925
|
-
});
|
|
926
|
-
});
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
}]);
|
|
931
|
-
}();
|
|
932
|
-
Kn.type = "backend";
|
|
933
|
-
let We;
|
|
934
|
-
typeof window < "u" ? (window.__STORE_SDK_CONTEXT__ || (window.__STORE_SDK_CONTEXT__ = be(void 0)), We = window.__STORE_SDK_CONTEXT__) : We = be(void 0);
|
|
935
|
-
const Qn = () => {
|
|
936
|
-
const t = bn(We);
|
|
937
|
-
return t || console.error("You must wrap your component in a <DataProvider>"), t?.sdkType === "dummy" || t?.sdkType === "vendure", t;
|
|
938
|
-
};
|
|
939
|
-
new $e();
|
|
940
|
-
function Bt(t, e) {
|
|
574
|
+
L();
|
|
575
|
+
L();
|
|
576
|
+
L();
|
|
577
|
+
L();
|
|
578
|
+
L();
|
|
579
|
+
L();
|
|
580
|
+
L();
|
|
581
|
+
new yt();
|
|
582
|
+
function bt(t, e) {
|
|
941
583
|
return function() {
|
|
942
584
|
return t.apply(e, arguments);
|
|
943
585
|
};
|
|
944
586
|
}
|
|
945
|
-
const { toString:
|
|
946
|
-
const r =
|
|
587
|
+
const { toString: yn } = Object.prototype, { getPrototypeOf: Ie } = Object, { iterator: ye, toStringTag: wt } = Symbol, ge = /* @__PURE__ */ ((t) => (e) => {
|
|
588
|
+
const r = yn.call(e);
|
|
947
589
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
948
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
949
|
-
function
|
|
950
|
-
return t !== null && !
|
|
590
|
+
})(/* @__PURE__ */ Object.create(null)), P = (t) => (t = t.toLowerCase(), (e) => ge(e) === t), be = (t) => (e) => typeof e === t, { isArray: Q } = Array, Y = be("undefined");
|
|
591
|
+
function gn(t) {
|
|
592
|
+
return t !== null && !Y(t) && t.constructor !== null && !Y(t.constructor) && k(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
951
593
|
}
|
|
952
|
-
const
|
|
953
|
-
function
|
|
594
|
+
const St = P("ArrayBuffer");
|
|
595
|
+
function bn(t) {
|
|
954
596
|
let e;
|
|
955
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
597
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && St(t.buffer), e;
|
|
956
598
|
}
|
|
957
|
-
const
|
|
958
|
-
if (
|
|
599
|
+
const wn = be("string"), k = be("function"), vt = be("number"), we = (t) => t !== null && typeof t == "object", Sn = (t) => t === !0 || t === !1, le = (t) => {
|
|
600
|
+
if (ge(t) !== "object")
|
|
959
601
|
return !1;
|
|
960
|
-
const e =
|
|
961
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
962
|
-
},
|
|
602
|
+
const e = Ie(t);
|
|
603
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(wt in t) && !(ye in t);
|
|
604
|
+
}, vn = P("Date"), An = P("File"), En = P("Blob"), Tn = P("FileList"), On = (t) => we(t) && k(t.pipe), kn = (t) => {
|
|
963
605
|
let e;
|
|
964
|
-
return t && (typeof FormData == "function" && t instanceof FormData ||
|
|
965
|
-
e === "object" &&
|
|
966
|
-
},
|
|
967
|
-
function
|
|
606
|
+
return t && (typeof FormData == "function" && t instanceof FormData || k(t.append) && ((e = ge(t)) === "formdata" || // detect form-data instance
|
|
607
|
+
e === "object" && k(t.toString) && t.toString() === "[object FormData]"));
|
|
608
|
+
}, Nn = P("URLSearchParams"), [Rn, _n, Pn, xn] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Cn = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
609
|
+
function Z(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
968
610
|
if (t === null || typeof t > "u")
|
|
969
611
|
return;
|
|
970
|
-
let n,
|
|
971
|
-
if (typeof t != "object" && (t = [t]),
|
|
972
|
-
for (n = 0,
|
|
612
|
+
let n, o;
|
|
613
|
+
if (typeof t != "object" && (t = [t]), Q(t))
|
|
614
|
+
for (n = 0, o = t.length; n < o; n++)
|
|
973
615
|
e.call(null, t[n], n, t);
|
|
974
616
|
else {
|
|
975
|
-
const
|
|
617
|
+
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), s = i.length;
|
|
976
618
|
let a;
|
|
977
619
|
for (n = 0; n < s; n++)
|
|
978
|
-
a =
|
|
620
|
+
a = i[n], e.call(null, t[a], a, t);
|
|
979
621
|
}
|
|
980
622
|
}
|
|
981
|
-
function
|
|
623
|
+
function At(t, e) {
|
|
982
624
|
e = e.toLowerCase();
|
|
983
625
|
const r = Object.keys(t);
|
|
984
|
-
let n = r.length,
|
|
626
|
+
let n = r.length, o;
|
|
985
627
|
for (; n-- > 0; )
|
|
986
|
-
if (
|
|
987
|
-
return
|
|
628
|
+
if (o = r[n], e === o.toLowerCase())
|
|
629
|
+
return o;
|
|
988
630
|
return null;
|
|
989
631
|
}
|
|
990
|
-
const
|
|
991
|
-
function
|
|
992
|
-
const { caseless: t } =
|
|
993
|
-
const
|
|
994
|
-
|
|
632
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Et = (t) => !Y(t) && t !== B;
|
|
633
|
+
function Ce() {
|
|
634
|
+
const { caseless: t } = Et(this) && this || {}, e = {}, r = (n, o) => {
|
|
635
|
+
const i = t && At(e, o) || o;
|
|
636
|
+
le(e[i]) && le(n) ? e[i] = Ce(e[i], n) : le(n) ? e[i] = Ce({}, n) : Q(n) ? e[i] = n.slice() : e[i] = n;
|
|
995
637
|
};
|
|
996
|
-
for (let n = 0,
|
|
997
|
-
arguments[n] &&
|
|
638
|
+
for (let n = 0, o = arguments.length; n < o; n++)
|
|
639
|
+
arguments[n] && Z(arguments[n], r);
|
|
998
640
|
return e;
|
|
999
641
|
}
|
|
1000
|
-
const
|
|
1001
|
-
r &&
|
|
1002
|
-
}, { allOwnKeys: n }), t),
|
|
642
|
+
const Dn = (t, e, r, { allOwnKeys: n } = {}) => (Z(e, (o, i) => {
|
|
643
|
+
r && k(o) ? t[i] = bt(o, r) : t[i] = o;
|
|
644
|
+
}, { allOwnKeys: n }), t), qn = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Fn = (t, e, r, n) => {
|
|
1003
645
|
t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
1004
646
|
value: e.prototype
|
|
1005
647
|
}), r && Object.assign(t.prototype, r);
|
|
1006
|
-
},
|
|
1007
|
-
let
|
|
648
|
+
}, jn = (t, e, r, n) => {
|
|
649
|
+
let o, i, s;
|
|
1008
650
|
const a = {};
|
|
1009
651
|
if (e = e || {}, t == null) return e;
|
|
1010
652
|
do {
|
|
1011
|
-
for (
|
|
1012
|
-
s = i
|
|
1013
|
-
t = r !== !1 &&
|
|
653
|
+
for (o = Object.getOwnPropertyNames(t), i = o.length; i-- > 0; )
|
|
654
|
+
s = o[i], (!n || n(s, t, e)) && !a[s] && (e[s] = t[s], a[s] = !0);
|
|
655
|
+
t = r !== !1 && Ie(t);
|
|
1014
656
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
1015
657
|
return e;
|
|
1016
|
-
},
|
|
658
|
+
}, Mn = (t, e, r) => {
|
|
1017
659
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
1018
660
|
const n = t.indexOf(e, r);
|
|
1019
661
|
return n !== -1 && n === r;
|
|
1020
|
-
},
|
|
662
|
+
}, Bn = (t) => {
|
|
1021
663
|
if (!t) return null;
|
|
1022
|
-
if (
|
|
664
|
+
if (Q(t)) return t;
|
|
1023
665
|
let e = t.length;
|
|
1024
|
-
if (
|
|
666
|
+
if (!vt(e)) return null;
|
|
1025
667
|
const r = new Array(e);
|
|
1026
668
|
for (; e-- > 0; )
|
|
1027
669
|
r[e] = t[e];
|
|
1028
670
|
return r;
|
|
1029
|
-
},
|
|
1030
|
-
const n = (t && t[
|
|
1031
|
-
let
|
|
1032
|
-
for (; (
|
|
1033
|
-
const
|
|
1034
|
-
e.call(t,
|
|
671
|
+
}, In = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Ie(Uint8Array)), Un = (t, e) => {
|
|
672
|
+
const n = (t && t[ye]).call(t);
|
|
673
|
+
let o;
|
|
674
|
+
for (; (o = n.next()) && !o.done; ) {
|
|
675
|
+
const i = o.value;
|
|
676
|
+
e.call(t, i[0], i[1]);
|
|
1035
677
|
}
|
|
1036
|
-
},
|
|
678
|
+
}, $n = (t, e) => {
|
|
1037
679
|
let r;
|
|
1038
680
|
const n = [];
|
|
1039
681
|
for (; (r = t.exec(e)) !== null; )
|
|
1040
682
|
n.push(r);
|
|
1041
683
|
return n;
|
|
1042
|
-
},
|
|
684
|
+
}, Ln = P("HTMLFormElement"), Vn = (t) => t.toLowerCase().replace(
|
|
1043
685
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1044
|
-
function(r, n,
|
|
1045
|
-
return n.toUpperCase() +
|
|
686
|
+
function(r, n, o) {
|
|
687
|
+
return n.toUpperCase() + o;
|
|
1046
688
|
}
|
|
1047
|
-
),
|
|
689
|
+
), He = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Hn = P("RegExp"), Tt = (t, e) => {
|
|
1048
690
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
1049
|
-
|
|
691
|
+
Z(r, (o, i) => {
|
|
1050
692
|
let s;
|
|
1051
|
-
(s = e(
|
|
693
|
+
(s = e(o, i, t)) !== !1 && (n[i] = s || o);
|
|
1052
694
|
}), Object.defineProperties(t, n);
|
|
1053
|
-
},
|
|
1054
|
-
|
|
1055
|
-
if (
|
|
695
|
+
}, Wn = (t) => {
|
|
696
|
+
Tt(t, (e, r) => {
|
|
697
|
+
if (k(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
1056
698
|
return !1;
|
|
1057
699
|
const n = t[r];
|
|
1058
|
-
if (
|
|
700
|
+
if (k(n)) {
|
|
1059
701
|
if (e.enumerable = !1, "writable" in e) {
|
|
1060
702
|
e.writable = !1;
|
|
1061
703
|
return;
|
|
@@ -1065,103 +707,103 @@ const mr = (t, e, r, { allOwnKeys: n } = {}) => (ie(e, (i, o) => {
|
|
|
1065
707
|
});
|
|
1066
708
|
}
|
|
1067
709
|
});
|
|
1068
|
-
},
|
|
1069
|
-
const r = {}, n = (
|
|
1070
|
-
|
|
1071
|
-
r[
|
|
710
|
+
}, zn = (t, e) => {
|
|
711
|
+
const r = {}, n = (o) => {
|
|
712
|
+
o.forEach((i) => {
|
|
713
|
+
r[i] = !0;
|
|
1072
714
|
});
|
|
1073
715
|
};
|
|
1074
|
-
return
|
|
1075
|
-
},
|
|
1076
|
-
},
|
|
1077
|
-
function
|
|
1078
|
-
return !!(t &&
|
|
1079
|
-
}
|
|
1080
|
-
const
|
|
1081
|
-
const e = new Array(10), r = (n,
|
|
1082
|
-
if (
|
|
716
|
+
return Q(t) ? n(t) : n(String(t).split(e)), r;
|
|
717
|
+
}, Jn = () => {
|
|
718
|
+
}, Qn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
719
|
+
function Kn(t) {
|
|
720
|
+
return !!(t && k(t.append) && t[wt] === "FormData" && t[ye]);
|
|
721
|
+
}
|
|
722
|
+
const Xn = (t) => {
|
|
723
|
+
const e = new Array(10), r = (n, o) => {
|
|
724
|
+
if (we(n)) {
|
|
1083
725
|
if (e.indexOf(n) >= 0)
|
|
1084
726
|
return;
|
|
1085
727
|
if (!("toJSON" in n)) {
|
|
1086
|
-
e[
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1089
|
-
const
|
|
1090
|
-
!
|
|
1091
|
-
}), e[
|
|
728
|
+
e[o] = n;
|
|
729
|
+
const i = Q(n) ? [] : {};
|
|
730
|
+
return Z(n, (s, a) => {
|
|
731
|
+
const c = r(s, o + 1);
|
|
732
|
+
!Y(c) && (i[a] = c);
|
|
733
|
+
}), e[o] = void 0, i;
|
|
1092
734
|
}
|
|
1093
735
|
}
|
|
1094
736
|
return n;
|
|
1095
737
|
};
|
|
1096
738
|
return r(t, 0);
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1099
|
-
}, !1), (
|
|
1100
|
-
n.push(
|
|
739
|
+
}, Gn = P("AsyncFunction"), Yn = (t) => t && (we(t) || k(t)) && k(t.then) && k(t.catch), Ot = ((t, e) => t ? setImmediate : e ? ((r, n) => (B.addEventListener("message", ({ source: o, data: i }) => {
|
|
740
|
+
o === B && i === r && n.length && n.shift()();
|
|
741
|
+
}, !1), (o) => {
|
|
742
|
+
n.push(o), B.postMessage(r, "*");
|
|
1101
743
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
1102
744
|
typeof setImmediate == "function",
|
|
1103
|
-
|
|
1104
|
-
),
|
|
1105
|
-
isArray:
|
|
1106
|
-
isArrayBuffer:
|
|
1107
|
-
isBuffer:
|
|
1108
|
-
isFormData:
|
|
1109
|
-
isArrayBufferView:
|
|
1110
|
-
isString:
|
|
1111
|
-
isNumber:
|
|
1112
|
-
isBoolean:
|
|
1113
|
-
isObject:
|
|
1114
|
-
isPlainObject:
|
|
1115
|
-
isReadableStream:
|
|
1116
|
-
isRequest:
|
|
1117
|
-
isResponse:
|
|
1118
|
-
isHeaders:
|
|
1119
|
-
isUndefined:
|
|
1120
|
-
isDate:
|
|
1121
|
-
isFile:
|
|
1122
|
-
isBlob:
|
|
1123
|
-
isRegExp:
|
|
1124
|
-
isFunction:
|
|
1125
|
-
isStream:
|
|
1126
|
-
isURLSearchParams:
|
|
1127
|
-
isTypedArray:
|
|
1128
|
-
isFileList:
|
|
1129
|
-
forEach:
|
|
1130
|
-
merge:
|
|
1131
|
-
extend:
|
|
1132
|
-
trim:
|
|
1133
|
-
stripBOM:
|
|
1134
|
-
inherits:
|
|
1135
|
-
toFlatObject:
|
|
1136
|
-
kindOf:
|
|
1137
|
-
kindOfTest:
|
|
1138
|
-
endsWith:
|
|
1139
|
-
toArray:
|
|
1140
|
-
forEachEntry:
|
|
1141
|
-
matchAll:
|
|
1142
|
-
isHTMLForm:
|
|
1143
|
-
hasOwnProperty:
|
|
1144
|
-
hasOwnProp:
|
|
745
|
+
k(B.postMessage)
|
|
746
|
+
), Zn = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || Ot, er = (t) => t != null && k(t[ye]), d = {
|
|
747
|
+
isArray: Q,
|
|
748
|
+
isArrayBuffer: St,
|
|
749
|
+
isBuffer: gn,
|
|
750
|
+
isFormData: kn,
|
|
751
|
+
isArrayBufferView: bn,
|
|
752
|
+
isString: wn,
|
|
753
|
+
isNumber: vt,
|
|
754
|
+
isBoolean: Sn,
|
|
755
|
+
isObject: we,
|
|
756
|
+
isPlainObject: le,
|
|
757
|
+
isReadableStream: Rn,
|
|
758
|
+
isRequest: _n,
|
|
759
|
+
isResponse: Pn,
|
|
760
|
+
isHeaders: xn,
|
|
761
|
+
isUndefined: Y,
|
|
762
|
+
isDate: vn,
|
|
763
|
+
isFile: An,
|
|
764
|
+
isBlob: En,
|
|
765
|
+
isRegExp: Hn,
|
|
766
|
+
isFunction: k,
|
|
767
|
+
isStream: On,
|
|
768
|
+
isURLSearchParams: Nn,
|
|
769
|
+
isTypedArray: In,
|
|
770
|
+
isFileList: Tn,
|
|
771
|
+
forEach: Z,
|
|
772
|
+
merge: Ce,
|
|
773
|
+
extend: Dn,
|
|
774
|
+
trim: Cn,
|
|
775
|
+
stripBOM: qn,
|
|
776
|
+
inherits: Fn,
|
|
777
|
+
toFlatObject: jn,
|
|
778
|
+
kindOf: ge,
|
|
779
|
+
kindOfTest: P,
|
|
780
|
+
endsWith: Mn,
|
|
781
|
+
toArray: Bn,
|
|
782
|
+
forEachEntry: Un,
|
|
783
|
+
matchAll: $n,
|
|
784
|
+
isHTMLForm: Ln,
|
|
785
|
+
hasOwnProperty: He,
|
|
786
|
+
hasOwnProp: He,
|
|
1145
787
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1146
|
-
reduceDescriptors:
|
|
1147
|
-
freezeMethods:
|
|
1148
|
-
toObjectSet:
|
|
1149
|
-
toCamelCase:
|
|
1150
|
-
noop:
|
|
1151
|
-
toFiniteNumber:
|
|
1152
|
-
findKey:
|
|
1153
|
-
global:
|
|
1154
|
-
isContextDefined:
|
|
1155
|
-
isSpecCompliantForm:
|
|
1156
|
-
toJSONObject:
|
|
1157
|
-
isAsyncFn:
|
|
1158
|
-
isThenable:
|
|
1159
|
-
setImmediate:
|
|
1160
|
-
asap:
|
|
1161
|
-
isIterable:
|
|
788
|
+
reduceDescriptors: Tt,
|
|
789
|
+
freezeMethods: Wn,
|
|
790
|
+
toObjectSet: zn,
|
|
791
|
+
toCamelCase: Vn,
|
|
792
|
+
noop: Jn,
|
|
793
|
+
toFiniteNumber: Qn,
|
|
794
|
+
findKey: At,
|
|
795
|
+
global: B,
|
|
796
|
+
isContextDefined: Et,
|
|
797
|
+
isSpecCompliantForm: Kn,
|
|
798
|
+
toJSONObject: Xn,
|
|
799
|
+
isAsyncFn: Gn,
|
|
800
|
+
isThenable: Yn,
|
|
801
|
+
setImmediate: Ot,
|
|
802
|
+
asap: Zn,
|
|
803
|
+
isIterable: er
|
|
1162
804
|
};
|
|
1163
|
-
function b(t, e, r, n,
|
|
1164
|
-
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),
|
|
805
|
+
function b(t, e, r, n, o) {
|
|
806
|
+
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), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
1165
807
|
}
|
|
1166
808
|
d.inherits(b, Error, {
|
|
1167
809
|
toJSON: function() {
|
|
@@ -1184,7 +826,7 @@ d.inherits(b, Error, {
|
|
|
1184
826
|
};
|
|
1185
827
|
}
|
|
1186
828
|
});
|
|
1187
|
-
const
|
|
829
|
+
const kt = b.prototype, Nt = {};
|
|
1188
830
|
[
|
|
1189
831
|
"ERR_BAD_OPTION_VALUE",
|
|
1190
832
|
"ERR_BAD_OPTION",
|
|
@@ -1200,35 +842,35 @@ const zt = b.prototype, Jt = {};
|
|
|
1200
842
|
"ERR_INVALID_URL"
|
|
1201
843
|
// eslint-disable-next-line func-names
|
|
1202
844
|
].forEach((t) => {
|
|
1203
|
-
|
|
845
|
+
Nt[t] = { value: t };
|
|
1204
846
|
});
|
|
1205
|
-
Object.defineProperties(b,
|
|
1206
|
-
Object.defineProperty(
|
|
1207
|
-
b.from = (t, e, r, n,
|
|
1208
|
-
const s = Object.create(
|
|
1209
|
-
return d.toFlatObject(t, s, function(
|
|
1210
|
-
return
|
|
1211
|
-
}, (a) => a !== "isAxiosError"), b.call(s, t.message, e, r, n,
|
|
847
|
+
Object.defineProperties(b, Nt);
|
|
848
|
+
Object.defineProperty(kt, "isAxiosError", { value: !0 });
|
|
849
|
+
b.from = (t, e, r, n, o, i) => {
|
|
850
|
+
const s = Object.create(kt);
|
|
851
|
+
return d.toFlatObject(t, s, function(c) {
|
|
852
|
+
return c !== Error.prototype;
|
|
853
|
+
}, (a) => a !== "isAxiosError"), b.call(s, t.message, e, r, n, o), s.cause = t, s.name = t.name, i && Object.assign(s, i), s;
|
|
1212
854
|
};
|
|
1213
|
-
const
|
|
1214
|
-
function
|
|
855
|
+
const tr = null;
|
|
856
|
+
function De(t) {
|
|
1215
857
|
return d.isPlainObject(t) || d.isArray(t);
|
|
1216
858
|
}
|
|
1217
|
-
function
|
|
859
|
+
function Rt(t) {
|
|
1218
860
|
return d.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1219
861
|
}
|
|
1220
|
-
function
|
|
1221
|
-
return t ? t.concat(e).map(function(
|
|
1222
|
-
return
|
|
862
|
+
function We(t, e, r) {
|
|
863
|
+
return t ? t.concat(e).map(function(o, i) {
|
|
864
|
+
return o = Rt(o), !r && i ? "[" + o + "]" : o;
|
|
1223
865
|
}).join(r ? "." : "") : e;
|
|
1224
866
|
}
|
|
1225
|
-
function
|
|
1226
|
-
return d.isArray(t) && !t.some(
|
|
867
|
+
function nr(t) {
|
|
868
|
+
return d.isArray(t) && !t.some(De);
|
|
1227
869
|
}
|
|
1228
|
-
const
|
|
870
|
+
const rr = d.toFlatObject(d, {}, null, function(e) {
|
|
1229
871
|
return /^is[A-Z]/.test(e);
|
|
1230
872
|
});
|
|
1231
|
-
function
|
|
873
|
+
function Se(t, e, r) {
|
|
1232
874
|
if (!d.isObject(t))
|
|
1233
875
|
throw new TypeError("target must be an object");
|
|
1234
876
|
e = e || new FormData(), r = d.toFlatObject(r, {
|
|
@@ -1238,52 +880,52 @@ function Ne(t, e, r) {
|
|
|
1238
880
|
}, !1, function(g, h) {
|
|
1239
881
|
return !d.isUndefined(h[g]);
|
|
1240
882
|
});
|
|
1241
|
-
const n = r.metaTokens,
|
|
1242
|
-
if (!d.isFunction(
|
|
883
|
+
const n = r.metaTokens, o = r.visitor || l, i = r.dots, s = r.indexes, c = (r.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(e);
|
|
884
|
+
if (!d.isFunction(o))
|
|
1243
885
|
throw new TypeError("visitor must be a function");
|
|
1244
|
-
function
|
|
886
|
+
function u(m) {
|
|
1245
887
|
if (m === null) return "";
|
|
1246
888
|
if (d.isDate(m))
|
|
1247
889
|
return m.toISOString();
|
|
1248
890
|
if (d.isBoolean(m))
|
|
1249
891
|
return m.toString();
|
|
1250
|
-
if (!
|
|
892
|
+
if (!c && d.isBlob(m))
|
|
1251
893
|
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
1252
|
-
return d.isArrayBuffer(m) || d.isTypedArray(m) ?
|
|
894
|
+
return d.isArrayBuffer(m) || d.isTypedArray(m) ? c && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
1253
895
|
}
|
|
1254
896
|
function l(m, g, h) {
|
|
1255
897
|
let w = m;
|
|
1256
898
|
if (m && !h && typeof m == "object") {
|
|
1257
899
|
if (d.endsWith(g, "{}"))
|
|
1258
900
|
g = n ? g : g.slice(0, -2), m = JSON.stringify(m);
|
|
1259
|
-
else if (d.isArray(m) &&
|
|
1260
|
-
return g =
|
|
1261
|
-
!(d.isUndefined(
|
|
901
|
+
else if (d.isArray(m) && nr(m) || (d.isFileList(m) || d.endsWith(g, "[]")) && (w = d.toArray(m)))
|
|
902
|
+
return g = Rt(g), w.forEach(function(A, C) {
|
|
903
|
+
!(d.isUndefined(A) || A === null) && e.append(
|
|
1262
904
|
// eslint-disable-next-line no-nested-ternary
|
|
1263
|
-
s === !0 ?
|
|
1264
|
-
|
|
905
|
+
s === !0 ? We([g], C, i) : s === null ? g : g + "[]",
|
|
906
|
+
u(A)
|
|
1265
907
|
);
|
|
1266
908
|
}), !1;
|
|
1267
909
|
}
|
|
1268
|
-
return
|
|
910
|
+
return De(m) ? !0 : (e.append(We(h, g, i), u(m)), !1);
|
|
1269
911
|
}
|
|
1270
|
-
const f = [], p = Object.assign(
|
|
912
|
+
const f = [], p = Object.assign(rr, {
|
|
1271
913
|
defaultVisitor: l,
|
|
1272
|
-
convertValue:
|
|
1273
|
-
isVisitable:
|
|
914
|
+
convertValue: u,
|
|
915
|
+
isVisitable: De
|
|
1274
916
|
});
|
|
1275
917
|
function y(m, g) {
|
|
1276
918
|
if (!d.isUndefined(m)) {
|
|
1277
919
|
if (f.indexOf(m) !== -1)
|
|
1278
920
|
throw Error("Circular reference detected in " + g.join("."));
|
|
1279
|
-
f.push(m), d.forEach(m, function(w,
|
|
1280
|
-
(!(d.isUndefined(w) || w === null) &&
|
|
921
|
+
f.push(m), d.forEach(m, function(w, S) {
|
|
922
|
+
(!(d.isUndefined(w) || w === null) && o.call(
|
|
1281
923
|
e,
|
|
1282
924
|
w,
|
|
1283
|
-
d.isString(
|
|
925
|
+
d.isString(S) ? S.trim() : S,
|
|
1284
926
|
g,
|
|
1285
927
|
p
|
|
1286
|
-
)) === !0 && y(w, g ? g.concat(
|
|
928
|
+
)) === !0 && y(w, g ? g.concat(S) : [S]);
|
|
1287
929
|
}), f.pop();
|
|
1288
930
|
}
|
|
1289
931
|
}
|
|
@@ -1291,7 +933,7 @@ function Ne(t, e, r) {
|
|
|
1291
933
|
throw new TypeError("data must be an object");
|
|
1292
934
|
return y(t), e;
|
|
1293
935
|
}
|
|
1294
|
-
function
|
|
936
|
+
function ze(t) {
|
|
1295
937
|
const e = {
|
|
1296
938
|
"!": "%21",
|
|
1297
939
|
"'": "%27",
|
|
@@ -1305,40 +947,40 @@ function pt(t) {
|
|
|
1305
947
|
return e[n];
|
|
1306
948
|
});
|
|
1307
949
|
}
|
|
1308
|
-
function
|
|
1309
|
-
this._pairs = [], t &&
|
|
950
|
+
function Ue(t, e) {
|
|
951
|
+
this._pairs = [], t && Se(t, this, e);
|
|
1310
952
|
}
|
|
1311
|
-
const
|
|
1312
|
-
|
|
953
|
+
const _t = Ue.prototype;
|
|
954
|
+
_t.append = function(e, r) {
|
|
1313
955
|
this._pairs.push([e, r]);
|
|
1314
956
|
};
|
|
1315
|
-
|
|
957
|
+
_t.toString = function(e) {
|
|
1316
958
|
const r = e ? function(n) {
|
|
1317
|
-
return e.call(this, n,
|
|
1318
|
-
} :
|
|
1319
|
-
return this._pairs.map(function(
|
|
1320
|
-
return r(
|
|
959
|
+
return e.call(this, n, ze);
|
|
960
|
+
} : ze;
|
|
961
|
+
return this._pairs.map(function(o) {
|
|
962
|
+
return r(o[0]) + "=" + r(o[1]);
|
|
1321
963
|
}, "").join("&");
|
|
1322
964
|
};
|
|
1323
|
-
function
|
|
965
|
+
function or(t) {
|
|
1324
966
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1325
967
|
}
|
|
1326
|
-
function
|
|
968
|
+
function Pt(t, e, r) {
|
|
1327
969
|
if (!e)
|
|
1328
970
|
return t;
|
|
1329
|
-
const n = r && r.encode ||
|
|
971
|
+
const n = r && r.encode || or;
|
|
1330
972
|
d.isFunction(r) && (r = {
|
|
1331
973
|
serialize: r
|
|
1332
974
|
});
|
|
1333
|
-
const
|
|
1334
|
-
let
|
|
1335
|
-
if (
|
|
975
|
+
const o = r && r.serialize;
|
|
976
|
+
let i;
|
|
977
|
+
if (o ? i = o(e, r) : i = d.isURLSearchParams(e) ? e.toString() : new Ue(e, r).toString(n), i) {
|
|
1336
978
|
const s = t.indexOf("#");
|
|
1337
|
-
s !== -1 && (t = t.slice(0, s)), t += (t.indexOf("?") === -1 ? "?" : "&") +
|
|
979
|
+
s !== -1 && (t = t.slice(0, s)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
1338
980
|
}
|
|
1339
981
|
return t;
|
|
1340
982
|
}
|
|
1341
|
-
class
|
|
983
|
+
class Je {
|
|
1342
984
|
constructor() {
|
|
1343
985
|
this.handlers = [];
|
|
1344
986
|
}
|
|
@@ -1392,65 +1034,65 @@ class mt {
|
|
|
1392
1034
|
});
|
|
1393
1035
|
}
|
|
1394
1036
|
}
|
|
1395
|
-
const
|
|
1037
|
+
const xt = {
|
|
1396
1038
|
silentJSONParsing: !0,
|
|
1397
1039
|
forcedJSONParsing: !0,
|
|
1398
1040
|
clarifyTimeoutError: !1
|
|
1399
|
-
},
|
|
1041
|
+
}, ir = typeof URLSearchParams < "u" ? URLSearchParams : Ue, sr = typeof FormData < "u" ? FormData : null, ar = typeof Blob < "u" ? Blob : null, cr = {
|
|
1400
1042
|
isBrowser: !0,
|
|
1401
1043
|
classes: {
|
|
1402
|
-
URLSearchParams:
|
|
1403
|
-
FormData:
|
|
1404
|
-
Blob:
|
|
1044
|
+
URLSearchParams: ir,
|
|
1045
|
+
FormData: sr,
|
|
1046
|
+
Blob: ar
|
|
1405
1047
|
},
|
|
1406
1048
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1407
|
-
},
|
|
1408
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1049
|
+
}, $e = typeof window < "u" && typeof document < "u", qe = typeof navigator == "object" && navigator || void 0, ur = $e && (!qe || ["ReactNative", "NativeScript", "NS"].indexOf(qe.product) < 0), lr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1050
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", dr = $e && window.location.href || "http://localhost", fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1409
1051
|
__proto__: null,
|
|
1410
|
-
hasBrowserEnv:
|
|
1411
|
-
hasStandardBrowserEnv:
|
|
1412
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1413
|
-
navigator:
|
|
1414
|
-
origin:
|
|
1415
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1416
|
-
...
|
|
1417
|
-
...
|
|
1052
|
+
hasBrowserEnv: $e,
|
|
1053
|
+
hasStandardBrowserEnv: ur,
|
|
1054
|
+
hasStandardBrowserWebWorkerEnv: lr,
|
|
1055
|
+
navigator: qe,
|
|
1056
|
+
origin: dr
|
|
1057
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
1058
|
+
...fr,
|
|
1059
|
+
...cr
|
|
1418
1060
|
};
|
|
1419
|
-
function
|
|
1420
|
-
return
|
|
1421
|
-
visitor: function(r, n,
|
|
1422
|
-
return
|
|
1061
|
+
function pr(t, e) {
|
|
1062
|
+
return Se(t, new T.classes.URLSearchParams(), Object.assign({
|
|
1063
|
+
visitor: function(r, n, o, i) {
|
|
1064
|
+
return T.isNode && d.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
1423
1065
|
}
|
|
1424
1066
|
}, e));
|
|
1425
1067
|
}
|
|
1426
|
-
function
|
|
1068
|
+
function mr(t) {
|
|
1427
1069
|
return d.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1428
1070
|
}
|
|
1429
|
-
function
|
|
1071
|
+
function hr(t) {
|
|
1430
1072
|
const e = {}, r = Object.keys(t);
|
|
1431
1073
|
let n;
|
|
1432
|
-
const
|
|
1433
|
-
let
|
|
1434
|
-
for (n = 0; n <
|
|
1435
|
-
|
|
1074
|
+
const o = r.length;
|
|
1075
|
+
let i;
|
|
1076
|
+
for (n = 0; n < o; n++)
|
|
1077
|
+
i = r[n], e[i] = t[i];
|
|
1436
1078
|
return e;
|
|
1437
1079
|
}
|
|
1438
|
-
function
|
|
1439
|
-
function e(r, n,
|
|
1440
|
-
let s = r[
|
|
1080
|
+
function Ct(t) {
|
|
1081
|
+
function e(r, n, o, i) {
|
|
1082
|
+
let s = r[i++];
|
|
1441
1083
|
if (s === "__proto__") return !0;
|
|
1442
|
-
const a = Number.isFinite(+s),
|
|
1443
|
-
return s = !s && d.isArray(
|
|
1084
|
+
const a = Number.isFinite(+s), c = i >= r.length;
|
|
1085
|
+
return s = !s && d.isArray(o) ? o.length : s, c ? (d.hasOwnProp(o, s) ? o[s] = [o[s], n] : o[s] = n, !a) : ((!o[s] || !d.isObject(o[s])) && (o[s] = []), e(r, n, o[s], i) && d.isArray(o[s]) && (o[s] = hr(o[s])), !a);
|
|
1444
1086
|
}
|
|
1445
1087
|
if (d.isFormData(t) && d.isFunction(t.entries)) {
|
|
1446
1088
|
const r = {};
|
|
1447
|
-
return d.forEachEntry(t, (n,
|
|
1448
|
-
e(
|
|
1089
|
+
return d.forEachEntry(t, (n, o) => {
|
|
1090
|
+
e(mr(n), o, r, 0);
|
|
1449
1091
|
}), r;
|
|
1450
1092
|
}
|
|
1451
1093
|
return null;
|
|
1452
1094
|
}
|
|
1453
|
-
function
|
|
1095
|
+
function yr(t, e, r) {
|
|
1454
1096
|
if (d.isString(t))
|
|
1455
1097
|
try {
|
|
1456
1098
|
return (e || JSON.parse)(t), d.trim(t);
|
|
@@ -1460,13 +1102,13 @@ function Gr(t, e, r) {
|
|
|
1460
1102
|
}
|
|
1461
1103
|
return (r || JSON.stringify)(t);
|
|
1462
1104
|
}
|
|
1463
|
-
const
|
|
1464
|
-
transitional:
|
|
1105
|
+
const ee = {
|
|
1106
|
+
transitional: xt,
|
|
1465
1107
|
adapter: ["xhr", "http", "fetch"],
|
|
1466
1108
|
transformRequest: [function(e, r) {
|
|
1467
|
-
const n = r.getContentType() || "",
|
|
1468
|
-
if (
|
|
1469
|
-
return
|
|
1109
|
+
const n = r.getContentType() || "", o = n.indexOf("application/json") > -1, i = d.isObject(e);
|
|
1110
|
+
if (i && d.isHTMLForm(e) && (e = new FormData(e)), d.isFormData(e))
|
|
1111
|
+
return o ? JSON.stringify(Ct(e)) : e;
|
|
1470
1112
|
if (d.isArrayBuffer(e) || d.isBuffer(e) || d.isStream(e) || d.isFile(e) || d.isBlob(e) || d.isReadableStream(e))
|
|
1471
1113
|
return e;
|
|
1472
1114
|
if (d.isArrayBufferView(e))
|
|
@@ -1474,26 +1116,26 @@ const oe = {
|
|
|
1474
1116
|
if (d.isURLSearchParams(e))
|
|
1475
1117
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
1476
1118
|
let a;
|
|
1477
|
-
if (
|
|
1119
|
+
if (i) {
|
|
1478
1120
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1479
|
-
return
|
|
1121
|
+
return pr(e, this.formSerializer).toString();
|
|
1480
1122
|
if ((a = d.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
1481
|
-
const
|
|
1482
|
-
return
|
|
1123
|
+
const c = this.env && this.env.FormData;
|
|
1124
|
+
return Se(
|
|
1483
1125
|
a ? { "files[]": e } : e,
|
|
1484
|
-
|
|
1126
|
+
c && new c(),
|
|
1485
1127
|
this.formSerializer
|
|
1486
1128
|
);
|
|
1487
1129
|
}
|
|
1488
1130
|
}
|
|
1489
|
-
return
|
|
1131
|
+
return i || o ? (r.setContentType("application/json", !1), yr(e)) : e;
|
|
1490
1132
|
}],
|
|
1491
1133
|
transformResponse: [function(e) {
|
|
1492
|
-
const r = this.transitional ||
|
|
1134
|
+
const r = this.transitional || ee.transitional, n = r && r.forcedJSONParsing, o = this.responseType === "json";
|
|
1493
1135
|
if (d.isResponse(e) || d.isReadableStream(e))
|
|
1494
1136
|
return e;
|
|
1495
|
-
if (e && d.isString(e) && (n && !this.responseType ||
|
|
1496
|
-
const s = !(r && r.silentJSONParsing) &&
|
|
1137
|
+
if (e && d.isString(e) && (n && !this.responseType || o)) {
|
|
1138
|
+
const s = !(r && r.silentJSONParsing) && o;
|
|
1497
1139
|
try {
|
|
1498
1140
|
return JSON.parse(e);
|
|
1499
1141
|
} catch (a) {
|
|
@@ -1513,8 +1155,8 @@ const oe = {
|
|
|
1513
1155
|
maxContentLength: -1,
|
|
1514
1156
|
maxBodyLength: -1,
|
|
1515
1157
|
env: {
|
|
1516
|
-
FormData:
|
|
1517
|
-
Blob:
|
|
1158
|
+
FormData: T.classes.FormData,
|
|
1159
|
+
Blob: T.classes.Blob
|
|
1518
1160
|
},
|
|
1519
1161
|
validateStatus: function(e) {
|
|
1520
1162
|
return e >= 200 && e < 300;
|
|
@@ -1527,9 +1169,9 @@ const oe = {
|
|
|
1527
1169
|
}
|
|
1528
1170
|
};
|
|
1529
1171
|
d.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1530
|
-
|
|
1172
|
+
ee.headers[t] = {};
|
|
1531
1173
|
});
|
|
1532
|
-
const
|
|
1174
|
+
const gr = d.toObjectSet([
|
|
1533
1175
|
"age",
|
|
1534
1176
|
"authorization",
|
|
1535
1177
|
"content-length",
|
|
@@ -1547,136 +1189,136 @@ const Yr = d.toObjectSet([
|
|
|
1547
1189
|
"referer",
|
|
1548
1190
|
"retry-after",
|
|
1549
1191
|
"user-agent"
|
|
1550
|
-
]),
|
|
1192
|
+
]), br = (t) => {
|
|
1551
1193
|
const e = {};
|
|
1552
|
-
let r, n,
|
|
1194
|
+
let r, n, o;
|
|
1553
1195
|
return t && t.split(`
|
|
1554
1196
|
`).forEach(function(s) {
|
|
1555
|
-
|
|
1197
|
+
o = s.indexOf(":"), r = s.substring(0, o).trim().toLowerCase(), n = s.substring(o + 1).trim(), !(!r || e[r] && gr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
1556
1198
|
}), e;
|
|
1557
|
-
},
|
|
1558
|
-
function
|
|
1199
|
+
}, Qe = Symbol("internals");
|
|
1200
|
+
function X(t) {
|
|
1559
1201
|
return t && String(t).trim().toLowerCase();
|
|
1560
1202
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return t === !1 || t == null ? t : d.isArray(t) ? t.map(
|
|
1203
|
+
function de(t) {
|
|
1204
|
+
return t === !1 || t == null ? t : d.isArray(t) ? t.map(de) : String(t);
|
|
1563
1205
|
}
|
|
1564
|
-
function
|
|
1206
|
+
function wr(t) {
|
|
1565
1207
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1566
1208
|
let n;
|
|
1567
1209
|
for (; n = r.exec(t); )
|
|
1568
1210
|
e[n[1]] = n[2];
|
|
1569
1211
|
return e;
|
|
1570
1212
|
}
|
|
1571
|
-
const
|
|
1572
|
-
function
|
|
1213
|
+
const Sr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1214
|
+
function _e(t, e, r, n, o) {
|
|
1573
1215
|
if (d.isFunction(n))
|
|
1574
1216
|
return n.call(this, e, r);
|
|
1575
|
-
if (
|
|
1217
|
+
if (o && (e = r), !!d.isString(e)) {
|
|
1576
1218
|
if (d.isString(n))
|
|
1577
1219
|
return e.indexOf(n) !== -1;
|
|
1578
1220
|
if (d.isRegExp(n))
|
|
1579
1221
|
return n.test(e);
|
|
1580
1222
|
}
|
|
1581
1223
|
}
|
|
1582
|
-
function
|
|
1224
|
+
function vr(t) {
|
|
1583
1225
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
1584
1226
|
}
|
|
1585
|
-
function
|
|
1227
|
+
function Ar(t, e) {
|
|
1586
1228
|
const r = d.toCamelCase(" " + e);
|
|
1587
1229
|
["get", "set", "has"].forEach((n) => {
|
|
1588
1230
|
Object.defineProperty(t, n + r, {
|
|
1589
|
-
value: function(
|
|
1590
|
-
return this[n].call(this, e,
|
|
1231
|
+
value: function(o, i, s) {
|
|
1232
|
+
return this[n].call(this, e, o, i, s);
|
|
1591
1233
|
},
|
|
1592
1234
|
configurable: !0
|
|
1593
1235
|
});
|
|
1594
1236
|
});
|
|
1595
1237
|
}
|
|
1596
|
-
let
|
|
1238
|
+
let N = class {
|
|
1597
1239
|
constructor(e) {
|
|
1598
1240
|
e && this.set(e);
|
|
1599
1241
|
}
|
|
1600
1242
|
set(e, r, n) {
|
|
1601
|
-
const
|
|
1602
|
-
function
|
|
1603
|
-
const l =
|
|
1243
|
+
const o = this;
|
|
1244
|
+
function i(a, c, u) {
|
|
1245
|
+
const l = X(c);
|
|
1604
1246
|
if (!l)
|
|
1605
1247
|
throw new Error("header name must be a non-empty string");
|
|
1606
|
-
const f = d.findKey(
|
|
1607
|
-
(!f ||
|
|
1248
|
+
const f = d.findKey(o, l);
|
|
1249
|
+
(!f || o[f] === void 0 || u === !0 || u === void 0 && o[f] !== !1) && (o[f || c] = de(a));
|
|
1608
1250
|
}
|
|
1609
|
-
const s = (a,
|
|
1251
|
+
const s = (a, c) => d.forEach(a, (u, l) => i(u, l, c));
|
|
1610
1252
|
if (d.isPlainObject(e) || e instanceof this.constructor)
|
|
1611
1253
|
s(e, r);
|
|
1612
|
-
else if (d.isString(e) && (e = e.trim()) && !
|
|
1613
|
-
s(
|
|
1254
|
+
else if (d.isString(e) && (e = e.trim()) && !Sr(e))
|
|
1255
|
+
s(br(e), r);
|
|
1614
1256
|
else if (d.isObject(e) && d.isIterable(e)) {
|
|
1615
|
-
let a = {},
|
|
1257
|
+
let a = {}, c, u;
|
|
1616
1258
|
for (const l of e) {
|
|
1617
1259
|
if (!d.isArray(l))
|
|
1618
1260
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1619
|
-
a[
|
|
1261
|
+
a[u = l[0]] = (c = a[u]) ? d.isArray(c) ? [...c, l[1]] : [c, l[1]] : l[1];
|
|
1620
1262
|
}
|
|
1621
1263
|
s(a, r);
|
|
1622
1264
|
} else
|
|
1623
|
-
e != null &&
|
|
1265
|
+
e != null && i(r, e, n);
|
|
1624
1266
|
return this;
|
|
1625
1267
|
}
|
|
1626
1268
|
get(e, r) {
|
|
1627
|
-
if (e =
|
|
1269
|
+
if (e = X(e), e) {
|
|
1628
1270
|
const n = d.findKey(this, e);
|
|
1629
1271
|
if (n) {
|
|
1630
|
-
const
|
|
1272
|
+
const o = this[n];
|
|
1631
1273
|
if (!r)
|
|
1632
|
-
return
|
|
1274
|
+
return o;
|
|
1633
1275
|
if (r === !0)
|
|
1634
|
-
return
|
|
1276
|
+
return wr(o);
|
|
1635
1277
|
if (d.isFunction(r))
|
|
1636
|
-
return r.call(this,
|
|
1278
|
+
return r.call(this, o, n);
|
|
1637
1279
|
if (d.isRegExp(r))
|
|
1638
|
-
return r.exec(
|
|
1280
|
+
return r.exec(o);
|
|
1639
1281
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1640
1282
|
}
|
|
1641
1283
|
}
|
|
1642
1284
|
}
|
|
1643
1285
|
has(e, r) {
|
|
1644
|
-
if (e =
|
|
1286
|
+
if (e = X(e), e) {
|
|
1645
1287
|
const n = d.findKey(this, e);
|
|
1646
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1288
|
+
return !!(n && this[n] !== void 0 && (!r || _e(this, this[n], n, r)));
|
|
1647
1289
|
}
|
|
1648
1290
|
return !1;
|
|
1649
1291
|
}
|
|
1650
1292
|
delete(e, r) {
|
|
1651
1293
|
const n = this;
|
|
1652
|
-
let
|
|
1653
|
-
function
|
|
1654
|
-
if (s =
|
|
1294
|
+
let o = !1;
|
|
1295
|
+
function i(s) {
|
|
1296
|
+
if (s = X(s), s) {
|
|
1655
1297
|
const a = d.findKey(n, s);
|
|
1656
|
-
a && (!r ||
|
|
1298
|
+
a && (!r || _e(n, n[a], a, r)) && (delete n[a], o = !0);
|
|
1657
1299
|
}
|
|
1658
1300
|
}
|
|
1659
|
-
return d.isArray(e) ? e.forEach(
|
|
1301
|
+
return d.isArray(e) ? e.forEach(i) : i(e), o;
|
|
1660
1302
|
}
|
|
1661
1303
|
clear(e) {
|
|
1662
1304
|
const r = Object.keys(this);
|
|
1663
|
-
let n = r.length,
|
|
1305
|
+
let n = r.length, o = !1;
|
|
1664
1306
|
for (; n--; ) {
|
|
1665
|
-
const
|
|
1666
|
-
(!e ||
|
|
1307
|
+
const i = r[n];
|
|
1308
|
+
(!e || _e(this, this[i], i, e, !0)) && (delete this[i], o = !0);
|
|
1667
1309
|
}
|
|
1668
|
-
return
|
|
1310
|
+
return o;
|
|
1669
1311
|
}
|
|
1670
1312
|
normalize(e) {
|
|
1671
1313
|
const r = this, n = {};
|
|
1672
|
-
return d.forEach(this, (
|
|
1673
|
-
const s = d.findKey(n,
|
|
1314
|
+
return d.forEach(this, (o, i) => {
|
|
1315
|
+
const s = d.findKey(n, i);
|
|
1674
1316
|
if (s) {
|
|
1675
|
-
r[s] =
|
|
1317
|
+
r[s] = de(o), delete r[i];
|
|
1676
1318
|
return;
|
|
1677
1319
|
}
|
|
1678
|
-
const a = e ?
|
|
1679
|
-
a !==
|
|
1320
|
+
const a = e ? vr(i) : String(i).trim();
|
|
1321
|
+
a !== i && delete r[i], r[a] = de(o), n[a] = !0;
|
|
1680
1322
|
}), this;
|
|
1681
1323
|
}
|
|
1682
1324
|
concat(...e) {
|
|
@@ -1684,8 +1326,8 @@ let R = class {
|
|
|
1684
1326
|
}
|
|
1685
1327
|
toJSON(e) {
|
|
1686
1328
|
const r = /* @__PURE__ */ Object.create(null);
|
|
1687
|
-
return d.forEach(this, (n,
|
|
1688
|
-
n != null && n !== !1 && (r[
|
|
1329
|
+
return d.forEach(this, (n, o) => {
|
|
1330
|
+
n != null && n !== !1 && (r[o] = e && d.isArray(n) ? n.join(", ") : n);
|
|
1689
1331
|
}), r;
|
|
1690
1332
|
}
|
|
1691
1333
|
[Symbol.iterator]() {
|
|
@@ -1706,21 +1348,21 @@ let R = class {
|
|
|
1706
1348
|
}
|
|
1707
1349
|
static concat(e, ...r) {
|
|
1708
1350
|
const n = new this(e);
|
|
1709
|
-
return r.forEach((
|
|
1351
|
+
return r.forEach((o) => n.set(o)), n;
|
|
1710
1352
|
}
|
|
1711
1353
|
static accessor(e) {
|
|
1712
|
-
const n = (this[
|
|
1354
|
+
const n = (this[Qe] = this[Qe] = {
|
|
1713
1355
|
accessors: {}
|
|
1714
|
-
}).accessors,
|
|
1715
|
-
function
|
|
1716
|
-
const a =
|
|
1717
|
-
n[a] || (
|
|
1356
|
+
}).accessors, o = this.prototype;
|
|
1357
|
+
function i(s) {
|
|
1358
|
+
const a = X(s);
|
|
1359
|
+
n[a] || (Ar(o, s), n[a] = !0);
|
|
1718
1360
|
}
|
|
1719
|
-
return d.isArray(e) ? e.forEach(
|
|
1361
|
+
return d.isArray(e) ? e.forEach(i) : i(e), this;
|
|
1720
1362
|
}
|
|
1721
1363
|
};
|
|
1722
|
-
|
|
1723
|
-
d.reduceDescriptors(
|
|
1364
|
+
N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1365
|
+
d.reduceDescriptors(N.prototype, ({ value: t }, e) => {
|
|
1724
1366
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
1725
1367
|
return {
|
|
1726
1368
|
get: () => t,
|
|
@@ -1729,24 +1371,24 @@ d.reduceDescriptors(R.prototype, ({ value: t }, e) => {
|
|
|
1729
1371
|
}
|
|
1730
1372
|
};
|
|
1731
1373
|
});
|
|
1732
|
-
d.freezeMethods(
|
|
1733
|
-
function
|
|
1734
|
-
const r = this ||
|
|
1735
|
-
let
|
|
1374
|
+
d.freezeMethods(N);
|
|
1375
|
+
function Pe(t, e) {
|
|
1376
|
+
const r = this || ee, n = e || r, o = N.from(n.headers);
|
|
1377
|
+
let i = n.data;
|
|
1736
1378
|
return d.forEach(t, function(a) {
|
|
1737
|
-
|
|
1738
|
-
}),
|
|
1379
|
+
i = a.call(r, i, o.normalize(), e ? e.status : void 0);
|
|
1380
|
+
}), o.normalize(), i;
|
|
1739
1381
|
}
|
|
1740
|
-
function
|
|
1382
|
+
function Dt(t) {
|
|
1741
1383
|
return !!(t && t.__CANCEL__);
|
|
1742
1384
|
}
|
|
1743
|
-
function
|
|
1385
|
+
function K(t, e, r) {
|
|
1744
1386
|
b.call(this, t ?? "canceled", b.ERR_CANCELED, e, r), this.name = "CanceledError";
|
|
1745
1387
|
}
|
|
1746
|
-
d.inherits(
|
|
1388
|
+
d.inherits(K, b, {
|
|
1747
1389
|
__CANCEL__: !0
|
|
1748
1390
|
});
|
|
1749
|
-
function
|
|
1391
|
+
function qt(t, e, r) {
|
|
1750
1392
|
const n = r.config.validateStatus;
|
|
1751
1393
|
!r.status || !n || n(r.status) ? t(r) : e(new b(
|
|
1752
1394
|
"Request failed with status code " + r.status,
|
|
@@ -1756,73 +1398,73 @@ function tn(t, e, r) {
|
|
|
1756
1398
|
r
|
|
1757
1399
|
));
|
|
1758
1400
|
}
|
|
1759
|
-
function
|
|
1401
|
+
function Er(t) {
|
|
1760
1402
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1761
1403
|
return e && e[1] || "";
|
|
1762
1404
|
}
|
|
1763
|
-
function
|
|
1405
|
+
function Tr(t, e) {
|
|
1764
1406
|
t = t || 10;
|
|
1765
1407
|
const r = new Array(t), n = new Array(t);
|
|
1766
|
-
let
|
|
1767
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
1768
|
-
const
|
|
1769
|
-
s || (s =
|
|
1770
|
-
let f =
|
|
1771
|
-
for (; f !==
|
|
1408
|
+
let o = 0, i = 0, s;
|
|
1409
|
+
return e = e !== void 0 ? e : 1e3, function(c) {
|
|
1410
|
+
const u = Date.now(), l = n[i];
|
|
1411
|
+
s || (s = u), r[o] = c, n[o] = u;
|
|
1412
|
+
let f = i, p = 0;
|
|
1413
|
+
for (; f !== o; )
|
|
1772
1414
|
p += r[f++], f = f % t;
|
|
1773
|
-
if (
|
|
1415
|
+
if (o = (o + 1) % t, o === i && (i = (i + 1) % t), u - s < e)
|
|
1774
1416
|
return;
|
|
1775
|
-
const y = l &&
|
|
1417
|
+
const y = l && u - l;
|
|
1776
1418
|
return y ? Math.round(p * 1e3 / y) : void 0;
|
|
1777
1419
|
};
|
|
1778
1420
|
}
|
|
1779
|
-
function
|
|
1780
|
-
let r = 0, n = 1e3 / e,
|
|
1781
|
-
const s = (
|
|
1782
|
-
r = l,
|
|
1421
|
+
function Or(t, e) {
|
|
1422
|
+
let r = 0, n = 1e3 / e, o, i;
|
|
1423
|
+
const s = (u, l = Date.now()) => {
|
|
1424
|
+
r = l, o = null, i && (clearTimeout(i), i = null), t.apply(null, u);
|
|
1783
1425
|
};
|
|
1784
|
-
return [(...
|
|
1426
|
+
return [(...u) => {
|
|
1785
1427
|
const l = Date.now(), f = l - r;
|
|
1786
|
-
f >= n ? s(
|
|
1787
|
-
|
|
1428
|
+
f >= n ? s(u, l) : (o = u, i || (i = setTimeout(() => {
|
|
1429
|
+
i = null, s(o);
|
|
1788
1430
|
}, n - f)));
|
|
1789
|
-
}, () =>
|
|
1431
|
+
}, () => o && s(o)];
|
|
1790
1432
|
}
|
|
1791
|
-
const
|
|
1433
|
+
const pe = (t, e, r = 3) => {
|
|
1792
1434
|
let n = 0;
|
|
1793
|
-
const
|
|
1794
|
-
return
|
|
1795
|
-
const s =
|
|
1435
|
+
const o = Tr(50, 250);
|
|
1436
|
+
return Or((i) => {
|
|
1437
|
+
const s = i.loaded, a = i.lengthComputable ? i.total : void 0, c = s - n, u = o(c), l = s <= a;
|
|
1796
1438
|
n = s;
|
|
1797
1439
|
const f = {
|
|
1798
1440
|
loaded: s,
|
|
1799
1441
|
total: a,
|
|
1800
1442
|
progress: a ? s / a : void 0,
|
|
1801
|
-
bytes:
|
|
1802
|
-
rate:
|
|
1803
|
-
estimated:
|
|
1804
|
-
event:
|
|
1443
|
+
bytes: c,
|
|
1444
|
+
rate: u || void 0,
|
|
1445
|
+
estimated: u && a && l ? (a - s) / u : void 0,
|
|
1446
|
+
event: i,
|
|
1805
1447
|
lengthComputable: a != null,
|
|
1806
1448
|
[e ? "download" : "upload"]: !0
|
|
1807
1449
|
};
|
|
1808
1450
|
t(f);
|
|
1809
1451
|
}, r);
|
|
1810
|
-
},
|
|
1452
|
+
}, Ke = (t, e) => {
|
|
1811
1453
|
const r = t != null;
|
|
1812
1454
|
return [(n) => e[0]({
|
|
1813
1455
|
lengthComputable: r,
|
|
1814
1456
|
total: t,
|
|
1815
1457
|
loaded: n
|
|
1816
1458
|
}), e[1]];
|
|
1817
|
-
},
|
|
1818
|
-
new URL(
|
|
1819
|
-
|
|
1820
|
-
) : () => !0,
|
|
1459
|
+
}, Xe = (t) => (...e) => d.asap(() => t(...e)), kr = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, T.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
1460
|
+
new URL(T.origin),
|
|
1461
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
1462
|
+
) : () => !0, Nr = T.hasStandardBrowserEnv ? (
|
|
1821
1463
|
// Standard browser envs support document.cookie
|
|
1822
1464
|
{
|
|
1823
|
-
write(t, e, r, n,
|
|
1465
|
+
write(t, e, r, n, o, i) {
|
|
1824
1466
|
const s = [t + "=" + encodeURIComponent(e)];
|
|
1825
|
-
d.isNumber(r) && s.push("expires=" + new Date(r).toGMTString()), d.isString(n) && s.push("path=" + n), d.isString(
|
|
1467
|
+
d.isNumber(r) && s.push("expires=" + new Date(r).toGMTString()), d.isString(n) && s.push("path=" + n), d.isString(o) && s.push("domain=" + o), i === !0 && s.push("secure"), document.cookie = s.join("; ");
|
|
1826
1468
|
},
|
|
1827
1469
|
read(t) {
|
|
1828
1470
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -1844,49 +1486,49 @@ const ve = (t, e, r = 3) => {
|
|
|
1844
1486
|
}
|
|
1845
1487
|
}
|
|
1846
1488
|
);
|
|
1847
|
-
function
|
|
1489
|
+
function Rr(t) {
|
|
1848
1490
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1849
1491
|
}
|
|
1850
|
-
function
|
|
1492
|
+
function _r(t, e) {
|
|
1851
1493
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1852
1494
|
}
|
|
1853
|
-
function
|
|
1854
|
-
let n = !
|
|
1855
|
-
return t && (n || r == !1) ?
|
|
1495
|
+
function Ft(t, e, r) {
|
|
1496
|
+
let n = !Rr(e);
|
|
1497
|
+
return t && (n || r == !1) ? _r(t, e) : e;
|
|
1856
1498
|
}
|
|
1857
|
-
const
|
|
1858
|
-
function
|
|
1499
|
+
const Ge = (t) => t instanceof N ? { ...t } : t;
|
|
1500
|
+
function U(t, e) {
|
|
1859
1501
|
e = e || {};
|
|
1860
1502
|
const r = {};
|
|
1861
|
-
function n(
|
|
1862
|
-
return d.isPlainObject(
|
|
1503
|
+
function n(u, l, f, p) {
|
|
1504
|
+
return d.isPlainObject(u) && d.isPlainObject(l) ? d.merge.call({ caseless: p }, u, l) : d.isPlainObject(l) ? d.merge({}, l) : d.isArray(l) ? l.slice() : l;
|
|
1863
1505
|
}
|
|
1864
|
-
function
|
|
1506
|
+
function o(u, l, f, p) {
|
|
1865
1507
|
if (d.isUndefined(l)) {
|
|
1866
|
-
if (!d.isUndefined(
|
|
1867
|
-
return n(void 0,
|
|
1868
|
-
} else return n(
|
|
1508
|
+
if (!d.isUndefined(u))
|
|
1509
|
+
return n(void 0, u, f, p);
|
|
1510
|
+
} else return n(u, l, f, p);
|
|
1869
1511
|
}
|
|
1870
|
-
function
|
|
1512
|
+
function i(u, l) {
|
|
1871
1513
|
if (!d.isUndefined(l))
|
|
1872
1514
|
return n(void 0, l);
|
|
1873
1515
|
}
|
|
1874
|
-
function s(
|
|
1516
|
+
function s(u, l) {
|
|
1875
1517
|
if (d.isUndefined(l)) {
|
|
1876
|
-
if (!d.isUndefined(
|
|
1877
|
-
return n(void 0,
|
|
1518
|
+
if (!d.isUndefined(u))
|
|
1519
|
+
return n(void 0, u);
|
|
1878
1520
|
} else return n(void 0, l);
|
|
1879
1521
|
}
|
|
1880
|
-
function a(
|
|
1522
|
+
function a(u, l, f) {
|
|
1881
1523
|
if (f in e)
|
|
1882
|
-
return n(
|
|
1524
|
+
return n(u, l);
|
|
1883
1525
|
if (f in t)
|
|
1884
|
-
return n(void 0,
|
|
1526
|
+
return n(void 0, u);
|
|
1885
1527
|
}
|
|
1886
|
-
const
|
|
1887
|
-
url:
|
|
1888
|
-
method:
|
|
1889
|
-
data:
|
|
1528
|
+
const c = {
|
|
1529
|
+
url: i,
|
|
1530
|
+
method: i,
|
|
1531
|
+
data: i,
|
|
1890
1532
|
baseURL: s,
|
|
1891
1533
|
transformRequest: s,
|
|
1892
1534
|
transformResponse: s,
|
|
@@ -1912,63 +1554,63 @@ function H(t, e) {
|
|
|
1912
1554
|
socketPath: s,
|
|
1913
1555
|
responseEncoding: s,
|
|
1914
1556
|
validateStatus: a,
|
|
1915
|
-
headers: (
|
|
1557
|
+
headers: (u, l, f) => o(Ge(u), Ge(l), f, !0)
|
|
1916
1558
|
};
|
|
1917
1559
|
return d.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
|
1918
|
-
const f =
|
|
1560
|
+
const f = c[l] || o, p = f(t[l], e[l], l);
|
|
1919
1561
|
d.isUndefined(p) && f !== a || (r[l] = p);
|
|
1920
1562
|
}), r;
|
|
1921
1563
|
}
|
|
1922
|
-
const
|
|
1923
|
-
const e =
|
|
1924
|
-
let { data: r, withXSRFToken: n, xsrfHeaderName:
|
|
1925
|
-
e.headers = s =
|
|
1564
|
+
const jt = (t) => {
|
|
1565
|
+
const e = U({}, t);
|
|
1566
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: a } = e;
|
|
1567
|
+
e.headers = s = N.from(s), e.url = Pt(Ft(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && s.set(
|
|
1926
1568
|
"Authorization",
|
|
1927
1569
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1928
1570
|
);
|
|
1929
|
-
let
|
|
1571
|
+
let c;
|
|
1930
1572
|
if (d.isFormData(r)) {
|
|
1931
|
-
if (
|
|
1573
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1932
1574
|
s.setContentType(void 0);
|
|
1933
|
-
else if ((
|
|
1934
|
-
const [
|
|
1935
|
-
s.setContentType([
|
|
1575
|
+
else if ((c = s.getContentType()) !== !1) {
|
|
1576
|
+
const [u, ...l] = c ? c.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1577
|
+
s.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1936
1578
|
}
|
|
1937
1579
|
}
|
|
1938
|
-
if (
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1580
|
+
if (T.hasStandardBrowserEnv && (n && d.isFunction(n) && (n = n(e)), n || n !== !1 && kr(e.url))) {
|
|
1581
|
+
const u = o && i && Nr.read(i);
|
|
1582
|
+
u && s.set(o, u);
|
|
1941
1583
|
}
|
|
1942
1584
|
return e;
|
|
1943
|
-
},
|
|
1585
|
+
}, Pr = typeof XMLHttpRequest < "u", xr = Pr && function(t) {
|
|
1944
1586
|
return new Promise(function(r, n) {
|
|
1945
|
-
const
|
|
1946
|
-
let
|
|
1947
|
-
const s =
|
|
1948
|
-
let { responseType: a, onUploadProgress:
|
|
1587
|
+
const o = jt(t);
|
|
1588
|
+
let i = o.data;
|
|
1589
|
+
const s = N.from(o.headers).normalize();
|
|
1590
|
+
let { responseType: a, onUploadProgress: c, onDownloadProgress: u } = o, l, f, p, y, m;
|
|
1949
1591
|
function g() {
|
|
1950
|
-
y && y(), m && m(),
|
|
1592
|
+
y && y(), m && m(), o.cancelToken && o.cancelToken.unsubscribe(l), o.signal && o.signal.removeEventListener("abort", l);
|
|
1951
1593
|
}
|
|
1952
1594
|
let h = new XMLHttpRequest();
|
|
1953
|
-
h.open(
|
|
1595
|
+
h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
|
|
1954
1596
|
function w() {
|
|
1955
1597
|
if (!h)
|
|
1956
1598
|
return;
|
|
1957
|
-
const
|
|
1599
|
+
const A = N.from(
|
|
1958
1600
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1959
|
-
),
|
|
1601
|
+
), O = {
|
|
1960
1602
|
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1961
1603
|
status: h.status,
|
|
1962
1604
|
statusText: h.statusText,
|
|
1963
|
-
headers:
|
|
1605
|
+
headers: A,
|
|
1964
1606
|
config: t,
|
|
1965
1607
|
request: h
|
|
1966
1608
|
};
|
|
1967
|
-
|
|
1968
|
-
r(
|
|
1969
|
-
}, function(
|
|
1970
|
-
n(
|
|
1971
|
-
},
|
|
1609
|
+
qt(function(M) {
|
|
1610
|
+
r(M), g();
|
|
1611
|
+
}, function(M) {
|
|
1612
|
+
n(M), g();
|
|
1613
|
+
}, O), h = null;
|
|
1972
1614
|
}
|
|
1973
1615
|
"onloadend" in h ? h.onloadend = w : h.onreadystatechange = function() {
|
|
1974
1616
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
@@ -1977,62 +1619,62 @@ const rn = (t) => {
|
|
|
1977
1619
|
}, h.onerror = function() {
|
|
1978
1620
|
n(new b("Network Error", b.ERR_NETWORK, t, h)), h = null;
|
|
1979
1621
|
}, h.ontimeout = function() {
|
|
1980
|
-
let
|
|
1981
|
-
const
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1622
|
+
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1623
|
+
const O = o.transitional || xt;
|
|
1624
|
+
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), n(new b(
|
|
1625
|
+
C,
|
|
1626
|
+
O.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
1985
1627
|
t,
|
|
1986
1628
|
h
|
|
1987
1629
|
)), h = null;
|
|
1988
|
-
},
|
|
1989
|
-
h.setRequestHeader(
|
|
1990
|
-
}), d.isUndefined(
|
|
1991
|
-
h && (n(!
|
|
1992
|
-
},
|
|
1993
|
-
const
|
|
1994
|
-
if (
|
|
1995
|
-
n(new b("Unsupported protocol " +
|
|
1630
|
+
}, i === void 0 && s.setContentType(null), "setRequestHeader" in h && d.forEach(s.toJSON(), function(C, O) {
|
|
1631
|
+
h.setRequestHeader(O, C);
|
|
1632
|
+
}), d.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType), u && ([p, m] = pe(u, !0), h.addEventListener("progress", p)), c && h.upload && ([f, y] = pe(c), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", y)), (o.cancelToken || o.signal) && (l = (A) => {
|
|
1633
|
+
h && (n(!A || A.type ? new K(null, t, h) : A), h.abort(), h = null);
|
|
1634
|
+
}, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
|
|
1635
|
+
const S = Er(o.url);
|
|
1636
|
+
if (S && T.protocols.indexOf(S) === -1) {
|
|
1637
|
+
n(new b("Unsupported protocol " + S + ":", b.ERR_BAD_REQUEST, t));
|
|
1996
1638
|
return;
|
|
1997
1639
|
}
|
|
1998
|
-
h.send(
|
|
1640
|
+
h.send(i || null);
|
|
1999
1641
|
});
|
|
2000
|
-
},
|
|
1642
|
+
}, Cr = (t, e) => {
|
|
2001
1643
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
2002
1644
|
if (e || r) {
|
|
2003
|
-
let n = new AbortController(),
|
|
2004
|
-
const
|
|
2005
|
-
if (!
|
|
2006
|
-
|
|
2007
|
-
const l =
|
|
2008
|
-
n.abort(l instanceof b ? l : new
|
|
1645
|
+
let n = new AbortController(), o;
|
|
1646
|
+
const i = function(u) {
|
|
1647
|
+
if (!o) {
|
|
1648
|
+
o = !0, a();
|
|
1649
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1650
|
+
n.abort(l instanceof b ? l : new K(l instanceof Error ? l.message : l));
|
|
2009
1651
|
}
|
|
2010
1652
|
};
|
|
2011
1653
|
let s = e && setTimeout(() => {
|
|
2012
|
-
s = null,
|
|
1654
|
+
s = null, i(new b(`timeout ${e} of ms exceeded`, b.ETIMEDOUT));
|
|
2013
1655
|
}, e);
|
|
2014
1656
|
const a = () => {
|
|
2015
|
-
t && (s && clearTimeout(s), s = null, t.forEach((
|
|
2016
|
-
|
|
1657
|
+
t && (s && clearTimeout(s), s = null, t.forEach((u) => {
|
|
1658
|
+
u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
|
|
2017
1659
|
}), t = null);
|
|
2018
1660
|
};
|
|
2019
|
-
t.forEach((
|
|
2020
|
-
const { signal:
|
|
2021
|
-
return
|
|
1661
|
+
t.forEach((u) => u.addEventListener("abort", i));
|
|
1662
|
+
const { signal: c } = n;
|
|
1663
|
+
return c.unsubscribe = () => d.asap(a), c;
|
|
2022
1664
|
}
|
|
2023
|
-
},
|
|
1665
|
+
}, Dr = function* (t, e) {
|
|
2024
1666
|
let r = t.byteLength;
|
|
2025
1667
|
if (r < e) {
|
|
2026
1668
|
yield t;
|
|
2027
1669
|
return;
|
|
2028
1670
|
}
|
|
2029
|
-
let n = 0,
|
|
1671
|
+
let n = 0, o;
|
|
2030
1672
|
for (; n < r; )
|
|
2031
|
-
|
|
2032
|
-
},
|
|
2033
|
-
for await (const r of
|
|
2034
|
-
yield*
|
|
2035
|
-
},
|
|
1673
|
+
o = n + e, yield t.slice(n, o), n = o;
|
|
1674
|
+
}, qr = async function* (t, e) {
|
|
1675
|
+
for await (const r of Fr(t))
|
|
1676
|
+
yield* Dr(r, e);
|
|
1677
|
+
}, Fr = async function* (t) {
|
|
2036
1678
|
if (t[Symbol.asyncIterator]) {
|
|
2037
1679
|
yield* t;
|
|
2038
1680
|
return;
|
|
@@ -2048,44 +1690,44 @@ const rn = (t) => {
|
|
|
2048
1690
|
} finally {
|
|
2049
1691
|
await e.cancel();
|
|
2050
1692
|
}
|
|
2051
|
-
},
|
|
2052
|
-
const
|
|
2053
|
-
let
|
|
2054
|
-
s || (s = !0, n && n(
|
|
1693
|
+
}, Ye = (t, e, r, n) => {
|
|
1694
|
+
const o = qr(t, e);
|
|
1695
|
+
let i = 0, s, a = (c) => {
|
|
1696
|
+
s || (s = !0, n && n(c));
|
|
2055
1697
|
};
|
|
2056
1698
|
return new ReadableStream({
|
|
2057
|
-
async pull(
|
|
1699
|
+
async pull(c) {
|
|
2058
1700
|
try {
|
|
2059
|
-
const { done:
|
|
2060
|
-
if (
|
|
2061
|
-
a(),
|
|
1701
|
+
const { done: u, value: l } = await o.next();
|
|
1702
|
+
if (u) {
|
|
1703
|
+
a(), c.close();
|
|
2062
1704
|
return;
|
|
2063
1705
|
}
|
|
2064
1706
|
let f = l.byteLength;
|
|
2065
1707
|
if (r) {
|
|
2066
|
-
let p =
|
|
1708
|
+
let p = i += f;
|
|
2067
1709
|
r(p);
|
|
2068
1710
|
}
|
|
2069
|
-
|
|
2070
|
-
} catch (
|
|
2071
|
-
throw a(
|
|
1711
|
+
c.enqueue(new Uint8Array(l));
|
|
1712
|
+
} catch (u) {
|
|
1713
|
+
throw a(u), u;
|
|
2072
1714
|
}
|
|
2073
1715
|
},
|
|
2074
|
-
cancel(
|
|
2075
|
-
return a(
|
|
1716
|
+
cancel(c) {
|
|
1717
|
+
return a(c), o.return();
|
|
2076
1718
|
}
|
|
2077
1719
|
}, {
|
|
2078
1720
|
highWaterMark: 2
|
|
2079
1721
|
});
|
|
2080
|
-
},
|
|
1722
|
+
}, ve = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Mt = ve && typeof ReadableStream == "function", jr = ve && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), Bt = (t, ...e) => {
|
|
2081
1723
|
try {
|
|
2082
1724
|
return !!t(...e);
|
|
2083
1725
|
} catch {
|
|
2084
1726
|
return !1;
|
|
2085
1727
|
}
|
|
2086
|
-
},
|
|
1728
|
+
}, Mr = Mt && Bt(() => {
|
|
2087
1729
|
let t = !1;
|
|
2088
|
-
const e = new Request(
|
|
1730
|
+
const e = new Request(T.origin, {
|
|
2089
1731
|
body: new ReadableStream(),
|
|
2090
1732
|
method: "POST",
|
|
2091
1733
|
get duplex() {
|
|
@@ -2093,67 +1735,67 @@ const rn = (t) => {
|
|
|
2093
1735
|
}
|
|
2094
1736
|
}).headers.has("Content-Type");
|
|
2095
1737
|
return t && !e;
|
|
2096
|
-
}),
|
|
2097
|
-
stream:
|
|
1738
|
+
}), Ze = 64 * 1024, Fe = Mt && Bt(() => d.isReadableStream(new Response("").body)), me = {
|
|
1739
|
+
stream: Fe && ((t) => t.body)
|
|
2098
1740
|
};
|
|
2099
|
-
|
|
1741
|
+
ve && ((t) => {
|
|
2100
1742
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
2101
|
-
!
|
|
1743
|
+
!me[e] && (me[e] = d.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
|
|
2102
1744
|
throw new b(`Response type '${e}' is not supported`, b.ERR_NOT_SUPPORT, n);
|
|
2103
1745
|
});
|
|
2104
1746
|
});
|
|
2105
1747
|
})(new Response());
|
|
2106
|
-
const
|
|
1748
|
+
const Br = async (t) => {
|
|
2107
1749
|
if (t == null)
|
|
2108
1750
|
return 0;
|
|
2109
1751
|
if (d.isBlob(t))
|
|
2110
1752
|
return t.size;
|
|
2111
1753
|
if (d.isSpecCompliantForm(t))
|
|
2112
|
-
return (await new Request(
|
|
1754
|
+
return (await new Request(T.origin, {
|
|
2113
1755
|
method: "POST",
|
|
2114
1756
|
body: t
|
|
2115
1757
|
}).arrayBuffer()).byteLength;
|
|
2116
1758
|
if (d.isArrayBufferView(t) || d.isArrayBuffer(t))
|
|
2117
1759
|
return t.byteLength;
|
|
2118
1760
|
if (d.isURLSearchParams(t) && (t = t + ""), d.isString(t))
|
|
2119
|
-
return (await
|
|
2120
|
-
},
|
|
1761
|
+
return (await jr(t)).byteLength;
|
|
1762
|
+
}, Ir = async (t, e) => {
|
|
2121
1763
|
const r = d.toFiniteNumber(t.getContentLength());
|
|
2122
|
-
return r ??
|
|
2123
|
-
},
|
|
1764
|
+
return r ?? Br(e);
|
|
1765
|
+
}, Ur = ve && (async (t) => {
|
|
2124
1766
|
let {
|
|
2125
1767
|
url: e,
|
|
2126
1768
|
method: r,
|
|
2127
1769
|
data: n,
|
|
2128
|
-
signal:
|
|
2129
|
-
cancelToken:
|
|
1770
|
+
signal: o,
|
|
1771
|
+
cancelToken: i,
|
|
2130
1772
|
timeout: s,
|
|
2131
1773
|
onDownloadProgress: a,
|
|
2132
|
-
onUploadProgress:
|
|
2133
|
-
responseType:
|
|
1774
|
+
onUploadProgress: c,
|
|
1775
|
+
responseType: u,
|
|
2134
1776
|
headers: l,
|
|
2135
1777
|
withCredentials: f = "same-origin",
|
|
2136
1778
|
fetchOptions: p
|
|
2137
|
-
} =
|
|
2138
|
-
|
|
2139
|
-
let y =
|
|
1779
|
+
} = jt(t);
|
|
1780
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1781
|
+
let y = Cr([o, i && i.toAbortSignal()], s), m;
|
|
2140
1782
|
const g = y && y.unsubscribe && (() => {
|
|
2141
1783
|
y.unsubscribe();
|
|
2142
1784
|
});
|
|
2143
1785
|
let h;
|
|
2144
1786
|
try {
|
|
2145
|
-
if (
|
|
2146
|
-
let
|
|
1787
|
+
if (c && Mr && r !== "get" && r !== "head" && (h = await Ir(l, n)) !== 0) {
|
|
1788
|
+
let O = new Request(e, {
|
|
2147
1789
|
method: "POST",
|
|
2148
1790
|
body: n,
|
|
2149
1791
|
duplex: "half"
|
|
2150
|
-
}),
|
|
2151
|
-
if (d.isFormData(n) && (
|
|
2152
|
-
const [
|
|
1792
|
+
}), q;
|
|
1793
|
+
if (d.isFormData(n) && (q = O.headers.get("content-type")) && l.setContentType(q), O.body) {
|
|
1794
|
+
const [M, re] = Ke(
|
|
2153
1795
|
h,
|
|
2154
|
-
|
|
1796
|
+
pe(Xe(c))
|
|
2155
1797
|
);
|
|
2156
|
-
n =
|
|
1798
|
+
n = Ye(O.body, Ze, M, re);
|
|
2157
1799
|
}
|
|
2158
1800
|
}
|
|
2159
1801
|
d.isString(f) || (f = f ? "include" : "omit");
|
|
@@ -2167,32 +1809,32 @@ const wi = async (t) => {
|
|
|
2167
1809
|
duplex: "half",
|
|
2168
1810
|
credentials: w ? f : void 0
|
|
2169
1811
|
});
|
|
2170
|
-
let
|
|
2171
|
-
const
|
|
2172
|
-
if (
|
|
2173
|
-
const
|
|
2174
|
-
["status", "statusText", "headers"].forEach((
|
|
2175
|
-
|
|
1812
|
+
let S = await fetch(m, p);
|
|
1813
|
+
const A = Fe && (u === "stream" || u === "response");
|
|
1814
|
+
if (Fe && (a || A && g)) {
|
|
1815
|
+
const O = {};
|
|
1816
|
+
["status", "statusText", "headers"].forEach((Le) => {
|
|
1817
|
+
O[Le] = S[Le];
|
|
2176
1818
|
});
|
|
2177
|
-
const
|
|
2178
|
-
|
|
2179
|
-
|
|
1819
|
+
const q = d.toFiniteNumber(S.headers.get("content-length")), [M, re] = a && Ke(
|
|
1820
|
+
q,
|
|
1821
|
+
pe(Xe(a), !0)
|
|
2180
1822
|
) || [];
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
1823
|
+
S = new Response(
|
|
1824
|
+
Ye(S.body, Ze, M, () => {
|
|
1825
|
+
re && re(), g && g();
|
|
2184
1826
|
}),
|
|
2185
|
-
|
|
1827
|
+
O
|
|
2186
1828
|
);
|
|
2187
1829
|
}
|
|
2188
|
-
|
|
2189
|
-
let
|
|
2190
|
-
return !
|
|
2191
|
-
|
|
2192
|
-
data:
|
|
2193
|
-
headers:
|
|
2194
|
-
status:
|
|
2195
|
-
statusText:
|
|
1830
|
+
u = u || "text";
|
|
1831
|
+
let C = await me[d.findKey(me, u) || "text"](S, t);
|
|
1832
|
+
return !A && g && g(), await new Promise((O, q) => {
|
|
1833
|
+
qt(O, q, {
|
|
1834
|
+
data: C,
|
|
1835
|
+
headers: N.from(S.headers),
|
|
1836
|
+
status: S.status,
|
|
1837
|
+
statusText: S.statusText,
|
|
2196
1838
|
config: t,
|
|
2197
1839
|
request: m
|
|
2198
1840
|
});
|
|
@@ -2205,12 +1847,12 @@ const wi = async (t) => {
|
|
|
2205
1847
|
}
|
|
2206
1848
|
) : b.from(w, w && w.code, t, m);
|
|
2207
1849
|
}
|
|
2208
|
-
}),
|
|
2209
|
-
http:
|
|
2210
|
-
xhr:
|
|
2211
|
-
fetch:
|
|
1850
|
+
}), je = {
|
|
1851
|
+
http: tr,
|
|
1852
|
+
xhr: xr,
|
|
1853
|
+
fetch: Ur
|
|
2212
1854
|
};
|
|
2213
|
-
d.forEach(
|
|
1855
|
+
d.forEach(je, (t, e) => {
|
|
2214
1856
|
if (t) {
|
|
2215
1857
|
try {
|
|
2216
1858
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -2219,28 +1861,28 @@ d.forEach(Qe, (t, e) => {
|
|
|
2219
1861
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
2220
1862
|
}
|
|
2221
1863
|
});
|
|
2222
|
-
const
|
|
1864
|
+
const et = (t) => `- ${t}`, $r = (t) => d.isFunction(t) || t === null || t === !1, It = {
|
|
2223
1865
|
getAdapter: (t) => {
|
|
2224
1866
|
t = d.isArray(t) ? t : [t];
|
|
2225
1867
|
const { length: e } = t;
|
|
2226
1868
|
let r, n;
|
|
2227
|
-
const
|
|
2228
|
-
for (let
|
|
2229
|
-
r = t[
|
|
1869
|
+
const o = {};
|
|
1870
|
+
for (let i = 0; i < e; i++) {
|
|
1871
|
+
r = t[i];
|
|
2230
1872
|
let s;
|
|
2231
|
-
if (n = r,
|
|
1873
|
+
if (n = r, !$r(r) && (n = je[(s = String(r)).toLowerCase()], n === void 0))
|
|
2232
1874
|
throw new b(`Unknown adapter '${s}'`);
|
|
2233
1875
|
if (n)
|
|
2234
1876
|
break;
|
|
2235
|
-
|
|
1877
|
+
o[s || "#" + i] = n;
|
|
2236
1878
|
}
|
|
2237
1879
|
if (!n) {
|
|
2238
|
-
const
|
|
2239
|
-
([a,
|
|
1880
|
+
const i = Object.entries(o).map(
|
|
1881
|
+
([a, c]) => `adapter ${a} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2240
1882
|
);
|
|
2241
|
-
let s = e ?
|
|
2242
|
-
` +
|
|
2243
|
-
`) : " " +
|
|
1883
|
+
let s = e ? i.length > 1 ? `since :
|
|
1884
|
+
` + i.map(et).join(`
|
|
1885
|
+
`) : " " + et(i[0]) : "as no adapter specified";
|
|
2244
1886
|
throw new b(
|
|
2245
1887
|
"There is no suitable adapter to dispatch the request " + s,
|
|
2246
1888
|
"ERR_NOT_SUPPORT"
|
|
@@ -2248,84 +1890,84 @@ const St = (t) => `- ${t}`, Oi = (t) => d.isFunction(t) || t === null || t === !
|
|
|
2248
1890
|
}
|
|
2249
1891
|
return n;
|
|
2250
1892
|
},
|
|
2251
|
-
adapters:
|
|
1893
|
+
adapters: je
|
|
2252
1894
|
};
|
|
2253
|
-
function
|
|
1895
|
+
function xe(t) {
|
|
2254
1896
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
2255
|
-
throw new
|
|
1897
|
+
throw new K(null, t);
|
|
2256
1898
|
}
|
|
2257
|
-
function
|
|
2258
|
-
return
|
|
1899
|
+
function tt(t) {
|
|
1900
|
+
return xe(t), t.headers = N.from(t.headers), t.data = Pe.call(
|
|
2259
1901
|
t,
|
|
2260
1902
|
t.transformRequest
|
|
2261
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
2262
|
-
return
|
|
1903
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), It.getAdapter(t.adapter || ee.adapter)(t).then(function(n) {
|
|
1904
|
+
return xe(t), n.data = Pe.call(
|
|
2263
1905
|
t,
|
|
2264
1906
|
t.transformResponse,
|
|
2265
1907
|
n
|
|
2266
|
-
), n.headers =
|
|
1908
|
+
), n.headers = N.from(n.headers), n;
|
|
2267
1909
|
}, function(n) {
|
|
2268
|
-
return
|
|
1910
|
+
return Dt(n) || (xe(t), n && n.response && (n.response.data = Pe.call(
|
|
2269
1911
|
t,
|
|
2270
1912
|
t.transformResponse,
|
|
2271
1913
|
n.response
|
|
2272
|
-
), n.response.headers =
|
|
1914
|
+
), n.response.headers = N.from(n.response.headers))), Promise.reject(n);
|
|
2273
1915
|
});
|
|
2274
1916
|
}
|
|
2275
|
-
const
|
|
1917
|
+
const Ut = "1.10.0", Ae = {};
|
|
2276
1918
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2277
|
-
|
|
1919
|
+
Ae[t] = function(n) {
|
|
2278
1920
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2279
1921
|
};
|
|
2280
1922
|
});
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2283
|
-
function i
|
|
2284
|
-
return "[Axios v" +
|
|
1923
|
+
const nt = {};
|
|
1924
|
+
Ae.transitional = function(e, r, n) {
|
|
1925
|
+
function o(i, s) {
|
|
1926
|
+
return "[Axios v" + Ut + "] Transitional option '" + i + "'" + s + (n ? ". " + n : "");
|
|
2285
1927
|
}
|
|
2286
|
-
return (
|
|
1928
|
+
return (i, s, a) => {
|
|
2287
1929
|
if (e === !1)
|
|
2288
1930
|
throw new b(
|
|
2289
|
-
|
|
1931
|
+
o(s, " has been removed" + (r ? " in " + r : "")),
|
|
2290
1932
|
b.ERR_DEPRECATED
|
|
2291
1933
|
);
|
|
2292
|
-
return r && !
|
|
2293
|
-
|
|
1934
|
+
return r && !nt[s] && (nt[s] = !0, console.warn(
|
|
1935
|
+
o(
|
|
2294
1936
|
s,
|
|
2295
1937
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
2296
1938
|
)
|
|
2297
|
-
)), e ? e(
|
|
1939
|
+
)), e ? e(i, s, a) : !0;
|
|
2298
1940
|
};
|
|
2299
1941
|
};
|
|
2300
|
-
|
|
1942
|
+
Ae.spelling = function(e) {
|
|
2301
1943
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
2302
1944
|
};
|
|
2303
|
-
function
|
|
1945
|
+
function Lr(t, e, r) {
|
|
2304
1946
|
if (typeof t != "object")
|
|
2305
1947
|
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
2306
1948
|
const n = Object.keys(t);
|
|
2307
|
-
let
|
|
2308
|
-
for (;
|
|
2309
|
-
const
|
|
1949
|
+
let o = n.length;
|
|
1950
|
+
for (; o-- > 0; ) {
|
|
1951
|
+
const i = n[o], s = e[i];
|
|
2310
1952
|
if (s) {
|
|
2311
|
-
const a = t[
|
|
2312
|
-
if (
|
|
2313
|
-
throw new b("option " +
|
|
1953
|
+
const a = t[i], c = a === void 0 || s(a, i, t);
|
|
1954
|
+
if (c !== !0)
|
|
1955
|
+
throw new b("option " + i + " must be " + c, b.ERR_BAD_OPTION_VALUE);
|
|
2314
1956
|
continue;
|
|
2315
1957
|
}
|
|
2316
1958
|
if (r !== !0)
|
|
2317
|
-
throw new b("Unknown option " +
|
|
1959
|
+
throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
|
|
2318
1960
|
}
|
|
2319
1961
|
}
|
|
2320
|
-
const
|
|
2321
|
-
assertOptions:
|
|
2322
|
-
validators:
|
|
2323
|
-
},
|
|
2324
|
-
let
|
|
1962
|
+
const fe = {
|
|
1963
|
+
assertOptions: Lr,
|
|
1964
|
+
validators: Ae
|
|
1965
|
+
}, x = fe.validators;
|
|
1966
|
+
let I = class {
|
|
2325
1967
|
constructor(e) {
|
|
2326
1968
|
this.defaults = e || {}, this.interceptors = {
|
|
2327
|
-
request: new
|
|
2328
|
-
response: new
|
|
1969
|
+
request: new Je(),
|
|
1970
|
+
response: new Je()
|
|
2329
1971
|
};
|
|
2330
1972
|
}
|
|
2331
1973
|
/**
|
|
@@ -2341,12 +1983,12 @@ let L = class {
|
|
|
2341
1983
|
return await this._request(e, r);
|
|
2342
1984
|
} catch (n) {
|
|
2343
1985
|
if (n instanceof Error) {
|
|
2344
|
-
let
|
|
2345
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
2346
|
-
const
|
|
1986
|
+
let o = {};
|
|
1987
|
+
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1988
|
+
const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
2347
1989
|
try {
|
|
2348
|
-
n.stack ?
|
|
2349
|
-
` +
|
|
1990
|
+
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1991
|
+
` + i) : n.stack = i;
|
|
2350
1992
|
} catch {
|
|
2351
1993
|
}
|
|
2352
1994
|
}
|
|
@@ -2354,44 +1996,44 @@ let L = class {
|
|
|
2354
1996
|
}
|
|
2355
1997
|
}
|
|
2356
1998
|
_request(e, r) {
|
|
2357
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
2358
|
-
const { transitional: n, paramsSerializer:
|
|
2359
|
-
n !== void 0 &&
|
|
2360
|
-
silentJSONParsing:
|
|
2361
|
-
forcedJSONParsing:
|
|
2362
|
-
clarifyTimeoutError:
|
|
2363
|
-
}, !1),
|
|
2364
|
-
serialize:
|
|
2365
|
-
} :
|
|
2366
|
-
encode:
|
|
2367
|
-
serialize:
|
|
2368
|
-
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
2369
|
-
baseUrl:
|
|
2370
|
-
withXsrfToken:
|
|
1999
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = U(this.defaults, r);
|
|
2000
|
+
const { transitional: n, paramsSerializer: o, headers: i } = r;
|
|
2001
|
+
n !== void 0 && fe.assertOptions(n, {
|
|
2002
|
+
silentJSONParsing: x.transitional(x.boolean),
|
|
2003
|
+
forcedJSONParsing: x.transitional(x.boolean),
|
|
2004
|
+
clarifyTimeoutError: x.transitional(x.boolean)
|
|
2005
|
+
}, !1), o != null && (d.isFunction(o) ? r.paramsSerializer = {
|
|
2006
|
+
serialize: o
|
|
2007
|
+
} : fe.assertOptions(o, {
|
|
2008
|
+
encode: x.function,
|
|
2009
|
+
serialize: x.function
|
|
2010
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), fe.assertOptions(r, {
|
|
2011
|
+
baseUrl: x.spelling("baseURL"),
|
|
2012
|
+
withXsrfToken: x.spelling("withXSRFToken")
|
|
2371
2013
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2372
|
-
let s =
|
|
2373
|
-
|
|
2374
|
-
|
|
2014
|
+
let s = i && d.merge(
|
|
2015
|
+
i.common,
|
|
2016
|
+
i[r.method]
|
|
2375
2017
|
);
|
|
2376
|
-
|
|
2018
|
+
i && d.forEach(
|
|
2377
2019
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2378
2020
|
(m) => {
|
|
2379
|
-
delete
|
|
2021
|
+
delete i[m];
|
|
2380
2022
|
}
|
|
2381
|
-
), r.headers =
|
|
2023
|
+
), r.headers = N.concat(s, i);
|
|
2382
2024
|
const a = [];
|
|
2383
|
-
let
|
|
2025
|
+
let c = !0;
|
|
2384
2026
|
this.interceptors.request.forEach(function(g) {
|
|
2385
|
-
typeof g.runWhen == "function" && g.runWhen(r) === !1 || (
|
|
2027
|
+
typeof g.runWhen == "function" && g.runWhen(r) === !1 || (c = c && g.synchronous, a.unshift(g.fulfilled, g.rejected));
|
|
2386
2028
|
});
|
|
2387
|
-
const
|
|
2029
|
+
const u = [];
|
|
2388
2030
|
this.interceptors.response.forEach(function(g) {
|
|
2389
|
-
|
|
2031
|
+
u.push(g.fulfilled, g.rejected);
|
|
2390
2032
|
});
|
|
2391
2033
|
let l, f = 0, p;
|
|
2392
|
-
if (!
|
|
2393
|
-
const m = [
|
|
2394
|
-
for (m.unshift.apply(m, a), m.push.apply(m,
|
|
2034
|
+
if (!c) {
|
|
2035
|
+
const m = [tt.bind(this), void 0];
|
|
2036
|
+
for (m.unshift.apply(m, a), m.push.apply(m, u), p = m.length, l = Promise.resolve(r); f < p; )
|
|
2395
2037
|
l = l.then(m[f++], m[f++]);
|
|
2396
2038
|
return l;
|
|
2397
2039
|
}
|
|
@@ -2407,23 +2049,23 @@ let L = class {
|
|
|
2407
2049
|
}
|
|
2408
2050
|
}
|
|
2409
2051
|
try {
|
|
2410
|
-
l =
|
|
2052
|
+
l = tt.call(this, y);
|
|
2411
2053
|
} catch (m) {
|
|
2412
2054
|
return Promise.reject(m);
|
|
2413
2055
|
}
|
|
2414
|
-
for (f = 0, p =
|
|
2415
|
-
l = l.then(
|
|
2056
|
+
for (f = 0, p = u.length; f < p; )
|
|
2057
|
+
l = l.then(u[f++], u[f++]);
|
|
2416
2058
|
return l;
|
|
2417
2059
|
}
|
|
2418
2060
|
getUri(e) {
|
|
2419
|
-
e =
|
|
2420
|
-
const r =
|
|
2421
|
-
return
|
|
2061
|
+
e = U(this.defaults, e);
|
|
2062
|
+
const r = Ft(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
2063
|
+
return Pt(r, e.params, e.paramsSerializer);
|
|
2422
2064
|
}
|
|
2423
2065
|
};
|
|
2424
2066
|
d.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2425
|
-
|
|
2426
|
-
return this.request(
|
|
2067
|
+
I.prototype[e] = function(r, n) {
|
|
2068
|
+
return this.request(U(n || {}, {
|
|
2427
2069
|
method: e,
|
|
2428
2070
|
url: r,
|
|
2429
2071
|
data: (n || {}).data
|
|
@@ -2432,44 +2074,44 @@ d.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
2432
2074
|
});
|
|
2433
2075
|
d.forEach(["post", "put", "patch"], function(e) {
|
|
2434
2076
|
function r(n) {
|
|
2435
|
-
return function(
|
|
2436
|
-
return this.request(
|
|
2077
|
+
return function(i, s, a) {
|
|
2078
|
+
return this.request(U(a || {}, {
|
|
2437
2079
|
method: e,
|
|
2438
2080
|
headers: n ? {
|
|
2439
2081
|
"Content-Type": "multipart/form-data"
|
|
2440
2082
|
} : {},
|
|
2441
|
-
url:
|
|
2083
|
+
url: i,
|
|
2442
2084
|
data: s
|
|
2443
2085
|
}));
|
|
2444
2086
|
};
|
|
2445
2087
|
}
|
|
2446
|
-
|
|
2088
|
+
I.prototype[e] = r(), I.prototype[e + "Form"] = r(!0);
|
|
2447
2089
|
});
|
|
2448
|
-
let
|
|
2090
|
+
let Vr = class $t {
|
|
2449
2091
|
constructor(e) {
|
|
2450
2092
|
if (typeof e != "function")
|
|
2451
2093
|
throw new TypeError("executor must be a function.");
|
|
2452
2094
|
let r;
|
|
2453
|
-
this.promise = new Promise(function(
|
|
2454
|
-
r =
|
|
2095
|
+
this.promise = new Promise(function(i) {
|
|
2096
|
+
r = i;
|
|
2455
2097
|
});
|
|
2456
2098
|
const n = this;
|
|
2457
|
-
this.promise.then((
|
|
2099
|
+
this.promise.then((o) => {
|
|
2458
2100
|
if (!n._listeners) return;
|
|
2459
|
-
let
|
|
2460
|
-
for (;
|
|
2461
|
-
n._listeners[
|
|
2101
|
+
let i = n._listeners.length;
|
|
2102
|
+
for (; i-- > 0; )
|
|
2103
|
+
n._listeners[i](o);
|
|
2462
2104
|
n._listeners = null;
|
|
2463
|
-
}), this.promise.then = (
|
|
2464
|
-
let
|
|
2105
|
+
}), this.promise.then = (o) => {
|
|
2106
|
+
let i;
|
|
2465
2107
|
const s = new Promise((a) => {
|
|
2466
|
-
n.subscribe(a),
|
|
2467
|
-
}).then(
|
|
2108
|
+
n.subscribe(a), i = a;
|
|
2109
|
+
}).then(o);
|
|
2468
2110
|
return s.cancel = function() {
|
|
2469
|
-
n.unsubscribe(
|
|
2111
|
+
n.unsubscribe(i);
|
|
2470
2112
|
}, s;
|
|
2471
|
-
}, e(function(
|
|
2472
|
-
n.reason || (n.reason = new
|
|
2113
|
+
}, e(function(i, s, a) {
|
|
2114
|
+
n.reason || (n.reason = new K(i, s, a), r(n.reason));
|
|
2473
2115
|
});
|
|
2474
2116
|
}
|
|
2475
2117
|
/**
|
|
@@ -2511,22 +2153,22 @@ let Ai = class cn {
|
|
|
2511
2153
|
static source() {
|
|
2512
2154
|
let e;
|
|
2513
2155
|
return {
|
|
2514
|
-
token: new
|
|
2515
|
-
e =
|
|
2156
|
+
token: new $t(function(o) {
|
|
2157
|
+
e = o;
|
|
2516
2158
|
}),
|
|
2517
2159
|
cancel: e
|
|
2518
2160
|
};
|
|
2519
2161
|
}
|
|
2520
2162
|
};
|
|
2521
|
-
function
|
|
2163
|
+
function Hr(t) {
|
|
2522
2164
|
return function(r) {
|
|
2523
2165
|
return t.apply(null, r);
|
|
2524
2166
|
};
|
|
2525
2167
|
}
|
|
2526
|
-
function
|
|
2168
|
+
function Wr(t) {
|
|
2527
2169
|
return d.isObject(t) && t.isAxiosError === !0;
|
|
2528
2170
|
}
|
|
2529
|
-
const
|
|
2171
|
+
const Me = {
|
|
2530
2172
|
Continue: 100,
|
|
2531
2173
|
SwitchingProtocols: 101,
|
|
2532
2174
|
Processing: 102,
|
|
@@ -2591,70 +2233,54 @@ const Ge = {
|
|
|
2591
2233
|
NotExtended: 510,
|
|
2592
2234
|
NetworkAuthenticationRequired: 511
|
|
2593
2235
|
};
|
|
2594
|
-
Object.entries(
|
|
2595
|
-
|
|
2236
|
+
Object.entries(Me).forEach(([t, e]) => {
|
|
2237
|
+
Me[e] = t;
|
|
2596
2238
|
});
|
|
2597
|
-
function
|
|
2598
|
-
const e = new
|
|
2599
|
-
return d.extend(r,
|
|
2600
|
-
return
|
|
2239
|
+
function Lt(t) {
|
|
2240
|
+
const e = new I(t), r = bt(I.prototype.request, e);
|
|
2241
|
+
return d.extend(r, I.prototype, e, { allOwnKeys: !0 }), d.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(o) {
|
|
2242
|
+
return Lt(U(t, o));
|
|
2601
2243
|
}, r;
|
|
2602
2244
|
}
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2245
|
+
const v = Lt(ee);
|
|
2246
|
+
v.Axios = I;
|
|
2247
|
+
v.CanceledError = K;
|
|
2248
|
+
v.CancelToken = Vr;
|
|
2249
|
+
v.isCancel = Dt;
|
|
2250
|
+
v.VERSION = Ut;
|
|
2251
|
+
v.toFormData = Se;
|
|
2252
|
+
v.AxiosError = b;
|
|
2253
|
+
v.Cancel = v.CanceledError;
|
|
2254
|
+
v.all = function(e) {
|
|
2613
2255
|
return Promise.all(e);
|
|
2614
2256
|
};
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2257
|
+
v.spread = Hr;
|
|
2258
|
+
v.isAxiosError = Wr;
|
|
2259
|
+
v.mergeConfig = U;
|
|
2260
|
+
v.AxiosHeaders = N;
|
|
2261
|
+
v.formToJSON = (t) => Ct(d.isHTMLForm(t) ? new FormData(t) : t);
|
|
2262
|
+
v.getAdapter = It.getAdapter;
|
|
2263
|
+
v.HttpStatusCode = Me;
|
|
2264
|
+
v.default = v;
|
|
2623
2265
|
const {
|
|
2624
|
-
Axios:
|
|
2625
|
-
AxiosError:
|
|
2626
|
-
CanceledError:
|
|
2627
|
-
isCancel:
|
|
2628
|
-
CancelToken:
|
|
2629
|
-
VERSION:
|
|
2630
|
-
all:
|
|
2631
|
-
Cancel:
|
|
2632
|
-
isAxiosError:
|
|
2633
|
-
spread:
|
|
2634
|
-
toFormData:
|
|
2635
|
-
AxiosHeaders:
|
|
2636
|
-
HttpStatusCode:
|
|
2637
|
-
formToJSON:
|
|
2638
|
-
getAdapter:
|
|
2639
|
-
mergeConfig:
|
|
2640
|
-
} =
|
|
2641
|
-
|
|
2642
|
-
typeof window < "u" ? (window.__STORE_QUERY_CLIENT__ ? x.log("Query client already exists in window", "vendure/axiosClient", window.__STORE_QUERY_CLIENT__) : (x.log("Creating query client in window", "vendure/axiosClient"), window.__STORE_QUERY_CLIENT__ = new $e({
|
|
2643
|
-
defaultOptions: {
|
|
2644
|
-
queries: {
|
|
2645
|
-
refetchOnWindowFocus: !0,
|
|
2646
|
-
refetchOnMount: !1,
|
|
2647
|
-
retry: 3,
|
|
2648
|
-
staleTime: 1e3 * 60 * 5
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
})), window.__STORE_API_CLIENT__ ? x.log("Axios instance already exists in window", "vendure/axiosClient", window.__STORE_API_CLIENT__) : (x.log("Creating axios instance in window", "vendure/axiosClient"), window.__STORE_API_CLIENT__ = S.create({
|
|
2652
|
-
baseURL: "https://localhost:3000/shop-api",
|
|
2653
|
-
withCredentials: !0,
|
|
2654
|
-
headers: {
|
|
2655
|
-
"vendure-token": ""
|
|
2656
|
-
}
|
|
2657
|
-
})), Oe = window.__STORE_API_CLIENT__) : (x.log("Creating query client", "vendure/axiosClient"), new $e({
|
|
2266
|
+
Axios: Oo,
|
|
2267
|
+
AxiosError: rt,
|
|
2268
|
+
CanceledError: ko,
|
|
2269
|
+
isCancel: No,
|
|
2270
|
+
CancelToken: Ro,
|
|
2271
|
+
VERSION: _o,
|
|
2272
|
+
all: Po,
|
|
2273
|
+
Cancel: xo,
|
|
2274
|
+
isAxiosError: Co,
|
|
2275
|
+
spread: Do,
|
|
2276
|
+
toFormData: qo,
|
|
2277
|
+
AxiosHeaders: Fo,
|
|
2278
|
+
HttpStatusCode: jo,
|
|
2279
|
+
formToJSON: Mo,
|
|
2280
|
+
getAdapter: Bo,
|
|
2281
|
+
mergeConfig: Io
|
|
2282
|
+
} = v, zr = (t) => Be.some(t, (e) => e && e.errorCode !== void 0) || t?.errorCode !== void 0;
|
|
2283
|
+
globalThis.__STORE_QUERY_CLIENT__ ||= new yt({
|
|
2658
2284
|
defaultOptions: {
|
|
2659
2285
|
queries: {
|
|
2660
2286
|
refetchOnWindowFocus: !0,
|
|
@@ -2663,212 +2289,219 @@ typeof window < "u" ? (window.__STORE_QUERY_CLIENT__ ? x.log("Query client alrea
|
|
|
2663
2289
|
staleTime: 1e3 * 60 * 5
|
|
2664
2290
|
}
|
|
2665
2291
|
}
|
|
2666
|
-
})
|
|
2292
|
+
});
|
|
2293
|
+
const Vt = globalThis.__STORE_API_CLIENT__ ||= v.create({
|
|
2667
2294
|
baseURL: "https://localhost:3000/shop-api",
|
|
2668
2295
|
withCredentials: !0,
|
|
2669
2296
|
headers: {
|
|
2670
2297
|
"vendure-token": ""
|
|
2671
2298
|
}
|
|
2672
|
-
})
|
|
2673
|
-
|
|
2674
|
-
let ki = async (t, e) => {
|
|
2299
|
+
}), Ht = "auth_token", Jr = "lang", Qr = "currencyCode";
|
|
2300
|
+
let Kr = async (t, e) => {
|
|
2675
2301
|
await e(t);
|
|
2676
2302
|
};
|
|
2677
|
-
|
|
2678
|
-
const n = await F.getItem(
|
|
2679
|
-
n && (r.headers.Authorization = `Bearer ${n}`),
|
|
2303
|
+
Vt.interceptors.request.use(async (t) => (await Kr(t, async (r) => {
|
|
2304
|
+
const n = await F.getItem(Ht), o = await F.getItem("channelToken"), i = await F.getItem(Qr), s = await F.getItem(Jr);
|
|
2305
|
+
n && (r.headers.Authorization = `Bearer ${n}`), o && (r.headers["vendure-token"] = o), r.params = r.params || {}, i && (r.params.currencyCode = i), s && (r.params.languageCode = s);
|
|
2680
2306
|
}), t));
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2307
|
+
let Xr = async (t, e) => {
|
|
2308
|
+
await e(t);
|
|
2309
|
+
};
|
|
2310
|
+
Vt.interceptors.response.use(async (t) => (await Xr(t, async (r) => {
|
|
2311
|
+
const n = r.headers["vendure-auth-token"];
|
|
2312
|
+
if (n && F.setItem(Ht, n), zr(r.data.data)) {
|
|
2313
|
+
const o = Object.values(r.data.data)[0], i = new rt(o.errorCode);
|
|
2314
|
+
return i.response = r, i.request = r.request, i.config = r.config, Promise.reject(i);
|
|
2315
|
+
}
|
|
2316
|
+
if (r.data.errors?.length > 0) {
|
|
2317
|
+
const o = r.data.errors[0], i = new rt(o.message);
|
|
2318
|
+
return i.response = r, i.request = r.request, i.config = r.config, Promise.reject(i);
|
|
2319
|
+
}
|
|
2320
|
+
}), t), (t) => (gt.error("Axios error", "vendure/axiosClient", t), Promise.reject(t)));
|
|
2321
|
+
const Gr = globalThis.__STORE_SDK_CONTEXT__ ||= ht(void 0), Yr = () => {
|
|
2322
|
+
const e = Gt(Gr)?.sdk;
|
|
2323
|
+
return e || console.error("You must wrap your component in a <DataProvider>"), e?.sdkType === "dummy" || e?.sdkType === "vendure", e;
|
|
2324
|
+
};
|
|
2325
|
+
new Event("searchParamsUpdate");
|
|
2326
|
+
var _ = {}, ie = {}, se = {}, ae = {}, ot;
|
|
2327
|
+
function te() {
|
|
2328
|
+
if (ot) return ae;
|
|
2329
|
+
ot = 1, Object.defineProperty(ae, "__esModule", { value: !0 });
|
|
2697
2330
|
var t;
|
|
2698
2331
|
return function(e) {
|
|
2699
2332
|
e.Mutation = "mutation", e.Query = "query", e.Subscription = "subscription";
|
|
2700
|
-
}(t || (t = {})),
|
|
2333
|
+
}(t || (t = {})), ae.default = t, ae;
|
|
2701
2334
|
}
|
|
2702
|
-
var
|
|
2703
|
-
function
|
|
2704
|
-
if (
|
|
2705
|
-
|
|
2335
|
+
var V = {}, G = {}, it;
|
|
2336
|
+
function Zr() {
|
|
2337
|
+
if (it) return G;
|
|
2338
|
+
it = 1, Object.defineProperty(G, "__esModule", { value: !0 }), G.isNestedField = void 0;
|
|
2706
2339
|
function t(e) {
|
|
2707
2340
|
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");
|
|
2708
2341
|
}
|
|
2709
|
-
return
|
|
2342
|
+
return G.isNestedField = t, G;
|
|
2710
2343
|
}
|
|
2711
|
-
var
|
|
2712
|
-
function
|
|
2713
|
-
if (
|
|
2714
|
-
|
|
2715
|
-
var t =
|
|
2344
|
+
var st;
|
|
2345
|
+
function ne() {
|
|
2346
|
+
if (st) return V;
|
|
2347
|
+
st = 1;
|
|
2348
|
+
var t = V && V.__assign || function() {
|
|
2716
2349
|
return t = Object.assign || function(n) {
|
|
2717
|
-
for (var
|
|
2718
|
-
|
|
2719
|
-
for (var a in
|
|
2350
|
+
for (var o, i = 1, s = arguments.length; i < s; i++) {
|
|
2351
|
+
o = arguments[i];
|
|
2352
|
+
for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]);
|
|
2720
2353
|
}
|
|
2721
2354
|
return n;
|
|
2722
2355
|
}, t.apply(this, arguments);
|
|
2723
2356
|
};
|
|
2724
|
-
Object.defineProperty(
|
|
2725
|
-
var e =
|
|
2357
|
+
Object.defineProperty(V, "__esModule", { value: !0 });
|
|
2358
|
+
var e = Zr(), r = (
|
|
2726
2359
|
/** @class */
|
|
2727
2360
|
function() {
|
|
2728
2361
|
function n() {
|
|
2729
2362
|
}
|
|
2730
|
-
return n.resolveVariables = function(
|
|
2731
|
-
for (var
|
|
2732
|
-
var
|
|
2733
|
-
|
|
2363
|
+
return n.resolveVariables = function(o) {
|
|
2364
|
+
for (var i = {}, s = 0, a = o; s < a.length; s++) {
|
|
2365
|
+
var c = a[s], u = c.variables, l = c.fields;
|
|
2366
|
+
i = t(t(t({}, i), u), l && n.getNestedVariables(l) || {});
|
|
2734
2367
|
}
|
|
2735
|
-
return
|
|
2736
|
-
}, n.queryDataNameAndArgumentMap = function(
|
|
2737
|
-
return
|
|
2738
|
-
var
|
|
2739
|
-
return "".concat(
|
|
2368
|
+
return i;
|
|
2369
|
+
}, n.queryDataNameAndArgumentMap = function(o) {
|
|
2370
|
+
return o && Object.keys(o).length ? "(".concat(Object.entries(o).reduce(function(i, s, a) {
|
|
2371
|
+
var c = s[0], u = s[1];
|
|
2372
|
+
return "".concat(i).concat(a !== 0 ? ", " : "").concat(u && u.name ? u.name : c, ": $").concat(c);
|
|
2740
2373
|
}, ""), ")") : "";
|
|
2741
|
-
}, n.queryFieldsMap = function(
|
|
2742
|
-
var
|
|
2743
|
-
return
|
|
2374
|
+
}, n.queryFieldsMap = function(o) {
|
|
2375
|
+
var i = this;
|
|
2376
|
+
return o ? o.map(function(s) {
|
|
2744
2377
|
if ((0, e.isNestedField)(s))
|
|
2745
2378
|
return n.queryNestedFieldMap(s);
|
|
2746
2379
|
if (typeof s == "object") {
|
|
2747
2380
|
var a = "";
|
|
2748
|
-
return Object.entries(s).forEach(function(
|
|
2749
|
-
var f =
|
|
2750
|
-
a += "".concat(f, " ").concat(p.length > 0 ? "{ " +
|
|
2381
|
+
return Object.entries(s).forEach(function(c, u, l) {
|
|
2382
|
+
var f = c[0], p = c[1];
|
|
2383
|
+
a += "".concat(f, " ").concat(p.length > 0 ? "{ " + i.queryFieldsMap(p) + " }" : ""), u < l.length - 1 && (a += ", ");
|
|
2751
2384
|
}), a;
|
|
2752
2385
|
} else
|
|
2753
2386
|
return "".concat(s);
|
|
2754
2387
|
}).join(", ") : "";
|
|
2755
|
-
}, n.operationOrAlias = function(
|
|
2756
|
-
return typeof
|
|
2757
|
-
}, n.isFragment = function(
|
|
2758
|
-
var
|
|
2759
|
-
return (
|
|
2760
|
-
}, n.operationOrFragment = function(
|
|
2761
|
-
return n.isFragment(
|
|
2762
|
-
}, n.getFragment = function(
|
|
2763
|
-
return n.isFragment(
|
|
2764
|
-
}, n.queryNestedFieldMap = function(
|
|
2765
|
-
return "".concat(n.getFragment(
|
|
2766
|
-
}, n.queryVariablesMap = function(
|
|
2767
|
-
var s = {}, a = function(
|
|
2768
|
-
|
|
2769
|
-
s[
|
|
2388
|
+
}, n.operationOrAlias = function(o) {
|
|
2389
|
+
return typeof o == "string" ? o : "".concat(o.alias, ": ").concat(o.name);
|
|
2390
|
+
}, n.isFragment = function(o) {
|
|
2391
|
+
var i;
|
|
2392
|
+
return (i = o?.fragment === !0) !== null && i !== void 0 ? i : !1;
|
|
2393
|
+
}, n.operationOrFragment = function(o) {
|
|
2394
|
+
return n.isFragment(o) ? o.operation : n.operationOrAlias(o.operation);
|
|
2395
|
+
}, n.getFragment = function(o) {
|
|
2396
|
+
return n.isFragment(o) ? "... on " : "";
|
|
2397
|
+
}, n.queryNestedFieldMap = function(o) {
|
|
2398
|
+
return "".concat(n.getFragment(o)).concat(n.operationOrFragment(o), " ").concat(this.isFragment(o) ? "" : this.queryDataNameAndArgumentMap(o.variables), " ").concat(o.fields.length > 0 ? "{ " + this.queryFieldsMap(o.fields) + " }" : "");
|
|
2399
|
+
}, n.queryVariablesMap = function(o, i) {
|
|
2400
|
+
var s = {}, a = function(c) {
|
|
2401
|
+
c && Object.keys(c).map(function(u) {
|
|
2402
|
+
s[u] = typeof c[u] == "object" ? c[u].value : c[u];
|
|
2770
2403
|
});
|
|
2771
2404
|
};
|
|
2772
|
-
return a(
|
|
2773
|
-
}, n.getNestedVariables = function(
|
|
2774
|
-
var
|
|
2405
|
+
return a(o), i && typeof i == "object" && a(n.getNestedVariables(i)), s;
|
|
2406
|
+
}, n.getNestedVariables = function(o) {
|
|
2407
|
+
var i = {};
|
|
2775
2408
|
function s(a) {
|
|
2776
|
-
return a?.forEach(function(
|
|
2777
|
-
if ((0, e.isNestedField)(
|
|
2778
|
-
|
|
2779
|
-
else if (typeof
|
|
2780
|
-
for (var
|
|
2781
|
-
var f = l[
|
|
2409
|
+
return a?.forEach(function(c) {
|
|
2410
|
+
if ((0, e.isNestedField)(c))
|
|
2411
|
+
i = t(t(t({}, c.variables), i), c.fields && s(c.fields));
|
|
2412
|
+
else if (typeof c == "object")
|
|
2413
|
+
for (var u = 0, l = Object.entries(c); u < l.length; u++) {
|
|
2414
|
+
var f = l[u], p = f[1];
|
|
2782
2415
|
s(p);
|
|
2783
2416
|
}
|
|
2784
|
-
}),
|
|
2417
|
+
}), i;
|
|
2785
2418
|
}
|
|
2786
|
-
return s(
|
|
2787
|
-
}, n.queryDataType = function(
|
|
2788
|
-
var
|
|
2789
|
-
if (
|
|
2790
|
-
|
|
2419
|
+
return s(o), i;
|
|
2420
|
+
}, n.queryDataType = function(o) {
|
|
2421
|
+
var i = "String", s = typeof o == "object" ? o.value : o;
|
|
2422
|
+
if (o?.type != null)
|
|
2423
|
+
i = o.type;
|
|
2791
2424
|
else {
|
|
2792
2425
|
var a = Array.isArray(s) ? s[0] : s;
|
|
2793
2426
|
switch (typeof a) {
|
|
2794
2427
|
case "object":
|
|
2795
|
-
|
|
2428
|
+
i = "Object";
|
|
2796
2429
|
break;
|
|
2797
2430
|
case "boolean":
|
|
2798
|
-
|
|
2431
|
+
i = "Boolean";
|
|
2799
2432
|
break;
|
|
2800
2433
|
case "number":
|
|
2801
|
-
|
|
2434
|
+
i = a % 1 === 0 ? "Int" : "Float";
|
|
2802
2435
|
break;
|
|
2803
2436
|
}
|
|
2804
2437
|
}
|
|
2805
|
-
return typeof
|
|
2438
|
+
return typeof o == "object" && (o.list === !0 ? i = "[".concat(i, "]") : Array.isArray(o.list) && (i = "[".concat(i).concat(o.list[0] ? "!" : "", "]")), o.required && (i += "!")), i;
|
|
2806
2439
|
}, n;
|
|
2807
2440
|
}()
|
|
2808
2441
|
);
|
|
2809
|
-
return
|
|
2442
|
+
return V.default = r, V;
|
|
2810
2443
|
}
|
|
2811
|
-
var
|
|
2812
|
-
function
|
|
2813
|
-
if (
|
|
2814
|
-
|
|
2815
|
-
var t =
|
|
2444
|
+
var at;
|
|
2445
|
+
function eo() {
|
|
2446
|
+
if (at) return se;
|
|
2447
|
+
at = 1, Object.defineProperty(se, "__esModule", { value: !0 });
|
|
2448
|
+
var t = te(), e = ne(), r = (
|
|
2816
2449
|
/** @class */
|
|
2817
2450
|
function() {
|
|
2818
|
-
function n(
|
|
2819
|
-
Array.isArray(
|
|
2451
|
+
function n(o) {
|
|
2452
|
+
Array.isArray(o) ? this.variables = e.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields, this.operation = o.operation);
|
|
2820
2453
|
}
|
|
2821
2454
|
return n.prototype.mutationBuilder = function() {
|
|
2822
2455
|
return this.operationWrapperTemplate(this.variables, this.operationTemplate(this.operation));
|
|
2823
|
-
}, n.prototype.mutationsBuilder = function(
|
|
2824
|
-
var
|
|
2825
|
-
return
|
|
2456
|
+
}, n.prototype.mutationsBuilder = function(o) {
|
|
2457
|
+
var i = this, s = o.map(function(a) {
|
|
2458
|
+
return i.operation = a.operation, i.variables = a.variables, i.fields = a.fields, i.operationTemplate(a.operation);
|
|
2826
2459
|
});
|
|
2827
|
-
return this.operationWrapperTemplate(e.default.resolveVariables(
|
|
2460
|
+
return this.operationWrapperTemplate(e.default.resolveVariables(o), s.join(`
|
|
2828
2461
|
`));
|
|
2829
2462
|
}, n.prototype.queryDataNameAndArgumentMap = function() {
|
|
2830
|
-
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(
|
|
2831
|
-
return "".concat(
|
|
2463
|
+
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, i, s) {
|
|
2464
|
+
return "".concat(o).concat(s !== 0 ? ", " : "").concat(i, ": $").concat(i);
|
|
2832
2465
|
}, ""), ")") : "";
|
|
2833
|
-
}, n.prototype.queryDataArgumentAndTypeMap = function(
|
|
2834
|
-
return Object.keys(
|
|
2835
|
-
return "".concat(
|
|
2466
|
+
}, n.prototype.queryDataArgumentAndTypeMap = function(o) {
|
|
2467
|
+
return Object.keys(o).length ? "(".concat(Object.keys(o).reduce(function(i, s, a) {
|
|
2468
|
+
return "".concat(i).concat(a !== 0 ? ", " : "", "$").concat(s, ": ").concat(e.default.queryDataType(o[s]));
|
|
2836
2469
|
}, ""), ")") : "";
|
|
2837
|
-
}, n.prototype.operationWrapperTemplate = function(
|
|
2470
|
+
}, n.prototype.operationWrapperTemplate = function(o, i) {
|
|
2838
2471
|
var s = typeof this.operation == "string" ? this.operation : this.operation.name;
|
|
2839
2472
|
return {
|
|
2840
|
-
query: "".concat(t.default.Mutation, " ").concat(s.charAt(0).toUpperCase() + s.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(
|
|
2841
|
-
`).concat(
|
|
2473
|
+
query: "".concat(t.default.Mutation, " ").concat(s.charAt(0).toUpperCase() + s.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(o), ` {
|
|
2474
|
+
`).concat(i, `
|
|
2842
2475
|
}`),
|
|
2843
|
-
variables: e.default.queryVariablesMap(
|
|
2476
|
+
variables: e.default.queryVariablesMap(o)
|
|
2844
2477
|
};
|
|
2845
|
-
}, n.prototype.operationTemplate = function(
|
|
2846
|
-
var
|
|
2847
|
-
return "".concat(
|
|
2478
|
+
}, n.prototype.operationTemplate = function(o) {
|
|
2479
|
+
var i = typeof o == "string" ? o : "".concat(o.alias, ": ").concat(o.name);
|
|
2480
|
+
return "".concat(i, " ").concat(this.queryDataNameAndArgumentMap(), ` {
|
|
2848
2481
|
`).concat(this.queryFieldsMap(this.fields), `
|
|
2849
2482
|
}`);
|
|
2850
|
-
}, n.prototype.queryFieldsMap = function(
|
|
2851
|
-
var
|
|
2852
|
-
return Array.isArray(
|
|
2853
|
-
return typeof s == "object" ? "".concat(Object.keys(s)[0], " { ").concat(
|
|
2483
|
+
}, n.prototype.queryFieldsMap = function(o) {
|
|
2484
|
+
var i = this;
|
|
2485
|
+
return Array.isArray(o) ? o.map(function(s) {
|
|
2486
|
+
return typeof s == "object" ? "".concat(Object.keys(s)[0], " { ").concat(i.queryFieldsMap(Object.values(s)[0]), " }") : "".concat(s);
|
|
2854
2487
|
}).join(", ") : "";
|
|
2855
2488
|
}, n;
|
|
2856
2489
|
}()
|
|
2857
2490
|
);
|
|
2858
|
-
return
|
|
2491
|
+
return se.default = r, se;
|
|
2859
2492
|
}
|
|
2860
|
-
var
|
|
2861
|
-
function
|
|
2862
|
-
if (
|
|
2863
|
-
|
|
2864
|
-
var t =
|
|
2493
|
+
var ce = {}, ct;
|
|
2494
|
+
function to() {
|
|
2495
|
+
if (ct) return ce;
|
|
2496
|
+
ct = 1, Object.defineProperty(ce, "__esModule", { value: !0 });
|
|
2497
|
+
var t = te(), e = ne(), r = (
|
|
2865
2498
|
/** @class */
|
|
2866
2499
|
function() {
|
|
2867
|
-
function n(
|
|
2868
|
-
this.queryDataType = function(
|
|
2869
|
-
var s = "String", a = typeof
|
|
2870
|
-
if (
|
|
2871
|
-
s =
|
|
2500
|
+
function n(o) {
|
|
2501
|
+
this.queryDataType = function(i) {
|
|
2502
|
+
var s = "String", a = typeof i == "object" ? i.value : i;
|
|
2503
|
+
if (i.type !== void 0)
|
|
2504
|
+
s = i.type;
|
|
2872
2505
|
else
|
|
2873
2506
|
switch (typeof a) {
|
|
2874
2507
|
case "object":
|
|
@@ -2881,244 +2514,244 @@ function ji() {
|
|
|
2881
2514
|
s = a % 1 === 0 ? "Int" : "Float";
|
|
2882
2515
|
break;
|
|
2883
2516
|
}
|
|
2884
|
-
return typeof
|
|
2885
|
-
}, Array.isArray(
|
|
2517
|
+
return typeof i == "object" && i.required && (s += "!"), s;
|
|
2518
|
+
}, Array.isArray(o) ? this.variables = e.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields || [], this.operation = o.operation);
|
|
2886
2519
|
}
|
|
2887
2520
|
return n.prototype.queryBuilder = function() {
|
|
2888
2521
|
return this.operationWrapperTemplate(this.operationTemplate());
|
|
2889
|
-
}, n.prototype.queriesBuilder = function(
|
|
2890
|
-
var
|
|
2522
|
+
}, n.prototype.queriesBuilder = function(o) {
|
|
2523
|
+
var i = this, s = function() {
|
|
2891
2524
|
var a = [];
|
|
2892
|
-
return
|
|
2893
|
-
|
|
2525
|
+
return o.forEach(function(c) {
|
|
2526
|
+
c && (i.operation = c.operation, i.fields = c.fields, i.variables = c.variables, a.push(i.operationTemplate()));
|
|
2894
2527
|
}), a.join(" ");
|
|
2895
2528
|
};
|
|
2896
2529
|
return this.operationWrapperTemplate(s());
|
|
2897
2530
|
}, n.prototype.queryDataNameAndArgumentMap = function() {
|
|
2898
|
-
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(
|
|
2899
|
-
return "".concat(
|
|
2531
|
+
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, i, s) {
|
|
2532
|
+
return "".concat(o).concat(s !== 0 ? ", " : "").concat(i, ": $").concat(i);
|
|
2900
2533
|
}, ""), ")") : "";
|
|
2901
2534
|
}, n.prototype.queryDataArgumentAndTypeMap = function() {
|
|
2902
|
-
var
|
|
2903
|
-
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(
|
|
2904
|
-
return "".concat(
|
|
2535
|
+
var o = this;
|
|
2536
|
+
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(i, s, a) {
|
|
2537
|
+
return "".concat(i).concat(a !== 0 ? ", " : "", "$").concat(s, ": ").concat(o.queryDataType(o.variables[s]));
|
|
2905
2538
|
}, ""), ")") : "";
|
|
2906
|
-
}, n.prototype.operationWrapperTemplate = function(
|
|
2907
|
-
var
|
|
2539
|
+
}, n.prototype.operationWrapperTemplate = function(o) {
|
|
2540
|
+
var i = typeof this.operation == "string" ? this.operation : this.operation.name;
|
|
2908
2541
|
return {
|
|
2909
|
-
query: "".concat(t.default.Query, " ").concat(
|
|
2542
|
+
query: "".concat(t.default.Query, " ").concat(i.charAt(0).toUpperCase()).concat(i.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(o, " }"),
|
|
2910
2543
|
variables: e.default.queryVariablesMap(this.variables)
|
|
2911
2544
|
};
|
|
2912
2545
|
}, n.prototype.operationTemplate = function() {
|
|
2913
|
-
var
|
|
2914
|
-
return "".concat(
|
|
2546
|
+
var o = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
|
|
2547
|
+
return "".concat(o, " ").concat(this.queryDataNameAndArgumentMap(), " { nodes { ").concat(e.default.queryFieldsMap(this.fields), " } }");
|
|
2915
2548
|
}, n;
|
|
2916
2549
|
}()
|
|
2917
2550
|
);
|
|
2918
|
-
return
|
|
2919
|
-
}
|
|
2920
|
-
var
|
|
2921
|
-
function
|
|
2922
|
-
if (
|
|
2923
|
-
|
|
2924
|
-
var t =
|
|
2925
|
-
return
|
|
2926
|
-
}
|
|
2927
|
-
var
|
|
2928
|
-
function
|
|
2929
|
-
if (
|
|
2930
|
-
|
|
2931
|
-
var t =
|
|
2932
|
-
return t = Object.assign || function(
|
|
2933
|
-
for (var
|
|
2934
|
-
|
|
2935
|
-
for (var
|
|
2551
|
+
return ce.default = r, ce;
|
|
2552
|
+
}
|
|
2553
|
+
var ut;
|
|
2554
|
+
function no() {
|
|
2555
|
+
if (ut) return ie;
|
|
2556
|
+
ut = 1, Object.defineProperty(ie, "__esModule", { value: !0 });
|
|
2557
|
+
var t = eo(), e = to();
|
|
2558
|
+
return ie.default = { DefaultAppSyncQueryAdapter: e.default, DefaultAppSyncMutationAdapter: t.default }, ie;
|
|
2559
|
+
}
|
|
2560
|
+
var H = {}, lt;
|
|
2561
|
+
function ro() {
|
|
2562
|
+
if (lt) return H;
|
|
2563
|
+
lt = 1;
|
|
2564
|
+
var t = H && H.__assign || function() {
|
|
2565
|
+
return t = Object.assign || function(o) {
|
|
2566
|
+
for (var i, s = 1, a = arguments.length; s < a; s++) {
|
|
2567
|
+
i = arguments[s];
|
|
2568
|
+
for (var c in i) Object.prototype.hasOwnProperty.call(i, c) && (o[c] = i[c]);
|
|
2936
2569
|
}
|
|
2937
|
-
return
|
|
2570
|
+
return o;
|
|
2938
2571
|
}, t.apply(this, arguments);
|
|
2939
2572
|
};
|
|
2940
|
-
Object.defineProperty(
|
|
2941
|
-
var e =
|
|
2573
|
+
Object.defineProperty(H, "__esModule", { value: !0 });
|
|
2574
|
+
var e = te(), r = ne(), n = (
|
|
2942
2575
|
/** @class */
|
|
2943
2576
|
function() {
|
|
2944
|
-
function i
|
|
2577
|
+
function o(i, s) {
|
|
2945
2578
|
var a = this;
|
|
2946
|
-
Array.isArray(
|
|
2579
|
+
Array.isArray(i) ? this.variables = r.default.resolveVariables(i) : (this.variables = i.variables, this.fields = i.fields, this.operation = i.operation), this.config = {
|
|
2947
2580
|
operationName: ""
|
|
2948
|
-
}, s && Object.entries(s).forEach(function(
|
|
2949
|
-
var
|
|
2950
|
-
a.config[
|
|
2581
|
+
}, s && Object.entries(s).forEach(function(c) {
|
|
2582
|
+
var u = c[0], l = c[1];
|
|
2583
|
+
a.config[u] = l;
|
|
2951
2584
|
});
|
|
2952
2585
|
}
|
|
2953
|
-
return
|
|
2586
|
+
return o.prototype.mutationBuilder = function() {
|
|
2954
2587
|
return this.operationWrapperTemplate(e.default.Mutation, this.variables, this.operationTemplate(this.operation));
|
|
2955
|
-
},
|
|
2956
|
-
var s = this, a =
|
|
2957
|
-
return s.operation =
|
|
2588
|
+
}, o.prototype.mutationsBuilder = function(i) {
|
|
2589
|
+
var s = this, a = i.map(function(c) {
|
|
2590
|
+
return s.operation = c.operation, s.variables = c.variables, s.fields = c.fields, s.operationTemplate(c.operation);
|
|
2958
2591
|
});
|
|
2959
|
-
return this.operationWrapperTemplate(e.default.Mutation, r.default.resolveVariables(
|
|
2592
|
+
return this.operationWrapperTemplate(e.default.Mutation, r.default.resolveVariables(i), a.join(`
|
|
2960
2593
|
`));
|
|
2961
|
-
},
|
|
2962
|
-
return this.fields && typeof this.fields == "object" && (
|
|
2963
|
-
return "".concat(s).concat(
|
|
2594
|
+
}, o.prototype.queryDataArgumentAndTypeMap = function(i) {
|
|
2595
|
+
return this.fields && typeof this.fields == "object" && (i = t(t({}, r.default.getNestedVariables(this.fields)), i)), i && Object.keys(i).length > 0 ? "(".concat(Object.keys(i).reduce(function(s, a, c) {
|
|
2596
|
+
return "".concat(s).concat(c !== 0 ? ", " : "", "$").concat(a, ": ").concat(r.default.queryDataType(i[a]));
|
|
2964
2597
|
}, ""), ")") : "";
|
|
2965
|
-
},
|
|
2966
|
-
var
|
|
2598
|
+
}, o.prototype.operationWrapperTemplate = function(i, s, a) {
|
|
2599
|
+
var c = "".concat(i, " ").concat(this.queryDataArgumentAndTypeMap(s), ` {
|
|
2967
2600
|
`).concat(a, `
|
|
2968
2601
|
}`);
|
|
2969
|
-
return this.config.operationName && (
|
|
2970
|
-
query:
|
|
2602
|
+
return this.config.operationName && (c = c.replace("mutation", "mutation ".concat(this.config.operationName))), {
|
|
2603
|
+
query: c,
|
|
2971
2604
|
variables: r.default.queryVariablesMap(s, this.fields)
|
|
2972
2605
|
};
|
|
2973
|
-
},
|
|
2974
|
-
var s = typeof
|
|
2606
|
+
}, o.prototype.operationTemplate = function(i) {
|
|
2607
|
+
var s = typeof i == "string" ? i : "".concat(i.alias, ": ").concat(i.name);
|
|
2975
2608
|
return "".concat(s, " ").concat(r.default.queryDataNameAndArgumentMap(this.variables), " ").concat(this.fields && this.fields.length > 0 ? `{
|
|
2976
2609
|
`.concat(r.default.queryFieldsMap(this.fields), `
|
|
2977
2610
|
}`) : "");
|
|
2978
|
-
},
|
|
2611
|
+
}, o;
|
|
2979
2612
|
}()
|
|
2980
2613
|
);
|
|
2981
|
-
return
|
|
2982
|
-
}
|
|
2983
|
-
var
|
|
2984
|
-
function
|
|
2985
|
-
if (
|
|
2986
|
-
|
|
2987
|
-
var t =
|
|
2988
|
-
return t = Object.assign || function(
|
|
2989
|
-
for (var
|
|
2990
|
-
|
|
2991
|
-
for (var
|
|
2614
|
+
return H.default = n, H;
|
|
2615
|
+
}
|
|
2616
|
+
var W = {}, dt;
|
|
2617
|
+
function oo() {
|
|
2618
|
+
if (dt) return W;
|
|
2619
|
+
dt = 1;
|
|
2620
|
+
var t = W && W.__assign || function() {
|
|
2621
|
+
return t = Object.assign || function(o) {
|
|
2622
|
+
for (var i, s = 1, a = arguments.length; s < a; s++) {
|
|
2623
|
+
i = arguments[s];
|
|
2624
|
+
for (var c in i) Object.prototype.hasOwnProperty.call(i, c) && (o[c] = i[c]);
|
|
2992
2625
|
}
|
|
2993
|
-
return
|
|
2626
|
+
return o;
|
|
2994
2627
|
}, t.apply(this, arguments);
|
|
2995
2628
|
};
|
|
2996
|
-
Object.defineProperty(
|
|
2997
|
-
var e =
|
|
2629
|
+
Object.defineProperty(W, "__esModule", { value: !0 });
|
|
2630
|
+
var e = te(), r = ne(), n = (
|
|
2998
2631
|
/** @class */
|
|
2999
2632
|
function() {
|
|
3000
|
-
function i
|
|
2633
|
+
function o(i, s) {
|
|
3001
2634
|
var a = this;
|
|
3002
2635
|
this.config = {
|
|
3003
2636
|
operationName: ""
|
|
3004
|
-
}, s && Object.entries(s).forEach(function(
|
|
3005
|
-
var
|
|
3006
|
-
a.config[
|
|
3007
|
-
}), Array.isArray(
|
|
2637
|
+
}, s && Object.entries(s).forEach(function(c) {
|
|
2638
|
+
var u = c[0], l = c[1];
|
|
2639
|
+
a.config[u] = l;
|
|
2640
|
+
}), Array.isArray(i) ? this.variables = r.default.resolveVariables(i) : (this.variables = i.variables, this.fields = i.fields || [], this.operation = i.operation);
|
|
3008
2641
|
}
|
|
3009
|
-
return
|
|
2642
|
+
return o.prototype.queryBuilder = function() {
|
|
3010
2643
|
return this.operationWrapperTemplate(this.operationTemplate(this.variables));
|
|
3011
|
-
},
|
|
2644
|
+
}, o.prototype.queriesBuilder = function(i) {
|
|
3012
2645
|
var s = this, a = function() {
|
|
3013
|
-
var
|
|
3014
|
-
return
|
|
3015
|
-
|
|
3016
|
-
}),
|
|
2646
|
+
var c = [];
|
|
2647
|
+
return i.forEach(function(u) {
|
|
2648
|
+
u && (s.operation = u.operation, s.fields = u.fields, c.push(s.operationTemplate(u.variables)));
|
|
2649
|
+
}), c.join(" ");
|
|
3017
2650
|
};
|
|
3018
2651
|
return this.operationWrapperTemplate(a());
|
|
3019
|
-
},
|
|
3020
|
-
var
|
|
3021
|
-
return this.fields && typeof this.fields == "object" && (
|
|
3022
|
-
return "".concat(s).concat(
|
|
2652
|
+
}, o.prototype.queryDataArgumentAndTypeMap = function() {
|
|
2653
|
+
var i = this.variables;
|
|
2654
|
+
return this.fields && typeof this.fields == "object" && (i = t(t({}, r.default.getNestedVariables(this.fields)), i)), i && Object.keys(i).length > 0 ? "(".concat(Object.keys(i).reduce(function(s, a, c) {
|
|
2655
|
+
return "".concat(s).concat(c !== 0 ? ", " : "", "$").concat(a, ": ").concat(r.default.queryDataType(i[a]));
|
|
3023
2656
|
}, ""), ")") : "";
|
|
3024
|
-
},
|
|
3025
|
-
var s = "".concat(e.default.Query, " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(
|
|
2657
|
+
}, o.prototype.operationWrapperTemplate = function(i) {
|
|
2658
|
+
var s = "".concat(e.default.Query, " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(i, " }");
|
|
3026
2659
|
return s = s.replace("query", "query".concat(this.config.operationName !== "" ? " " + this.config.operationName : "")), {
|
|
3027
2660
|
query: s,
|
|
3028
2661
|
variables: r.default.queryVariablesMap(this.variables, this.fields)
|
|
3029
2662
|
};
|
|
3030
|
-
},
|
|
2663
|
+
}, o.prototype.operationTemplate = function(i) {
|
|
3031
2664
|
var s = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
|
|
3032
|
-
return "".concat(s, " ").concat(
|
|
3033
|
-
},
|
|
2665
|
+
return "".concat(s, " ").concat(i ? r.default.queryDataNameAndArgumentMap(i) : "", " ").concat(this.fields && this.fields.length > 0 ? "{ " + r.default.queryFieldsMap(this.fields) + " }" : "");
|
|
2666
|
+
}, o;
|
|
3034
2667
|
}()
|
|
3035
2668
|
);
|
|
3036
|
-
return
|
|
2669
|
+
return W.default = n, W;
|
|
3037
2670
|
}
|
|
3038
|
-
var
|
|
3039
|
-
function
|
|
3040
|
-
if (
|
|
3041
|
-
|
|
3042
|
-
var t =
|
|
2671
|
+
var ue = {}, ft;
|
|
2672
|
+
function io() {
|
|
2673
|
+
if (ft) return ue;
|
|
2674
|
+
ft = 1, Object.defineProperty(ue, "__esModule", { value: !0 });
|
|
2675
|
+
var t = te(), e = ne(), r = (
|
|
3043
2676
|
/** @class */
|
|
3044
2677
|
function() {
|
|
3045
|
-
function n(
|
|
3046
|
-
Array.isArray(
|
|
2678
|
+
function n(o) {
|
|
2679
|
+
Array.isArray(o) ? this.variables = e.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields, this.operation = o.operation);
|
|
3047
2680
|
}
|
|
3048
2681
|
return n.prototype.subscriptionBuilder = function() {
|
|
3049
2682
|
return this.operationWrapperTemplate(t.default.Subscription, this.variables, this.operationTemplate(this.operation));
|
|
3050
|
-
}, n.prototype.subscriptionsBuilder = function(
|
|
3051
|
-
var
|
|
3052
|
-
return
|
|
2683
|
+
}, n.prototype.subscriptionsBuilder = function(o) {
|
|
2684
|
+
var i = this, s = o.map(function(a) {
|
|
2685
|
+
return i.operation = a.operation, i.variables = a.variables, i.fields = a.fields, i.operationTemplate(a.operation);
|
|
3053
2686
|
});
|
|
3054
|
-
return this.operationWrapperTemplate(t.default.Subscription, e.default.resolveVariables(
|
|
2687
|
+
return this.operationWrapperTemplate(t.default.Subscription, e.default.resolveVariables(o), s.join(`
|
|
3055
2688
|
`));
|
|
3056
2689
|
}, n.prototype.queryDataNameAndArgumentMap = function() {
|
|
3057
|
-
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(
|
|
3058
|
-
return "".concat(
|
|
2690
|
+
return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, i, s) {
|
|
2691
|
+
return "".concat(o).concat(s !== 0 ? ", " : "").concat(i, ": $").concat(i);
|
|
3059
2692
|
}, ""), ")") : "";
|
|
3060
|
-
}, n.prototype.queryDataArgumentAndTypeMap = function(
|
|
3061
|
-
return Object.keys(
|
|
3062
|
-
return "".concat(
|
|
2693
|
+
}, n.prototype.queryDataArgumentAndTypeMap = function(o) {
|
|
2694
|
+
return Object.keys(o).length ? "(".concat(Object.keys(o).reduce(function(i, s, a) {
|
|
2695
|
+
return "".concat(i).concat(a !== 0 ? ", " : "", "$").concat(s, ": ").concat(e.default.queryDataType(o[s]));
|
|
3063
2696
|
}, ""), ")") : "";
|
|
3064
|
-
}, n.prototype.operationWrapperTemplate = function(
|
|
2697
|
+
}, n.prototype.operationWrapperTemplate = function(o, i, s) {
|
|
3065
2698
|
return {
|
|
3066
|
-
query: "".concat(
|
|
2699
|
+
query: "".concat(o, " ").concat(this.queryDataArgumentAndTypeMap(i), ` {
|
|
3067
2700
|
`).concat(s, `
|
|
3068
2701
|
}`),
|
|
3069
|
-
variables: e.default.queryVariablesMap(
|
|
2702
|
+
variables: e.default.queryVariablesMap(i)
|
|
3070
2703
|
};
|
|
3071
|
-
}, n.prototype.operationTemplate = function(
|
|
3072
|
-
var
|
|
3073
|
-
return "".concat(
|
|
2704
|
+
}, n.prototype.operationTemplate = function(o) {
|
|
2705
|
+
var i = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
|
|
2706
|
+
return "".concat(i, " ").concat(this.queryDataNameAndArgumentMap(), ` {
|
|
3074
2707
|
`).concat(this.queryFieldsMap(this.fields), `
|
|
3075
2708
|
}`);
|
|
3076
|
-
}, n.prototype.queryFieldsMap = function(
|
|
3077
|
-
var
|
|
3078
|
-
return
|
|
3079
|
-
return typeof s == "object" ? "".concat(Object.keys(s)[0], " { ").concat(
|
|
2709
|
+
}, n.prototype.queryFieldsMap = function(o) {
|
|
2710
|
+
var i = this;
|
|
2711
|
+
return o ? o.map(function(s) {
|
|
2712
|
+
return typeof s == "object" ? "".concat(Object.keys(s)[0], " { ").concat(i.queryFieldsMap(Object.values(s)[0]), " }") : "".concat(s);
|
|
3080
2713
|
}).join(", ") : "";
|
|
3081
2714
|
}, n;
|
|
3082
2715
|
}()
|
|
3083
2716
|
);
|
|
3084
|
-
return
|
|
3085
|
-
}
|
|
3086
|
-
var
|
|
3087
|
-
function
|
|
3088
|
-
if (
|
|
3089
|
-
|
|
3090
|
-
var t =
|
|
3091
|
-
|
|
3092
|
-
var e =
|
|
3093
|
-
function
|
|
2717
|
+
return ue.default = r, ue;
|
|
2718
|
+
}
|
|
2719
|
+
var pt;
|
|
2720
|
+
function so() {
|
|
2721
|
+
if (pt) return _;
|
|
2722
|
+
pt = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.adapters = _.query = _.mutation = _.subscription = void 0;
|
|
2723
|
+
var t = no();
|
|
2724
|
+
_.adapters = t.default;
|
|
2725
|
+
var e = ro(), r = oo(), n = io();
|
|
2726
|
+
function o(a, c, u) {
|
|
3094
2727
|
var l;
|
|
3095
2728
|
if (Array.isArray(a)) {
|
|
3096
|
-
if (
|
|
3097
|
-
var f = new
|
|
2729
|
+
if (c) {
|
|
2730
|
+
var f = new c(a, u);
|
|
3098
2731
|
return f.queriesBuilder(a);
|
|
3099
2732
|
}
|
|
3100
|
-
return l = new r.default(a,
|
|
2733
|
+
return l = new r.default(a, u), l.queriesBuilder(a);
|
|
3101
2734
|
}
|
|
3102
|
-
if (
|
|
3103
|
-
var f = new
|
|
2735
|
+
if (c) {
|
|
2736
|
+
var f = new c(a, u);
|
|
3104
2737
|
return f.queryBuilder();
|
|
3105
2738
|
}
|
|
3106
|
-
return l = new r.default(a,
|
|
2739
|
+
return l = new r.default(a, u), l.queryBuilder();
|
|
3107
2740
|
}
|
|
3108
|
-
|
|
3109
|
-
function
|
|
2741
|
+
_.query = o;
|
|
2742
|
+
function i(a, c, u) {
|
|
3110
2743
|
var l, f;
|
|
3111
|
-
return Array.isArray(a) ?
|
|
2744
|
+
return Array.isArray(a) ? c ? (l = new c(a, u), l.mutationsBuilder(a)) : (f = new e.default(a, u), f.mutationsBuilder(a)) : c ? (l = new c(a, u), l.mutationBuilder()) : (f = new e.default(a, u), f.mutationBuilder());
|
|
3112
2745
|
}
|
|
3113
|
-
|
|
3114
|
-
function s(a,
|
|
3115
|
-
var
|
|
3116
|
-
return Array.isArray(a) ?
|
|
2746
|
+
_.mutation = i;
|
|
2747
|
+
function s(a, c) {
|
|
2748
|
+
var u, l;
|
|
2749
|
+
return Array.isArray(a) ? c ? (u = new c(a), u.subscriptionsBuilder(a)) : (l = new n.default(a), l.subscriptionsBuilder(a)) : c ? (u = new c(a), u.subscriptionBuilder()) : (l = new n.default(a), l.subscriptionBuilder());
|
|
3117
2750
|
}
|
|
3118
|
-
return
|
|
2751
|
+
return _.subscription = s, _;
|
|
3119
2752
|
}
|
|
3120
|
-
|
|
3121
|
-
const
|
|
2753
|
+
so();
|
|
2754
|
+
const ao = {
|
|
3122
2755
|
kind: "Document",
|
|
3123
2756
|
definitions: [{
|
|
3124
2757
|
kind: "FragmentDefinition",
|
|
@@ -3162,7 +2795,7 @@ const Bi = {
|
|
|
3162
2795
|
}]
|
|
3163
2796
|
}
|
|
3164
2797
|
}]
|
|
3165
|
-
},
|
|
2798
|
+
}, co = {
|
|
3166
2799
|
kind: "Document",
|
|
3167
2800
|
definitions: [{
|
|
3168
2801
|
kind: "OperationDefinition",
|
|
@@ -3337,7 +2970,7 @@ const Bi = {
|
|
|
3337
2970
|
}]
|
|
3338
2971
|
}
|
|
3339
2972
|
}]
|
|
3340
|
-
},
|
|
2973
|
+
}, uo = {
|
|
3341
2974
|
kind: "Document",
|
|
3342
2975
|
definitions: [{
|
|
3343
2976
|
kind: "OperationDefinition",
|
|
@@ -3367,7 +3000,7 @@ const Bi = {
|
|
|
3367
3000
|
}]
|
|
3368
3001
|
}
|
|
3369
3002
|
}]
|
|
3370
|
-
},
|
|
3003
|
+
}, lo = {
|
|
3371
3004
|
kind: "Document",
|
|
3372
3005
|
definitions: [{
|
|
3373
3006
|
kind: "OperationDefinition",
|
|
@@ -3397,7 +3030,7 @@ const Bi = {
|
|
|
3397
3030
|
}]
|
|
3398
3031
|
}
|
|
3399
3032
|
}]
|
|
3400
|
-
},
|
|
3033
|
+
}, fo = {
|
|
3401
3034
|
kind: "Document",
|
|
3402
3035
|
definitions: [{
|
|
3403
3036
|
kind: "OperationDefinition",
|
|
@@ -3480,7 +3113,7 @@ const Bi = {
|
|
|
3480
3113
|
}]
|
|
3481
3114
|
}
|
|
3482
3115
|
}]
|
|
3483
|
-
},
|
|
3116
|
+
}, po = {
|
|
3484
3117
|
kind: "Document",
|
|
3485
3118
|
definitions: [{
|
|
3486
3119
|
kind: "OperationDefinition",
|
|
@@ -3500,7 +3133,7 @@ const Bi = {
|
|
|
3500
3133
|
}]
|
|
3501
3134
|
}
|
|
3502
3135
|
}]
|
|
3503
|
-
},
|
|
3136
|
+
}, mo = {
|
|
3504
3137
|
kind: "Document",
|
|
3505
3138
|
definitions: [{
|
|
3506
3139
|
kind: "OperationDefinition",
|
|
@@ -3571,19 +3204,19 @@ const Bi = {
|
|
|
3571
3204
|
}]
|
|
3572
3205
|
}
|
|
3573
3206
|
}]
|
|
3574
|
-
},
|
|
3575
|
-
"\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":
|
|
3576
|
-
"\n mutation logout {\n logout {\n success\n }\n }\n":
|
|
3577
|
-
"\n query me {\n me {\n id\n }\n }\n":
|
|
3578
|
-
"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":
|
|
3579
|
-
"\n query nextOrderStates {\n nextOrderStates\n }\n":
|
|
3580
|
-
"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n":
|
|
3581
|
-
"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n":
|
|
3207
|
+
}, ho = {
|
|
3208
|
+
"\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": co,
|
|
3209
|
+
"\n mutation logout {\n logout {\n success\n }\n }\n": uo,
|
|
3210
|
+
"\n query me {\n me {\n id\n }\n }\n": lo,
|
|
3211
|
+
"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n": fo,
|
|
3212
|
+
"\n query nextOrderStates {\n nextOrderStates\n }\n": po,
|
|
3213
|
+
"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n": ao,
|
|
3214
|
+
"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n": mo
|
|
3582
3215
|
};
|
|
3583
|
-
function
|
|
3584
|
-
return
|
|
3216
|
+
function Ee(t) {
|
|
3217
|
+
return ho[t] ?? {};
|
|
3585
3218
|
}
|
|
3586
|
-
|
|
3219
|
+
Ee(
|
|
3587
3220
|
/* GraphQL */
|
|
3588
3221
|
`
|
|
3589
3222
|
mutation transitionOrderToState($input: String!) {
|
|
@@ -3596,7 +3229,7 @@ Ce(
|
|
|
3596
3229
|
}
|
|
3597
3230
|
`
|
|
3598
3231
|
);
|
|
3599
|
-
|
|
3232
|
+
Ee(
|
|
3600
3233
|
/* GraphQL */
|
|
3601
3234
|
`
|
|
3602
3235
|
query nextOrderStates {
|
|
@@ -3604,7 +3237,7 @@ Ce(
|
|
|
3604
3237
|
}
|
|
3605
3238
|
`
|
|
3606
3239
|
);
|
|
3607
|
-
|
|
3240
|
+
Ee(
|
|
3608
3241
|
/* GraphQL */
|
|
3609
3242
|
`
|
|
3610
3243
|
fragment EligiblePaymentMethods on PaymentMethodQuote {
|
|
@@ -3615,7 +3248,7 @@ Ce(
|
|
|
3615
3248
|
}
|
|
3616
3249
|
`
|
|
3617
3250
|
);
|
|
3618
|
-
|
|
3251
|
+
Ee(
|
|
3619
3252
|
/* GraphQL */
|
|
3620
3253
|
`
|
|
3621
3254
|
query EligiblePaymentMethods {
|
|
@@ -3625,104 +3258,104 @@ Ce(
|
|
|
3625
3258
|
}
|
|
3626
3259
|
`
|
|
3627
3260
|
);
|
|
3628
|
-
const
|
|
3629
|
-
const t =
|
|
3261
|
+
const Te = () => {
|
|
3262
|
+
const t = $.c(2), {
|
|
3630
3263
|
getPlatform: e
|
|
3631
|
-
} =
|
|
3264
|
+
} = Yr();
|
|
3632
3265
|
let r;
|
|
3633
3266
|
return t[0] !== e ? (r = e(), t[0] = e, t[1] = r) : r = t[1], r;
|
|
3634
3267
|
};
|
|
3635
|
-
|
|
3636
|
-
const
|
|
3268
|
+
globalThis.__STORE_COMPONENT_PROVIDER_CONTEXT__ ||= ht(void 0);
|
|
3269
|
+
const Oe = "ProductBadge", [yo] = Zt(Oe), [go, bo] = yo(Oe), Wt = ({
|
|
3637
3270
|
children: t,
|
|
3638
3271
|
product: e,
|
|
3639
3272
|
__scopeProductBadge: r,
|
|
3640
3273
|
style: n,
|
|
3641
|
-
...
|
|
3274
|
+
...o
|
|
3642
3275
|
}) => {
|
|
3643
|
-
const
|
|
3644
|
-
if (!
|
|
3276
|
+
const i = Yt(null), s = Te(), a = he(s);
|
|
3277
|
+
if (!J.getEnabled())
|
|
3645
3278
|
return null;
|
|
3646
3279
|
const {
|
|
3647
|
-
badges:
|
|
3280
|
+
badges: c
|
|
3648
3281
|
} = e;
|
|
3649
|
-
if (!
|
|
3282
|
+
if (!c)
|
|
3650
3283
|
return null;
|
|
3651
|
-
const
|
|
3652
|
-
groupedBadges:
|
|
3653
|
-
badges:
|
|
3654
|
-
badgesRef:
|
|
3284
|
+
const u = c.reduce((p, y) => (p[y.position] || (p[y.position] = []), p[y.position].push(y), p), {}), l = Object.keys(u), f = {
|
|
3285
|
+
groupedBadges: u,
|
|
3286
|
+
badges: c,
|
|
3287
|
+
badgesRef: i,
|
|
3655
3288
|
positions: l
|
|
3656
3289
|
};
|
|
3657
|
-
return /* @__PURE__ */
|
|
3290
|
+
return /* @__PURE__ */ D.jsx(go, { scope: r, ...f, children: /* @__PURE__ */ D.jsx(a, { ...o, style: n, children: mt(t, f) }) });
|
|
3658
3291
|
};
|
|
3659
|
-
|
|
3660
|
-
const
|
|
3661
|
-
const e =
|
|
3662
|
-
let r, n,
|
|
3292
|
+
Wt.displayName = Oe;
|
|
3293
|
+
const zt = (t) => {
|
|
3294
|
+
const e = $.c(18);
|
|
3295
|
+
let r, n, o, i, s;
|
|
3663
3296
|
e[0] !== t ? ({
|
|
3664
|
-
children:
|
|
3665
|
-
position:
|
|
3297
|
+
children: o,
|
|
3298
|
+
position: i,
|
|
3666
3299
|
asChild: n,
|
|
3667
3300
|
__scopeProductBadge: r,
|
|
3668
3301
|
...s
|
|
3669
|
-
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] =
|
|
3670
|
-
const a =
|
|
3671
|
-
let
|
|
3672
|
-
e[6] !== n || e[7] !== a ? (
|
|
3673
|
-
const
|
|
3302
|
+
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] = o, e[4] = i, e[5] = s) : (r = e[1], n = e[2], o = e[3], i = e[4], s = e[5]);
|
|
3303
|
+
const a = Te();
|
|
3304
|
+
let c;
|
|
3305
|
+
e[6] !== n || e[7] !== a ? (c = he(a, n, "div"), e[6] = n, e[7] = a, e[8] = c) : c = e[8];
|
|
3306
|
+
const u = c, {
|
|
3674
3307
|
groupedBadges: l
|
|
3675
|
-
} =
|
|
3308
|
+
} = bo(Oe, r), f = l[i];
|
|
3676
3309
|
let p;
|
|
3677
|
-
e[9] !== f || e[10] !==
|
|
3310
|
+
e[9] !== f || e[10] !== o || e[11] !== i ? (p = mt(o, {
|
|
3678
3311
|
badges: f,
|
|
3679
|
-
position:
|
|
3680
|
-
}), e[9] = f, e[10] =
|
|
3312
|
+
position: i
|
|
3313
|
+
}), e[9] = f, e[10] = o, e[11] = i, e[12] = p) : p = e[12];
|
|
3681
3314
|
let y;
|
|
3682
|
-
return e[13] !==
|
|
3683
|
-
},
|
|
3684
|
-
const e =
|
|
3685
|
-
let r, n,
|
|
3315
|
+
return e[13] !== u || e[14] !== i || e[15] !== s || e[16] !== p ? (y = /* @__PURE__ */ D.jsx(u, { ...s, "data-position": i, children: p }), e[13] = u, e[14] = i, e[15] = s, e[16] = p, e[17] = y) : y = e[17], y;
|
|
3316
|
+
}, Jt = (t) => {
|
|
3317
|
+
const e = $.c(13);
|
|
3318
|
+
let r, n, o, i;
|
|
3686
3319
|
e[0] !== t ? ({
|
|
3687
|
-
children:
|
|
3320
|
+
children: o,
|
|
3688
3321
|
asChild: r,
|
|
3689
3322
|
badge: n,
|
|
3690
|
-
...
|
|
3691
|
-
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] =
|
|
3692
|
-
const s =
|
|
3323
|
+
...i
|
|
3324
|
+
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] = o, e[4] = i) : (r = e[1], n = e[2], o = e[3], i = e[4]);
|
|
3325
|
+
const s = Te();
|
|
3693
3326
|
let a;
|
|
3694
|
-
e[5] !== r || e[6] !== s ? (a =
|
|
3695
|
-
const
|
|
3327
|
+
e[5] !== r || e[6] !== s ? (a = he(s, r, "div"), e[5] = r, e[6] = s, e[7] = a) : a = e[7];
|
|
3328
|
+
const c = a, u = n?.id;
|
|
3696
3329
|
let l;
|
|
3697
|
-
return e[8] !==
|
|
3698
|
-
},
|
|
3699
|
-
const e =
|
|
3700
|
-
let r, n,
|
|
3330
|
+
return e[8] !== c || e[9] !== o || e[10] !== i || e[11] !== u ? (l = /* @__PURE__ */ D.jsx(c, { ...i, "data-badge-id": u, children: o }), e[8] = c, e[9] = o, e[10] = i, e[11] = u, e[12] = l) : l = e[12], l;
|
|
3331
|
+
}, Qt = (t) => {
|
|
3332
|
+
const e = $.c(15);
|
|
3333
|
+
let r, n, o;
|
|
3701
3334
|
e[0] !== t ? ({
|
|
3702
3335
|
badge: n,
|
|
3703
3336
|
asChild: r,
|
|
3704
|
-
...
|
|
3705
|
-
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] =
|
|
3706
|
-
const
|
|
3337
|
+
...o
|
|
3338
|
+
} = t, e[0] = t, e[1] = r, e[2] = n, e[3] = o) : (r = e[1], n = e[2], o = e[3]);
|
|
3339
|
+
const i = Te();
|
|
3707
3340
|
let s;
|
|
3708
|
-
e[4] !== r || e[5] !==
|
|
3341
|
+
e[4] !== r || e[5] !== i ? (s = he(i, r, "img"), e[4] = r, e[5] = i, e[6] = s) : s = e[6];
|
|
3709
3342
|
const a = s;
|
|
3710
|
-
let
|
|
3711
|
-
e[7] !==
|
|
3712
|
-
const
|
|
3343
|
+
let c;
|
|
3344
|
+
e[7] !== i || e[8] !== o ? (c = en(o, i), e[7] = i, e[8] = o, e[9] = c) : c = e[9];
|
|
3345
|
+
const u = c, l = n.asset?.preview;
|
|
3713
3346
|
let f;
|
|
3714
|
-
return e[10] !== a || e[11] !== n.collection.name || e[12] !== l || e[13] !==
|
|
3347
|
+
return e[10] !== a || e[11] !== n.collection.name || e[12] !== l || e[13] !== u ? (f = /* @__PURE__ */ D.jsx(a, { src: l, alt: n.collection.name, "data-badge-name": n.collection.name, ...u }), e[10] = a, e[11] = n.collection.name, e[12] = l, e[13] = u, e[14] = f) : f = e[14], f;
|
|
3715
3348
|
};
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
const
|
|
3720
|
-
Root:
|
|
3721
|
-
Group:
|
|
3722
|
-
Item:
|
|
3723
|
-
Image:
|
|
3349
|
+
zt.displayName = "ProductBadgeGroup";
|
|
3350
|
+
Jt.displayName = "ProductBadgeItem";
|
|
3351
|
+
Qt.displayName = "ProductBadgeImage";
|
|
3352
|
+
const Uo = {
|
|
3353
|
+
Root: Wt,
|
|
3354
|
+
Group: zt,
|
|
3355
|
+
Item: Jt,
|
|
3356
|
+
Image: Qt
|
|
3724
3357
|
};
|
|
3725
3358
|
export {
|
|
3726
|
-
|
|
3727
|
-
|
|
3359
|
+
Uo as ProductBadge,
|
|
3360
|
+
J as VendureBadgePlugin
|
|
3728
3361
|
};
|