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