@feedmepos/mf-settings 0.0.51 → 0.0.52-prod
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/dist/App-2c0e7dc6.js +22089 -0
- package/dist/Business-8f1f703c.js +11975 -0
- package/dist/{CreateBusiness-2a4f54d4.js → CreateBusiness-5da625ee.js} +11 -11
- package/dist/FoodCourt-57b90140.js +71535 -0
- package/dist/{actionButton-cc6bcf01.js → FormSection.vue_vue_type_script_setup_true_lang-6aab82f2.js} +25 -25
- package/dist/{ResponsiveFabButton.vue_vue_type_script_setup_true_lang-977372d5.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-e9712a4d.js} +63 -63
- package/dist/{Tagging-5ba0d4ec.js → Tagging-0487e189.js} +6402 -6404
- package/dist/TemplateBuilder-3e34e9e8.js +27 -0
- package/dist/_commonjs-dynamic-modules-bed80856.js +6 -0
- package/dist/{app-6a6102be.js → app-e351b342.js} +358 -40
- package/dist/app.js +2 -2
- package/dist/apps/mf-settings/src/api/foodCourt.d.ts +1 -1
- package/dist/apps/mf-settings/src/api/restaurant.d.ts +2 -2
- package/dist/apps/mf-settings/src/app.d.ts +1 -0
- package/dist/apps/mf-settings/src/components/business/RestaurantForm.vue.d.ts +1 -1
- package/dist/apps/mf-settings/src/components/foodcourt/foodCourt.d.ts +1 -1
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{business-9a4e5bd7.js → business-4073e305.js} +1 -1
- package/dist/{loading-84215dce.js → index-95f69047.js} +467 -468
- package/dist/{index.esm2017-c60b1ce5.js → map-54b71412.js} +561 -444
- package/dist/{createForm-681e977a.js → object-8ac0c0d8.js} +18 -19
- package/package.json +3 -3
- package/dist/App-b3a895b0.js +0 -4352
- package/dist/Business-189e288f.js +0 -3893
- package/dist/FoodCourt-561cd7e3.js +0 -47798
- package/dist/TemplateBuilder-54a34178.js +0 -27
- package/dist/index-1eb3cc0a.js +0 -17754
|
@@ -1,40 +1,69 @@
|
|
|
1
|
-
import { e as Q } from "./index-f1e5e565.js";
|
|
2
|
-
import { useCoreStore as j } from "@feedmepos/mf-common";
|
|
3
1
|
import { computed as Et, isRef as St, watch as Rt } from "vue";
|
|
4
|
-
import { defineStore as Tt } from "pinia";
|
|
5
2
|
import { SnackbarPosition as oe } from "@feedmepos/ui-library";
|
|
6
|
-
|
|
3
|
+
import { defineStore as Tt } from "pinia";
|
|
4
|
+
import { e as K } from "./index-f1e5e565.js";
|
|
5
|
+
import { useCoreStore as j } from "@feedmepos/mf-common";
|
|
6
|
+
var T = [];
|
|
7
|
+
for (var ie = 0; ie < 256; ++ie)
|
|
8
|
+
T.push((ie + 256).toString(16).slice(1));
|
|
9
|
+
function At(t, e = 0) {
|
|
10
|
+
return (T[t[e + 0]] + T[t[e + 1]] + T[t[e + 2]] + T[t[e + 3]] + "-" + T[t[e + 4]] + T[t[e + 5]] + "-" + T[t[e + 6]] + T[t[e + 7]] + "-" + T[t[e + 8]] + T[t[e + 9]] + "-" + T[t[e + 10]] + T[t[e + 11]] + T[t[e + 12]] + T[t[e + 13]] + T[t[e + 14]] + T[t[e + 15]]).toLowerCase();
|
|
11
|
+
}
|
|
12
|
+
var z, Ot = new Uint8Array(16);
|
|
13
|
+
function Ct() {
|
|
14
|
+
if (!z && (z = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !z))
|
|
15
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
16
|
+
return z(Ot);
|
|
17
|
+
}
|
|
18
|
+
var It = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
19
|
+
const Ie = {
|
|
20
|
+
randomUUID: It
|
|
21
|
+
};
|
|
22
|
+
function We(t, e, n) {
|
|
23
|
+
if (Ie.randomUUID && !e && !t)
|
|
24
|
+
return Ie.randomUUID();
|
|
25
|
+
t = t || {};
|
|
26
|
+
var r = t.random || (t.rng || Ct)();
|
|
27
|
+
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, e) {
|
|
28
|
+
n = n || 0;
|
|
29
|
+
for (var s = 0; s < 16; ++s)
|
|
30
|
+
e[n + s] = r[s];
|
|
31
|
+
return e;
|
|
32
|
+
}
|
|
33
|
+
return At(r);
|
|
34
|
+
}
|
|
35
|
+
function Ve(t, e) {
|
|
7
36
|
return function() {
|
|
8
37
|
return t.apply(e, arguments);
|
|
9
38
|
};
|
|
10
39
|
}
|
|
11
|
-
const { toString:
|
|
12
|
-
const n =
|
|
40
|
+
const { toString: xt } = Object.prototype, { getPrototypeOf: ge } = Object, Z = ((t) => (e) => {
|
|
41
|
+
const n = xt.call(e);
|
|
13
42
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
14
|
-
})(/* @__PURE__ */ Object.create(null)), x = (t) => (t = t.toLowerCase(), (e) =>
|
|
15
|
-
function
|
|
43
|
+
})(/* @__PURE__ */ Object.create(null)), x = (t) => (t = t.toLowerCase(), (e) => Z(e) === t), ee = (t) => (e) => typeof e === t, { isArray: M } = Array, $ = ee("undefined");
|
|
44
|
+
function Ut(t) {
|
|
16
45
|
return t !== null && !$(t) && t.constructor !== null && !$(t.constructor) && C(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
17
46
|
}
|
|
18
47
|
const Ge = x("ArrayBuffer");
|
|
19
|
-
function
|
|
48
|
+
function kt(t) {
|
|
20
49
|
let e;
|
|
21
50
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ge(t.buffer), e;
|
|
22
51
|
}
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
52
|
+
const Pt = ee("string"), C = ee("function"), Ke = ee("number"), te = (t) => t !== null && typeof t == "object", Lt = (t) => t === !0 || t === !1, W = (t) => {
|
|
53
|
+
if (Z(t) !== "object")
|
|
25
54
|
return !1;
|
|
26
55
|
const e = ge(t);
|
|
27
56
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
28
|
-
},
|
|
57
|
+
}, _t = x("Date"), Nt = x("File"), Bt = x("Blob"), Ft = x("FileList"), Mt = (t) => te(t) && C(t.pipe), vt = (t) => {
|
|
29
58
|
let e;
|
|
30
|
-
return t && (typeof FormData == "function" && t instanceof FormData || C(t.append) && ((e =
|
|
59
|
+
return t && (typeof FormData == "function" && t instanceof FormData || C(t.append) && ((e = Z(t)) === "formdata" || // detect form-data instance
|
|
31
60
|
e === "object" && C(t.toString) && t.toString() === "[object FormData]"));
|
|
32
|
-
},
|
|
61
|
+
}, Dt = x("URLSearchParams"), [$t, jt, qt, Ht] = ["ReadableStream", "Request", "Response", "Headers"].map(x), zt = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
33
62
|
function q(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
34
63
|
if (t === null || typeof t > "u")
|
|
35
64
|
return;
|
|
36
65
|
let r, s;
|
|
37
|
-
if (typeof t != "object" && (t = [t]),
|
|
66
|
+
if (typeof t != "object" && (t = [t]), M(t))
|
|
38
67
|
for (r = 0, s = t.length; r < s; r++)
|
|
39
68
|
e.call(null, t[r], r, t);
|
|
40
69
|
else {
|
|
@@ -53,23 +82,23 @@ function Qe(t, e) {
|
|
|
53
82
|
return s;
|
|
54
83
|
return null;
|
|
55
84
|
}
|
|
56
|
-
const
|
|
85
|
+
const N = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Xe = (t) => !$(t) && t !== N;
|
|
57
86
|
function fe() {
|
|
58
|
-
const { caseless: t } =
|
|
87
|
+
const { caseless: t } = Xe(this) && this || {}, e = {}, n = (r, s) => {
|
|
59
88
|
const o = t && Qe(e, s) || s;
|
|
60
|
-
W(e[o]) && W(r) ? e[o] = fe(e[o], r) : W(r) ? e[o] = fe({}, r) :
|
|
89
|
+
W(e[o]) && W(r) ? e[o] = fe(e[o], r) : W(r) ? e[o] = fe({}, r) : M(r) ? e[o] = r.slice() : e[o] = r;
|
|
61
90
|
};
|
|
62
91
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
63
92
|
arguments[r] && q(arguments[r], n);
|
|
64
93
|
return e;
|
|
65
94
|
}
|
|
66
|
-
const
|
|
67
|
-
n && C(s) ? t[o] =
|
|
68
|
-
}, { allOwnKeys: r }), t),
|
|
95
|
+
const Jt = (t, e, n, { allOwnKeys: r } = {}) => (q(e, (s, o) => {
|
|
96
|
+
n && C(s) ? t[o] = Ve(s, n) : t[o] = s;
|
|
97
|
+
}, { allOwnKeys: r }), t), Wt = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Vt = (t, e, n, r) => {
|
|
69
98
|
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
70
99
|
value: e.prototype
|
|
71
100
|
}), n && Object.assign(t.prototype, n);
|
|
72
|
-
},
|
|
101
|
+
}, Gt = (t, e, n, r) => {
|
|
73
102
|
let s, o, i;
|
|
74
103
|
const a = {};
|
|
75
104
|
if (e = e || {}, t == null)
|
|
@@ -80,48 +109,48 @@ const jt = (t, e, n, { allOwnKeys: r } = {}) => (q(e, (s, o) => {
|
|
|
80
109
|
t = n !== !1 && ge(t);
|
|
81
110
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
82
111
|
return e;
|
|
83
|
-
},
|
|
112
|
+
}, Kt = (t, e, n) => {
|
|
84
113
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
85
114
|
const r = t.indexOf(e, n);
|
|
86
115
|
return r !== -1 && r === n;
|
|
87
|
-
},
|
|
116
|
+
}, Qt = (t) => {
|
|
88
117
|
if (!t)
|
|
89
118
|
return null;
|
|
90
|
-
if (
|
|
119
|
+
if (M(t))
|
|
91
120
|
return t;
|
|
92
121
|
let e = t.length;
|
|
93
|
-
if (!
|
|
122
|
+
if (!Ke(e))
|
|
94
123
|
return null;
|
|
95
124
|
const n = new Array(e);
|
|
96
125
|
for (; e-- > 0; )
|
|
97
126
|
n[e] = t[e];
|
|
98
127
|
return n;
|
|
99
|
-
},
|
|
128
|
+
}, Xt = ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && ge(Uint8Array)), Yt = (t, e) => {
|
|
100
129
|
const r = (t && t[Symbol.iterator]).call(t);
|
|
101
130
|
let s;
|
|
102
131
|
for (; (s = r.next()) && !s.done; ) {
|
|
103
132
|
const o = s.value;
|
|
104
133
|
e.call(t, o[0], o[1]);
|
|
105
134
|
}
|
|
106
|
-
},
|
|
135
|
+
}, Zt = (t, e) => {
|
|
107
136
|
let n;
|
|
108
137
|
const r = [];
|
|
109
138
|
for (; (n = t.exec(e)) !== null; )
|
|
110
139
|
r.push(n);
|
|
111
140
|
return r;
|
|
112
|
-
},
|
|
141
|
+
}, en = x("HTMLFormElement"), tn = (t) => t.toLowerCase().replace(
|
|
113
142
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
114
143
|
function(n, r, s) {
|
|
115
144
|
return r.toUpperCase() + s;
|
|
116
145
|
}
|
|
117
|
-
),
|
|
146
|
+
), xe = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), nn = x("RegExp"), Ye = (t, e) => {
|
|
118
147
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
119
148
|
q(n, (s, o) => {
|
|
120
149
|
let i;
|
|
121
150
|
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
122
151
|
}), Object.defineProperties(t, r);
|
|
123
|
-
},
|
|
124
|
-
|
|
152
|
+
}, rn = (t) => {
|
|
153
|
+
Ye(t, (e, n) => {
|
|
125
154
|
if (C(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
126
155
|
return !1;
|
|
127
156
|
const r = t[n];
|
|
@@ -135,36 +164,36 @@ const jt = (t, e, n, { allOwnKeys: r } = {}) => (q(e, (s, o) => {
|
|
|
135
164
|
});
|
|
136
165
|
}
|
|
137
166
|
});
|
|
138
|
-
},
|
|
167
|
+
}, sn = (t, e) => {
|
|
139
168
|
const n = {}, r = (s) => {
|
|
140
169
|
s.forEach((o) => {
|
|
141
170
|
n[o] = !0;
|
|
142
171
|
});
|
|
143
172
|
};
|
|
144
|
-
return
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
DIGIT:
|
|
148
|
-
ALPHA:
|
|
149
|
-
ALPHA_DIGIT:
|
|
150
|
-
},
|
|
173
|
+
return M(t) ? r(t) : r(String(t).split(e)), n;
|
|
174
|
+
}, on = () => {
|
|
175
|
+
}, an = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, ae = "abcdefghijklmnopqrstuvwxyz", Ue = "0123456789", Ze = {
|
|
176
|
+
DIGIT: Ue,
|
|
177
|
+
ALPHA: ae,
|
|
178
|
+
ALPHA_DIGIT: ae + ae.toUpperCase() + Ue
|
|
179
|
+
}, cn = (t = 16, e = Ze.ALPHA_DIGIT) => {
|
|
151
180
|
let n = "";
|
|
152
181
|
const { length: r } = e;
|
|
153
182
|
for (; t--; )
|
|
154
183
|
n += e[Math.random() * r | 0];
|
|
155
184
|
return n;
|
|
156
185
|
};
|
|
157
|
-
function
|
|
186
|
+
function un(t) {
|
|
158
187
|
return !!(t && C(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
159
188
|
}
|
|
160
|
-
const
|
|
189
|
+
const ln = (t) => {
|
|
161
190
|
const e = new Array(10), n = (r, s) => {
|
|
162
191
|
if (te(r)) {
|
|
163
192
|
if (e.indexOf(r) >= 0)
|
|
164
193
|
return;
|
|
165
194
|
if (!("toJSON" in r)) {
|
|
166
195
|
e[s] = r;
|
|
167
|
-
const o =
|
|
196
|
+
const o = M(r) ? [] : {};
|
|
168
197
|
return q(r, (i, a) => {
|
|
169
198
|
const d = n(i, s + 1);
|
|
170
199
|
!$(d) && (o[a] = d);
|
|
@@ -174,72 +203,72 @@ const on = (t) => {
|
|
|
174
203
|
return r;
|
|
175
204
|
};
|
|
176
205
|
return n(t, 0);
|
|
177
|
-
},
|
|
178
|
-
s ===
|
|
206
|
+
}, dn = x("AsyncFunction"), fn = (t) => t && (te(t) || C(t)) && C(t.then) && C(t.catch), et = ((t, e) => t ? setImmediate : e ? ((n, r) => (N.addEventListener("message", ({ source: s, data: o }) => {
|
|
207
|
+
s === N && o === n && r.length && r.shift()();
|
|
179
208
|
}, !1), (s) => {
|
|
180
|
-
r.push(s),
|
|
209
|
+
r.push(s), N.postMessage(n, "*");
|
|
181
210
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
182
211
|
typeof setImmediate == "function",
|
|
183
|
-
C(
|
|
184
|
-
),
|
|
185
|
-
isArray:
|
|
212
|
+
C(N.postMessage)
|
|
213
|
+
), pn = typeof queueMicrotask < "u" ? queueMicrotask.bind(N) : typeof process < "u" && process.nextTick || et, c = {
|
|
214
|
+
isArray: M,
|
|
186
215
|
isArrayBuffer: Ge,
|
|
187
|
-
isBuffer:
|
|
188
|
-
isFormData:
|
|
189
|
-
isArrayBufferView:
|
|
190
|
-
isString:
|
|
191
|
-
isNumber:
|
|
192
|
-
isBoolean:
|
|
216
|
+
isBuffer: Ut,
|
|
217
|
+
isFormData: vt,
|
|
218
|
+
isArrayBufferView: kt,
|
|
219
|
+
isString: Pt,
|
|
220
|
+
isNumber: Ke,
|
|
221
|
+
isBoolean: Lt,
|
|
193
222
|
isObject: te,
|
|
194
223
|
isPlainObject: W,
|
|
195
|
-
isReadableStream:
|
|
196
|
-
isRequest:
|
|
197
|
-
isResponse:
|
|
198
|
-
isHeaders:
|
|
224
|
+
isReadableStream: $t,
|
|
225
|
+
isRequest: jt,
|
|
226
|
+
isResponse: qt,
|
|
227
|
+
isHeaders: Ht,
|
|
199
228
|
isUndefined: $,
|
|
200
|
-
isDate:
|
|
201
|
-
isFile:
|
|
202
|
-
isBlob:
|
|
203
|
-
isRegExp:
|
|
229
|
+
isDate: _t,
|
|
230
|
+
isFile: Nt,
|
|
231
|
+
isBlob: Bt,
|
|
232
|
+
isRegExp: nn,
|
|
204
233
|
isFunction: C,
|
|
205
|
-
isStream:
|
|
206
|
-
isURLSearchParams:
|
|
207
|
-
isTypedArray:
|
|
208
|
-
isFileList:
|
|
234
|
+
isStream: Mt,
|
|
235
|
+
isURLSearchParams: Dt,
|
|
236
|
+
isTypedArray: Xt,
|
|
237
|
+
isFileList: Ft,
|
|
209
238
|
forEach: q,
|
|
210
239
|
merge: fe,
|
|
211
|
-
extend:
|
|
212
|
-
trim:
|
|
213
|
-
stripBOM:
|
|
214
|
-
inherits:
|
|
215
|
-
toFlatObject:
|
|
216
|
-
kindOf:
|
|
240
|
+
extend: Jt,
|
|
241
|
+
trim: zt,
|
|
242
|
+
stripBOM: Wt,
|
|
243
|
+
inherits: Vt,
|
|
244
|
+
toFlatObject: Gt,
|
|
245
|
+
kindOf: Z,
|
|
217
246
|
kindOfTest: x,
|
|
218
|
-
endsWith:
|
|
219
|
-
toArray:
|
|
220
|
-
forEachEntry:
|
|
221
|
-
matchAll:
|
|
222
|
-
isHTMLForm:
|
|
223
|
-
hasOwnProperty:
|
|
224
|
-
hasOwnProp:
|
|
247
|
+
endsWith: Kt,
|
|
248
|
+
toArray: Qt,
|
|
249
|
+
forEachEntry: Yt,
|
|
250
|
+
matchAll: Zt,
|
|
251
|
+
isHTMLForm: en,
|
|
252
|
+
hasOwnProperty: xe,
|
|
253
|
+
hasOwnProp: xe,
|
|
225
254
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
226
|
-
reduceDescriptors:
|
|
227
|
-
freezeMethods:
|
|
228
|
-
toObjectSet:
|
|
229
|
-
toCamelCase:
|
|
230
|
-
noop:
|
|
231
|
-
toFiniteNumber:
|
|
255
|
+
reduceDescriptors: Ye,
|
|
256
|
+
freezeMethods: rn,
|
|
257
|
+
toObjectSet: sn,
|
|
258
|
+
toCamelCase: tn,
|
|
259
|
+
noop: on,
|
|
260
|
+
toFiniteNumber: an,
|
|
232
261
|
findKey: Qe,
|
|
233
|
-
global:
|
|
234
|
-
isContextDefined:
|
|
262
|
+
global: N,
|
|
263
|
+
isContextDefined: Xe,
|
|
235
264
|
ALPHABET: Ze,
|
|
236
|
-
generateString:
|
|
237
|
-
isSpecCompliantForm:
|
|
238
|
-
toJSONObject:
|
|
239
|
-
isAsyncFn:
|
|
240
|
-
isThenable:
|
|
241
|
-
setImmediate:
|
|
242
|
-
asap:
|
|
265
|
+
generateString: cn,
|
|
266
|
+
isSpecCompliantForm: un,
|
|
267
|
+
toJSONObject: ln,
|
|
268
|
+
isAsyncFn: dn,
|
|
269
|
+
isThenable: fn,
|
|
270
|
+
setImmediate: et,
|
|
271
|
+
asap: pn
|
|
243
272
|
};
|
|
244
273
|
function m(t, e, n, r, s) {
|
|
245
274
|
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), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -265,7 +294,7 @@ c.inherits(m, Error, {
|
|
|
265
294
|
};
|
|
266
295
|
}
|
|
267
296
|
});
|
|
268
|
-
const
|
|
297
|
+
const tt = m.prototype, nt = {};
|
|
269
298
|
[
|
|
270
299
|
"ERR_BAD_OPTION_VALUE",
|
|
271
300
|
"ERR_BAD_OPTION",
|
|
@@ -281,32 +310,32 @@ const et = m.prototype, tt = {};
|
|
|
281
310
|
"ERR_INVALID_URL"
|
|
282
311
|
// eslint-disable-next-line func-names
|
|
283
312
|
].forEach((t) => {
|
|
284
|
-
|
|
313
|
+
nt[t] = { value: t };
|
|
285
314
|
});
|
|
286
|
-
Object.defineProperties(m,
|
|
287
|
-
Object.defineProperty(
|
|
315
|
+
Object.defineProperties(m, nt);
|
|
316
|
+
Object.defineProperty(tt, "isAxiosError", { value: !0 });
|
|
288
317
|
m.from = (t, e, n, r, s, o) => {
|
|
289
|
-
const i = Object.create(
|
|
318
|
+
const i = Object.create(tt);
|
|
290
319
|
return c.toFlatObject(t, i, function(d) {
|
|
291
320
|
return d !== Error.prototype;
|
|
292
321
|
}, (a) => a !== "isAxiosError"), m.call(i, t.message, e, n, r, s), i.cause = t, i.name = t.name, o && Object.assign(i, o), i;
|
|
293
322
|
};
|
|
294
|
-
const
|
|
323
|
+
const hn = null;
|
|
295
324
|
function pe(t) {
|
|
296
325
|
return c.isPlainObject(t) || c.isArray(t);
|
|
297
326
|
}
|
|
298
|
-
function
|
|
327
|
+
function rt(t) {
|
|
299
328
|
return c.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
300
329
|
}
|
|
301
|
-
function
|
|
330
|
+
function ke(t, e, n) {
|
|
302
331
|
return t ? t.concat(e).map(function(s, o) {
|
|
303
|
-
return s =
|
|
332
|
+
return s = rt(s), !n && o ? "[" + s + "]" : s;
|
|
304
333
|
}).join(n ? "." : "") : e;
|
|
305
334
|
}
|
|
306
|
-
function
|
|
335
|
+
function mn(t) {
|
|
307
336
|
return c.isArray(t) && !t.some(pe);
|
|
308
337
|
}
|
|
309
|
-
const
|
|
338
|
+
const yn = c.toFlatObject(c, {}, null, function(e) {
|
|
310
339
|
return /^is[A-Z]/.test(e);
|
|
311
340
|
});
|
|
312
341
|
function ne(t, e, n) {
|
|
@@ -332,22 +361,22 @@ function ne(t, e, n) {
|
|
|
332
361
|
return c.isArrayBuffer(p) || c.isTypedArray(p) ? d && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
333
362
|
}
|
|
334
363
|
function l(p, y, h) {
|
|
335
|
-
let
|
|
364
|
+
let w = p;
|
|
336
365
|
if (p && !h && typeof p == "object") {
|
|
337
366
|
if (c.endsWith(y, "{}"))
|
|
338
367
|
y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
|
|
339
|
-
else if (c.isArray(p) &&
|
|
340
|
-
return y =
|
|
368
|
+
else if (c.isArray(p) && mn(p) || (c.isFileList(p) || c.endsWith(y, "[]")) && (w = c.toArray(p)))
|
|
369
|
+
return y = rt(y), w.forEach(function(R, U) {
|
|
341
370
|
!(c.isUndefined(R) || R === null) && e.append(
|
|
342
371
|
// eslint-disable-next-line no-nested-ternary
|
|
343
|
-
i === !0 ?
|
|
372
|
+
i === !0 ? ke([y], U, o) : i === null ? y : y + "[]",
|
|
344
373
|
u(R)
|
|
345
374
|
);
|
|
346
375
|
}), !1;
|
|
347
376
|
}
|
|
348
|
-
return pe(p) ? !0 : (e.append(
|
|
377
|
+
return pe(p) ? !0 : (e.append(ke(h, y, o), u(p)), !1);
|
|
349
378
|
}
|
|
350
|
-
const f = [],
|
|
379
|
+
const f = [], b = Object.assign(yn, {
|
|
351
380
|
defaultVisitor: l,
|
|
352
381
|
convertValue: u,
|
|
353
382
|
isVisitable: pe
|
|
@@ -356,14 +385,14 @@ function ne(t, e, n) {
|
|
|
356
385
|
if (!c.isUndefined(p)) {
|
|
357
386
|
if (f.indexOf(p) !== -1)
|
|
358
387
|
throw Error("Circular reference detected in " + y.join("."));
|
|
359
|
-
f.push(p), c.forEach(p, function(
|
|
360
|
-
(!(c.isUndefined(
|
|
388
|
+
f.push(p), c.forEach(p, function(w, S) {
|
|
389
|
+
(!(c.isUndefined(w) || w === null) && s.call(
|
|
361
390
|
e,
|
|
362
|
-
|
|
391
|
+
w,
|
|
363
392
|
c.isString(S) ? S.trim() : S,
|
|
364
393
|
y,
|
|
365
|
-
|
|
366
|
-
)) === !0 && E(
|
|
394
|
+
b
|
|
395
|
+
)) === !0 && E(w, y ? y.concat(S) : [S]);
|
|
367
396
|
}), f.pop();
|
|
368
397
|
}
|
|
369
398
|
}
|
|
@@ -371,7 +400,7 @@ function ne(t, e, n) {
|
|
|
371
400
|
throw new TypeError("data must be an object");
|
|
372
401
|
return E(t), e;
|
|
373
402
|
}
|
|
374
|
-
function
|
|
403
|
+
function Pe(t) {
|
|
375
404
|
const e = {
|
|
376
405
|
"!": "%21",
|
|
377
406
|
"'": "%27",
|
|
@@ -388,25 +417,25 @@ function ke(t) {
|
|
|
388
417
|
function Ee(t, e) {
|
|
389
418
|
this._pairs = [], t && ne(t, this, e);
|
|
390
419
|
}
|
|
391
|
-
const
|
|
392
|
-
|
|
420
|
+
const st = Ee.prototype;
|
|
421
|
+
st.append = function(e, n) {
|
|
393
422
|
this._pairs.push([e, n]);
|
|
394
423
|
};
|
|
395
|
-
|
|
424
|
+
st.toString = function(e) {
|
|
396
425
|
const n = e ? function(r) {
|
|
397
|
-
return e.call(this, r,
|
|
398
|
-
} :
|
|
426
|
+
return e.call(this, r, Pe);
|
|
427
|
+
} : Pe;
|
|
399
428
|
return this._pairs.map(function(s) {
|
|
400
429
|
return n(s[0]) + "=" + n(s[1]);
|
|
401
430
|
}, "").join("&");
|
|
402
431
|
};
|
|
403
|
-
function
|
|
432
|
+
function bn(t) {
|
|
404
433
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
405
434
|
}
|
|
406
|
-
function
|
|
435
|
+
function ot(t, e, n) {
|
|
407
436
|
if (!e)
|
|
408
437
|
return t;
|
|
409
|
-
const r = n && n.encode ||
|
|
438
|
+
const r = n && n.encode || bn, s = n && n.serialize;
|
|
410
439
|
let o;
|
|
411
440
|
if (s ? o = s(e, n) : o = c.isURLSearchParams(e) ? e.toString() : new Ee(e, n).toString(r), o) {
|
|
412
441
|
const i = t.indexOf("#");
|
|
@@ -414,7 +443,7 @@ function st(t, e, n) {
|
|
|
414
443
|
}
|
|
415
444
|
return t;
|
|
416
445
|
}
|
|
417
|
-
class
|
|
446
|
+
class wn {
|
|
418
447
|
constructor() {
|
|
419
448
|
this.handlers = [];
|
|
420
449
|
}
|
|
@@ -468,41 +497,41 @@ class hn {
|
|
|
468
497
|
});
|
|
469
498
|
}
|
|
470
499
|
}
|
|
471
|
-
const
|
|
500
|
+
const Le = wn, it = {
|
|
472
501
|
silentJSONParsing: !0,
|
|
473
502
|
forcedJSONParsing: !0,
|
|
474
503
|
clarifyTimeoutError: !1
|
|
475
|
-
},
|
|
504
|
+
}, gn = typeof URLSearchParams < "u" ? URLSearchParams : Ee, En = typeof FormData < "u" ? FormData : null, Sn = typeof Blob < "u" ? Blob : null, Rn = {
|
|
476
505
|
isBrowser: !0,
|
|
477
506
|
classes: {
|
|
478
|
-
URLSearchParams:
|
|
479
|
-
FormData:
|
|
480
|
-
Blob:
|
|
507
|
+
URLSearchParams: gn,
|
|
508
|
+
FormData: En,
|
|
509
|
+
Blob: Sn
|
|
481
510
|
},
|
|
482
511
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
483
|
-
}, Se = typeof window < "u" && typeof document < "u", he = typeof navigator == "object" && navigator || void 0,
|
|
484
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
512
|
+
}, Se = typeof window < "u" && typeof document < "u", he = typeof navigator == "object" && navigator || void 0, Tn = Se && (!he || ["ReactNative", "NativeScript", "NS"].indexOf(he.product) < 0), An = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
513
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), On = Se && window.location.href || "http://localhost", Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
485
514
|
__proto__: null,
|
|
486
515
|
hasBrowserEnv: Se,
|
|
487
|
-
hasStandardBrowserEnv:
|
|
488
|
-
hasStandardBrowserWebWorkerEnv:
|
|
516
|
+
hasStandardBrowserEnv: Tn,
|
|
517
|
+
hasStandardBrowserWebWorkerEnv: An,
|
|
489
518
|
navigator: he,
|
|
490
|
-
origin:
|
|
491
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
492
|
-
...
|
|
493
|
-
...
|
|
519
|
+
origin: On
|
|
520
|
+
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
521
|
+
...Cn,
|
|
522
|
+
...Rn
|
|
494
523
|
};
|
|
495
|
-
function
|
|
496
|
-
return ne(t, new
|
|
524
|
+
function In(t, e) {
|
|
525
|
+
return ne(t, new O.classes.URLSearchParams(), Object.assign({
|
|
497
526
|
visitor: function(n, r, s, o) {
|
|
498
|
-
return
|
|
527
|
+
return O.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
499
528
|
}
|
|
500
529
|
}, e));
|
|
501
530
|
}
|
|
502
|
-
function
|
|
531
|
+
function xn(t) {
|
|
503
532
|
return c.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
504
533
|
}
|
|
505
|
-
function
|
|
534
|
+
function Un(t) {
|
|
506
535
|
const e = {}, n = Object.keys(t);
|
|
507
536
|
let r;
|
|
508
537
|
const s = n.length;
|
|
@@ -511,23 +540,23 @@ function An(t) {
|
|
|
511
540
|
o = n[r], e[o] = t[o];
|
|
512
541
|
return e;
|
|
513
542
|
}
|
|
514
|
-
function
|
|
543
|
+
function at(t) {
|
|
515
544
|
function e(n, r, s, o) {
|
|
516
545
|
let i = n[o++];
|
|
517
546
|
if (i === "__proto__")
|
|
518
547
|
return !0;
|
|
519
548
|
const a = Number.isFinite(+i), d = o >= n.length;
|
|
520
|
-
return i = !i && c.isArray(s) ? s.length : i, d ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && c.isArray(s[i]) && (s[i] =
|
|
549
|
+
return i = !i && c.isArray(s) ? s.length : i, d ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = Un(s[i])), !a);
|
|
521
550
|
}
|
|
522
551
|
if (c.isFormData(t) && c.isFunction(t.entries)) {
|
|
523
552
|
const n = {};
|
|
524
553
|
return c.forEachEntry(t, (r, s) => {
|
|
525
|
-
e(
|
|
554
|
+
e(xn(r), s, n, 0);
|
|
526
555
|
}), n;
|
|
527
556
|
}
|
|
528
557
|
return null;
|
|
529
558
|
}
|
|
530
|
-
function
|
|
559
|
+
function kn(t, e, n) {
|
|
531
560
|
if (c.isString(t))
|
|
532
561
|
try {
|
|
533
562
|
return (e || JSON.parse)(t), c.trim(t);
|
|
@@ -538,12 +567,12 @@ function Cn(t, e, n) {
|
|
|
538
567
|
return (n || JSON.stringify)(t);
|
|
539
568
|
}
|
|
540
569
|
const Re = {
|
|
541
|
-
transitional:
|
|
570
|
+
transitional: it,
|
|
542
571
|
adapter: ["xhr", "http", "fetch"],
|
|
543
572
|
transformRequest: [function(e, n) {
|
|
544
573
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(e);
|
|
545
574
|
if (o && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
|
|
546
|
-
return s ? JSON.stringify(
|
|
575
|
+
return s ? JSON.stringify(at(e)) : e;
|
|
547
576
|
if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
|
|
548
577
|
return e;
|
|
549
578
|
if (c.isArrayBufferView(e))
|
|
@@ -553,7 +582,7 @@ const Re = {
|
|
|
553
582
|
let a;
|
|
554
583
|
if (o) {
|
|
555
584
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
556
|
-
return
|
|
585
|
+
return In(e, this.formSerializer).toString();
|
|
557
586
|
if ((a = c.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
558
587
|
const d = this.env && this.env.FormData;
|
|
559
588
|
return ne(
|
|
@@ -563,7 +592,7 @@ const Re = {
|
|
|
563
592
|
);
|
|
564
593
|
}
|
|
565
594
|
}
|
|
566
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
595
|
+
return o || s ? (n.setContentType("application/json", !1), kn(e)) : e;
|
|
567
596
|
}],
|
|
568
597
|
transformResponse: [function(e) {
|
|
569
598
|
const n = this.transitional || Re.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -590,8 +619,8 @@ const Re = {
|
|
|
590
619
|
maxContentLength: -1,
|
|
591
620
|
maxBodyLength: -1,
|
|
592
621
|
env: {
|
|
593
|
-
FormData:
|
|
594
|
-
Blob:
|
|
622
|
+
FormData: O.classes.FormData,
|
|
623
|
+
Blob: O.classes.Blob
|
|
595
624
|
},
|
|
596
625
|
validateStatus: function(e) {
|
|
597
626
|
return e >= 200 && e < 300;
|
|
@@ -606,7 +635,7 @@ const Re = {
|
|
|
606
635
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
607
636
|
Re.headers[t] = {};
|
|
608
637
|
});
|
|
609
|
-
const Te = Re,
|
|
638
|
+
const Te = Re, Pn = c.toObjectSet([
|
|
610
639
|
"age",
|
|
611
640
|
"authorization",
|
|
612
641
|
"content-length",
|
|
@@ -624,29 +653,29 @@ const Te = Re, In = c.toObjectSet([
|
|
|
624
653
|
"referer",
|
|
625
654
|
"retry-after",
|
|
626
655
|
"user-agent"
|
|
627
|
-
]),
|
|
656
|
+
]), Ln = (t) => {
|
|
628
657
|
const e = {};
|
|
629
658
|
let n, r, s;
|
|
630
659
|
return t && t.split(`
|
|
631
660
|
`).forEach(function(i) {
|
|
632
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] &&
|
|
661
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && Pn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
633
662
|
}), e;
|
|
634
|
-
},
|
|
663
|
+
}, _e = Symbol("internals");
|
|
635
664
|
function D(t) {
|
|
636
665
|
return t && String(t).trim().toLowerCase();
|
|
637
666
|
}
|
|
638
|
-
function
|
|
639
|
-
return t === !1 || t == null ? t : c.isArray(t) ? t.map(
|
|
667
|
+
function V(t) {
|
|
668
|
+
return t === !1 || t == null ? t : c.isArray(t) ? t.map(V) : String(t);
|
|
640
669
|
}
|
|
641
|
-
function
|
|
670
|
+
function _n(t) {
|
|
642
671
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
643
672
|
let r;
|
|
644
673
|
for (; r = n.exec(t); )
|
|
645
674
|
e[r[1]] = r[2];
|
|
646
675
|
return e;
|
|
647
676
|
}
|
|
648
|
-
const
|
|
649
|
-
function
|
|
677
|
+
const Nn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
678
|
+
function ce(t, e, n, r, s) {
|
|
650
679
|
if (c.isFunction(r))
|
|
651
680
|
return r.call(this, e, n);
|
|
652
681
|
if (s && (e = n), !!c.isString(e)) {
|
|
@@ -656,10 +685,10 @@ function ae(t, e, n, r, s) {
|
|
|
656
685
|
return r.test(e);
|
|
657
686
|
}
|
|
658
687
|
}
|
|
659
|
-
function
|
|
688
|
+
function Bn(t) {
|
|
660
689
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
661
690
|
}
|
|
662
|
-
function
|
|
691
|
+
function Fn(t, e) {
|
|
663
692
|
const n = c.toCamelCase(" " + e);
|
|
664
693
|
["get", "set", "has"].forEach((r) => {
|
|
665
694
|
Object.defineProperty(t, r + n, {
|
|
@@ -681,13 +710,13 @@ let re = class {
|
|
|
681
710
|
if (!l)
|
|
682
711
|
throw new Error("header name must be a non-empty string");
|
|
683
712
|
const f = c.findKey(s, l);
|
|
684
|
-
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] =
|
|
713
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = V(a));
|
|
685
714
|
}
|
|
686
715
|
const i = (a, d) => c.forEach(a, (u, l) => o(u, l, d));
|
|
687
716
|
if (c.isPlainObject(e) || e instanceof this.constructor)
|
|
688
717
|
i(e, n);
|
|
689
|
-
else if (c.isString(e) && (e = e.trim()) && !
|
|
690
|
-
i(
|
|
718
|
+
else if (c.isString(e) && (e = e.trim()) && !Nn(e))
|
|
719
|
+
i(Ln(e), n);
|
|
691
720
|
else if (c.isHeaders(e))
|
|
692
721
|
for (const [a, d] of e.entries())
|
|
693
722
|
o(d, a, r);
|
|
@@ -703,7 +732,7 @@ let re = class {
|
|
|
703
732
|
if (!n)
|
|
704
733
|
return s;
|
|
705
734
|
if (n === !0)
|
|
706
|
-
return
|
|
735
|
+
return _n(s);
|
|
707
736
|
if (c.isFunction(n))
|
|
708
737
|
return n.call(this, s, r);
|
|
709
738
|
if (c.isRegExp(n))
|
|
@@ -715,7 +744,7 @@ let re = class {
|
|
|
715
744
|
has(e, n) {
|
|
716
745
|
if (e = D(e), e) {
|
|
717
746
|
const r = c.findKey(this, e);
|
|
718
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
747
|
+
return !!(r && this[r] !== void 0 && (!n || ce(this, this[r], r, n)));
|
|
719
748
|
}
|
|
720
749
|
return !1;
|
|
721
750
|
}
|
|
@@ -725,7 +754,7 @@ let re = class {
|
|
|
725
754
|
function o(i) {
|
|
726
755
|
if (i = D(i), i) {
|
|
727
756
|
const a = c.findKey(r, i);
|
|
728
|
-
a && (!n ||
|
|
757
|
+
a && (!n || ce(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
729
758
|
}
|
|
730
759
|
}
|
|
731
760
|
return c.isArray(e) ? e.forEach(o) : o(e), s;
|
|
@@ -735,7 +764,7 @@ let re = class {
|
|
|
735
764
|
let r = n.length, s = !1;
|
|
736
765
|
for (; r--; ) {
|
|
737
766
|
const o = n[r];
|
|
738
|
-
(!e ||
|
|
767
|
+
(!e || ce(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
739
768
|
}
|
|
740
769
|
return s;
|
|
741
770
|
}
|
|
@@ -744,11 +773,11 @@ let re = class {
|
|
|
744
773
|
return c.forEach(this, (s, o) => {
|
|
745
774
|
const i = c.findKey(r, o);
|
|
746
775
|
if (i) {
|
|
747
|
-
n[i] =
|
|
776
|
+
n[i] = V(s), delete n[o];
|
|
748
777
|
return;
|
|
749
778
|
}
|
|
750
|
-
const a = e ?
|
|
751
|
-
a !== o && delete n[o], n[a] =
|
|
779
|
+
const a = e ? Bn(o) : String(o).trim();
|
|
780
|
+
a !== o && delete n[o], n[a] = V(s), r[a] = !0;
|
|
752
781
|
}), this;
|
|
753
782
|
}
|
|
754
783
|
concat(...e) {
|
|
@@ -778,12 +807,12 @@ let re = class {
|
|
|
778
807
|
return n.forEach((s) => r.set(s)), r;
|
|
779
808
|
}
|
|
780
809
|
static accessor(e) {
|
|
781
|
-
const r = (this[
|
|
810
|
+
const r = (this[_e] = this[_e] = {
|
|
782
811
|
accessors: {}
|
|
783
812
|
}).accessors, s = this.prototype;
|
|
784
813
|
function o(i) {
|
|
785
814
|
const a = D(i);
|
|
786
|
-
r[a] || (
|
|
815
|
+
r[a] || (Fn(s, i), r[a] = !0);
|
|
787
816
|
}
|
|
788
817
|
return c.isArray(e) ? e.forEach(o) : o(e), this;
|
|
789
818
|
}
|
|
@@ -800,23 +829,23 @@ c.reduceDescriptors(re.prototype, ({ value: t }, e) => {
|
|
|
800
829
|
});
|
|
801
830
|
c.freezeMethods(re);
|
|
802
831
|
const I = re;
|
|
803
|
-
function
|
|
832
|
+
function ue(t, e) {
|
|
804
833
|
const n = this || Te, r = e || n, s = I.from(r.headers);
|
|
805
834
|
let o = r.data;
|
|
806
835
|
return c.forEach(t, function(a) {
|
|
807
836
|
o = a.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
808
837
|
}), s.normalize(), o;
|
|
809
838
|
}
|
|
810
|
-
function
|
|
839
|
+
function ct(t) {
|
|
811
840
|
return !!(t && t.__CANCEL__);
|
|
812
841
|
}
|
|
813
|
-
function
|
|
842
|
+
function v(t, e, n) {
|
|
814
843
|
m.call(this, t ?? "canceled", m.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
815
844
|
}
|
|
816
|
-
c.inherits(
|
|
845
|
+
c.inherits(v, m, {
|
|
817
846
|
__CANCEL__: !0
|
|
818
847
|
});
|
|
819
|
-
function
|
|
848
|
+
function ut(t, e, n) {
|
|
820
849
|
const r = n.config.validateStatus;
|
|
821
850
|
!n.status || !r || r(n.status) ? t(n) : e(new m(
|
|
822
851
|
"Request failed with status code " + n.status,
|
|
@@ -826,27 +855,27 @@ function ct(t, e, n) {
|
|
|
826
855
|
n
|
|
827
856
|
));
|
|
828
857
|
}
|
|
829
|
-
function
|
|
858
|
+
function Mn(t) {
|
|
830
859
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
831
860
|
return e && e[1] || "";
|
|
832
861
|
}
|
|
833
|
-
function
|
|
862
|
+
function vn(t, e) {
|
|
834
863
|
t = t || 10;
|
|
835
864
|
const n = new Array(t), r = new Array(t);
|
|
836
865
|
let s = 0, o = 0, i;
|
|
837
866
|
return e = e !== void 0 ? e : 1e3, function(d) {
|
|
838
867
|
const u = Date.now(), l = r[o];
|
|
839
868
|
i || (i = u), n[s] = d, r[s] = u;
|
|
840
|
-
let f = o,
|
|
869
|
+
let f = o, b = 0;
|
|
841
870
|
for (; f !== s; )
|
|
842
|
-
|
|
871
|
+
b += n[f++], f = f % t;
|
|
843
872
|
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
|
|
844
873
|
return;
|
|
845
874
|
const E = l && u - l;
|
|
846
|
-
return E ? Math.round(
|
|
875
|
+
return E ? Math.round(b * 1e3 / E) : void 0;
|
|
847
876
|
};
|
|
848
877
|
}
|
|
849
|
-
function
|
|
878
|
+
function Dn(t, e) {
|
|
850
879
|
let n = 0, r = 1e3 / e, s, o;
|
|
851
880
|
const i = (u, l = Date.now()) => {
|
|
852
881
|
n = l, s = null, o && (clearTimeout(o), o = null), t.apply(null, u);
|
|
@@ -858,10 +887,10 @@ function vn(t, e) {
|
|
|
858
887
|
}, r - f)));
|
|
859
888
|
}, () => s && i(s)];
|
|
860
889
|
}
|
|
861
|
-
const
|
|
890
|
+
const Q = (t, e, n = 3) => {
|
|
862
891
|
let r = 0;
|
|
863
|
-
const s =
|
|
864
|
-
return
|
|
892
|
+
const s = vn(50, 250);
|
|
893
|
+
return Dn((o) => {
|
|
865
894
|
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= a;
|
|
866
895
|
r = i;
|
|
867
896
|
const f = {
|
|
@@ -877,18 +906,18 @@ const K = (t, e, n = 3) => {
|
|
|
877
906
|
};
|
|
878
907
|
t(f);
|
|
879
908
|
}, n);
|
|
880
|
-
},
|
|
909
|
+
}, Ne = (t, e) => {
|
|
881
910
|
const n = t != null;
|
|
882
911
|
return [(r) => e[0]({
|
|
883
912
|
lengthComputable: n,
|
|
884
913
|
total: t,
|
|
885
914
|
loaded: r
|
|
886
915
|
}), e[1]];
|
|
887
|
-
}, Be = (t) => (...e) => c.asap(() => t(...e)),
|
|
916
|
+
}, Be = (t) => (...e) => c.asap(() => t(...e)), $n = O.hasStandardBrowserEnv ? (
|
|
888
917
|
// Standard browser envs have full support of the APIs needed to test
|
|
889
918
|
// whether the request URL is of the same origin as current location.
|
|
890
919
|
function() {
|
|
891
|
-
const e =
|
|
920
|
+
const e = O.navigator && /(msie|trident)/i.test(O.navigator.userAgent), n = document.createElement("a");
|
|
892
921
|
let r;
|
|
893
922
|
function s(o) {
|
|
894
923
|
let i = o;
|
|
@@ -915,7 +944,7 @@ const K = (t, e, n = 3) => {
|
|
|
915
944
|
return !0;
|
|
916
945
|
};
|
|
917
946
|
}()
|
|
918
|
-
),
|
|
947
|
+
), jn = O.hasStandardBrowserEnv ? (
|
|
919
948
|
// Standard browser envs support document.cookie
|
|
920
949
|
{
|
|
921
950
|
write(t, e, n, r, s, o) {
|
|
@@ -942,17 +971,17 @@ const K = (t, e, n = 3) => {
|
|
|
942
971
|
}
|
|
943
972
|
}
|
|
944
973
|
);
|
|
945
|
-
function
|
|
974
|
+
function qn(t) {
|
|
946
975
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
947
976
|
}
|
|
948
|
-
function
|
|
977
|
+
function Hn(t, e) {
|
|
949
978
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
950
979
|
}
|
|
951
|
-
function
|
|
952
|
-
return t && !
|
|
980
|
+
function lt(t, e) {
|
|
981
|
+
return t && !qn(e) ? Hn(t, e) : e;
|
|
953
982
|
}
|
|
954
|
-
const
|
|
955
|
-
function
|
|
983
|
+
const Fe = (t) => t instanceof I ? { ...t } : t;
|
|
984
|
+
function B(t, e) {
|
|
956
985
|
e = e || {};
|
|
957
986
|
const n = {};
|
|
958
987
|
function r(u, l, f) {
|
|
@@ -1011,51 +1040,51 @@ function v(t, e) {
|
|
|
1011
1040
|
socketPath: i,
|
|
1012
1041
|
responseEncoding: i,
|
|
1013
1042
|
validateStatus: a,
|
|
1014
|
-
headers: (u, l) => s(
|
|
1043
|
+
headers: (u, l) => s(Fe(u), Fe(l), !0)
|
|
1015
1044
|
};
|
|
1016
1045
|
return c.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
|
1017
|
-
const f = d[l] || s,
|
|
1018
|
-
c.isUndefined(
|
|
1046
|
+
const f = d[l] || s, b = f(t[l], e[l], l);
|
|
1047
|
+
c.isUndefined(b) && f !== a || (n[l] = b);
|
|
1019
1048
|
}), n;
|
|
1020
1049
|
}
|
|
1021
|
-
const
|
|
1022
|
-
const e =
|
|
1050
|
+
const dt = (t) => {
|
|
1051
|
+
const e = B({}, t);
|
|
1023
1052
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = e;
|
|
1024
|
-
e.headers = i = I.from(i), e.url =
|
|
1053
|
+
e.headers = i = I.from(i), e.url = ot(lt(e.baseURL, e.url), t.params, t.paramsSerializer), a && i.set(
|
|
1025
1054
|
"Authorization",
|
|
1026
1055
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1027
1056
|
);
|
|
1028
1057
|
let d;
|
|
1029
1058
|
if (c.isFormData(n)) {
|
|
1030
|
-
if (
|
|
1059
|
+
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
1031
1060
|
i.setContentType(void 0);
|
|
1032
1061
|
else if ((d = i.getContentType()) !== !1) {
|
|
1033
1062
|
const [u, ...l] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1034
1063
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1035
1064
|
}
|
|
1036
1065
|
}
|
|
1037
|
-
if (
|
|
1038
|
-
const u = s && o &&
|
|
1066
|
+
if (O.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(e)), r || r !== !1 && $n(e.url))) {
|
|
1067
|
+
const u = s && o && jn.read(o);
|
|
1039
1068
|
u && i.set(s, u);
|
|
1040
1069
|
}
|
|
1041
1070
|
return e;
|
|
1042
|
-
},
|
|
1071
|
+
}, zn = typeof XMLHttpRequest < "u", Jn = zn && function(t) {
|
|
1043
1072
|
return new Promise(function(n, r) {
|
|
1044
|
-
const s =
|
|
1073
|
+
const s = dt(t);
|
|
1045
1074
|
let o = s.data;
|
|
1046
1075
|
const i = I.from(s.headers).normalize();
|
|
1047
|
-
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, f,
|
|
1076
|
+
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, f, b, E, p;
|
|
1048
1077
|
function y() {
|
|
1049
1078
|
E && E(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1050
1079
|
}
|
|
1051
1080
|
let h = new XMLHttpRequest();
|
|
1052
1081
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1053
|
-
function
|
|
1082
|
+
function w() {
|
|
1054
1083
|
if (!h)
|
|
1055
1084
|
return;
|
|
1056
1085
|
const R = I.from(
|
|
1057
1086
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1058
|
-
),
|
|
1087
|
+
), A = {
|
|
1059
1088
|
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1060
1089
|
status: h.status,
|
|
1061
1090
|
statusText: h.statusText,
|
|
@@ -1063,40 +1092,40 @@ const lt = (t) => {
|
|
|
1063
1092
|
config: t,
|
|
1064
1093
|
request: h
|
|
1065
1094
|
};
|
|
1066
|
-
|
|
1095
|
+
ut(function(_) {
|
|
1067
1096
|
n(_), y();
|
|
1068
1097
|
}, function(_) {
|
|
1069
1098
|
r(_), y();
|
|
1070
|
-
},
|
|
1099
|
+
}, A), h = null;
|
|
1071
1100
|
}
|
|
1072
|
-
"onloadend" in h ? h.onloadend =
|
|
1073
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1101
|
+
"onloadend" in h ? h.onloadend = w : h.onreadystatechange = function() {
|
|
1102
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1074
1103
|
}, h.onabort = function() {
|
|
1075
1104
|
h && (r(new m("Request aborted", m.ECONNABORTED, t, h)), h = null);
|
|
1076
1105
|
}, h.onerror = function() {
|
|
1077
1106
|
r(new m("Network Error", m.ERR_NETWORK, t, h)), h = null;
|
|
1078
1107
|
}, h.ontimeout = function() {
|
|
1079
1108
|
let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1080
|
-
const
|
|
1109
|
+
const A = s.transitional || it;
|
|
1081
1110
|
s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
|
|
1082
1111
|
U,
|
|
1083
|
-
|
|
1112
|
+
A.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1084
1113
|
t,
|
|
1085
1114
|
h
|
|
1086
1115
|
)), h = null;
|
|
1087
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(U,
|
|
1088
|
-
h.setRequestHeader(
|
|
1089
|
-
}), c.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), u && ([
|
|
1090
|
-
h && (r(!R || R.type ? new
|
|
1116
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(U, A) {
|
|
1117
|
+
h.setRequestHeader(A, U);
|
|
1118
|
+
}), c.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), u && ([b, p] = Q(u, !0), h.addEventListener("progress", b)), d && h.upload && ([f, E] = Q(d), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (R) => {
|
|
1119
|
+
h && (r(!R || R.type ? new v(null, t, h) : R), h.abort(), h = null);
|
|
1091
1120
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1092
|
-
const S =
|
|
1093
|
-
if (S &&
|
|
1121
|
+
const S = Mn(s.url);
|
|
1122
|
+
if (S && O.protocols.indexOf(S) === -1) {
|
|
1094
1123
|
r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, t));
|
|
1095
1124
|
return;
|
|
1096
1125
|
}
|
|
1097
1126
|
h.send(o || null);
|
|
1098
1127
|
});
|
|
1099
|
-
},
|
|
1128
|
+
}, Wn = (t, e) => {
|
|
1100
1129
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1101
1130
|
if (e || n) {
|
|
1102
1131
|
let r = new AbortController(), s;
|
|
@@ -1104,7 +1133,7 @@ const lt = (t) => {
|
|
|
1104
1133
|
if (!s) {
|
|
1105
1134
|
s = !0, a();
|
|
1106
1135
|
const l = u instanceof Error ? u : this.reason;
|
|
1107
|
-
r.abort(l instanceof m ? l : new
|
|
1136
|
+
r.abort(l instanceof m ? l : new v(l instanceof Error ? l.message : l));
|
|
1108
1137
|
}
|
|
1109
1138
|
};
|
|
1110
1139
|
let i = e && setTimeout(() => {
|
|
@@ -1119,7 +1148,7 @@ const lt = (t) => {
|
|
|
1119
1148
|
const { signal: d } = r;
|
|
1120
1149
|
return d.unsubscribe = () => c.asap(a), d;
|
|
1121
1150
|
}
|
|
1122
|
-
},
|
|
1151
|
+
}, Vn = Wn, Gn = function* (t, e) {
|
|
1123
1152
|
let n = t.byteLength;
|
|
1124
1153
|
if (!e || n < e) {
|
|
1125
1154
|
yield t;
|
|
@@ -1128,10 +1157,10 @@ const lt = (t) => {
|
|
|
1128
1157
|
let r = 0, s;
|
|
1129
1158
|
for (; r < n; )
|
|
1130
1159
|
s = r + e, yield t.slice(r, s), r = s;
|
|
1131
|
-
},
|
|
1132
|
-
for await (const n of
|
|
1133
|
-
yield*
|
|
1134
|
-
},
|
|
1160
|
+
}, Kn = async function* (t, e) {
|
|
1161
|
+
for await (const n of Qn(t))
|
|
1162
|
+
yield* Gn(n, e);
|
|
1163
|
+
}, Qn = async function* (t) {
|
|
1135
1164
|
if (t[Symbol.asyncIterator]) {
|
|
1136
1165
|
yield* t;
|
|
1137
1166
|
return;
|
|
@@ -1147,8 +1176,8 @@ const lt = (t) => {
|
|
|
1147
1176
|
} finally {
|
|
1148
1177
|
await e.cancel();
|
|
1149
1178
|
}
|
|
1150
|
-
},
|
|
1151
|
-
const s =
|
|
1179
|
+
}, Me = (t, e, n, r) => {
|
|
1180
|
+
const s = Kn(t, e);
|
|
1152
1181
|
let o = 0, i, a = (d) => {
|
|
1153
1182
|
i || (i = !0, r && r(d));
|
|
1154
1183
|
};
|
|
@@ -1162,8 +1191,8 @@ const lt = (t) => {
|
|
|
1162
1191
|
}
|
|
1163
1192
|
let f = l.byteLength;
|
|
1164
1193
|
if (n) {
|
|
1165
|
-
let
|
|
1166
|
-
n(
|
|
1194
|
+
let b = o += f;
|
|
1195
|
+
n(b);
|
|
1167
1196
|
}
|
|
1168
1197
|
d.enqueue(new Uint8Array(l));
|
|
1169
1198
|
} catch (u) {
|
|
@@ -1176,15 +1205,15 @@ const lt = (t) => {
|
|
|
1176
1205
|
}, {
|
|
1177
1206
|
highWaterMark: 2
|
|
1178
1207
|
});
|
|
1179
|
-
}, se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1208
|
+
}, se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ft = se && typeof ReadableStream == "function", Xn = se && (typeof TextEncoder == "function" ? ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), pt = (t, ...e) => {
|
|
1180
1209
|
try {
|
|
1181
1210
|
return !!t(...e);
|
|
1182
1211
|
} catch {
|
|
1183
1212
|
return !1;
|
|
1184
1213
|
}
|
|
1185
|
-
},
|
|
1214
|
+
}, Yn = ft && pt(() => {
|
|
1186
1215
|
let t = !1;
|
|
1187
|
-
const e = new Request(
|
|
1216
|
+
const e = new Request(O.origin, {
|
|
1188
1217
|
body: new ReadableStream(),
|
|
1189
1218
|
method: "POST",
|
|
1190
1219
|
get duplex() {
|
|
@@ -1192,7 +1221,7 @@ const lt = (t) => {
|
|
|
1192
1221
|
}
|
|
1193
1222
|
}).headers.has("Content-Type");
|
|
1194
1223
|
return t && !e;
|
|
1195
|
-
}),
|
|
1224
|
+
}), ve = 64 * 1024, me = ft && pt(() => c.isReadableStream(new Response("").body)), X = {
|
|
1196
1225
|
stream: me && ((t) => t.body)
|
|
1197
1226
|
};
|
|
1198
1227
|
se && ((t) => {
|
|
@@ -1202,24 +1231,24 @@ se && ((t) => {
|
|
|
1202
1231
|
});
|
|
1203
1232
|
});
|
|
1204
1233
|
})(new Response());
|
|
1205
|
-
const
|
|
1234
|
+
const Zn = async (t) => {
|
|
1206
1235
|
if (t == null)
|
|
1207
1236
|
return 0;
|
|
1208
1237
|
if (c.isBlob(t))
|
|
1209
1238
|
return t.size;
|
|
1210
1239
|
if (c.isSpecCompliantForm(t))
|
|
1211
|
-
return (await new Request(
|
|
1240
|
+
return (await new Request(O.origin, {
|
|
1212
1241
|
method: "POST",
|
|
1213
1242
|
body: t
|
|
1214
1243
|
}).arrayBuffer()).byteLength;
|
|
1215
1244
|
if (c.isArrayBufferView(t) || c.isArrayBuffer(t))
|
|
1216
1245
|
return t.byteLength;
|
|
1217
1246
|
if (c.isURLSearchParams(t) && (t = t + ""), c.isString(t))
|
|
1218
|
-
return (await
|
|
1219
|
-
},
|
|
1247
|
+
return (await Xn(t)).byteLength;
|
|
1248
|
+
}, er = async (t, e) => {
|
|
1220
1249
|
const n = c.toFiniteNumber(t.getContentLength());
|
|
1221
|
-
return n ??
|
|
1222
|
-
},
|
|
1250
|
+
return n ?? Zn(e);
|
|
1251
|
+
}, tr = se && (async (t) => {
|
|
1223
1252
|
let {
|
|
1224
1253
|
url: e,
|
|
1225
1254
|
method: n,
|
|
@@ -1232,62 +1261,62 @@ const Qn = async (t) => {
|
|
|
1232
1261
|
responseType: u,
|
|
1233
1262
|
headers: l,
|
|
1234
1263
|
withCredentials: f = "same-origin",
|
|
1235
|
-
fetchOptions:
|
|
1236
|
-
} =
|
|
1264
|
+
fetchOptions: b
|
|
1265
|
+
} = dt(t);
|
|
1237
1266
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1238
|
-
let E =
|
|
1267
|
+
let E = Vn([s, o && o.toAbortSignal()], i), p;
|
|
1239
1268
|
const y = E && E.unsubscribe && (() => {
|
|
1240
1269
|
E.unsubscribe();
|
|
1241
1270
|
});
|
|
1242
1271
|
let h;
|
|
1243
1272
|
try {
|
|
1244
|
-
if (d &&
|
|
1245
|
-
let
|
|
1273
|
+
if (d && Yn && n !== "get" && n !== "head" && (h = await er(l, r)) !== 0) {
|
|
1274
|
+
let A = new Request(e, {
|
|
1246
1275
|
method: "POST",
|
|
1247
1276
|
body: r,
|
|
1248
1277
|
duplex: "half"
|
|
1249
1278
|
}), k;
|
|
1250
|
-
if (c.isFormData(r) && (k =
|
|
1251
|
-
const [_, H] =
|
|
1279
|
+
if (c.isFormData(r) && (k = A.headers.get("content-type")) && l.setContentType(k), A.body) {
|
|
1280
|
+
const [_, H] = Ne(
|
|
1252
1281
|
h,
|
|
1253
|
-
|
|
1282
|
+
Q(Be(d))
|
|
1254
1283
|
);
|
|
1255
|
-
r =
|
|
1284
|
+
r = Me(A.body, ve, _, H);
|
|
1256
1285
|
}
|
|
1257
1286
|
}
|
|
1258
1287
|
c.isString(f) || (f = f ? "include" : "omit");
|
|
1259
|
-
const
|
|
1288
|
+
const w = "credentials" in Request.prototype;
|
|
1260
1289
|
p = new Request(e, {
|
|
1261
|
-
...
|
|
1290
|
+
...b,
|
|
1262
1291
|
signal: E,
|
|
1263
1292
|
method: n.toUpperCase(),
|
|
1264
1293
|
headers: l.normalize().toJSON(),
|
|
1265
1294
|
body: r,
|
|
1266
1295
|
duplex: "half",
|
|
1267
|
-
credentials:
|
|
1296
|
+
credentials: w ? f : void 0
|
|
1268
1297
|
});
|
|
1269
1298
|
let S = await fetch(p);
|
|
1270
1299
|
const R = me && (u === "stream" || u === "response");
|
|
1271
1300
|
if (me && (a || R && y)) {
|
|
1272
|
-
const
|
|
1301
|
+
const A = {};
|
|
1273
1302
|
["status", "statusText", "headers"].forEach((Ce) => {
|
|
1274
|
-
|
|
1303
|
+
A[Ce] = S[Ce];
|
|
1275
1304
|
});
|
|
1276
|
-
const k = c.toFiniteNumber(S.headers.get("content-length")), [_, H] = a &&
|
|
1305
|
+
const k = c.toFiniteNumber(S.headers.get("content-length")), [_, H] = a && Ne(
|
|
1277
1306
|
k,
|
|
1278
|
-
|
|
1307
|
+
Q(Be(a), !0)
|
|
1279
1308
|
) || [];
|
|
1280
1309
|
S = new Response(
|
|
1281
|
-
|
|
1310
|
+
Me(S.body, ve, _, () => {
|
|
1282
1311
|
H && H(), y && y();
|
|
1283
1312
|
}),
|
|
1284
|
-
|
|
1313
|
+
A
|
|
1285
1314
|
);
|
|
1286
1315
|
}
|
|
1287
1316
|
u = u || "text";
|
|
1288
1317
|
let U = await X[c.findKey(X, u) || "text"](S, t);
|
|
1289
|
-
return !R && y && y(), await new Promise((
|
|
1290
|
-
|
|
1318
|
+
return !R && y && y(), await new Promise((A, k) => {
|
|
1319
|
+
ut(A, k, {
|
|
1291
1320
|
data: U,
|
|
1292
1321
|
headers: I.from(S.headers),
|
|
1293
1322
|
status: S.status,
|
|
@@ -1296,18 +1325,18 @@ const Qn = async (t) => {
|
|
|
1296
1325
|
request: p
|
|
1297
1326
|
});
|
|
1298
1327
|
});
|
|
1299
|
-
} catch (
|
|
1300
|
-
throw y && y(),
|
|
1328
|
+
} catch (w) {
|
|
1329
|
+
throw y && y(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1301
1330
|
new m("Network Error", m.ERR_NETWORK, t, p),
|
|
1302
1331
|
{
|
|
1303
|
-
cause:
|
|
1332
|
+
cause: w.cause || w
|
|
1304
1333
|
}
|
|
1305
|
-
) : m.from(
|
|
1334
|
+
) : m.from(w, w && w.code, t, p);
|
|
1306
1335
|
}
|
|
1307
1336
|
}), ye = {
|
|
1308
|
-
http:
|
|
1309
|
-
xhr:
|
|
1310
|
-
fetch:
|
|
1337
|
+
http: hn,
|
|
1338
|
+
xhr: Jn,
|
|
1339
|
+
fetch: tr
|
|
1311
1340
|
};
|
|
1312
1341
|
c.forEach(ye, (t, e) => {
|
|
1313
1342
|
if (t) {
|
|
@@ -1318,7 +1347,7 @@ c.forEach(ye, (t, e) => {
|
|
|
1318
1347
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1319
1348
|
}
|
|
1320
1349
|
});
|
|
1321
|
-
const
|
|
1350
|
+
const De = (t) => `- ${t}`, nr = (t) => c.isFunction(t) || t === null || t === !1, ht = {
|
|
1322
1351
|
getAdapter: (t) => {
|
|
1323
1352
|
t = c.isArray(t) ? t : [t];
|
|
1324
1353
|
const { length: e } = t;
|
|
@@ -1327,7 +1356,7 @@ const Me = (t) => `- ${t}`, Zn = (t) => c.isFunction(t) || t === null || t === !
|
|
|
1327
1356
|
for (let o = 0; o < e; o++) {
|
|
1328
1357
|
n = t[o];
|
|
1329
1358
|
let i;
|
|
1330
|
-
if (r = n, !
|
|
1359
|
+
if (r = n, !nr(n) && (r = ye[(i = String(n)).toLowerCase()], r === void 0))
|
|
1331
1360
|
throw new m(`Unknown adapter '${i}'`);
|
|
1332
1361
|
if (r)
|
|
1333
1362
|
break;
|
|
@@ -1338,8 +1367,8 @@ const Me = (t) => `- ${t}`, Zn = (t) => c.isFunction(t) || t === null || t === !
|
|
|
1338
1367
|
([a, d]) => `adapter ${a} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1339
1368
|
);
|
|
1340
1369
|
let i = e ? o.length > 1 ? `since :
|
|
1341
|
-
` + o.map(
|
|
1342
|
-
`) : " " +
|
|
1370
|
+
` + o.map(De).join(`
|
|
1371
|
+
`) : " " + De(o[0]) : "as no adapter specified";
|
|
1343
1372
|
throw new m(
|
|
1344
1373
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1345
1374
|
"ERR_NOT_SUPPORT"
|
|
@@ -1349,38 +1378,38 @@ const Me = (t) => `- ${t}`, Zn = (t) => c.isFunction(t) || t === null || t === !
|
|
|
1349
1378
|
},
|
|
1350
1379
|
adapters: ye
|
|
1351
1380
|
};
|
|
1352
|
-
function
|
|
1381
|
+
function le(t) {
|
|
1353
1382
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1354
|
-
throw new
|
|
1383
|
+
throw new v(null, t);
|
|
1355
1384
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return
|
|
1385
|
+
function $e(t) {
|
|
1386
|
+
return le(t), t.headers = I.from(t.headers), t.data = ue.call(
|
|
1358
1387
|
t,
|
|
1359
1388
|
t.transformRequest
|
|
1360
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1361
|
-
return
|
|
1389
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ht.getAdapter(t.adapter || Te.adapter)(t).then(function(r) {
|
|
1390
|
+
return le(t), r.data = ue.call(
|
|
1362
1391
|
t,
|
|
1363
1392
|
t.transformResponse,
|
|
1364
1393
|
r
|
|
1365
1394
|
), r.headers = I.from(r.headers), r;
|
|
1366
1395
|
}, function(r) {
|
|
1367
|
-
return
|
|
1396
|
+
return ct(r) || (le(t), r && r.response && (r.response.data = ue.call(
|
|
1368
1397
|
t,
|
|
1369
1398
|
t.transformResponse,
|
|
1370
1399
|
r.response
|
|
1371
1400
|
), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
|
|
1372
1401
|
});
|
|
1373
1402
|
}
|
|
1374
|
-
const
|
|
1403
|
+
const mt = "1.7.7", Ae = {};
|
|
1375
1404
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1376
|
-
|
|
1405
|
+
Ae[t] = function(r) {
|
|
1377
1406
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1378
1407
|
};
|
|
1379
1408
|
});
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1409
|
+
const je = {};
|
|
1410
|
+
Ae.transitional = function(e, n, r) {
|
|
1382
1411
|
function s(o, i) {
|
|
1383
|
-
return "[Axios v" +
|
|
1412
|
+
return "[Axios v" + mt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1384
1413
|
}
|
|
1385
1414
|
return (o, i, a) => {
|
|
1386
1415
|
if (e === !1)
|
|
@@ -1388,7 +1417,7 @@ Oe.transitional = function(e, n, r) {
|
|
|
1388
1417
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1389
1418
|
m.ERR_DEPRECATED
|
|
1390
1419
|
);
|
|
1391
|
-
return n &&
|
|
1420
|
+
return n && !je[i] && (je[i] = !0, console.warn(
|
|
1392
1421
|
s(
|
|
1393
1422
|
i,
|
|
1394
1423
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1396,7 +1425,7 @@ Oe.transitional = function(e, n, r) {
|
|
|
1396
1425
|
)), e ? e(o, i, a) : !0;
|
|
1397
1426
|
};
|
|
1398
1427
|
};
|
|
1399
|
-
function
|
|
1428
|
+
function rr(t, e, n) {
|
|
1400
1429
|
if (typeof t != "object")
|
|
1401
1430
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1402
1431
|
const r = Object.keys(t);
|
|
@@ -1413,15 +1442,15 @@ function Yn(t, e, n) {
|
|
|
1413
1442
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1414
1443
|
}
|
|
1415
1444
|
}
|
|
1416
|
-
const
|
|
1417
|
-
assertOptions:
|
|
1418
|
-
validators:
|
|
1419
|
-
}, P =
|
|
1420
|
-
let
|
|
1445
|
+
const be = {
|
|
1446
|
+
assertOptions: rr,
|
|
1447
|
+
validators: Ae
|
|
1448
|
+
}, P = be.validators;
|
|
1449
|
+
let Y = class {
|
|
1421
1450
|
constructor(e) {
|
|
1422
1451
|
this.defaults = e, this.interceptors = {
|
|
1423
|
-
request: new
|
|
1424
|
-
response: new
|
|
1452
|
+
request: new Le(),
|
|
1453
|
+
response: new Le()
|
|
1425
1454
|
};
|
|
1426
1455
|
}
|
|
1427
1456
|
/**
|
|
@@ -1450,15 +1479,15 @@ let Z = class {
|
|
|
1450
1479
|
}
|
|
1451
1480
|
}
|
|
1452
1481
|
_request(e, n) {
|
|
1453
|
-
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n =
|
|
1482
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = B(this.defaults, n);
|
|
1454
1483
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1455
|
-
r !== void 0 &&
|
|
1484
|
+
r !== void 0 && be.assertOptions(r, {
|
|
1456
1485
|
silentJSONParsing: P.transitional(P.boolean),
|
|
1457
1486
|
forcedJSONParsing: P.transitional(P.boolean),
|
|
1458
1487
|
clarifyTimeoutError: P.transitional(P.boolean)
|
|
1459
1488
|
}, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
|
|
1460
1489
|
serialize: s
|
|
1461
|
-
} :
|
|
1490
|
+
} : be.assertOptions(s, {
|
|
1462
1491
|
encode: P.function,
|
|
1463
1492
|
serialize: P.function
|
|
1464
1493
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1481,16 +1510,16 @@ let Z = class {
|
|
|
1481
1510
|
this.interceptors.response.forEach(function(y) {
|
|
1482
1511
|
u.push(y.fulfilled, y.rejected);
|
|
1483
1512
|
});
|
|
1484
|
-
let l, f = 0,
|
|
1513
|
+
let l, f = 0, b;
|
|
1485
1514
|
if (!d) {
|
|
1486
|
-
const p = [
|
|
1487
|
-
for (p.unshift.apply(p, a), p.push.apply(p, u),
|
|
1515
|
+
const p = [$e.bind(this), void 0];
|
|
1516
|
+
for (p.unshift.apply(p, a), p.push.apply(p, u), b = p.length, l = Promise.resolve(n); f < b; )
|
|
1488
1517
|
l = l.then(p[f++], p[f++]);
|
|
1489
1518
|
return l;
|
|
1490
1519
|
}
|
|
1491
|
-
|
|
1520
|
+
b = a.length;
|
|
1492
1521
|
let E = n;
|
|
1493
|
-
for (f = 0; f <
|
|
1522
|
+
for (f = 0; f < b; ) {
|
|
1494
1523
|
const p = a[f++], y = a[f++];
|
|
1495
1524
|
try {
|
|
1496
1525
|
E = p(E);
|
|
@@ -1500,23 +1529,23 @@ let Z = class {
|
|
|
1500
1529
|
}
|
|
1501
1530
|
}
|
|
1502
1531
|
try {
|
|
1503
|
-
l =
|
|
1532
|
+
l = $e.call(this, E);
|
|
1504
1533
|
} catch (p) {
|
|
1505
1534
|
return Promise.reject(p);
|
|
1506
1535
|
}
|
|
1507
|
-
for (f = 0,
|
|
1536
|
+
for (f = 0, b = u.length; f < b; )
|
|
1508
1537
|
l = l.then(u[f++], u[f++]);
|
|
1509
1538
|
return l;
|
|
1510
1539
|
}
|
|
1511
1540
|
getUri(e) {
|
|
1512
|
-
e =
|
|
1513
|
-
const n =
|
|
1514
|
-
return
|
|
1541
|
+
e = B(this.defaults, e);
|
|
1542
|
+
const n = lt(e.baseURL, e.url);
|
|
1543
|
+
return ot(n, e.params, e.paramsSerializer);
|
|
1515
1544
|
}
|
|
1516
1545
|
};
|
|
1517
1546
|
c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1518
|
-
|
|
1519
|
-
return this.request(
|
|
1547
|
+
Y.prototype[e] = function(n, r) {
|
|
1548
|
+
return this.request(B(r || {}, {
|
|
1520
1549
|
method: e,
|
|
1521
1550
|
url: n,
|
|
1522
1551
|
data: (r || {}).data
|
|
@@ -1526,7 +1555,7 @@ c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1526
1555
|
c.forEach(["post", "put", "patch"], function(e) {
|
|
1527
1556
|
function n(r) {
|
|
1528
1557
|
return function(o, i, a) {
|
|
1529
|
-
return this.request(
|
|
1558
|
+
return this.request(B(a || {}, {
|
|
1530
1559
|
method: e,
|
|
1531
1560
|
headers: r ? {
|
|
1532
1561
|
"Content-Type": "multipart/form-data"
|
|
@@ -1536,10 +1565,10 @@ c.forEach(["post", "put", "patch"], function(e) {
|
|
|
1536
1565
|
}));
|
|
1537
1566
|
};
|
|
1538
1567
|
}
|
|
1539
|
-
|
|
1568
|
+
Y.prototype[e] = n(), Y.prototype[e + "Form"] = n(!0);
|
|
1540
1569
|
});
|
|
1541
|
-
const
|
|
1542
|
-
let
|
|
1570
|
+
const G = Y;
|
|
1571
|
+
let sr = class yt {
|
|
1543
1572
|
constructor(e) {
|
|
1544
1573
|
if (typeof e != "function")
|
|
1545
1574
|
throw new TypeError("executor must be a function.");
|
|
@@ -1564,7 +1593,7 @@ let er = class mt {
|
|
|
1564
1593
|
r.unsubscribe(o);
|
|
1565
1594
|
}, i;
|
|
1566
1595
|
}, e(function(o, i, a) {
|
|
1567
|
-
r.reason || (r.reason = new
|
|
1596
|
+
r.reason || (r.reason = new v(o, i, a), n(r.reason));
|
|
1568
1597
|
});
|
|
1569
1598
|
}
|
|
1570
1599
|
/**
|
|
@@ -1606,23 +1635,23 @@ let er = class mt {
|
|
|
1606
1635
|
static source() {
|
|
1607
1636
|
let e;
|
|
1608
1637
|
return {
|
|
1609
|
-
token: new
|
|
1638
|
+
token: new yt(function(s) {
|
|
1610
1639
|
e = s;
|
|
1611
1640
|
}),
|
|
1612
1641
|
cancel: e
|
|
1613
1642
|
};
|
|
1614
1643
|
}
|
|
1615
1644
|
};
|
|
1616
|
-
const
|
|
1617
|
-
function
|
|
1645
|
+
const or = sr;
|
|
1646
|
+
function ir(t) {
|
|
1618
1647
|
return function(n) {
|
|
1619
1648
|
return t.apply(null, n);
|
|
1620
1649
|
};
|
|
1621
1650
|
}
|
|
1622
|
-
function
|
|
1651
|
+
function ar(t) {
|
|
1623
1652
|
return c.isObject(t) && t.isAxiosError === !0;
|
|
1624
1653
|
}
|
|
1625
|
-
const
|
|
1654
|
+
const we = {
|
|
1626
1655
|
Continue: 100,
|
|
1627
1656
|
SwitchingProtocols: 101,
|
|
1628
1657
|
Processing: 102,
|
|
@@ -1687,37 +1716,37 @@ const be = {
|
|
|
1687
1716
|
NotExtended: 510,
|
|
1688
1717
|
NetworkAuthenticationRequired: 511
|
|
1689
1718
|
};
|
|
1690
|
-
Object.entries(
|
|
1691
|
-
|
|
1719
|
+
Object.entries(we).forEach(([t, e]) => {
|
|
1720
|
+
we[e] = t;
|
|
1692
1721
|
});
|
|
1693
|
-
const
|
|
1694
|
-
function
|
|
1695
|
-
const e = new
|
|
1696
|
-
return c.extend(n,
|
|
1697
|
-
return
|
|
1722
|
+
const cr = we;
|
|
1723
|
+
function bt(t) {
|
|
1724
|
+
const e = new G(t), n = Ve(G.prototype.request, e);
|
|
1725
|
+
return c.extend(n, G.prototype, e, { allOwnKeys: !0 }), c.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1726
|
+
return bt(B(t, s));
|
|
1698
1727
|
}, n;
|
|
1699
1728
|
}
|
|
1700
|
-
const g =
|
|
1701
|
-
g.Axios =
|
|
1702
|
-
g.CanceledError =
|
|
1703
|
-
g.CancelToken =
|
|
1704
|
-
g.isCancel =
|
|
1705
|
-
g.VERSION =
|
|
1729
|
+
const g = bt(Te);
|
|
1730
|
+
g.Axios = G;
|
|
1731
|
+
g.CanceledError = v;
|
|
1732
|
+
g.CancelToken = or;
|
|
1733
|
+
g.isCancel = ct;
|
|
1734
|
+
g.VERSION = mt;
|
|
1706
1735
|
g.toFormData = ne;
|
|
1707
1736
|
g.AxiosError = m;
|
|
1708
1737
|
g.Cancel = g.CanceledError;
|
|
1709
1738
|
g.all = function(e) {
|
|
1710
1739
|
return Promise.all(e);
|
|
1711
1740
|
};
|
|
1712
|
-
g.spread =
|
|
1713
|
-
g.isAxiosError =
|
|
1714
|
-
g.mergeConfig =
|
|
1741
|
+
g.spread = ir;
|
|
1742
|
+
g.isAxiosError = ar;
|
|
1743
|
+
g.mergeConfig = B;
|
|
1715
1744
|
g.AxiosHeaders = I;
|
|
1716
|
-
g.formToJSON = (t) =>
|
|
1717
|
-
g.getAdapter =
|
|
1718
|
-
g.HttpStatusCode =
|
|
1745
|
+
g.formToJSON = (t) => at(c.isHTMLForm(t) ? new FormData(t) : t);
|
|
1746
|
+
g.getAdapter = ht.getAdapter;
|
|
1747
|
+
g.HttpStatusCode = cr;
|
|
1719
1748
|
g.default = g;
|
|
1720
|
-
const
|
|
1749
|
+
const Oe = g, {
|
|
1721
1750
|
Axios: Cr,
|
|
1722
1751
|
AxiosError: wt,
|
|
1723
1752
|
CanceledError: Ir,
|
|
@@ -1727,15 +1756,15 @@ const Ae = g, {
|
|
|
1727
1756
|
all: Pr,
|
|
1728
1757
|
Cancel: Lr,
|
|
1729
1758
|
isAxiosError: _r,
|
|
1730
|
-
spread:
|
|
1731
|
-
toFormData:
|
|
1732
|
-
AxiosHeaders:
|
|
1733
|
-
HttpStatusCode:
|
|
1734
|
-
formToJSON:
|
|
1759
|
+
spread: Nr,
|
|
1760
|
+
toFormData: Br,
|
|
1761
|
+
AxiosHeaders: Fr,
|
|
1762
|
+
HttpStatusCode: Mr,
|
|
1763
|
+
formToJSON: vr,
|
|
1735
1764
|
getAdapter: Dr,
|
|
1736
1765
|
mergeConfig: $r
|
|
1737
|
-
} =
|
|
1738
|
-
var
|
|
1766
|
+
} = Oe;
|
|
1767
|
+
var F = globalThis && globalThis.__awaiter || function(t, e, n, r) {
|
|
1739
1768
|
function s(o) {
|
|
1740
1769
|
return o instanceof n ? o : new n(function(i) {
|
|
1741
1770
|
i(o);
|
|
@@ -1762,7 +1791,7 @@ var N = globalThis && globalThis.__awaiter || function(t, e, n, r) {
|
|
|
1762
1791
|
u((r = r.apply(t, e || [])).next());
|
|
1763
1792
|
});
|
|
1764
1793
|
};
|
|
1765
|
-
const
|
|
1794
|
+
const J = "feedme-one-tap", ur = "feedme-login-iframe", de = "feedme-otp-iframe", lr = "fm-iframe-message-request", dr = "fm-iframe-message-response";
|
|
1766
1795
|
class L {
|
|
1767
1796
|
static get token() {
|
|
1768
1797
|
if (!this.bgIframe)
|
|
@@ -1858,19 +1887,19 @@ class L {
|
|
|
1858
1887
|
`, document.head.appendChild(a);
|
|
1859
1888
|
}
|
|
1860
1889
|
static signIn({ waitForInitialAuthState: e = !1, root: n } = {}) {
|
|
1861
|
-
return
|
|
1862
|
-
if (e && (yield this.initialAuthStatePromise) || (window.parent !== window && console.warn("FeedMeAuth: looks like you are inside an iframe now, please let the parent window to handle the login instead."), document.getElementById(
|
|
1890
|
+
return F(this, void 0, void 0, function* () {
|
|
1891
|
+
if (e && (yield this.initialAuthStatePromise) || (window.parent !== window && console.warn("FeedMeAuth: looks like you are inside an iframe now, please let the parent window to handle the login instead."), document.getElementById(J)))
|
|
1863
1892
|
return;
|
|
1864
1893
|
const r = this.feedMePosOptions.oneTapMode, { wrapper: s } = this.createIframe({
|
|
1865
1894
|
root: n,
|
|
1866
1895
|
url: this.getOneTapUrl(),
|
|
1867
|
-
id:
|
|
1896
|
+
id: J,
|
|
1868
1897
|
classList: [r === "full_screen" ? "full-screen" : "popup"]
|
|
1869
1898
|
}), o = (i) => {
|
|
1870
1899
|
if (i.origin === this.baseUrl) {
|
|
1871
1900
|
if (typeof i.data == "string")
|
|
1872
1901
|
if (i.data === "fm-close-one-tap")
|
|
1873
|
-
this.unmountById(
|
|
1902
|
+
this.unmountById(J), window.removeEventListener("message", o);
|
|
1874
1903
|
else if (i.data.startsWith("fm-one-tap-height-") && this.feedMePosOptions.oneTapMode === "popup") {
|
|
1875
1904
|
const a = i.data.replace("fm-one-tap-height-", "");
|
|
1876
1905
|
s.style.height = a + "px";
|
|
@@ -1907,7 +1936,7 @@ class L {
|
|
|
1907
1936
|
static verifyOtp({ phone: e, tokenType: n = "idtoken" }) {
|
|
1908
1937
|
return new Promise((r, s) => {
|
|
1909
1938
|
this.createIframe({
|
|
1910
|
-
id:
|
|
1939
|
+
id: de,
|
|
1911
1940
|
url: this.getOtpUrl(e, n),
|
|
1912
1941
|
classList: ["full-screen"]
|
|
1913
1942
|
});
|
|
@@ -1916,9 +1945,9 @@ class L {
|
|
|
1916
1945
|
const a = "fm-idtoken-";
|
|
1917
1946
|
if (i.data.startsWith(a)) {
|
|
1918
1947
|
const d = i.data.replace(a, "");
|
|
1919
|
-
window.removeEventListener("message", o), this.unmountById(
|
|
1948
|
+
window.removeEventListener("message", o), this.unmountById(de), r(d);
|
|
1920
1949
|
}
|
|
1921
|
-
i.data === "fm-close-otp" && (this.unmountById(
|
|
1950
|
+
i.data === "fm-close-otp" && (this.unmountById(de), window.removeEventListener("message", o), s(new Error("Verify Failed.")));
|
|
1922
1951
|
}
|
|
1923
1952
|
};
|
|
1924
1953
|
window.addEventListener("message", o);
|
|
@@ -1931,7 +1960,7 @@ class L {
|
|
|
1931
1960
|
}, 300));
|
|
1932
1961
|
}
|
|
1933
1962
|
static getCustomToken() {
|
|
1934
|
-
return
|
|
1963
|
+
return F(this, void 0, void 0, function* () {
|
|
1935
1964
|
const e = yield fetch(this.baseUrl + "/api/token/custom", {
|
|
1936
1965
|
method: "POST",
|
|
1937
1966
|
headers: {
|
|
@@ -1948,7 +1977,7 @@ class L {
|
|
|
1948
1977
|
});
|
|
1949
1978
|
}
|
|
1950
1979
|
static currentUser() {
|
|
1951
|
-
return
|
|
1980
|
+
return F(this, void 0, void 0, function* () {
|
|
1952
1981
|
if (!this.bgIframe)
|
|
1953
1982
|
throw new Error("Can't call before initialize");
|
|
1954
1983
|
return yield this.initialAuthStatePromise, yield this.callMethodOnIframe({
|
|
@@ -1959,7 +1988,7 @@ class L {
|
|
|
1959
1988
|
});
|
|
1960
1989
|
}
|
|
1961
1990
|
static signInWithCustomToken(e) {
|
|
1962
|
-
return
|
|
1991
|
+
return F(this, void 0, void 0, function* () {
|
|
1963
1992
|
if (!this.bgIframe)
|
|
1964
1993
|
throw new Error("Can't call before initialize");
|
|
1965
1994
|
return yield this.callMethodOnIframe({
|
|
@@ -1971,7 +2000,7 @@ class L {
|
|
|
1971
2000
|
});
|
|
1972
2001
|
}
|
|
1973
2002
|
static refreshToken() {
|
|
1974
|
-
return
|
|
2003
|
+
return F(this, void 0, void 0, function* () {
|
|
1975
2004
|
if (!this.bgIframe)
|
|
1976
2005
|
throw new Error("FeedMeAuth.refreshToken must be called after initialize()");
|
|
1977
2006
|
return new Promise((e, n) => {
|
|
@@ -1985,7 +2014,7 @@ class L {
|
|
|
1985
2014
|
});
|
|
1986
2015
|
}
|
|
1987
2016
|
static getUserClaims() {
|
|
1988
|
-
return
|
|
2017
|
+
return F(this, void 0, void 0, function* () {
|
|
1989
2018
|
const e = yield fetch(this.baseUrl + "/api/user/claims", {
|
|
1990
2019
|
method: "GET",
|
|
1991
2020
|
headers: {
|
|
@@ -2007,7 +2036,7 @@ class L {
|
|
|
2007
2036
|
if (r.type === "fm-auth-state-changed") {
|
|
2008
2037
|
if (r.user && !r.user.phoneNumber)
|
|
2009
2038
|
return;
|
|
2010
|
-
this._token = r.token, Object.values(this.authStateChangeCallbacks).forEach((s) => s(r.user, r.token)), this._token && this.unmountById(
|
|
2039
|
+
this._token = r.token, Object.values(this.authStateChangeCallbacks).forEach((s) => s(r.user, r.token)), this._token && this.unmountById(J);
|
|
2011
2040
|
}
|
|
2012
2041
|
}
|
|
2013
2042
|
}), this.initialAuthStatePromise = new Promise((n, r) => {
|
|
@@ -2021,7 +2050,7 @@ class L {
|
|
|
2021
2050
|
}
|
|
2022
2051
|
static startLoginIframe() {
|
|
2023
2052
|
const { wrapper: e } = this.createIframe({
|
|
2024
|
-
id:
|
|
2053
|
+
id: ur,
|
|
2025
2054
|
url: this.getLoginUrl()
|
|
2026
2055
|
}), n = (r) => {
|
|
2027
2056
|
if (r.origin === this.baseUrl) {
|
|
@@ -2081,14 +2110,14 @@ class L {
|
|
|
2081
2110
|
throw new Error("Target iframe not exist.");
|
|
2082
2111
|
const o = String(Math.random());
|
|
2083
2112
|
return e.contentWindow.postMessage({
|
|
2084
|
-
type:
|
|
2113
|
+
type: lr,
|
|
2085
2114
|
messageId: o,
|
|
2086
2115
|
methodName: n,
|
|
2087
2116
|
params: r
|
|
2088
2117
|
}, "*"), new Promise((i, a) => {
|
|
2089
2118
|
const d = (l) => {
|
|
2090
|
-
var f,
|
|
2091
|
-
l.origin === this.baseUrl && l.data.type ===
|
|
2119
|
+
var f, b;
|
|
2120
|
+
l.origin === this.baseUrl && l.data.type === dr && ((f = l.data) === null || f === void 0 ? void 0 : f.messageId) === o && (clearTimeout(u), window.removeEventListener("message", d), i((b = l.data) === null || b === void 0 ? void 0 : b.response));
|
|
2092
2121
|
};
|
|
2093
2122
|
window.addEventListener("message", d);
|
|
2094
2123
|
let u;
|
|
@@ -2104,91 +2133,12 @@ L.bgIframe = null;
|
|
|
2104
2133
|
L._token = null;
|
|
2105
2134
|
L.authStateChangeCallBackId = 1;
|
|
2106
2135
|
window.FeedMeAuthGlobal = L;
|
|
2107
|
-
const
|
|
2108
|
-
var s;
|
|
2109
|
-
const n = ((s = j().sessionUser.value) == null ? void 0 : s.token) ?? L.token;
|
|
2110
|
-
if (!n)
|
|
2111
|
-
throw new Error("Invalid token");
|
|
2112
|
-
const r = Ae.create({
|
|
2113
|
-
baseURL: `${t}/${e}`,
|
|
2114
|
-
headers: {
|
|
2115
|
-
Authorization: `Bearer ${n}`
|
|
2116
|
-
}
|
|
2117
|
-
});
|
|
2118
|
-
return r.interceptors.response.use(
|
|
2119
|
-
(o) => o,
|
|
2120
|
-
async (o) => {
|
|
2121
|
-
var i;
|
|
2122
|
-
if (o instanceof wt) {
|
|
2123
|
-
const a = (i = o.response) == null ? void 0 : i.data, d = (a == null ? void 0 : a.message) || (a == null ? void 0 : a.error) || `${o.message}` || `${o}`;
|
|
2124
|
-
return Promise.reject(d);
|
|
2125
|
-
}
|
|
2126
|
-
return Promise.reject(o);
|
|
2127
|
-
}
|
|
2128
|
-
), r;
|
|
2129
|
-
}, bt = (t = "", e = void 0) => {
|
|
2130
|
-
const { portalBackendUrl: n } = ur(e);
|
|
2131
|
-
return cr(n)(t);
|
|
2132
|
-
}, jr = () => {
|
|
2133
|
-
var e;
|
|
2134
|
-
const t = j();
|
|
2135
|
-
if (t.currentBusiness.value) {
|
|
2136
|
-
const n = `businesses/${(e = t.currentBusiness.value) == null ? void 0 : e.id}`;
|
|
2137
|
-
return bt(n);
|
|
2138
|
-
} else
|
|
2139
|
-
throw new Error("Invalid business");
|
|
2140
|
-
}, qr = (t, e) => {
|
|
2141
|
-
const n = `/restaurants/${t}`, r = e ? `/${e}${n}` : n;
|
|
2142
|
-
if (t)
|
|
2143
|
-
return bt(r);
|
|
2144
|
-
throw new Error("Invalid restaurant");
|
|
2145
|
-
};
|
|
2146
|
-
Q.F_COUNTRY.enum.SG, Q.F_COUNTRY.enum.ID;
|
|
2147
|
-
function ur(t = void 0) {
|
|
2148
|
-
const { namespace: e, currentCountry: n } = j(), r = t ?? n.value, s = e.value === "dev", o = (r == null ? void 0 : r.toLowerCase()) !== "my" ? `.${r == null ? void 0 : r.toLowerCase()}` : "", a = `https://portal-v2${`${s ? "-dev" : ""}${o}.feedmeapi.com`}`;
|
|
2149
|
-
return {
|
|
2150
|
-
portalBackendUrl: { remy: "https://remy-dev.feedmeapi.com/v1", customerApp: "https://feedmedev.cc", googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", templateBuilderUrl: "https://print-template-builder.feedme.dev/", gtm: { id: "GTM-P7Z9FMS6", serverUrl: "https://server-side-tagging-rsrq3ogsuq-as.a.run.app", env: "development", serverMeasurementId: "G-759WBZPF06", debug: !0 }, firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, r2: null }.mainBackend ?? a,
|
|
2151
|
-
menuBackendUrl: { remy: "https://remy-dev.feedmeapi.com/v1", customerApp: "https://feedmedev.cc", googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", templateBuilderUrl: "https://print-template-builder.feedme.dev/", gtm: { id: "GTM-P7Z9FMS6", serverUrl: "https://server-side-tagging-rsrq3ogsuq-as.a.run.app", env: "development", serverMeasurementId: "G-759WBZPF06", debug: !0 }, firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, r2: null }.menuBackend ?? a
|
|
2152
|
-
};
|
|
2153
|
-
}
|
|
2154
|
-
function Hr(t) {
|
|
2155
|
-
return t.data;
|
|
2156
|
-
}
|
|
2157
|
-
var T = [];
|
|
2158
|
-
for (var de = 0; de < 256; ++de)
|
|
2159
|
-
T.push((de + 256).toString(16).slice(1));
|
|
2160
|
-
function lr(t, e = 0) {
|
|
2161
|
-
return (T[t[e + 0]] + T[t[e + 1]] + T[t[e + 2]] + T[t[e + 3]] + "-" + T[t[e + 4]] + T[t[e + 5]] + "-" + T[t[e + 6]] + T[t[e + 7]] + "-" + T[t[e + 8]] + T[t[e + 9]] + "-" + T[t[e + 10]] + T[t[e + 11]] + T[t[e + 12]] + T[t[e + 13]] + T[t[e + 14]] + T[t[e + 15]]).toLowerCase();
|
|
2162
|
-
}
|
|
2163
|
-
var J, dr = new Uint8Array(16);
|
|
2164
|
-
function fr() {
|
|
2165
|
-
if (!J && (J = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !J))
|
|
2166
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2167
|
-
return J(dr);
|
|
2168
|
-
}
|
|
2169
|
-
var pr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
2170
|
-
const je = {
|
|
2171
|
-
randomUUID: pr
|
|
2172
|
-
};
|
|
2173
|
-
function gt(t, e, n) {
|
|
2174
|
-
if (je.randomUUID && !e && !t)
|
|
2175
|
-
return je.randomUUID();
|
|
2176
|
-
t = t || {};
|
|
2177
|
-
var r = t.random || (t.rng || fr)();
|
|
2178
|
-
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, e) {
|
|
2179
|
-
n = n || 0;
|
|
2180
|
-
for (var s = 0; s < 16; ++s)
|
|
2181
|
-
e[n + s] = r[s];
|
|
2182
|
-
return e;
|
|
2183
|
-
}
|
|
2184
|
-
return lr(r);
|
|
2185
|
-
}
|
|
2186
|
-
const hr = (t) => (e) => {
|
|
2136
|
+
const fr = (t) => (e) => {
|
|
2187
2137
|
var s;
|
|
2188
2138
|
const n = ((s = j().sessionUser.value) == null ? void 0 : s.token) ?? L.token;
|
|
2189
2139
|
if (!n)
|
|
2190
2140
|
throw new Error("Invalid token");
|
|
2191
|
-
const r =
|
|
2141
|
+
const r = Oe.create({
|
|
2192
2142
|
baseURL: `${t}/${e}`,
|
|
2193
2143
|
headers: {
|
|
2194
2144
|
Authorization: `Bearer ${n}`
|
|
@@ -2206,15 +2156,15 @@ const hr = (t) => (e) => {
|
|
|
2206
2156
|
}
|
|
2207
2157
|
), r;
|
|
2208
2158
|
}, qe = (t = "") => {
|
|
2209
|
-
const { portalBackendUrl: e } =
|
|
2210
|
-
return
|
|
2211
|
-
},
|
|
2159
|
+
const { portalBackendUrl: e } = hr();
|
|
2160
|
+
return fr(e)(t);
|
|
2161
|
+
}, pr = [K.F_COUNTRY.enum.SG, K.F_COUNTRY.enum.ID];
|
|
2212
2162
|
function He(t) {
|
|
2213
2163
|
return t.data;
|
|
2214
2164
|
}
|
|
2215
|
-
function
|
|
2165
|
+
function hr() {
|
|
2216
2166
|
var i;
|
|
2217
|
-
const { namespace: t, currentCountry: e } = j(), n = t.value === "dev", r =
|
|
2167
|
+
const { namespace: t, currentCountry: e } = j(), n = t.value === "dev", r = pr.includes(e.value) ? `.${(i = e.value) == null ? void 0 : i.toLowerCase()}` : "";
|
|
2218
2168
|
return {
|
|
2219
2169
|
portalBackendUrl: `https://portal-v2${`${n ? "-dev" : ""}${r}.feedmeapi.com`}`
|
|
2220
2170
|
};
|
|
@@ -2227,7 +2177,7 @@ const ze = {
|
|
|
2227
2177
|
return He(await qe().put("/public-setting", t));
|
|
2228
2178
|
}
|
|
2229
2179
|
};
|
|
2230
|
-
function
|
|
2180
|
+
function mr() {
|
|
2231
2181
|
return {
|
|
2232
2182
|
loadingQueue: [],
|
|
2233
2183
|
publicSetting: {
|
|
@@ -2251,7 +2201,7 @@ function wr() {
|
|
|
2251
2201
|
};
|
|
2252
2202
|
}
|
|
2253
2203
|
const Je = Tt("portal-app-store", {
|
|
2254
|
-
state: () =>
|
|
2204
|
+
state: () => mr(),
|
|
2255
2205
|
actions: {
|
|
2256
2206
|
addLoadingQueues(t) {
|
|
2257
2207
|
this.loadingQueue = [...this.loadingQueue, ...t];
|
|
@@ -2263,7 +2213,7 @@ const Je = Tt("portal-app-store", {
|
|
|
2263
2213
|
this.loadingQueue = this.loadingQueue.filter((e) => !t.includes(e.id));
|
|
2264
2214
|
},
|
|
2265
2215
|
async promise(t, e = !0) {
|
|
2266
|
-
const n =
|
|
2216
|
+
const n = We();
|
|
2267
2217
|
try {
|
|
2268
2218
|
const r = [{ id: n, isGlobal: e }];
|
|
2269
2219
|
return this.addLoadingQueues(r), await t();
|
|
@@ -2281,11 +2231,11 @@ const Je = Tt("portal-app-store", {
|
|
|
2281
2231
|
}), this.publicSetting;
|
|
2282
2232
|
}
|
|
2283
2233
|
}
|
|
2284
|
-
}),
|
|
2234
|
+
}), yr = (t) => {
|
|
2285
2235
|
async function e(r, s) {
|
|
2286
2236
|
var a, d;
|
|
2287
2237
|
let o = [];
|
|
2288
|
-
!s || !s.customId ? o.push(`${(/* @__PURE__ */ new Date()).toISOString()}_${
|
|
2238
|
+
!s || !s.customId ? o.push(`${(/* @__PURE__ */ new Date()).toISOString()}_${We().split("-")[0]}`) : typeof s.customId == "string" ? o.push(s.customId) : o = s.customId;
|
|
2289
2239
|
const i = Je();
|
|
2290
2240
|
i.addLoadingQueues(
|
|
2291
2241
|
o.map((u) => ({
|
|
@@ -2374,12 +2324,61 @@ const Je = Tt("portal-app-store", {
|
|
|
2374
2324
|
}
|
|
2375
2325
|
)
|
|
2376
2326
|
};
|
|
2377
|
-
},
|
|
2327
|
+
}, jr = yr, br = (t) => (e) => {
|
|
2328
|
+
var s;
|
|
2329
|
+
const n = ((s = j().sessionUser.value) == null ? void 0 : s.token) ?? L.token;
|
|
2330
|
+
if (!n)
|
|
2331
|
+
throw new Error("Invalid token");
|
|
2332
|
+
const r = Oe.create({
|
|
2333
|
+
baseURL: `${t}/${e}`,
|
|
2334
|
+
headers: {
|
|
2335
|
+
Authorization: `Bearer ${n}`
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
return r.interceptors.response.use(
|
|
2339
|
+
(o) => o,
|
|
2340
|
+
async (o) => {
|
|
2341
|
+
var i;
|
|
2342
|
+
if (o instanceof wt) {
|
|
2343
|
+
const a = (i = o.response) == null ? void 0 : i.data, d = (a == null ? void 0 : a.message) || (a == null ? void 0 : a.error) || `${o.message}` || `${o}`;
|
|
2344
|
+
return Promise.reject(d);
|
|
2345
|
+
}
|
|
2346
|
+
return Promise.reject(o);
|
|
2347
|
+
}
|
|
2348
|
+
), r;
|
|
2349
|
+
}, gt = (t = "", e = void 0) => {
|
|
2350
|
+
const { portalBackendUrl: n } = wr(e);
|
|
2351
|
+
return br(n)(t);
|
|
2352
|
+
}, qr = () => {
|
|
2353
|
+
var e;
|
|
2354
|
+
const t = j();
|
|
2355
|
+
if (t.currentBusiness.value) {
|
|
2356
|
+
const n = `businesses/${(e = t.currentBusiness.value) == null ? void 0 : e.id}`;
|
|
2357
|
+
return gt(n);
|
|
2358
|
+
} else
|
|
2359
|
+
throw new Error("Invalid business");
|
|
2360
|
+
}, Hr = (t, e) => {
|
|
2361
|
+
const n = `/restaurants/${t}`, r = e ? `/${e}${n}` : n;
|
|
2362
|
+
if (t)
|
|
2363
|
+
return gt(r);
|
|
2364
|
+
throw new Error("Invalid restaurant");
|
|
2365
|
+
};
|
|
2366
|
+
K.F_COUNTRY.enum.SG, K.F_COUNTRY.enum.ID;
|
|
2367
|
+
function wr(t = void 0) {
|
|
2368
|
+
const { namespace: e, currentCountry: n } = j(), r = t ?? n.value, s = e.value === "dev", o = (r == null ? void 0 : r.toLowerCase()) !== "my" ? `.${r == null ? void 0 : r.toLowerCase()}` : "", a = `https://portal-v2${`${s ? "-dev" : ""}${o}.feedmeapi.com`}`;
|
|
2369
|
+
return {
|
|
2370
|
+
portalBackendUrl: { remy: "https://remy.feedmeapi.com/v1", customerApp: "https://feedme.cc", googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", templateBuilderUrl: "https://print-template-builder.feedme.cc/", gtm: { id: "GTM-WR8XHXLH", serverUrl: "https://server-side-tagging-zzez732dna-as.a.run.app", env: "production", serverMeasurementId: "G-2MP52PC24R", debug: !1 }, firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, r2: { endPoint: "https://c0e0719247f81dc2f3d30844a8e0235c.r2.cloudflarestorage.com", bucketName: "image-feedme-cc", accessKeyId: "7c4faa649a257ce02edcf99d924b1799", secretAccessKey: "2b7ed3d5b6e23fdceb355f89281530875fa9673b09653be560be9a7694422a97" } }.mainBackend ?? a,
|
|
2371
|
+
menuBackendUrl: { remy: "https://remy.feedmeapi.com/v1", customerApp: "https://feedme.cc", googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", templateBuilderUrl: "https://print-template-builder.feedme.cc/", gtm: { id: "GTM-WR8XHXLH", serverUrl: "https://server-side-tagging-zzez732dna-as.a.run.app", env: "production", serverMeasurementId: "G-2MP52PC24R", debug: !1 }, firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, r2: { endPoint: "https://c0e0719247f81dc2f3d30844a8e0235c.r2.cloudflarestorage.com", bucketName: "image-feedme-cc", accessKeyId: "7c4faa649a257ce02edcf99d924b1799", secretAccessKey: "2b7ed3d5b6e23fdceb355f89281530875fa9673b09653be560be9a7694422a97" } }.menuBackend ?? a
|
|
2372
|
+
};
|
|
2373
|
+
}
|
|
2374
|
+
function zr(t) {
|
|
2375
|
+
return t.data;
|
|
2376
|
+
}
|
|
2378
2377
|
export {
|
|
2379
2378
|
L as F,
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2379
|
+
qr as a,
|
|
2380
|
+
gt as b,
|
|
2381
|
+
zr as g,
|
|
2382
|
+
Hr as r,
|
|
2383
|
+
jr as u
|
|
2385
2384
|
};
|