@feedmepos/mf-settings 0.0.54 → 0.0.56-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.
@@ -1,2384 +0,0 @@
1
- import { computed as Et, isRef as St, watch as Rt } from "vue";
2
- import { SnackbarPosition as oe } from "@feedmepos/ui-library";
3
- import { defineStore as Tt } from "pinia";
4
- import { e as Q } 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 Ot(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, At = 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(At);
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 Ot(r);
34
- }
35
- function Ge(t, e) {
36
- return function() {
37
- return t.apply(e, arguments);
38
- };
39
- }
40
- const { toString: xt } = Object.prototype, { getPrototypeOf: ge } = Object, Y = ((t) => (e) => {
41
- const n = xt.call(e);
42
- return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
43
- })(/* @__PURE__ */ Object.create(null)), x = (t) => (t = t.toLowerCase(), (e) => Y(e) === t), ee = (t) => (e) => typeof e === t, { isArray: F } = Array, $ = ee("undefined");
44
- function Ut(t) {
45
- return t !== null && !$(t) && t.constructor !== null && !$(t.constructor) && C(t.constructor.isBuffer) && t.constructor.isBuffer(t);
46
- }
47
- const Ve = x("ArrayBuffer");
48
- function kt(t) {
49
- let e;
50
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ve(t.buffer), e;
51
- }
52
- const Pt = ee("string"), C = ee("function"), Qe = ee("number"), te = (t) => t !== null && typeof t == "object", Lt = (t) => t === !0 || t === !1, W = (t) => {
53
- if (Y(t) !== "object")
54
- return !1;
55
- const e = ge(t);
56
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
57
- }, _t = x("Date"), Bt = x("File"), vt = x("Blob"), Nt = x("FileList"), Ft = (t) => te(t) && C(t.pipe), Mt = (t) => {
58
- let e;
59
- return t && (typeof FormData == "function" && t instanceof FormData || C(t.append) && ((e = Y(t)) === "formdata" || // detect form-data instance
60
- e === "object" && C(t.toString) && t.toString() === "[object FormData]"));
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, "");
62
- function q(t, e, { allOwnKeys: n = !1 } = {}) {
63
- if (t === null || typeof t > "u")
64
- return;
65
- let r, s;
66
- if (typeof t != "object" && (t = [t]), F(t))
67
- for (r = 0, s = t.length; r < s; r++)
68
- e.call(null, t[r], r, t);
69
- else {
70
- const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
71
- let a;
72
- for (r = 0; r < i; r++)
73
- a = o[r], e.call(null, t[a], a, t);
74
- }
75
- }
76
- function Ke(t, e) {
77
- e = e.toLowerCase();
78
- const n = Object.keys(t);
79
- let r = n.length, s;
80
- for (; r-- > 0; )
81
- if (s = n[r], e === s.toLowerCase())
82
- return s;
83
- return null;
84
- }
85
- const B = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Xe = (t) => !$(t) && t !== B;
86
- function fe() {
87
- const { caseless: t } = Xe(this) && this || {}, e = {}, n = (r, s) => {
88
- const o = t && Ke(e, s) || s;
89
- W(e[o]) && W(r) ? e[o] = fe(e[o], r) : W(r) ? e[o] = fe({}, r) : F(r) ? e[o] = r.slice() : e[o] = r;
90
- };
91
- for (let r = 0, s = arguments.length; r < s; r++)
92
- arguments[r] && q(arguments[r], n);
93
- return e;
94
- }
95
- const Jt = (t, e, n, { allOwnKeys: r } = {}) => (q(e, (s, o) => {
96
- n && C(s) ? t[o] = Ge(s, n) : t[o] = s;
97
- }, { allOwnKeys: r }), t), Wt = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Gt = (t, e, n, r) => {
98
- t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
99
- value: e.prototype
100
- }), n && Object.assign(t.prototype, n);
101
- }, Vt = (t, e, n, r) => {
102
- let s, o, i;
103
- const a = {};
104
- if (e = e || {}, t == null)
105
- return e;
106
- do {
107
- for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
108
- i = s[o], (!r || r(i, t, e)) && !a[i] && (e[i] = t[i], a[i] = !0);
109
- t = n !== !1 && ge(t);
110
- } while (t && (!n || n(t, e)) && t !== Object.prototype);
111
- return e;
112
- }, Qt = (t, e, n) => {
113
- t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
114
- const r = t.indexOf(e, n);
115
- return r !== -1 && r === n;
116
- }, Kt = (t) => {
117
- if (!t)
118
- return null;
119
- if (F(t))
120
- return t;
121
- let e = t.length;
122
- if (!Qe(e))
123
- return null;
124
- const n = new Array(e);
125
- for (; e-- > 0; )
126
- n[e] = t[e];
127
- return n;
128
- }, Xt = ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && ge(Uint8Array)), Zt = (t, e) => {
129
- const r = (t && t[Symbol.iterator]).call(t);
130
- let s;
131
- for (; (s = r.next()) && !s.done; ) {
132
- const o = s.value;
133
- e.call(t, o[0], o[1]);
134
- }
135
- }, Yt = (t, e) => {
136
- let n;
137
- const r = [];
138
- for (; (n = t.exec(e)) !== null; )
139
- r.push(n);
140
- return r;
141
- }, en = x("HTMLFormElement"), tn = (t) => t.toLowerCase().replace(
142
- /[-_\s]([a-z\d])(\w*)/g,
143
- function(n, r, s) {
144
- return r.toUpperCase() + s;
145
- }
146
- ), xe = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), nn = x("RegExp"), Ze = (t, e) => {
147
- const n = Object.getOwnPropertyDescriptors(t), r = {};
148
- q(n, (s, o) => {
149
- let i;
150
- (i = e(s, o, t)) !== !1 && (r[o] = i || s);
151
- }), Object.defineProperties(t, r);
152
- }, rn = (t) => {
153
- Ze(t, (e, n) => {
154
- if (C(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
155
- return !1;
156
- const r = t[n];
157
- if (C(r)) {
158
- if (e.enumerable = !1, "writable" in e) {
159
- e.writable = !1;
160
- return;
161
- }
162
- e.set || (e.set = () => {
163
- throw Error("Can not rewrite read-only method '" + n + "'");
164
- });
165
- }
166
- });
167
- }, sn = (t, e) => {
168
- const n = {}, r = (s) => {
169
- s.forEach((o) => {
170
- n[o] = !0;
171
- });
172
- };
173
- return F(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", Ye = {
176
- DIGIT: Ue,
177
- ALPHA: ae,
178
- ALPHA_DIGIT: ae + ae.toUpperCase() + Ue
179
- }, cn = (t = 16, e = Ye.ALPHA_DIGIT) => {
180
- let n = "";
181
- const { length: r } = e;
182
- for (; t--; )
183
- n += e[Math.random() * r | 0];
184
- return n;
185
- };
186
- function un(t) {
187
- return !!(t && C(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
188
- }
189
- const ln = (t) => {
190
- const e = new Array(10), n = (r, s) => {
191
- if (te(r)) {
192
- if (e.indexOf(r) >= 0)
193
- return;
194
- if (!("toJSON" in r)) {
195
- e[s] = r;
196
- const o = F(r) ? [] : {};
197
- return q(r, (i, a) => {
198
- const d = n(i, s + 1);
199
- !$(d) && (o[a] = d);
200
- }), e[s] = void 0, o;
201
- }
202
- }
203
- return r;
204
- };
205
- return n(t, 0);
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) => (B.addEventListener("message", ({ source: s, data: o }) => {
207
- s === B && o === n && r.length && r.shift()();
208
- }, !1), (s) => {
209
- r.push(s), B.postMessage(n, "*");
210
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
211
- typeof setImmediate == "function",
212
- C(B.postMessage)
213
- ), pn = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || et, c = {
214
- isArray: F,
215
- isArrayBuffer: Ve,
216
- isBuffer: Ut,
217
- isFormData: Mt,
218
- isArrayBufferView: kt,
219
- isString: Pt,
220
- isNumber: Qe,
221
- isBoolean: Lt,
222
- isObject: te,
223
- isPlainObject: W,
224
- isReadableStream: $t,
225
- isRequest: jt,
226
- isResponse: qt,
227
- isHeaders: Ht,
228
- isUndefined: $,
229
- isDate: _t,
230
- isFile: Bt,
231
- isBlob: vt,
232
- isRegExp: nn,
233
- isFunction: C,
234
- isStream: Ft,
235
- isURLSearchParams: Dt,
236
- isTypedArray: Xt,
237
- isFileList: Nt,
238
- forEach: q,
239
- merge: fe,
240
- extend: Jt,
241
- trim: zt,
242
- stripBOM: Wt,
243
- inherits: Gt,
244
- toFlatObject: Vt,
245
- kindOf: Y,
246
- kindOfTest: x,
247
- endsWith: Qt,
248
- toArray: Kt,
249
- forEachEntry: Zt,
250
- matchAll: Yt,
251
- isHTMLForm: en,
252
- hasOwnProperty: xe,
253
- hasOwnProp: xe,
254
- // an alias to avoid ESLint no-prototype-builtins detection
255
- reduceDescriptors: Ze,
256
- freezeMethods: rn,
257
- toObjectSet: sn,
258
- toCamelCase: tn,
259
- noop: on,
260
- toFiniteNumber: an,
261
- findKey: Ke,
262
- global: B,
263
- isContextDefined: Xe,
264
- ALPHABET: Ye,
265
- generateString: cn,
266
- isSpecCompliantForm: un,
267
- toJSONObject: ln,
268
- isAsyncFn: dn,
269
- isThenable: fn,
270
- setImmediate: et,
271
- asap: pn
272
- };
273
- function m(t, e, n, r, s) {
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);
275
- }
276
- c.inherits(m, Error, {
277
- toJSON: function() {
278
- return {
279
- // Standard
280
- message: this.message,
281
- name: this.name,
282
- // Microsoft
283
- description: this.description,
284
- number: this.number,
285
- // Mozilla
286
- fileName: this.fileName,
287
- lineNumber: this.lineNumber,
288
- columnNumber: this.columnNumber,
289
- stack: this.stack,
290
- // Axios
291
- config: c.toJSONObject(this.config),
292
- code: this.code,
293
- status: this.status
294
- };
295
- }
296
- });
297
- const tt = m.prototype, nt = {};
298
- [
299
- "ERR_BAD_OPTION_VALUE",
300
- "ERR_BAD_OPTION",
301
- "ECONNABORTED",
302
- "ETIMEDOUT",
303
- "ERR_NETWORK",
304
- "ERR_FR_TOO_MANY_REDIRECTS",
305
- "ERR_DEPRECATED",
306
- "ERR_BAD_RESPONSE",
307
- "ERR_BAD_REQUEST",
308
- "ERR_CANCELED",
309
- "ERR_NOT_SUPPORT",
310
- "ERR_INVALID_URL"
311
- // eslint-disable-next-line func-names
312
- ].forEach((t) => {
313
- nt[t] = { value: t };
314
- });
315
- Object.defineProperties(m, nt);
316
- Object.defineProperty(tt, "isAxiosError", { value: !0 });
317
- m.from = (t, e, n, r, s, o) => {
318
- const i = Object.create(tt);
319
- return c.toFlatObject(t, i, function(d) {
320
- return d !== Error.prototype;
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;
322
- };
323
- const hn = null;
324
- function pe(t) {
325
- return c.isPlainObject(t) || c.isArray(t);
326
- }
327
- function rt(t) {
328
- return c.endsWith(t, "[]") ? t.slice(0, -2) : t;
329
- }
330
- function ke(t, e, n) {
331
- return t ? t.concat(e).map(function(s, o) {
332
- return s = rt(s), !n && o ? "[" + s + "]" : s;
333
- }).join(n ? "." : "") : e;
334
- }
335
- function mn(t) {
336
- return c.isArray(t) && !t.some(pe);
337
- }
338
- const yn = c.toFlatObject(c, {}, null, function(e) {
339
- return /^is[A-Z]/.test(e);
340
- });
341
- function ne(t, e, n) {
342
- if (!c.isObject(t))
343
- throw new TypeError("target must be an object");
344
- e = e || new FormData(), n = c.toFlatObject(n, {
345
- metaTokens: !0,
346
- dots: !1,
347
- indexes: !1
348
- }, !1, function(y, h) {
349
- return !c.isUndefined(h[y]);
350
- });
351
- const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(e);
352
- if (!c.isFunction(s))
353
- throw new TypeError("visitor must be a function");
354
- function u(p) {
355
- if (p === null)
356
- return "";
357
- if (c.isDate(p))
358
- return p.toISOString();
359
- if (!d && c.isBlob(p))
360
- throw new m("Blob is not supported. Use a Buffer instead.");
361
- return c.isArrayBuffer(p) || c.isTypedArray(p) ? d && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
362
- }
363
- function l(p, y, h) {
364
- let b = p;
365
- if (p && !h && typeof p == "object") {
366
- if (c.endsWith(y, "{}"))
367
- y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
368
- else if (c.isArray(p) && mn(p) || (c.isFileList(p) || c.endsWith(y, "[]")) && (b = c.toArray(p)))
369
- return y = rt(y), b.forEach(function(R, U) {
370
- !(c.isUndefined(R) || R === null) && e.append(
371
- // eslint-disable-next-line no-nested-ternary
372
- i === !0 ? ke([y], U, o) : i === null ? y : y + "[]",
373
- u(R)
374
- );
375
- }), !1;
376
- }
377
- return pe(p) ? !0 : (e.append(ke(h, y, o), u(p)), !1);
378
- }
379
- const f = [], w = Object.assign(yn, {
380
- defaultVisitor: l,
381
- convertValue: u,
382
- isVisitable: pe
383
- });
384
- function E(p, y) {
385
- if (!c.isUndefined(p)) {
386
- if (f.indexOf(p) !== -1)
387
- throw Error("Circular reference detected in " + y.join("."));
388
- f.push(p), c.forEach(p, function(b, S) {
389
- (!(c.isUndefined(b) || b === null) && s.call(
390
- e,
391
- b,
392
- c.isString(S) ? S.trim() : S,
393
- y,
394
- w
395
- )) === !0 && E(b, y ? y.concat(S) : [S]);
396
- }), f.pop();
397
- }
398
- }
399
- if (!c.isObject(t))
400
- throw new TypeError("data must be an object");
401
- return E(t), e;
402
- }
403
- function Pe(t) {
404
- const e = {
405
- "!": "%21",
406
- "'": "%27",
407
- "(": "%28",
408
- ")": "%29",
409
- "~": "%7E",
410
- "%20": "+",
411
- "%00": "\0"
412
- };
413
- return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
414
- return e[r];
415
- });
416
- }
417
- function Ee(t, e) {
418
- this._pairs = [], t && ne(t, this, e);
419
- }
420
- const st = Ee.prototype;
421
- st.append = function(e, n) {
422
- this._pairs.push([e, n]);
423
- };
424
- st.toString = function(e) {
425
- const n = e ? function(r) {
426
- return e.call(this, r, Pe);
427
- } : Pe;
428
- return this._pairs.map(function(s) {
429
- return n(s[0]) + "=" + n(s[1]);
430
- }, "").join("&");
431
- };
432
- function wn(t) {
433
- return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
434
- }
435
- function ot(t, e, n) {
436
- if (!e)
437
- return t;
438
- const r = n && n.encode || wn, s = n && n.serialize;
439
- let o;
440
- if (s ? o = s(e, n) : o = c.isURLSearchParams(e) ? e.toString() : new Ee(e, n).toString(r), o) {
441
- const i = t.indexOf("#");
442
- i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
443
- }
444
- return t;
445
- }
446
- class bn {
447
- constructor() {
448
- this.handlers = [];
449
- }
450
- /**
451
- * Add a new interceptor to the stack
452
- *
453
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
454
- * @param {Function} rejected The function to handle `reject` for a `Promise`
455
- *
456
- * @return {Number} An ID used to remove interceptor later
457
- */
458
- use(e, n, r) {
459
- return this.handlers.push({
460
- fulfilled: e,
461
- rejected: n,
462
- synchronous: r ? r.synchronous : !1,
463
- runWhen: r ? r.runWhen : null
464
- }), this.handlers.length - 1;
465
- }
466
- /**
467
- * Remove an interceptor from the stack
468
- *
469
- * @param {Number} id The ID that was returned by `use`
470
- *
471
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
472
- */
473
- eject(e) {
474
- this.handlers[e] && (this.handlers[e] = null);
475
- }
476
- /**
477
- * Clear all interceptors from the stack
478
- *
479
- * @returns {void}
480
- */
481
- clear() {
482
- this.handlers && (this.handlers = []);
483
- }
484
- /**
485
- * Iterate over all the registered interceptors
486
- *
487
- * This method is particularly useful for skipping over any
488
- * interceptors that may have become `null` calling `eject`.
489
- *
490
- * @param {Function} fn The function to call for each interceptor
491
- *
492
- * @returns {void}
493
- */
494
- forEach(e) {
495
- c.forEach(this.handlers, function(r) {
496
- r !== null && e(r);
497
- });
498
- }
499
- }
500
- const Le = bn, it = {
501
- silentJSONParsing: !0,
502
- forcedJSONParsing: !0,
503
- clarifyTimeoutError: !1
504
- }, gn = typeof URLSearchParams < "u" ? URLSearchParams : Ee, En = typeof FormData < "u" ? FormData : null, Sn = typeof Blob < "u" ? Blob : null, Rn = {
505
- isBrowser: !0,
506
- classes: {
507
- URLSearchParams: gn,
508
- FormData: En,
509
- Blob: Sn
510
- },
511
- protocols: ["http", "https", "file", "blob", "url", "data"]
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), On = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
513
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), An = Se && window.location.href || "http://localhost", Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
514
- __proto__: null,
515
- hasBrowserEnv: Se,
516
- hasStandardBrowserEnv: Tn,
517
- hasStandardBrowserWebWorkerEnv: On,
518
- navigator: he,
519
- origin: An
520
- }, Symbol.toStringTag, { value: "Module" })), A = {
521
- ...Cn,
522
- ...Rn
523
- };
524
- function In(t, e) {
525
- return ne(t, new A.classes.URLSearchParams(), Object.assign({
526
- visitor: function(n, r, s, o) {
527
- return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
528
- }
529
- }, e));
530
- }
531
- function xn(t) {
532
- return c.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
533
- }
534
- function Un(t) {
535
- const e = {}, n = Object.keys(t);
536
- let r;
537
- const s = n.length;
538
- let o;
539
- for (r = 0; r < s; r++)
540
- o = n[r], e[o] = t[o];
541
- return e;
542
- }
543
- function at(t) {
544
- function e(n, r, s, o) {
545
- let i = n[o++];
546
- if (i === "__proto__")
547
- return !0;
548
- const a = Number.isFinite(+i), d = o >= n.length;
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);
550
- }
551
- if (c.isFormData(t) && c.isFunction(t.entries)) {
552
- const n = {};
553
- return c.forEachEntry(t, (r, s) => {
554
- e(xn(r), s, n, 0);
555
- }), n;
556
- }
557
- return null;
558
- }
559
- function kn(t, e, n) {
560
- if (c.isString(t))
561
- try {
562
- return (e || JSON.parse)(t), c.trim(t);
563
- } catch (r) {
564
- if (r.name !== "SyntaxError")
565
- throw r;
566
- }
567
- return (n || JSON.stringify)(t);
568
- }
569
- const Re = {
570
- transitional: it,
571
- adapter: ["xhr", "http", "fetch"],
572
- transformRequest: [function(e, n) {
573
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(e);
574
- if (o && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
575
- return s ? JSON.stringify(at(e)) : e;
576
- if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
577
- return e;
578
- if (c.isArrayBufferView(e))
579
- return e.buffer;
580
- if (c.isURLSearchParams(e))
581
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
582
- let a;
583
- if (o) {
584
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
585
- return In(e, this.formSerializer).toString();
586
- if ((a = c.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
587
- const d = this.env && this.env.FormData;
588
- return ne(
589
- a ? { "files[]": e } : e,
590
- d && new d(),
591
- this.formSerializer
592
- );
593
- }
594
- }
595
- return o || s ? (n.setContentType("application/json", !1), kn(e)) : e;
596
- }],
597
- transformResponse: [function(e) {
598
- const n = this.transitional || Re.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
599
- if (c.isResponse(e) || c.isReadableStream(e))
600
- return e;
601
- if (e && c.isString(e) && (r && !this.responseType || s)) {
602
- const i = !(n && n.silentJSONParsing) && s;
603
- try {
604
- return JSON.parse(e);
605
- } catch (a) {
606
- if (i)
607
- throw a.name === "SyntaxError" ? m.from(a, m.ERR_BAD_RESPONSE, this, null, this.response) : a;
608
- }
609
- }
610
- return e;
611
- }],
612
- /**
613
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
614
- * timeout is not created.
615
- */
616
- timeout: 0,
617
- xsrfCookieName: "XSRF-TOKEN",
618
- xsrfHeaderName: "X-XSRF-TOKEN",
619
- maxContentLength: -1,
620
- maxBodyLength: -1,
621
- env: {
622
- FormData: A.classes.FormData,
623
- Blob: A.classes.Blob
624
- },
625
- validateStatus: function(e) {
626
- return e >= 200 && e < 300;
627
- },
628
- headers: {
629
- common: {
630
- Accept: "application/json, text/plain, */*",
631
- "Content-Type": void 0
632
- }
633
- }
634
- };
635
- c.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
636
- Re.headers[t] = {};
637
- });
638
- const Te = Re, Pn = c.toObjectSet([
639
- "age",
640
- "authorization",
641
- "content-length",
642
- "content-type",
643
- "etag",
644
- "expires",
645
- "from",
646
- "host",
647
- "if-modified-since",
648
- "if-unmodified-since",
649
- "last-modified",
650
- "location",
651
- "max-forwards",
652
- "proxy-authorization",
653
- "referer",
654
- "retry-after",
655
- "user-agent"
656
- ]), Ln = (t) => {
657
- const e = {};
658
- let n, r, s;
659
- return t && t.split(`
660
- `).forEach(function(i) {
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);
662
- }), e;
663
- }, _e = Symbol("internals");
664
- function D(t) {
665
- return t && String(t).trim().toLowerCase();
666
- }
667
- function G(t) {
668
- return t === !1 || t == null ? t : c.isArray(t) ? t.map(G) : String(t);
669
- }
670
- function _n(t) {
671
- const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
672
- let r;
673
- for (; r = n.exec(t); )
674
- e[r[1]] = r[2];
675
- return e;
676
- }
677
- const Bn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
678
- function ce(t, e, n, r, s) {
679
- if (c.isFunction(r))
680
- return r.call(this, e, n);
681
- if (s && (e = n), !!c.isString(e)) {
682
- if (c.isString(r))
683
- return e.indexOf(r) !== -1;
684
- if (c.isRegExp(r))
685
- return r.test(e);
686
- }
687
- }
688
- function vn(t) {
689
- return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
690
- }
691
- function Nn(t, e) {
692
- const n = c.toCamelCase(" " + e);
693
- ["get", "set", "has"].forEach((r) => {
694
- Object.defineProperty(t, r + n, {
695
- value: function(s, o, i) {
696
- return this[r].call(this, e, s, o, i);
697
- },
698
- configurable: !0
699
- });
700
- });
701
- }
702
- let re = class {
703
- constructor(e) {
704
- e && this.set(e);
705
- }
706
- set(e, n, r) {
707
- const s = this;
708
- function o(a, d, u) {
709
- const l = D(d);
710
- if (!l)
711
- throw new Error("header name must be a non-empty string");
712
- const f = c.findKey(s, l);
713
- (!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = G(a));
714
- }
715
- const i = (a, d) => c.forEach(a, (u, l) => o(u, l, d));
716
- if (c.isPlainObject(e) || e instanceof this.constructor)
717
- i(e, n);
718
- else if (c.isString(e) && (e = e.trim()) && !Bn(e))
719
- i(Ln(e), n);
720
- else if (c.isHeaders(e))
721
- for (const [a, d] of e.entries())
722
- o(d, a, r);
723
- else
724
- e != null && o(n, e, r);
725
- return this;
726
- }
727
- get(e, n) {
728
- if (e = D(e), e) {
729
- const r = c.findKey(this, e);
730
- if (r) {
731
- const s = this[r];
732
- if (!n)
733
- return s;
734
- if (n === !0)
735
- return _n(s);
736
- if (c.isFunction(n))
737
- return n.call(this, s, r);
738
- if (c.isRegExp(n))
739
- return n.exec(s);
740
- throw new TypeError("parser must be boolean|regexp|function");
741
- }
742
- }
743
- }
744
- has(e, n) {
745
- if (e = D(e), e) {
746
- const r = c.findKey(this, e);
747
- return !!(r && this[r] !== void 0 && (!n || ce(this, this[r], r, n)));
748
- }
749
- return !1;
750
- }
751
- delete(e, n) {
752
- const r = this;
753
- let s = !1;
754
- function o(i) {
755
- if (i = D(i), i) {
756
- const a = c.findKey(r, i);
757
- a && (!n || ce(r, r[a], a, n)) && (delete r[a], s = !0);
758
- }
759
- }
760
- return c.isArray(e) ? e.forEach(o) : o(e), s;
761
- }
762
- clear(e) {
763
- const n = Object.keys(this);
764
- let r = n.length, s = !1;
765
- for (; r--; ) {
766
- const o = n[r];
767
- (!e || ce(this, this[o], o, e, !0)) && (delete this[o], s = !0);
768
- }
769
- return s;
770
- }
771
- normalize(e) {
772
- const n = this, r = {};
773
- return c.forEach(this, (s, o) => {
774
- const i = c.findKey(r, o);
775
- if (i) {
776
- n[i] = G(s), delete n[o];
777
- return;
778
- }
779
- const a = e ? vn(o) : String(o).trim();
780
- a !== o && delete n[o], n[a] = G(s), r[a] = !0;
781
- }), this;
782
- }
783
- concat(...e) {
784
- return this.constructor.concat(this, ...e);
785
- }
786
- toJSON(e) {
787
- const n = /* @__PURE__ */ Object.create(null);
788
- return c.forEach(this, (r, s) => {
789
- r != null && r !== !1 && (n[s] = e && c.isArray(r) ? r.join(", ") : r);
790
- }), n;
791
- }
792
- [Symbol.iterator]() {
793
- return Object.entries(this.toJSON())[Symbol.iterator]();
794
- }
795
- toString() {
796
- return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
797
- `);
798
- }
799
- get [Symbol.toStringTag]() {
800
- return "AxiosHeaders";
801
- }
802
- static from(e) {
803
- return e instanceof this ? e : new this(e);
804
- }
805
- static concat(e, ...n) {
806
- const r = new this(e);
807
- return n.forEach((s) => r.set(s)), r;
808
- }
809
- static accessor(e) {
810
- const r = (this[_e] = this[_e] = {
811
- accessors: {}
812
- }).accessors, s = this.prototype;
813
- function o(i) {
814
- const a = D(i);
815
- r[a] || (Nn(s, i), r[a] = !0);
816
- }
817
- return c.isArray(e) ? e.forEach(o) : o(e), this;
818
- }
819
- };
820
- re.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
821
- c.reduceDescriptors(re.prototype, ({ value: t }, e) => {
822
- let n = e[0].toUpperCase() + e.slice(1);
823
- return {
824
- get: () => t,
825
- set(r) {
826
- this[n] = r;
827
- }
828
- };
829
- });
830
- c.freezeMethods(re);
831
- const I = re;
832
- function ue(t, e) {
833
- const n = this || Te, r = e || n, s = I.from(r.headers);
834
- let o = r.data;
835
- return c.forEach(t, function(a) {
836
- o = a.call(n, o, s.normalize(), e ? e.status : void 0);
837
- }), s.normalize(), o;
838
- }
839
- function ct(t) {
840
- return !!(t && t.__CANCEL__);
841
- }
842
- function M(t, e, n) {
843
- m.call(this, t ?? "canceled", m.ERR_CANCELED, e, n), this.name = "CanceledError";
844
- }
845
- c.inherits(M, m, {
846
- __CANCEL__: !0
847
- });
848
- function ut(t, e, n) {
849
- const r = n.config.validateStatus;
850
- !n.status || !r || r(n.status) ? t(n) : e(new m(
851
- "Request failed with status code " + n.status,
852
- [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
853
- n.config,
854
- n.request,
855
- n
856
- ));
857
- }
858
- function Fn(t) {
859
- const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
860
- return e && e[1] || "";
861
- }
862
- function Mn(t, e) {
863
- t = t || 10;
864
- const n = new Array(t), r = new Array(t);
865
- let s = 0, o = 0, i;
866
- return e = e !== void 0 ? e : 1e3, function(d) {
867
- const u = Date.now(), l = r[o];
868
- i || (i = u), n[s] = d, r[s] = u;
869
- let f = o, w = 0;
870
- for (; f !== s; )
871
- w += n[f++], f = f % t;
872
- if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
873
- return;
874
- const E = l && u - l;
875
- return E ? Math.round(w * 1e3 / E) : void 0;
876
- };
877
- }
878
- function Dn(t, e) {
879
- let n = 0, r = 1e3 / e, s, o;
880
- const i = (u, l = Date.now()) => {
881
- n = l, s = null, o && (clearTimeout(o), o = null), t.apply(null, u);
882
- };
883
- return [(...u) => {
884
- const l = Date.now(), f = l - n;
885
- f >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
886
- o = null, i(s);
887
- }, r - f)));
888
- }, () => s && i(s)];
889
- }
890
- const K = (t, e, n = 3) => {
891
- let r = 0;
892
- const s = Mn(50, 250);
893
- return Dn((o) => {
894
- const i = o.loaded, a = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= a;
895
- r = i;
896
- const f = {
897
- loaded: i,
898
- total: a,
899
- progress: a ? i / a : void 0,
900
- bytes: d,
901
- rate: u || void 0,
902
- estimated: u && a && l ? (a - i) / u : void 0,
903
- event: o,
904
- lengthComputable: a != null,
905
- [e ? "download" : "upload"]: !0
906
- };
907
- t(f);
908
- }, n);
909
- }, Be = (t, e) => {
910
- const n = t != null;
911
- return [(r) => e[0]({
912
- lengthComputable: n,
913
- total: t,
914
- loaded: r
915
- }), e[1]];
916
- }, ve = (t) => (...e) => c.asap(() => t(...e)), $n = A.hasStandardBrowserEnv ? (
917
- // Standard browser envs have full support of the APIs needed to test
918
- // whether the request URL is of the same origin as current location.
919
- function() {
920
- const e = A.navigator && /(msie|trident)/i.test(A.navigator.userAgent), n = document.createElement("a");
921
- let r;
922
- function s(o) {
923
- let i = o;
924
- return e && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
925
- href: n.href,
926
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
927
- host: n.host,
928
- search: n.search ? n.search.replace(/^\?/, "") : "",
929
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
930
- hostname: n.hostname,
931
- port: n.port,
932
- pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
933
- };
934
- }
935
- return r = s(window.location.href), function(i) {
936
- const a = c.isString(i) ? s(i) : i;
937
- return a.protocol === r.protocol && a.host === r.host;
938
- };
939
- }()
940
- ) : (
941
- // Non standard browser envs (web workers, react-native) lack needed support.
942
- function() {
943
- return function() {
944
- return !0;
945
- };
946
- }()
947
- ), jn = A.hasStandardBrowserEnv ? (
948
- // Standard browser envs support document.cookie
949
- {
950
- write(t, e, n, r, s, o) {
951
- const i = [t + "=" + encodeURIComponent(e)];
952
- c.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), c.isString(r) && i.push("path=" + r), c.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
953
- },
954
- read(t) {
955
- const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
956
- return e ? decodeURIComponent(e[3]) : null;
957
- },
958
- remove(t) {
959
- this.write(t, "", Date.now() - 864e5);
960
- }
961
- }
962
- ) : (
963
- // Non-standard browser env (web workers, react-native) lack needed support.
964
- {
965
- write() {
966
- },
967
- read() {
968
- return null;
969
- },
970
- remove() {
971
- }
972
- }
973
- );
974
- function qn(t) {
975
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
976
- }
977
- function Hn(t, e) {
978
- return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
979
- }
980
- function lt(t, e) {
981
- return t && !qn(e) ? Hn(t, e) : e;
982
- }
983
- const Ne = (t) => t instanceof I ? { ...t } : t;
984
- function v(t, e) {
985
- e = e || {};
986
- const n = {};
987
- function r(u, l, f) {
988
- return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: f }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
989
- }
990
- function s(u, l, f) {
991
- if (c.isUndefined(l)) {
992
- if (!c.isUndefined(u))
993
- return r(void 0, u, f);
994
- } else
995
- return r(u, l, f);
996
- }
997
- function o(u, l) {
998
- if (!c.isUndefined(l))
999
- return r(void 0, l);
1000
- }
1001
- function i(u, l) {
1002
- if (c.isUndefined(l)) {
1003
- if (!c.isUndefined(u))
1004
- return r(void 0, u);
1005
- } else
1006
- return r(void 0, l);
1007
- }
1008
- function a(u, l, f) {
1009
- if (f in e)
1010
- return r(u, l);
1011
- if (f in t)
1012
- return r(void 0, u);
1013
- }
1014
- const d = {
1015
- url: o,
1016
- method: o,
1017
- data: o,
1018
- baseURL: i,
1019
- transformRequest: i,
1020
- transformResponse: i,
1021
- paramsSerializer: i,
1022
- timeout: i,
1023
- timeoutMessage: i,
1024
- withCredentials: i,
1025
- withXSRFToken: i,
1026
- adapter: i,
1027
- responseType: i,
1028
- xsrfCookieName: i,
1029
- xsrfHeaderName: i,
1030
- onUploadProgress: i,
1031
- onDownloadProgress: i,
1032
- decompress: i,
1033
- maxContentLength: i,
1034
- maxBodyLength: i,
1035
- beforeRedirect: i,
1036
- transport: i,
1037
- httpAgent: i,
1038
- httpsAgent: i,
1039
- cancelToken: i,
1040
- socketPath: i,
1041
- responseEncoding: i,
1042
- validateStatus: a,
1043
- headers: (u, l) => s(Ne(u), Ne(l), !0)
1044
- };
1045
- return c.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
1046
- const f = d[l] || s, w = f(t[l], e[l], l);
1047
- c.isUndefined(w) && f !== a || (n[l] = w);
1048
- }), n;
1049
- }
1050
- const dt = (t) => {
1051
- const e = v({}, t);
1052
- let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = e;
1053
- e.headers = i = I.from(i), e.url = ot(lt(e.baseURL, e.url), t.params, t.paramsSerializer), a && i.set(
1054
- "Authorization",
1055
- "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1056
- );
1057
- let d;
1058
- if (c.isFormData(n)) {
1059
- if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1060
- i.setContentType(void 0);
1061
- else if ((d = i.getContentType()) !== !1) {
1062
- const [u, ...l] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
1063
- i.setContentType([u || "multipart/form-data", ...l].join("; "));
1064
- }
1065
- }
1066
- if (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(e)), r || r !== !1 && $n(e.url))) {
1067
- const u = s && o && jn.read(o);
1068
- u && i.set(s, u);
1069
- }
1070
- return e;
1071
- }, zn = typeof XMLHttpRequest < "u", Jn = zn && function(t) {
1072
- return new Promise(function(n, r) {
1073
- const s = dt(t);
1074
- let o = s.data;
1075
- const i = I.from(s.headers).normalize();
1076
- let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, f, w, E, p;
1077
- function y() {
1078
- E && E(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1079
- }
1080
- let h = new XMLHttpRequest();
1081
- h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1082
- function b() {
1083
- if (!h)
1084
- return;
1085
- const R = I.from(
1086
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1087
- ), O = {
1088
- data: !a || a === "text" || a === "json" ? h.responseText : h.response,
1089
- status: h.status,
1090
- statusText: h.statusText,
1091
- headers: R,
1092
- config: t,
1093
- request: h
1094
- };
1095
- ut(function(_) {
1096
- n(_), y();
1097
- }, function(_) {
1098
- r(_), y();
1099
- }, O), h = null;
1100
- }
1101
- "onloadend" in h ? h.onloadend = b : h.onreadystatechange = function() {
1102
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(b);
1103
- }, h.onabort = function() {
1104
- h && (r(new m("Request aborted", m.ECONNABORTED, t, h)), h = null);
1105
- }, h.onerror = function() {
1106
- r(new m("Network Error", m.ERR_NETWORK, t, h)), h = null;
1107
- }, h.ontimeout = function() {
1108
- let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1109
- const O = s.transitional || it;
1110
- s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
1111
- U,
1112
- O.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1113
- t,
1114
- h
1115
- )), h = null;
1116
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(U, O) {
1117
- h.setRequestHeader(O, U);
1118
- }), c.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), u && ([w, p] = K(u, !0), h.addEventListener("progress", w)), d && h.upload && ([f, E] = K(d), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (R) => {
1119
- h && (r(!R || R.type ? new M(null, t, h) : R), h.abort(), h = null);
1120
- }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1121
- const S = Fn(s.url);
1122
- if (S && A.protocols.indexOf(S) === -1) {
1123
- r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, t));
1124
- return;
1125
- }
1126
- h.send(o || null);
1127
- });
1128
- }, Wn = (t, e) => {
1129
- const { length: n } = t = t ? t.filter(Boolean) : [];
1130
- if (e || n) {
1131
- let r = new AbortController(), s;
1132
- const o = function(u) {
1133
- if (!s) {
1134
- s = !0, a();
1135
- const l = u instanceof Error ? u : this.reason;
1136
- r.abort(l instanceof m ? l : new M(l instanceof Error ? l.message : l));
1137
- }
1138
- };
1139
- let i = e && setTimeout(() => {
1140
- i = null, o(new m(`timeout ${e} of ms exceeded`, m.ETIMEDOUT));
1141
- }, e);
1142
- const a = () => {
1143
- t && (i && clearTimeout(i), i = null, t.forEach((u) => {
1144
- u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
1145
- }), t = null);
1146
- };
1147
- t.forEach((u) => u.addEventListener("abort", o));
1148
- const { signal: d } = r;
1149
- return d.unsubscribe = () => c.asap(a), d;
1150
- }
1151
- }, Gn = Wn, Vn = function* (t, e) {
1152
- let n = t.byteLength;
1153
- if (!e || n < e) {
1154
- yield t;
1155
- return;
1156
- }
1157
- let r = 0, s;
1158
- for (; r < n; )
1159
- s = r + e, yield t.slice(r, s), r = s;
1160
- }, Qn = async function* (t, e) {
1161
- for await (const n of Kn(t))
1162
- yield* Vn(n, e);
1163
- }, Kn = async function* (t) {
1164
- if (t[Symbol.asyncIterator]) {
1165
- yield* t;
1166
- return;
1167
- }
1168
- const e = t.getReader();
1169
- try {
1170
- for (; ; ) {
1171
- const { done: n, value: r } = await e.read();
1172
- if (n)
1173
- break;
1174
- yield r;
1175
- }
1176
- } finally {
1177
- await e.cancel();
1178
- }
1179
- }, Fe = (t, e, n, r) => {
1180
- const s = Qn(t, e);
1181
- let o = 0, i, a = (d) => {
1182
- i || (i = !0, r && r(d));
1183
- };
1184
- return new ReadableStream({
1185
- async pull(d) {
1186
- try {
1187
- const { done: u, value: l } = await s.next();
1188
- if (u) {
1189
- a(), d.close();
1190
- return;
1191
- }
1192
- let f = l.byteLength;
1193
- if (n) {
1194
- let w = o += f;
1195
- n(w);
1196
- }
1197
- d.enqueue(new Uint8Array(l));
1198
- } catch (u) {
1199
- throw a(u), u;
1200
- }
1201
- },
1202
- cancel(d) {
1203
- return a(d), s.return();
1204
- }
1205
- }, {
1206
- highWaterMark: 2
1207
- });
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) => {
1209
- try {
1210
- return !!t(...e);
1211
- } catch {
1212
- return !1;
1213
- }
1214
- }, Zn = ft && pt(() => {
1215
- let t = !1;
1216
- const e = new Request(A.origin, {
1217
- body: new ReadableStream(),
1218
- method: "POST",
1219
- get duplex() {
1220
- return t = !0, "half";
1221
- }
1222
- }).headers.has("Content-Type");
1223
- return t && !e;
1224
- }), Me = 64 * 1024, me = ft && pt(() => c.isReadableStream(new Response("").body)), X = {
1225
- stream: me && ((t) => t.body)
1226
- };
1227
- se && ((t) => {
1228
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
1229
- !X[e] && (X[e] = c.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
1230
- throw new m(`Response type '${e}' is not supported`, m.ERR_NOT_SUPPORT, r);
1231
- });
1232
- });
1233
- })(new Response());
1234
- const Yn = async (t) => {
1235
- if (t == null)
1236
- return 0;
1237
- if (c.isBlob(t))
1238
- return t.size;
1239
- if (c.isSpecCompliantForm(t))
1240
- return (await new Request(A.origin, {
1241
- method: "POST",
1242
- body: t
1243
- }).arrayBuffer()).byteLength;
1244
- if (c.isArrayBufferView(t) || c.isArrayBuffer(t))
1245
- return t.byteLength;
1246
- if (c.isURLSearchParams(t) && (t = t + ""), c.isString(t))
1247
- return (await Xn(t)).byteLength;
1248
- }, er = async (t, e) => {
1249
- const n = c.toFiniteNumber(t.getContentLength());
1250
- return n ?? Yn(e);
1251
- }, tr = se && (async (t) => {
1252
- let {
1253
- url: e,
1254
- method: n,
1255
- data: r,
1256
- signal: s,
1257
- cancelToken: o,
1258
- timeout: i,
1259
- onDownloadProgress: a,
1260
- onUploadProgress: d,
1261
- responseType: u,
1262
- headers: l,
1263
- withCredentials: f = "same-origin",
1264
- fetchOptions: w
1265
- } = dt(t);
1266
- u = u ? (u + "").toLowerCase() : "text";
1267
- let E = Gn([s, o && o.toAbortSignal()], i), p;
1268
- const y = E && E.unsubscribe && (() => {
1269
- E.unsubscribe();
1270
- });
1271
- let h;
1272
- try {
1273
- if (d && Zn && n !== "get" && n !== "head" && (h = await er(l, r)) !== 0) {
1274
- let O = new Request(e, {
1275
- method: "POST",
1276
- body: r,
1277
- duplex: "half"
1278
- }), k;
1279
- if (c.isFormData(r) && (k = O.headers.get("content-type")) && l.setContentType(k), O.body) {
1280
- const [_, H] = Be(
1281
- h,
1282
- K(ve(d))
1283
- );
1284
- r = Fe(O.body, Me, _, H);
1285
- }
1286
- }
1287
- c.isString(f) || (f = f ? "include" : "omit");
1288
- const b = "credentials" in Request.prototype;
1289
- p = new Request(e, {
1290
- ...w,
1291
- signal: E,
1292
- method: n.toUpperCase(),
1293
- headers: l.normalize().toJSON(),
1294
- body: r,
1295
- duplex: "half",
1296
- credentials: b ? f : void 0
1297
- });
1298
- let S = await fetch(p);
1299
- const R = me && (u === "stream" || u === "response");
1300
- if (me && (a || R && y)) {
1301
- const O = {};
1302
- ["status", "statusText", "headers"].forEach((Ce) => {
1303
- O[Ce] = S[Ce];
1304
- });
1305
- const k = c.toFiniteNumber(S.headers.get("content-length")), [_, H] = a && Be(
1306
- k,
1307
- K(ve(a), !0)
1308
- ) || [];
1309
- S = new Response(
1310
- Fe(S.body, Me, _, () => {
1311
- H && H(), y && y();
1312
- }),
1313
- O
1314
- );
1315
- }
1316
- u = u || "text";
1317
- let U = await X[c.findKey(X, u) || "text"](S, t);
1318
- return !R && y && y(), await new Promise((O, k) => {
1319
- ut(O, k, {
1320
- data: U,
1321
- headers: I.from(S.headers),
1322
- status: S.status,
1323
- statusText: S.statusText,
1324
- config: t,
1325
- request: p
1326
- });
1327
- });
1328
- } catch (b) {
1329
- throw y && y(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
1330
- new m("Network Error", m.ERR_NETWORK, t, p),
1331
- {
1332
- cause: b.cause || b
1333
- }
1334
- ) : m.from(b, b && b.code, t, p);
1335
- }
1336
- }), ye = {
1337
- http: hn,
1338
- xhr: Jn,
1339
- fetch: tr
1340
- };
1341
- c.forEach(ye, (t, e) => {
1342
- if (t) {
1343
- try {
1344
- Object.defineProperty(t, "name", { value: e });
1345
- } catch {
1346
- }
1347
- Object.defineProperty(t, "adapterName", { value: e });
1348
- }
1349
- });
1350
- const De = (t) => `- ${t}`, nr = (t) => c.isFunction(t) || t === null || t === !1, ht = {
1351
- getAdapter: (t) => {
1352
- t = c.isArray(t) ? t : [t];
1353
- const { length: e } = t;
1354
- let n, r;
1355
- const s = {};
1356
- for (let o = 0; o < e; o++) {
1357
- n = t[o];
1358
- let i;
1359
- if (r = n, !nr(n) && (r = ye[(i = String(n)).toLowerCase()], r === void 0))
1360
- throw new m(`Unknown adapter '${i}'`);
1361
- if (r)
1362
- break;
1363
- s[i || "#" + o] = r;
1364
- }
1365
- if (!r) {
1366
- const o = Object.entries(s).map(
1367
- ([a, d]) => `adapter ${a} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1368
- );
1369
- let i = e ? o.length > 1 ? `since :
1370
- ` + o.map(De).join(`
1371
- `) : " " + De(o[0]) : "as no adapter specified";
1372
- throw new m(
1373
- "There is no suitable adapter to dispatch the request " + i,
1374
- "ERR_NOT_SUPPORT"
1375
- );
1376
- }
1377
- return r;
1378
- },
1379
- adapters: ye
1380
- };
1381
- function le(t) {
1382
- if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1383
- throw new M(null, t);
1384
- }
1385
- function $e(t) {
1386
- return le(t), t.headers = I.from(t.headers), t.data = ue.call(
1387
- t,
1388
- t.transformRequest
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(
1391
- t,
1392
- t.transformResponse,
1393
- r
1394
- ), r.headers = I.from(r.headers), r;
1395
- }, function(r) {
1396
- return ct(r) || (le(t), r && r.response && (r.response.data = ue.call(
1397
- t,
1398
- t.transformResponse,
1399
- r.response
1400
- ), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
1401
- });
1402
- }
1403
- const mt = "1.7.7", Oe = {};
1404
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1405
- Oe[t] = function(r) {
1406
- return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
1407
- };
1408
- });
1409
- const je = {};
1410
- Oe.transitional = function(e, n, r) {
1411
- function s(o, i) {
1412
- return "[Axios v" + mt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1413
- }
1414
- return (o, i, a) => {
1415
- if (e === !1)
1416
- throw new m(
1417
- s(i, " has been removed" + (n ? " in " + n : "")),
1418
- m.ERR_DEPRECATED
1419
- );
1420
- return n && !je[i] && (je[i] = !0, console.warn(
1421
- s(
1422
- i,
1423
- " has been deprecated since v" + n + " and will be removed in the near future"
1424
- )
1425
- )), e ? e(o, i, a) : !0;
1426
- };
1427
- };
1428
- function rr(t, e, n) {
1429
- if (typeof t != "object")
1430
- throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1431
- const r = Object.keys(t);
1432
- let s = r.length;
1433
- for (; s-- > 0; ) {
1434
- const o = r[s], i = e[o];
1435
- if (i) {
1436
- const a = t[o], d = a === void 0 || i(a, o, t);
1437
- if (d !== !0)
1438
- throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1439
- continue;
1440
- }
1441
- if (n !== !0)
1442
- throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
1443
- }
1444
- }
1445
- const we = {
1446
- assertOptions: rr,
1447
- validators: Oe
1448
- }, P = we.validators;
1449
- let Z = class {
1450
- constructor(e) {
1451
- this.defaults = e, this.interceptors = {
1452
- request: new Le(),
1453
- response: new Le()
1454
- };
1455
- }
1456
- /**
1457
- * Dispatch a request
1458
- *
1459
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1460
- * @param {?Object} config
1461
- *
1462
- * @returns {Promise} The Promise to be fulfilled
1463
- */
1464
- async request(e, n) {
1465
- try {
1466
- return await this._request(e, n);
1467
- } catch (r) {
1468
- if (r instanceof Error) {
1469
- let s;
1470
- Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
1471
- const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1472
- try {
1473
- r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1474
- ` + o) : r.stack = o;
1475
- } catch {
1476
- }
1477
- }
1478
- throw r;
1479
- }
1480
- }
1481
- _request(e, n) {
1482
- typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = v(this.defaults, n);
1483
- const { transitional: r, paramsSerializer: s, headers: o } = n;
1484
- r !== void 0 && we.assertOptions(r, {
1485
- silentJSONParsing: P.transitional(P.boolean),
1486
- forcedJSONParsing: P.transitional(P.boolean),
1487
- clarifyTimeoutError: P.transitional(P.boolean)
1488
- }, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
1489
- serialize: s
1490
- } : we.assertOptions(s, {
1491
- encode: P.function,
1492
- serialize: P.function
1493
- }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1494
- let i = o && c.merge(
1495
- o.common,
1496
- o[n.method]
1497
- );
1498
- o && c.forEach(
1499
- ["delete", "get", "head", "post", "put", "patch", "common"],
1500
- (p) => {
1501
- delete o[p];
1502
- }
1503
- ), n.headers = I.concat(i, o);
1504
- const a = [];
1505
- let d = !0;
1506
- this.interceptors.request.forEach(function(y) {
1507
- typeof y.runWhen == "function" && y.runWhen(n) === !1 || (d = d && y.synchronous, a.unshift(y.fulfilled, y.rejected));
1508
- });
1509
- const u = [];
1510
- this.interceptors.response.forEach(function(y) {
1511
- u.push(y.fulfilled, y.rejected);
1512
- });
1513
- let l, f = 0, w;
1514
- if (!d) {
1515
- const p = [$e.bind(this), void 0];
1516
- for (p.unshift.apply(p, a), p.push.apply(p, u), w = p.length, l = Promise.resolve(n); f < w; )
1517
- l = l.then(p[f++], p[f++]);
1518
- return l;
1519
- }
1520
- w = a.length;
1521
- let E = n;
1522
- for (f = 0; f < w; ) {
1523
- const p = a[f++], y = a[f++];
1524
- try {
1525
- E = p(E);
1526
- } catch (h) {
1527
- y.call(this, h);
1528
- break;
1529
- }
1530
- }
1531
- try {
1532
- l = $e.call(this, E);
1533
- } catch (p) {
1534
- return Promise.reject(p);
1535
- }
1536
- for (f = 0, w = u.length; f < w; )
1537
- l = l.then(u[f++], u[f++]);
1538
- return l;
1539
- }
1540
- getUri(e) {
1541
- e = v(this.defaults, e);
1542
- const n = lt(e.baseURL, e.url);
1543
- return ot(n, e.params, e.paramsSerializer);
1544
- }
1545
- };
1546
- c.forEach(["delete", "get", "head", "options"], function(e) {
1547
- Z.prototype[e] = function(n, r) {
1548
- return this.request(v(r || {}, {
1549
- method: e,
1550
- url: n,
1551
- data: (r || {}).data
1552
- }));
1553
- };
1554
- });
1555
- c.forEach(["post", "put", "patch"], function(e) {
1556
- function n(r) {
1557
- return function(o, i, a) {
1558
- return this.request(v(a || {}, {
1559
- method: e,
1560
- headers: r ? {
1561
- "Content-Type": "multipart/form-data"
1562
- } : {},
1563
- url: o,
1564
- data: i
1565
- }));
1566
- };
1567
- }
1568
- Z.prototype[e] = n(), Z.prototype[e + "Form"] = n(!0);
1569
- });
1570
- const V = Z;
1571
- let sr = class yt {
1572
- constructor(e) {
1573
- if (typeof e != "function")
1574
- throw new TypeError("executor must be a function.");
1575
- let n;
1576
- this.promise = new Promise(function(o) {
1577
- n = o;
1578
- });
1579
- const r = this;
1580
- this.promise.then((s) => {
1581
- if (!r._listeners)
1582
- return;
1583
- let o = r._listeners.length;
1584
- for (; o-- > 0; )
1585
- r._listeners[o](s);
1586
- r._listeners = null;
1587
- }), this.promise.then = (s) => {
1588
- let o;
1589
- const i = new Promise((a) => {
1590
- r.subscribe(a), o = a;
1591
- }).then(s);
1592
- return i.cancel = function() {
1593
- r.unsubscribe(o);
1594
- }, i;
1595
- }, e(function(o, i, a) {
1596
- r.reason || (r.reason = new M(o, i, a), n(r.reason));
1597
- });
1598
- }
1599
- /**
1600
- * Throws a `CanceledError` if cancellation has been requested.
1601
- */
1602
- throwIfRequested() {
1603
- if (this.reason)
1604
- throw this.reason;
1605
- }
1606
- /**
1607
- * Subscribe to the cancel signal
1608
- */
1609
- subscribe(e) {
1610
- if (this.reason) {
1611
- e(this.reason);
1612
- return;
1613
- }
1614
- this._listeners ? this._listeners.push(e) : this._listeners = [e];
1615
- }
1616
- /**
1617
- * Unsubscribe from the cancel signal
1618
- */
1619
- unsubscribe(e) {
1620
- if (!this._listeners)
1621
- return;
1622
- const n = this._listeners.indexOf(e);
1623
- n !== -1 && this._listeners.splice(n, 1);
1624
- }
1625
- toAbortSignal() {
1626
- const e = new AbortController(), n = (r) => {
1627
- e.abort(r);
1628
- };
1629
- return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
1630
- }
1631
- /**
1632
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1633
- * cancels the `CancelToken`.
1634
- */
1635
- static source() {
1636
- let e;
1637
- return {
1638
- token: new yt(function(s) {
1639
- e = s;
1640
- }),
1641
- cancel: e
1642
- };
1643
- }
1644
- };
1645
- const or = sr;
1646
- function ir(t) {
1647
- return function(n) {
1648
- return t.apply(null, n);
1649
- };
1650
- }
1651
- function ar(t) {
1652
- return c.isObject(t) && t.isAxiosError === !0;
1653
- }
1654
- const be = {
1655
- Continue: 100,
1656
- SwitchingProtocols: 101,
1657
- Processing: 102,
1658
- EarlyHints: 103,
1659
- Ok: 200,
1660
- Created: 201,
1661
- Accepted: 202,
1662
- NonAuthoritativeInformation: 203,
1663
- NoContent: 204,
1664
- ResetContent: 205,
1665
- PartialContent: 206,
1666
- MultiStatus: 207,
1667
- AlreadyReported: 208,
1668
- ImUsed: 226,
1669
- MultipleChoices: 300,
1670
- MovedPermanently: 301,
1671
- Found: 302,
1672
- SeeOther: 303,
1673
- NotModified: 304,
1674
- UseProxy: 305,
1675
- Unused: 306,
1676
- TemporaryRedirect: 307,
1677
- PermanentRedirect: 308,
1678
- BadRequest: 400,
1679
- Unauthorized: 401,
1680
- PaymentRequired: 402,
1681
- Forbidden: 403,
1682
- NotFound: 404,
1683
- MethodNotAllowed: 405,
1684
- NotAcceptable: 406,
1685
- ProxyAuthenticationRequired: 407,
1686
- RequestTimeout: 408,
1687
- Conflict: 409,
1688
- Gone: 410,
1689
- LengthRequired: 411,
1690
- PreconditionFailed: 412,
1691
- PayloadTooLarge: 413,
1692
- UriTooLong: 414,
1693
- UnsupportedMediaType: 415,
1694
- RangeNotSatisfiable: 416,
1695
- ExpectationFailed: 417,
1696
- ImATeapot: 418,
1697
- MisdirectedRequest: 421,
1698
- UnprocessableEntity: 422,
1699
- Locked: 423,
1700
- FailedDependency: 424,
1701
- TooEarly: 425,
1702
- UpgradeRequired: 426,
1703
- PreconditionRequired: 428,
1704
- TooManyRequests: 429,
1705
- RequestHeaderFieldsTooLarge: 431,
1706
- UnavailableForLegalReasons: 451,
1707
- InternalServerError: 500,
1708
- NotImplemented: 501,
1709
- BadGateway: 502,
1710
- ServiceUnavailable: 503,
1711
- GatewayTimeout: 504,
1712
- HttpVersionNotSupported: 505,
1713
- VariantAlsoNegotiates: 506,
1714
- InsufficientStorage: 507,
1715
- LoopDetected: 508,
1716
- NotExtended: 510,
1717
- NetworkAuthenticationRequired: 511
1718
- };
1719
- Object.entries(be).forEach(([t, e]) => {
1720
- be[e] = t;
1721
- });
1722
- const cr = be;
1723
- function wt(t) {
1724
- const e = new V(t), n = Ge(V.prototype.request, e);
1725
- return c.extend(n, V.prototype, e, { allOwnKeys: !0 }), c.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
1726
- return wt(v(t, s));
1727
- }, n;
1728
- }
1729
- const g = wt(Te);
1730
- g.Axios = V;
1731
- g.CanceledError = M;
1732
- g.CancelToken = or;
1733
- g.isCancel = ct;
1734
- g.VERSION = mt;
1735
- g.toFormData = ne;
1736
- g.AxiosError = m;
1737
- g.Cancel = g.CanceledError;
1738
- g.all = function(e) {
1739
- return Promise.all(e);
1740
- };
1741
- g.spread = ir;
1742
- g.isAxiosError = ar;
1743
- g.mergeConfig = v;
1744
- g.AxiosHeaders = I;
1745
- g.formToJSON = (t) => at(c.isHTMLForm(t) ? new FormData(t) : t);
1746
- g.getAdapter = ht.getAdapter;
1747
- g.HttpStatusCode = cr;
1748
- g.default = g;
1749
- const Ae = g, {
1750
- Axios: Cr,
1751
- AxiosError: bt,
1752
- CanceledError: Ir,
1753
- isCancel: xr,
1754
- CancelToken: Ur,
1755
- VERSION: kr,
1756
- all: Pr,
1757
- Cancel: Lr,
1758
- isAxiosError: _r,
1759
- spread: Br,
1760
- toFormData: vr,
1761
- AxiosHeaders: Nr,
1762
- HttpStatusCode: Fr,
1763
- formToJSON: Mr,
1764
- getAdapter: Dr,
1765
- mergeConfig: $r
1766
- } = Ae;
1767
- var N = globalThis && globalThis.__awaiter || function(t, e, n, r) {
1768
- function s(o) {
1769
- return o instanceof n ? o : new n(function(i) {
1770
- i(o);
1771
- });
1772
- }
1773
- return new (n || (n = Promise))(function(o, i) {
1774
- function a(l) {
1775
- try {
1776
- u(r.next(l));
1777
- } catch (f) {
1778
- i(f);
1779
- }
1780
- }
1781
- function d(l) {
1782
- try {
1783
- u(r.throw(l));
1784
- } catch (f) {
1785
- i(f);
1786
- }
1787
- }
1788
- function u(l) {
1789
- l.done ? o(l.value) : s(l.value).then(a, d);
1790
- }
1791
- u((r = r.apply(t, e || [])).next());
1792
- });
1793
- };
1794
- const J = "feedme-one-tap", ur = "feedme-login-iframe", de = "feedme-otp-iframe", lr = "fm-iframe-message-request", dr = "fm-iframe-message-response";
1795
- class L {
1796
- static get token() {
1797
- if (!this.bgIframe)
1798
- throw new Error("FeedMeAuth.token must be called after initialize()");
1799
- return this.bgIframe.contentWindow.postMessage("fm-get-token", this.baseUrl + "/one-tap/background"), this._token;
1800
- }
1801
- static setBaseUrl(e) {
1802
- typeof e == "string" ? this.baseUrl = e : this.baseUrl = `https://account.feedme${e ? "dev" : ""}.cc`;
1803
- }
1804
- static initialize({ clientId: e, setProfile: n = !0, profileAllowSkip: r = !0, oneTapMode: s = "popup", loginMode: o = "new_window", forceOtpLogin: i = !1 }) {
1805
- if (!e)
1806
- throw new Error("FeedMeAuth: clientId is required");
1807
- this.feedMePosOptions = {
1808
- clientId: e,
1809
- setProfile: n,
1810
- forceOtpLogin: i,
1811
- profileAllowSkip: r,
1812
- oneTapMode: s,
1813
- loginMode: o
1814
- }, this.startBackground();
1815
- const a = document.createElement("style");
1816
- a.innerHTML = `
1817
- #feedme-one-tap.popup {
1818
- width: 100%;
1819
- max-width: 350px;
1820
- height: 0;
1821
- position: absolute;
1822
- bottom: 20px;
1823
- /* center align */
1824
- left: 50%;
1825
- transform: translateX(-50%);
1826
- background-color: white;
1827
- transition: opacity 0.3s;
1828
- }
1829
-
1830
- #feedme-otp-iframe.full-screen {
1831
- width: 100vw;
1832
- height: 100vh;
1833
- left: 0;
1834
- top: 0;
1835
- position: fixed;
1836
- background-color: white;
1837
- transition: opacity 0.3s;
1838
- }
1839
-
1840
- #feedme-otp-iframe iframe {
1841
- width: 100%;
1842
- height: 100%;
1843
- }
1844
-
1845
- #feedme-one-tap.full-screen {
1846
- width: 100vw;
1847
- height: 100vh;
1848
- left: 0;
1849
- top: 0;
1850
- position: fixed;
1851
- background-color: white;
1852
- transition: opacity 0.3s;
1853
- }
1854
-
1855
- #feedme-login-iframe {
1856
- position: fixed;
1857
- left: 0;
1858
- right: 0;
1859
- top: 0;
1860
- bottom: 0;
1861
- background: white;
1862
- transition: opacity 0.3s;
1863
- }
1864
-
1865
- #feedme-login-iframe iframe {
1866
- width: 100%;
1867
- height: 100%;
1868
- }
1869
-
1870
- /* media query if pc or tablet */
1871
- @media (min-width: 768px) {
1872
- #feedme-one-tap.popup {
1873
- top: 20px;
1874
- right: 20px;
1875
- left: auto;
1876
- transform: none;
1877
- }
1878
- }
1879
-
1880
- #feedme-one-tap iframe {
1881
- width: 100%;
1882
- height: 100%;
1883
- border: none;
1884
- border-radius: 10px;
1885
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
1886
- }
1887
- `, document.head.appendChild(a);
1888
- }
1889
- static signIn({ waitForInitialAuthState: e = !1, root: n } = {}) {
1890
- return N(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)))
1892
- return;
1893
- const r = this.feedMePosOptions.oneTapMode, { wrapper: s } = this.createIframe({
1894
- root: n,
1895
- url: this.getOneTapUrl(),
1896
- id: J,
1897
- classList: [r === "full_screen" ? "full-screen" : "popup"]
1898
- }), o = (i) => {
1899
- if (i.origin === this.baseUrl) {
1900
- if (typeof i.data == "string")
1901
- if (i.data === "fm-close-one-tap")
1902
- this.unmountById(J), window.removeEventListener("message", o);
1903
- else if (i.data.startsWith("fm-one-tap-height-") && this.feedMePosOptions.oneTapMode === "popup") {
1904
- const a = i.data.replace("fm-one-tap-height-", "");
1905
- s.style.height = a + "px";
1906
- } else
1907
- i.data === "fm-one-tap-open-login-iframe" && this.startLoginIframe();
1908
- else if (i.data instanceof Error)
1909
- throw s.style.display = "none", i.data;
1910
- }
1911
- };
1912
- window.addEventListener("message", o);
1913
- });
1914
- }
1915
- static setToken(e) {
1916
- this._token = e;
1917
- }
1918
- static onAuthStateChanged(e) {
1919
- const n = this.authStateChangeCallBackId++;
1920
- return this.authStateChangeCallbacks[n] = e, () => {
1921
- delete this.authStateChangeCallbacks[n];
1922
- };
1923
- }
1924
- static signOut() {
1925
- if (!this.bgIframe)
1926
- throw new Error("FeedMeAuth.signOut() must be called after initialize()");
1927
- return this.bgIframe.contentWindow.postMessage("fm-sign-out", this.baseUrl + "/one-tap/background"), new Promise((e, n) => {
1928
- const r = this.onAuthStateChanged((o) => {
1929
- o || (r(), e({ status: "success" }));
1930
- });
1931
- setTimeout(() => {
1932
- r(), n({ status: "failed" });
1933
- }, 3e3);
1934
- });
1935
- }
1936
- static verifyOtp({ phone: e, tokenType: n = "idtoken" }) {
1937
- return new Promise((r, s) => {
1938
- this.createIframe({
1939
- id: de,
1940
- url: this.getOtpUrl(e, n),
1941
- classList: ["full-screen"]
1942
- });
1943
- const o = (i) => {
1944
- if (i.origin === this.baseUrl && typeof i.data == "string") {
1945
- const a = "fm-idtoken-";
1946
- if (i.data.startsWith(a)) {
1947
- const d = i.data.replace(a, "");
1948
- window.removeEventListener("message", o), this.unmountById(de), r(d);
1949
- }
1950
- i.data === "fm-close-otp" && (this.unmountById(de), window.removeEventListener("message", o), s(new Error("Verify Failed.")));
1951
- }
1952
- };
1953
- window.addEventListener("message", o);
1954
- });
1955
- }
1956
- static unmountById(e) {
1957
- const n = document.getElementById(e);
1958
- n && (n.style.opacity = "0", setTimeout(() => {
1959
- n.remove();
1960
- }, 300));
1961
- }
1962
- static getCustomToken() {
1963
- return N(this, void 0, void 0, function* () {
1964
- const e = yield fetch(this.baseUrl + "/api/token/custom", {
1965
- method: "POST",
1966
- headers: {
1967
- Authorization: `Bearer ${this.token}`,
1968
- "Content-Type": "application/json"
1969
- },
1970
- body: JSON.stringify({
1971
- token: this.token
1972
- })
1973
- });
1974
- if (!e.ok)
1975
- throw new Error("Failed to get custom token");
1976
- return yield e.text();
1977
- });
1978
- }
1979
- static currentUser() {
1980
- return N(this, void 0, void 0, function* () {
1981
- if (!this.bgIframe)
1982
- throw new Error("Can't call before initialize");
1983
- return yield this.initialAuthStatePromise, yield this.callMethodOnIframe({
1984
- iframe: this.bgIframe,
1985
- methodName: "currentUser",
1986
- timeout: 6e3
1987
- });
1988
- });
1989
- }
1990
- static signInWithCustomToken(e) {
1991
- return N(this, void 0, void 0, function* () {
1992
- if (!this.bgIframe)
1993
- throw new Error("Can't call before initialize");
1994
- return yield this.callMethodOnIframe({
1995
- iframe: this.bgIframe,
1996
- methodName: "signInWithCustomToken",
1997
- params: [e],
1998
- timeout: 6e3
1999
- });
2000
- });
2001
- }
2002
- static refreshToken() {
2003
- return N(this, void 0, void 0, function* () {
2004
- if (!this.bgIframe)
2005
- throw new Error("FeedMeAuth.refreshToken must be called after initialize()");
2006
- return new Promise((e, n) => {
2007
- const r = (o) => {
2008
- o.origin === this.baseUrl && o.data.type === "fm-token-refreshed" && (clearTimeout(s), window.removeEventListener("message", r), this.setToken(o.data.token), e(o.data.token));
2009
- }, s = setTimeout(() => {
2010
- window.removeEventListener("message", r), n(new Error("FeedMeAuth.refreshToken timed out"));
2011
- }, 6e4);
2012
- window.addEventListener("message", r), this.bgIframe.contentWindow.postMessage("fm-refresh-token", this.baseUrl + "/one-tap/background");
2013
- });
2014
- });
2015
- }
2016
- static getUserClaims() {
2017
- return N(this, void 0, void 0, function* () {
2018
- const e = yield fetch(this.baseUrl + "/api/user/claims", {
2019
- method: "GET",
2020
- headers: {
2021
- Authorization: `Bearer ${this.token}`
2022
- }
2023
- });
2024
- if (!e.ok)
2025
- throw new Error("Failed to get user claims");
2026
- return yield e.json();
2027
- });
2028
- }
2029
- static startBackground() {
2030
- if (!document)
2031
- throw new Error("FeedMeAuth.prompt() must be called in the browser");
2032
- const e = document.createElement("div");
2033
- e.id = "feedme-auth-bg", this.bgIframe = document.createElement("iframe"), this.bgIframe.src = this.getBackgroundUrl(), e.appendChild(this.bgIframe), e.style.display = "none", document.body.appendChild(e), window.addEventListener("message", (n) => {
2034
- if (n.origin === this.baseUrl && typeof n.data == "object") {
2035
- const r = n.data;
2036
- if (r.type === "fm-auth-state-changed") {
2037
- if (r.user && !r.user.phoneNumber)
2038
- return;
2039
- this._token = r.token, Object.values(this.authStateChangeCallbacks).forEach((s) => s(r.user, r.token)), this._token && this.unmountById(J);
2040
- }
2041
- }
2042
- }), this.initialAuthStatePromise = new Promise((n, r) => {
2043
- const s = this.onAuthStateChanged((i) => {
2044
- s(), n(!!i);
2045
- });
2046
- setTimeout(() => {
2047
- s(), n(!1);
2048
- }, 3e3);
2049
- });
2050
- }
2051
- static startLoginIframe() {
2052
- const { wrapper: e } = this.createIframe({
2053
- id: ur,
2054
- url: this.getLoginUrl()
2055
- }), n = (r) => {
2056
- if (r.origin === this.baseUrl) {
2057
- if (typeof r.data == "string")
2058
- r.data === "fm-close-login-iframe" && (this.unmountById("feedme-login-iframe"), window.removeEventListener("message", n));
2059
- else if (r.data instanceof Error)
2060
- throw e.style.display = "none", r.data;
2061
- }
2062
- };
2063
- window.addEventListener("message", n);
2064
- }
2065
- static createIframe({ root: e = document.body, url: n, id: r, classList: s = [] }) {
2066
- const o = document.getElementById(r), i = document.querySelector("iframe");
2067
- if (o && i)
2068
- return {
2069
- wrapper: o,
2070
- iframe: i
2071
- };
2072
- const a = document.createElement("div");
2073
- a.id = r, a.style.zIndex = String(this.getMaxZIndex() + 1), a.classList.add(...s), a.style.opacity = "0";
2074
- const d = document.createElement("iframe");
2075
- return d.src = n, a.appendChild(d), e.appendChild(a), d.addEventListener("load", () => {
2076
- a.style.opacity = "1";
2077
- }), {
2078
- wrapper: a,
2079
- iframe: d
2080
- };
2081
- }
2082
- static getQueryParams() {
2083
- const e = this.feedMePosOptions;
2084
- return `client_id=${e.clientId}&set_profile=${e.setProfile}&profile_allow_skip=${e.profileAllowSkip}&login_mode=${e.loginMode}&force_otp_login=${e.forceOtpLogin}`;
2085
- }
2086
- static getBackgroundUrl() {
2087
- return `${this.baseUrl}/one-tap/background?${this.getQueryParams()}`;
2088
- }
2089
- static getOneTapUrl() {
2090
- const e = this.feedMePosOptions.oneTapMode === "full_screen";
2091
- return `${this.baseUrl}/one-tap${e ? "/full" : ""}?${this.getQueryParams()}`;
2092
- }
2093
- static getLoginUrl() {
2094
- return `${this.baseUrl}/login?${this.getQueryParams()}`;
2095
- }
2096
- static getOtpUrl(e, n) {
2097
- return `${this.baseUrl}/otp?phone=${encodeURIComponent(e)}&tokentype=${encodeURIComponent(n)}`;
2098
- }
2099
- static getMaxZIndex() {
2100
- const e = document.querySelectorAll("body *");
2101
- let n = 1;
2102
- for (let r = 0; r < e.length; r++) {
2103
- const s = Number(getComputedStyle(e[r]).zIndex);
2104
- s > n && (n = s);
2105
- }
2106
- return n;
2107
- }
2108
- static callMethodOnIframe({ iframe: e, methodName: n, params: r = [], timeout: s }) {
2109
- if (!e)
2110
- throw new Error("Target iframe not exist.");
2111
- const o = String(Math.random());
2112
- return e.contentWindow.postMessage({
2113
- type: lr,
2114
- messageId: o,
2115
- methodName: n,
2116
- params: r
2117
- }, "*"), new Promise((i, a) => {
2118
- const d = (l) => {
2119
- var f, w;
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((w = l.data) === null || w === void 0 ? void 0 : w.response));
2121
- };
2122
- window.addEventListener("message", d);
2123
- let u;
2124
- s && (u = setTimeout(() => {
2125
- window.removeEventListener("message", d), a(new Error(`FeedMeAuth ${n} timed out`));
2126
- }, s));
2127
- });
2128
- }
2129
- }
2130
- L.baseUrl = "https://account.feedmedev.cc";
2131
- L.authStateChangeCallbacks = {};
2132
- L.bgIframe = null;
2133
- L._token = null;
2134
- L.authStateChangeCallBackId = 1;
2135
- window.FeedMeAuthGlobal = L;
2136
- const fr = (t) => (e) => {
2137
- var s;
2138
- const n = ((s = j().sessionUser.value) == null ? void 0 : s.token) ?? L.token;
2139
- if (!n)
2140
- throw new Error("Invalid token");
2141
- const r = Ae.create({
2142
- baseURL: `${t}/${e}`,
2143
- headers: {
2144
- Authorization: `Bearer ${n}`
2145
- }
2146
- });
2147
- return r.interceptors.response.use(
2148
- (o) => o,
2149
- async (o) => {
2150
- var i;
2151
- if (o instanceof bt) {
2152
- 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}`;
2153
- return Promise.reject(d);
2154
- }
2155
- return Promise.reject(o);
2156
- }
2157
- ), r;
2158
- }, qe = (t = "") => {
2159
- const { portalBackendUrl: e } = hr();
2160
- return fr(e)(t);
2161
- }, pr = [Q.F_COUNTRY.enum.SG, Q.F_COUNTRY.enum.ID];
2162
- function He(t) {
2163
- return t.data;
2164
- }
2165
- function hr() {
2166
- var i;
2167
- const { namespace: t, currentCountry: e } = j(), n = t.value === "dev", r = pr.includes(e.value) ? `.${(i = e.value) == null ? void 0 : i.toLowerCase()}` : "";
2168
- return {
2169
- portalBackendUrl: `https://portal-v2${`${n ? "-dev" : ""}${r}.feedmeapi.com`}`
2170
- };
2171
- }
2172
- const ze = {
2173
- async read() {
2174
- return He(await qe().get("/public-setting"));
2175
- },
2176
- async update(t) {
2177
- return He(await qe().put("/public-setting", t));
2178
- }
2179
- };
2180
- function mr() {
2181
- return {
2182
- loadingQueue: [],
2183
- publicSetting: {
2184
- delivery: {
2185
- feedMe: {
2186
- areas: [],
2187
- enable: !1,
2188
- maxDistance: 0
2189
- }
2190
- },
2191
- sms: {
2192
- firebase: !1
2193
- },
2194
- assets: {
2195
- groups: []
2196
- },
2197
- aiSettings: {
2198
- remy: { enable: !1 }
2199
- }
2200
- }
2201
- };
2202
- }
2203
- const Je = Tt("portal-app-store", {
2204
- state: () => mr(),
2205
- actions: {
2206
- addLoadingQueues(t) {
2207
- this.loadingQueue = [...this.loadingQueue, ...t];
2208
- },
2209
- clearLoadingQueue() {
2210
- this.loadingQueue = [];
2211
- },
2212
- resolveQueues(t) {
2213
- this.loadingQueue = this.loadingQueue.filter((e) => !t.includes(e.id));
2214
- },
2215
- async promise(t, e = !0) {
2216
- const n = We();
2217
- try {
2218
- const r = [{ id: n, isGlobal: e }];
2219
- return this.addLoadingQueues(r), await t();
2220
- } finally {
2221
- this.resolveQueues([n]);
2222
- }
2223
- },
2224
- async getPublicSetting() {
2225
- return this.publicSetting = await ze.read(), this.publicSetting;
2226
- },
2227
- async updatePublicSetting(t) {
2228
- return this.publicSetting = await ze.update({
2229
- ...this.publicSetting,
2230
- ...t
2231
- }), this.publicSetting;
2232
- }
2233
- }
2234
- }), yr = (t) => {
2235
- async function e(r, s) {
2236
- var a, d;
2237
- let o = [];
2238
- !s || !s.customId ? o.push(`${(/* @__PURE__ */ new Date()).toISOString()}_${We().split("-")[0]}`) : typeof s.customId == "string" ? o.push(s.customId) : o = s.customId;
2239
- const i = Je();
2240
- i.addLoadingQueues(
2241
- o.map((u) => ({
2242
- id: u,
2243
- isGlobal: (s == null ? void 0 : s.isGlobal) || !1
2244
- }))
2245
- );
2246
- try {
2247
- const u = await r();
2248
- return await ((a = s == null ? void 0 : s.onSuccess) == null ? void 0 : a.call(s, u)), u;
2249
- } catch (u) {
2250
- const l = u instanceof Error ? u.message : `${u}`;
2251
- throw s != null && s.onError ? await s.onError(l) : t.open({
2252
- type: "error",
2253
- message: l
2254
- }), u;
2255
- } finally {
2256
- i.resolveQueues(o), (d = s == null ? void 0 : s.onComplete) == null || d.call(s);
2257
- }
2258
- }
2259
- const n = Je();
2260
- return {
2261
- queue: Et(() => n.loadingQueue),
2262
- checkIsLoading: (r) => n.loadingQueue.some((s) => s.id === r),
2263
- global: async (r, s) => await e(r, {
2264
- isGlobal: !0,
2265
- onSuccess: async (o) => {
2266
- var i;
2267
- await ((i = s == null ? void 0 : s.onSuccess) == null ? void 0 : i.call(s, o)), s != null && s.successMessage && t.open({
2268
- type: "success",
2269
- message: s.successMessage,
2270
- position: oe.BOTTOM
2271
- });
2272
- }
2273
- }),
2274
- minor: async (r, s) => {
2275
- const o = t.open({
2276
- type: "info",
2277
- message: "Loading",
2278
- spinner: !0,
2279
- persistent: !0
2280
- }), i = (a, d) => {
2281
- if (!d)
2282
- return;
2283
- const u = (l) => {
2284
- t.updateSnackbar(o, { [a]: l });
2285
- };
2286
- St(d) ? (u(d.value), Rt(d, (l) => u(l))) : u(d);
2287
- };
2288
- return i("title", s == null ? void 0 : s.message), i("message", s == null ? void 0 : s.caption), await e(
2289
- async () => (s != null && s.isLoading && (s.isLoading.value = !0), await r()),
2290
- {
2291
- onSuccess: () => {
2292
- const a = (s == null ? void 0 : s.successMessage) || "Completed";
2293
- t.close(o), t.open({
2294
- type: "success",
2295
- title: a,
2296
- position: oe.BOTTOM
2297
- });
2298
- },
2299
- onError: (a) => {
2300
- const d = `${a}` || "Error";
2301
- t.close(o), t.open({
2302
- type: "error",
2303
- title: d,
2304
- position: oe.BOTTOM
2305
- });
2306
- },
2307
- onComplete: () => {
2308
- s != null && s.isLoading && (s.isLoading.value = !1);
2309
- },
2310
- customId: s == null ? void 0 : s.customId
2311
- }
2312
- );
2313
- },
2314
- custom: async (r, s) => await e(
2315
- async () => (s != null && s.isLoading && (s.isLoading.value = !0), await r()),
2316
- {
2317
- onSuccess: async () => {
2318
- s != null && s.successMessage && t.open({ message: s.successMessage });
2319
- },
2320
- onComplete: () => {
2321
- s && s.isLoading && (s.isLoading.value = !1);
2322
- },
2323
- customId: s == null ? void 0 : s.customId
2324
- }
2325
- )
2326
- };
2327
- }, jr = yr, wr = (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 = Ae.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 bt) {
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 } = br(e);
2351
- return wr(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
- Q.F_COUNTRY.enum.SG, Q.F_COUNTRY.enum.ID;
2367
- function br(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-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,
2371
- 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
2372
- };
2373
- }
2374
- function zr(t) {
2375
- return t.data;
2376
- }
2377
- export {
2378
- L as F,
2379
- qr as a,
2380
- gt as b,
2381
- zr as g,
2382
- Hr as r,
2383
- jr as u
2384
- };