@feedmepos/mf-hrm-portal 2.1.1-dev → 2.1.1-dev.3

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.
Files changed (83) hide show
  1. package/dist/ApprovalCodeList-BH5sgVMU.js +638 -0
  2. package/dist/AuditLogList-Q4L5Te8O.js +1145 -0
  3. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
  4. package/dist/EmployeeList-GtKmJZbf.js +899 -0
  5. package/dist/GrantUserList-CnLjOi5_.js +468 -0
  6. package/dist/Main-Cn7Dawg4.js +120 -0
  7. package/dist/{Main-mTxcltDY.js → Main-DLlpEU3j.js} +11 -9
  8. package/dist/{Main-BLRr_ORG.js → Main-cskEZ3k_.js} +1033 -1035
  9. package/dist/PermissionSetList-C2fK2pTz.js +357 -0
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js +3458 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-Czo3FLbc.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js} +1 -2
  12. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  13. package/dist/RoleList-CcuT1ERb.js +567 -0
  14. package/dist/TeamMemberList-Dfs2iNdC.js +1131 -0
  15. package/dist/{TimesheetList-D21j4zLV.js → TimesheetList-B1H_6zfP.js} +136 -141
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CRmmIfTk.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js} +14 -13
  17. package/dist/{app-CX-St7pv.js → app-DX-PG6wx.js} +2725 -5281
  18. package/dist/app.js +1 -1
  19. package/dist/approval-code-Q4666xp5.js +58 -0
  20. package/dist/{dayjs.min-MDoe5X-P.js → dayjs.min-BJrHE7oz.js} +1 -1
  21. package/dist/{employee-B2cdx2t4.js → employee-BJcqtqLM.js} +27 -26
  22. package/dist/grant-user-CQZaTzVt.js +67 -0
  23. package/dist/{TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js → index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js} +19 -50
  24. package/dist/iteration-Cfaqt-0s.js +7682 -0
  25. package/dist/{lodash-DZAGPZLQ.js → lodash-ClKqCmlZ.js} +1 -1
  26. package/dist/restaurant-YOVMuuFY.js +1876 -0
  27. package/dist/role-CR_-nBDY.js +82 -0
  28. package/dist/rule-BB-3S-2R.js +996 -0
  29. package/dist/src/api/approval-code/index.d.ts +7 -0
  30. package/dist/src/api/audit-log/index.d.ts +0 -6
  31. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  32. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +1 -7
  33. package/dist/src/components/table/TableEmptyState.vue.d.ts +15 -7
  34. package/dist/src/composables/useBasePermission.d.ts +1 -2
  35. package/dist/src/helpers/permission-set.d.ts +4 -8
  36. package/dist/src/helpers/rule.d.ts +1 -2
  37. package/dist/src/router/shared.d.ts +3 -1
  38. package/dist/src/stores/approval-code.d.ts +140 -0
  39. package/dist/src/stores/permission-set.d.ts +3 -12
  40. package/dist/src/types/approval-code.d.ts +99 -0
  41. package/dist/src/types/audit-log.d.ts +1 -1
  42. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +26 -0
  43. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +17 -0
  44. package/dist/src/views/approval-code/locales/index.d.ts +320 -0
  45. package/dist/src/views/audit-log/locales/index.d.ts +0 -296
  46. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +0 -1
  47. package/dist/src/views/pos-access/locales/index.d.ts +48 -0
  48. package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -13
  49. package/dist/src/views/team/locales/index.d.ts +0 -72
  50. package/dist/style.css +1 -1
  51. package/dist/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/useAppStore-DNTlIeMv.js +93 -0
  53. package/dist/useDebounce-CWb5QR9G.js +28 -0
  54. package/dist/{useLoading-qgSjOzRD.js → useLoading-BH02lYns.js} +1 -1
  55. package/dist/{useReportPermissions-CIhkjN3B.js → useReportPermissions-ybHA26cJ.js} +3 -3
  56. package/package.json +2 -2
  57. package/dist/AuditLogList-Cvp-5_0y.js +0 -1608
  58. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-Cb8-YaiH.js +0 -387
  59. package/dist/EmployeeList-DgrD3Hjm.js +0 -884
  60. package/dist/Main-G3am-0Xi.js +0 -577
  61. package/dist/PermissionSetList-OzyfE-Yg.js +0 -392
  62. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ca2NnAAF.js +0 -4121
  63. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +0 -42
  64. package/dist/RoleList-DOZ5RJ6A.js +0 -684
  65. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  66. package/dist/TeamMemberList-CAqLUyQK.js +0 -1186
  67. package/dist/iteration-B38iapI_.js +0 -9556
  68. package/dist/rule-DftQBR76.js +0 -1057
  69. package/dist/src/composables/useConditionDraft.d.ts +0 -40
  70. package/dist/src/composables/useCoverConditionOverride.d.ts +0 -61
  71. package/dist/src/helpers/business-timezone.d.ts +0 -22
  72. package/dist/src/helpers/filter.d.ts +0 -15
  73. package/dist/src/helpers/permission-reconcile.d.ts +0 -15
  74. package/dist/src/helpers/permission-reconcile.test.d.ts +0 -1
  75. package/dist/src/views/audit-log/event-line.d.ts +0 -13
  76. package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
  77. package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +0 -22
  78. package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +0 -23
  79. package/dist/src/views/team/condition-builders/component-map.d.ts +0 -4
  80. package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +0 -23
  81. package/dist/useAppStore-BBsP5C3E.js +0 -169
  82. package/dist/useDebounce-B8ZPVS5C.js +0 -15
  83. /package/dist/src/views/{grant → pos-access}/Main.vue.d.ts +0 -0
@@ -0,0 +1,1876 @@
1
+ import { defineStore as Et, storeToRefs as gt } from "pinia";
2
+ import { ref as fe } from "vue";
3
+ import { useCoreStore as re, baseClientInstance as Ve, FeedMeAuth as St } from "@feedmepos/mf-common";
4
+ function We(e, t) {
5
+ return function() {
6
+ return e.apply(t, arguments);
7
+ };
8
+ }
9
+ var Pe = {};
10
+ const { toString: Rt } = Object.prototype, { getPrototypeOf: Ee } = Object, { iterator: se, toStringTag: Ke } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
11
+ const n = Rt.call(t);
12
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
13
+ })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: H } = Array, $ = ie("undefined");
14
+ function J(e) {
15
+ return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
16
+ }
17
+ const Xe = P("ArrayBuffer");
18
+ function Ot(e) {
19
+ let t;
20
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Xe(e.buffer), t;
21
+ }
22
+ const At = ie("string"), A = ie("function"), Ge = ie("number"), V = (e) => e !== null && typeof e == "object", Tt = (e) => e === !0 || e === !1, Y = (e) => {
23
+ if (oe(e) !== "object")
24
+ return !1;
25
+ const t = Ee(e);
26
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ke in e) && !(se in e);
27
+ }, Ct = (e) => {
28
+ if (!V(e) || J(e))
29
+ return !1;
30
+ try {
31
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
32
+ } catch {
33
+ return !1;
34
+ }
35
+ }, xt = P("Date"), Nt = P("File"), Pt = P("Blob"), Ft = P("FileList"), Ut = (e) => V(e) && A(e.pipe), _t = (e) => {
36
+ let t;
37
+ return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
38
+ t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
39
+ }, Lt = P("URLSearchParams"), [Bt, kt, Dt, jt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), It = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
40
+ function W(e, t, { allOwnKeys: n = !1 } = {}) {
41
+ if (e === null || typeof e > "u")
42
+ return;
43
+ let r, s;
44
+ if (typeof e != "object" && (e = [e]), H(e))
45
+ for (r = 0, s = e.length; r < s; r++)
46
+ t.call(null, e[r], r, e);
47
+ else {
48
+ if (J(e))
49
+ return;
50
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
51
+ let c;
52
+ for (r = 0; r < i; r++)
53
+ c = o[r], t.call(null, e[c], c, e);
54
+ }
55
+ }
56
+ function Qe(e, t) {
57
+ if (J(e))
58
+ return null;
59
+ t = t.toLowerCase();
60
+ const n = Object.keys(e);
61
+ let r = n.length, s;
62
+ for (; r-- > 0; )
63
+ if (s = n[r], t === s.toLowerCase())
64
+ return s;
65
+ return null;
66
+ }
67
+ const D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ze = (e) => !$(e) && e !== D;
68
+ function me() {
69
+ const { caseless: e, skipUndefined: t } = Ze(this) && this || {}, n = {}, r = (s, o) => {
70
+ const i = e && Qe(n, o) || o;
71
+ Y(n[i]) && Y(s) ? n[i] = me(n[i], s) : Y(s) ? n[i] = me({}, s) : H(s) ? n[i] = s.slice() : (!t || !$(s)) && (n[i] = s);
72
+ };
73
+ for (let s = 0, o = arguments.length; s < o; s++)
74
+ arguments[s] && W(arguments[s], r);
75
+ return n;
76
+ }
77
+ const qt = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (s, o) => {
78
+ n && A(s) ? e[o] = We(s, n) : e[o] = s;
79
+ }, { allOwnKeys: r }), e), $t = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ht = (e, t, n, r) => {
80
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
81
+ value: t.prototype
82
+ }), n && Object.assign(e.prototype, n);
83
+ }, Mt = (e, t, n, r) => {
84
+ let s, o, i;
85
+ const c = {};
86
+ if (t = t || {}, e == null) return t;
87
+ do {
88
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
89
+ i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
90
+ e = n !== !1 && Ee(e);
91
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
92
+ return t;
93
+ }, vt = (e, t, n) => {
94
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
95
+ const r = e.indexOf(t, n);
96
+ return r !== -1 && r === n;
97
+ }, zt = (e) => {
98
+ if (!e) return null;
99
+ if (H(e)) return e;
100
+ let t = e.length;
101
+ if (!Ge(t)) return null;
102
+ const n = new Array(t);
103
+ for (; t-- > 0; )
104
+ n[t] = e[t];
105
+ return n;
106
+ }, Jt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ee(Uint8Array)), Vt = (e, t) => {
107
+ const r = (e && e[se]).call(e);
108
+ let s;
109
+ for (; (s = r.next()) && !s.done; ) {
110
+ const o = s.value;
111
+ t.call(e, o[0], o[1]);
112
+ }
113
+ }, Wt = (e, t) => {
114
+ let n;
115
+ const r = [];
116
+ for (; (n = e.exec(t)) !== null; )
117
+ r.push(n);
118
+ return r;
119
+ }, Kt = P("HTMLFormElement"), Xt = (e) => e.toLowerCase().replace(
120
+ /[-_\s]([a-z\d])(\w*)/g,
121
+ function(n, r, s) {
122
+ return r.toUpperCase() + s;
123
+ }
124
+ ), Fe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Gt = P("RegExp"), Ye = (e, t) => {
125
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
126
+ W(n, (s, o) => {
127
+ let i;
128
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
129
+ }), Object.defineProperties(e, r);
130
+ }, Qt = (e) => {
131
+ Ye(e, (t, n) => {
132
+ if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
133
+ return !1;
134
+ const r = e[n];
135
+ if (A(r)) {
136
+ if (t.enumerable = !1, "writable" in t) {
137
+ t.writable = !1;
138
+ return;
139
+ }
140
+ t.set || (t.set = () => {
141
+ throw Error("Can not rewrite read-only method '" + n + "'");
142
+ });
143
+ }
144
+ });
145
+ }, Zt = (e, t) => {
146
+ const n = {}, r = (s) => {
147
+ s.forEach((o) => {
148
+ n[o] = !0;
149
+ });
150
+ };
151
+ return H(e) ? r(e) : r(String(e).split(t)), n;
152
+ }, Yt = () => {
153
+ }, en = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
154
+ function tn(e) {
155
+ return !!(e && A(e.append) && e[Ke] === "FormData" && e[se]);
156
+ }
157
+ const nn = (e) => {
158
+ const t = new Array(10), n = (r, s) => {
159
+ if (V(r)) {
160
+ if (t.indexOf(r) >= 0)
161
+ return;
162
+ if (J(r))
163
+ return r;
164
+ if (!("toJSON" in r)) {
165
+ t[s] = r;
166
+ const o = H(r) ? [] : {};
167
+ return W(r, (i, c) => {
168
+ const f = n(i, s + 1);
169
+ !$(f) && (o[c] = f);
170
+ }), t[s] = void 0, o;
171
+ }
172
+ }
173
+ return r;
174
+ };
175
+ return n(e, 0);
176
+ }, rn = P("AsyncFunction"), sn = (e) => e && (V(e) || A(e)) && A(e.then) && A(e.catch), et = ((e, t) => e ? setImmediate : t ? ((n, r) => (D.addEventListener("message", ({ source: s, data: o }) => {
177
+ s === D && o === n && r.length && r.shift()();
178
+ }, !1), (s) => {
179
+ r.push(s), D.postMessage(n, "*");
180
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
181
+ typeof setImmediate == "function",
182
+ A(D.postMessage)
183
+ ), on = typeof queueMicrotask < "u" ? queueMicrotask.bind(D) : typeof Pe < "u" && Pe.nextTick || et, an = (e) => e != null && A(e[se]), a = {
184
+ isArray: H,
185
+ isArrayBuffer: Xe,
186
+ isBuffer: J,
187
+ isFormData: _t,
188
+ isArrayBufferView: Ot,
189
+ isString: At,
190
+ isNumber: Ge,
191
+ isBoolean: Tt,
192
+ isObject: V,
193
+ isPlainObject: Y,
194
+ isEmptyObject: Ct,
195
+ isReadableStream: Bt,
196
+ isRequest: kt,
197
+ isResponse: Dt,
198
+ isHeaders: jt,
199
+ isUndefined: $,
200
+ isDate: xt,
201
+ isFile: Nt,
202
+ isBlob: Pt,
203
+ isRegExp: Gt,
204
+ isFunction: A,
205
+ isStream: Ut,
206
+ isURLSearchParams: Lt,
207
+ isTypedArray: Jt,
208
+ isFileList: Ft,
209
+ forEach: W,
210
+ merge: me,
211
+ extend: qt,
212
+ trim: It,
213
+ stripBOM: $t,
214
+ inherits: Ht,
215
+ toFlatObject: Mt,
216
+ kindOf: oe,
217
+ kindOfTest: P,
218
+ endsWith: vt,
219
+ toArray: zt,
220
+ forEachEntry: Vt,
221
+ matchAll: Wt,
222
+ isHTMLForm: Kt,
223
+ hasOwnProperty: Fe,
224
+ hasOwnProp: Fe,
225
+ // an alias to avoid ESLint no-prototype-builtins detection
226
+ reduceDescriptors: Ye,
227
+ freezeMethods: Qt,
228
+ toObjectSet: Zt,
229
+ toCamelCase: Xt,
230
+ noop: Yt,
231
+ toFiniteNumber: en,
232
+ findKey: Qe,
233
+ global: D,
234
+ isContextDefined: Ze,
235
+ isSpecCompliantForm: tn,
236
+ toJSONObject: nn,
237
+ isAsyncFn: rn,
238
+ isThenable: sn,
239
+ setImmediate: et,
240
+ asap: on,
241
+ isIterable: an
242
+ };
243
+ function y(e, t, n, r, s) {
244
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
245
+ }
246
+ a.inherits(y, Error, {
247
+ toJSON: function() {
248
+ return {
249
+ // Standard
250
+ message: this.message,
251
+ name: this.name,
252
+ // Microsoft
253
+ description: this.description,
254
+ number: this.number,
255
+ // Mozilla
256
+ fileName: this.fileName,
257
+ lineNumber: this.lineNumber,
258
+ columnNumber: this.columnNumber,
259
+ stack: this.stack,
260
+ // Axios
261
+ config: a.toJSONObject(this.config),
262
+ code: this.code,
263
+ status: this.status
264
+ };
265
+ }
266
+ });
267
+ const tt = y.prototype, nt = {};
268
+ [
269
+ "ERR_BAD_OPTION_VALUE",
270
+ "ERR_BAD_OPTION",
271
+ "ECONNABORTED",
272
+ "ETIMEDOUT",
273
+ "ERR_NETWORK",
274
+ "ERR_FR_TOO_MANY_REDIRECTS",
275
+ "ERR_DEPRECATED",
276
+ "ERR_BAD_RESPONSE",
277
+ "ERR_BAD_REQUEST",
278
+ "ERR_CANCELED",
279
+ "ERR_NOT_SUPPORT",
280
+ "ERR_INVALID_URL"
281
+ // eslint-disable-next-line func-names
282
+ ].forEach((e) => {
283
+ nt[e] = { value: e };
284
+ });
285
+ Object.defineProperties(y, nt);
286
+ Object.defineProperty(tt, "isAxiosError", { value: !0 });
287
+ y.from = (e, t, n, r, s, o) => {
288
+ const i = Object.create(tt);
289
+ a.toFlatObject(e, i, function(u) {
290
+ return u !== Error.prototype;
291
+ }, (l) => l !== "isAxiosError");
292
+ const c = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
293
+ return y.call(i, c, f, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
294
+ };
295
+ const cn = null;
296
+ function ye(e) {
297
+ return a.isPlainObject(e) || a.isArray(e);
298
+ }
299
+ function rt(e) {
300
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
301
+ }
302
+ function Ue(e, t, n) {
303
+ return e ? e.concat(t).map(function(s, o) {
304
+ return s = rt(s), !n && o ? "[" + s + "]" : s;
305
+ }).join(n ? "." : "") : t;
306
+ }
307
+ function un(e) {
308
+ return a.isArray(e) && !e.some(ye);
309
+ }
310
+ const ln = a.toFlatObject(a, {}, null, function(t) {
311
+ return /^is[A-Z]/.test(t);
312
+ });
313
+ function ae(e, t, n) {
314
+ if (!a.isObject(e))
315
+ throw new TypeError("target must be an object");
316
+ t = t || new FormData(), n = a.toFlatObject(n, {
317
+ metaTokens: !0,
318
+ dots: !1,
319
+ indexes: !1
320
+ }, !1, function(m, p) {
321
+ return !a.isUndefined(p[m]);
322
+ });
323
+ const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
324
+ if (!a.isFunction(s))
325
+ throw new TypeError("visitor must be a function");
326
+ function l(d) {
327
+ if (d === null) return "";
328
+ if (a.isDate(d))
329
+ return d.toISOString();
330
+ if (a.isBoolean(d))
331
+ return d.toString();
332
+ if (!f && a.isBlob(d))
333
+ throw new y("Blob is not supported. Use a Buffer instead.");
334
+ return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
335
+ }
336
+ function u(d, m, p) {
337
+ let E = d;
338
+ if (d && !p && typeof d == "object") {
339
+ if (a.endsWith(m, "{}"))
340
+ m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
341
+ else if (a.isArray(d) && un(d) || (a.isFileList(d) || a.endsWith(m, "[]")) && (E = a.toArray(d)))
342
+ return m = rt(m), E.forEach(function(g, O) {
343
+ !(a.isUndefined(g) || g === null) && t.append(
344
+ // eslint-disable-next-line no-nested-ternary
345
+ i === !0 ? Ue([m], O, o) : i === null ? m : m + "[]",
346
+ l(g)
347
+ );
348
+ }), !1;
349
+ }
350
+ return ye(d) ? !0 : (t.append(Ue(p, m, o), l(d)), !1);
351
+ }
352
+ const h = [], b = Object.assign(ln, {
353
+ defaultVisitor: u,
354
+ convertValue: l,
355
+ isVisitable: ye
356
+ });
357
+ function S(d, m) {
358
+ if (!a.isUndefined(d)) {
359
+ if (h.indexOf(d) !== -1)
360
+ throw Error("Circular reference detected in " + m.join("."));
361
+ h.push(d), a.forEach(d, function(E, C) {
362
+ (!(a.isUndefined(E) || E === null) && s.call(
363
+ t,
364
+ E,
365
+ a.isString(C) ? C.trim() : C,
366
+ m,
367
+ b
368
+ )) === !0 && S(E, m ? m.concat(C) : [C]);
369
+ }), h.pop();
370
+ }
371
+ }
372
+ if (!a.isObject(e))
373
+ throw new TypeError("data must be an object");
374
+ return S(e), t;
375
+ }
376
+ function _e(e) {
377
+ const t = {
378
+ "!": "%21",
379
+ "'": "%27",
380
+ "(": "%28",
381
+ ")": "%29",
382
+ "~": "%7E",
383
+ "%20": "+",
384
+ "%00": "\0"
385
+ };
386
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
387
+ return t[r];
388
+ });
389
+ }
390
+ function ge(e, t) {
391
+ this._pairs = [], e && ae(e, this, t);
392
+ }
393
+ const st = ge.prototype;
394
+ st.append = function(t, n) {
395
+ this._pairs.push([t, n]);
396
+ };
397
+ st.toString = function(t) {
398
+ const n = t ? function(r) {
399
+ return t.call(this, r, _e);
400
+ } : _e;
401
+ return this._pairs.map(function(s) {
402
+ return n(s[0]) + "=" + n(s[1]);
403
+ }, "").join("&");
404
+ };
405
+ function fn(e) {
406
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
407
+ }
408
+ function ot(e, t, n) {
409
+ if (!t)
410
+ return e;
411
+ const r = n && n.encode || fn;
412
+ a.isFunction(n) && (n = {
413
+ serialize: n
414
+ });
415
+ const s = n && n.serialize;
416
+ let o;
417
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ge(t, n).toString(r), o) {
418
+ const i = e.indexOf("#");
419
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
420
+ }
421
+ return e;
422
+ }
423
+ class Le {
424
+ constructor() {
425
+ this.handlers = [];
426
+ }
427
+ /**
428
+ * Add a new interceptor to the stack
429
+ *
430
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
431
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
432
+ *
433
+ * @return {Number} An ID used to remove interceptor later
434
+ */
435
+ use(t, n, r) {
436
+ return this.handlers.push({
437
+ fulfilled: t,
438
+ rejected: n,
439
+ synchronous: r ? r.synchronous : !1,
440
+ runWhen: r ? r.runWhen : null
441
+ }), this.handlers.length - 1;
442
+ }
443
+ /**
444
+ * Remove an interceptor from the stack
445
+ *
446
+ * @param {Number} id The ID that was returned by `use`
447
+ *
448
+ * @returns {void}
449
+ */
450
+ eject(t) {
451
+ this.handlers[t] && (this.handlers[t] = null);
452
+ }
453
+ /**
454
+ * Clear all interceptors from the stack
455
+ *
456
+ * @returns {void}
457
+ */
458
+ clear() {
459
+ this.handlers && (this.handlers = []);
460
+ }
461
+ /**
462
+ * Iterate over all the registered interceptors
463
+ *
464
+ * This method is particularly useful for skipping over any
465
+ * interceptors that may have become `null` calling `eject`.
466
+ *
467
+ * @param {Function} fn The function to call for each interceptor
468
+ *
469
+ * @returns {void}
470
+ */
471
+ forEach(t) {
472
+ a.forEach(this.handlers, function(r) {
473
+ r !== null && t(r);
474
+ });
475
+ }
476
+ }
477
+ const it = {
478
+ silentJSONParsing: !0,
479
+ forcedJSONParsing: !0,
480
+ clarifyTimeoutError: !1
481
+ }, dn = typeof URLSearchParams < "u" ? URLSearchParams : ge, pn = typeof FormData < "u" ? FormData : null, hn = typeof Blob < "u" ? Blob : null, mn = {
482
+ isBrowser: !0,
483
+ classes: {
484
+ URLSearchParams: dn,
485
+ FormData: pn,
486
+ Blob: hn
487
+ },
488
+ protocols: ["http", "https", "file", "blob", "url", "data"]
489
+ }, Se = typeof window < "u" && typeof document < "u", be = typeof navigator == "object" && navigator || void 0, yn = Se && (!be || ["ReactNative", "NativeScript", "NS"].indexOf(be.product) < 0), bn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
490
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", wn = Se && window.location.href || "http://localhost", En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
491
+ __proto__: null,
492
+ hasBrowserEnv: Se,
493
+ hasStandardBrowserEnv: yn,
494
+ hasStandardBrowserWebWorkerEnv: bn,
495
+ navigator: be,
496
+ origin: wn
497
+ }, Symbol.toStringTag, { value: "Module" })), R = {
498
+ ...En,
499
+ ...mn
500
+ };
501
+ function gn(e, t) {
502
+ return ae(e, new R.classes.URLSearchParams(), {
503
+ visitor: function(n, r, s, o) {
504
+ return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
505
+ },
506
+ ...t
507
+ });
508
+ }
509
+ function Sn(e) {
510
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
511
+ }
512
+ function Rn(e) {
513
+ const t = {}, n = Object.keys(e);
514
+ let r;
515
+ const s = n.length;
516
+ let o;
517
+ for (r = 0; r < s; r++)
518
+ o = n[r], t[o] = e[o];
519
+ return t;
520
+ }
521
+ function at(e) {
522
+ function t(n, r, s, o) {
523
+ let i = n[o++];
524
+ if (i === "__proto__") return !0;
525
+ const c = Number.isFinite(+i), f = o >= n.length;
526
+ return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Rn(s[i])), !c);
527
+ }
528
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
529
+ const n = {};
530
+ return a.forEachEntry(e, (r, s) => {
531
+ t(Sn(r), s, n, 0);
532
+ }), n;
533
+ }
534
+ return null;
535
+ }
536
+ function On(e, t, n) {
537
+ if (a.isString(e))
538
+ try {
539
+ return (t || JSON.parse)(e), a.trim(e);
540
+ } catch (r) {
541
+ if (r.name !== "SyntaxError")
542
+ throw r;
543
+ }
544
+ return (n || JSON.stringify)(e);
545
+ }
546
+ const K = {
547
+ transitional: it,
548
+ adapter: ["xhr", "http", "fetch"],
549
+ transformRequest: [function(t, n) {
550
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
551
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
552
+ return s ? JSON.stringify(at(t)) : t;
553
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
554
+ return t;
555
+ if (a.isArrayBufferView(t))
556
+ return t.buffer;
557
+ if (a.isURLSearchParams(t))
558
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
559
+ let c;
560
+ if (o) {
561
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
562
+ return gn(t, this.formSerializer).toString();
563
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
564
+ const f = this.env && this.env.FormData;
565
+ return ae(
566
+ c ? { "files[]": t } : t,
567
+ f && new f(),
568
+ this.formSerializer
569
+ );
570
+ }
571
+ }
572
+ return o || s ? (n.setContentType("application/json", !1), On(t)) : t;
573
+ }],
574
+ transformResponse: [function(t) {
575
+ const n = this.transitional || K.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
576
+ if (a.isResponse(t) || a.isReadableStream(t))
577
+ return t;
578
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
579
+ const i = !(n && n.silentJSONParsing) && s;
580
+ try {
581
+ return JSON.parse(t, this.parseReviver);
582
+ } catch (c) {
583
+ if (i)
584
+ throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
585
+ }
586
+ }
587
+ return t;
588
+ }],
589
+ /**
590
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
591
+ * timeout is not created.
592
+ */
593
+ timeout: 0,
594
+ xsrfCookieName: "XSRF-TOKEN",
595
+ xsrfHeaderName: "X-XSRF-TOKEN",
596
+ maxContentLength: -1,
597
+ maxBodyLength: -1,
598
+ env: {
599
+ FormData: R.classes.FormData,
600
+ Blob: R.classes.Blob
601
+ },
602
+ validateStatus: function(t) {
603
+ return t >= 200 && t < 300;
604
+ },
605
+ headers: {
606
+ common: {
607
+ Accept: "application/json, text/plain, */*",
608
+ "Content-Type": void 0
609
+ }
610
+ }
611
+ };
612
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
613
+ K.headers[e] = {};
614
+ });
615
+ const An = a.toObjectSet([
616
+ "age",
617
+ "authorization",
618
+ "content-length",
619
+ "content-type",
620
+ "etag",
621
+ "expires",
622
+ "from",
623
+ "host",
624
+ "if-modified-since",
625
+ "if-unmodified-since",
626
+ "last-modified",
627
+ "location",
628
+ "max-forwards",
629
+ "proxy-authorization",
630
+ "referer",
631
+ "retry-after",
632
+ "user-agent"
633
+ ]), Tn = (e) => {
634
+ const t = {};
635
+ let n, r, s;
636
+ return e && e.split(`
637
+ `).forEach(function(i) {
638
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && An[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
639
+ }), t;
640
+ }, Be = Symbol("internals");
641
+ function z(e) {
642
+ return e && String(e).trim().toLowerCase();
643
+ }
644
+ function ee(e) {
645
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
646
+ }
647
+ function Cn(e) {
648
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
649
+ let r;
650
+ for (; r = n.exec(e); )
651
+ t[r[1]] = r[2];
652
+ return t;
653
+ }
654
+ const xn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
655
+ function de(e, t, n, r, s) {
656
+ if (a.isFunction(r))
657
+ return r.call(this, t, n);
658
+ if (s && (t = n), !!a.isString(t)) {
659
+ if (a.isString(r))
660
+ return t.indexOf(r) !== -1;
661
+ if (a.isRegExp(r))
662
+ return r.test(t);
663
+ }
664
+ }
665
+ function Nn(e) {
666
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
667
+ }
668
+ function Pn(e, t) {
669
+ const n = a.toCamelCase(" " + t);
670
+ ["get", "set", "has"].forEach((r) => {
671
+ Object.defineProperty(e, r + n, {
672
+ value: function(s, o, i) {
673
+ return this[r].call(this, t, s, o, i);
674
+ },
675
+ configurable: !0
676
+ });
677
+ });
678
+ }
679
+ let T = class {
680
+ constructor(t) {
681
+ t && this.set(t);
682
+ }
683
+ set(t, n, r) {
684
+ const s = this;
685
+ function o(c, f, l) {
686
+ const u = z(f);
687
+ if (!u)
688
+ throw new Error("header name must be a non-empty string");
689
+ const h = a.findKey(s, u);
690
+ (!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] = ee(c));
691
+ }
692
+ const i = (c, f) => a.forEach(c, (l, u) => o(l, u, f));
693
+ if (a.isPlainObject(t) || t instanceof this.constructor)
694
+ i(t, n);
695
+ else if (a.isString(t) && (t = t.trim()) && !xn(t))
696
+ i(Tn(t), n);
697
+ else if (a.isObject(t) && a.isIterable(t)) {
698
+ let c = {}, f, l;
699
+ for (const u of t) {
700
+ if (!a.isArray(u))
701
+ throw TypeError("Object iterator must return a key-value pair");
702
+ c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
703
+ }
704
+ i(c, n);
705
+ } else
706
+ t != null && o(n, t, r);
707
+ return this;
708
+ }
709
+ get(t, n) {
710
+ if (t = z(t), t) {
711
+ const r = a.findKey(this, t);
712
+ if (r) {
713
+ const s = this[r];
714
+ if (!n)
715
+ return s;
716
+ if (n === !0)
717
+ return Cn(s);
718
+ if (a.isFunction(n))
719
+ return n.call(this, s, r);
720
+ if (a.isRegExp(n))
721
+ return n.exec(s);
722
+ throw new TypeError("parser must be boolean|regexp|function");
723
+ }
724
+ }
725
+ }
726
+ has(t, n) {
727
+ if (t = z(t), t) {
728
+ const r = a.findKey(this, t);
729
+ return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
730
+ }
731
+ return !1;
732
+ }
733
+ delete(t, n) {
734
+ const r = this;
735
+ let s = !1;
736
+ function o(i) {
737
+ if (i = z(i), i) {
738
+ const c = a.findKey(r, i);
739
+ c && (!n || de(r, r[c], c, n)) && (delete r[c], s = !0);
740
+ }
741
+ }
742
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
743
+ }
744
+ clear(t) {
745
+ const n = Object.keys(this);
746
+ let r = n.length, s = !1;
747
+ for (; r--; ) {
748
+ const o = n[r];
749
+ (!t || de(this, this[o], o, t, !0)) && (delete this[o], s = !0);
750
+ }
751
+ return s;
752
+ }
753
+ normalize(t) {
754
+ const n = this, r = {};
755
+ return a.forEach(this, (s, o) => {
756
+ const i = a.findKey(r, o);
757
+ if (i) {
758
+ n[i] = ee(s), delete n[o];
759
+ return;
760
+ }
761
+ const c = t ? Nn(o) : String(o).trim();
762
+ c !== o && delete n[o], n[c] = ee(s), r[c] = !0;
763
+ }), this;
764
+ }
765
+ concat(...t) {
766
+ return this.constructor.concat(this, ...t);
767
+ }
768
+ toJSON(t) {
769
+ const n = /* @__PURE__ */ Object.create(null);
770
+ return a.forEach(this, (r, s) => {
771
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
772
+ }), n;
773
+ }
774
+ [Symbol.iterator]() {
775
+ return Object.entries(this.toJSON())[Symbol.iterator]();
776
+ }
777
+ toString() {
778
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
779
+ `);
780
+ }
781
+ getSetCookie() {
782
+ return this.get("set-cookie") || [];
783
+ }
784
+ get [Symbol.toStringTag]() {
785
+ return "AxiosHeaders";
786
+ }
787
+ static from(t) {
788
+ return t instanceof this ? t : new this(t);
789
+ }
790
+ static concat(t, ...n) {
791
+ const r = new this(t);
792
+ return n.forEach((s) => r.set(s)), r;
793
+ }
794
+ static accessor(t) {
795
+ const r = (this[Be] = this[Be] = {
796
+ accessors: {}
797
+ }).accessors, s = this.prototype;
798
+ function o(i) {
799
+ const c = z(i);
800
+ r[c] || (Pn(s, i), r[c] = !0);
801
+ }
802
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
803
+ }
804
+ };
805
+ T.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
806
+ a.reduceDescriptors(T.prototype, ({ value: e }, t) => {
807
+ let n = t[0].toUpperCase() + t.slice(1);
808
+ return {
809
+ get: () => e,
810
+ set(r) {
811
+ this[n] = r;
812
+ }
813
+ };
814
+ });
815
+ a.freezeMethods(T);
816
+ function pe(e, t) {
817
+ const n = this || K, r = t || n, s = T.from(r.headers);
818
+ let o = r.data;
819
+ return a.forEach(e, function(c) {
820
+ o = c.call(n, o, s.normalize(), t ? t.status : void 0);
821
+ }), s.normalize(), o;
822
+ }
823
+ function ct(e) {
824
+ return !!(e && e.__CANCEL__);
825
+ }
826
+ function M(e, t, n) {
827
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
828
+ }
829
+ a.inherits(M, y, {
830
+ __CANCEL__: !0
831
+ });
832
+ function ut(e, t, n) {
833
+ const r = n.config.validateStatus;
834
+ !n.status || !r || r(n.status) ? e(n) : t(new y(
835
+ "Request failed with status code " + n.status,
836
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
837
+ n.config,
838
+ n.request,
839
+ n
840
+ ));
841
+ }
842
+ function Fn(e) {
843
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
844
+ return t && t[1] || "";
845
+ }
846
+ function Un(e, t) {
847
+ e = e || 10;
848
+ const n = new Array(e), r = new Array(e);
849
+ let s = 0, o = 0, i;
850
+ return t = t !== void 0 ? t : 1e3, function(f) {
851
+ const l = Date.now(), u = r[o];
852
+ i || (i = l), n[s] = f, r[s] = l;
853
+ let h = o, b = 0;
854
+ for (; h !== s; )
855
+ b += n[h++], h = h % e;
856
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
857
+ return;
858
+ const S = u && l - u;
859
+ return S ? Math.round(b * 1e3 / S) : void 0;
860
+ };
861
+ }
862
+ function _n(e, t) {
863
+ let n = 0, r = 1e3 / t, s, o;
864
+ const i = (l, u = Date.now()) => {
865
+ n = u, s = null, o && (clearTimeout(o), o = null), e(...l);
866
+ };
867
+ return [(...l) => {
868
+ const u = Date.now(), h = u - n;
869
+ h >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
870
+ o = null, i(s);
871
+ }, r - h)));
872
+ }, () => s && i(s)];
873
+ }
874
+ const ne = (e, t, n = 3) => {
875
+ let r = 0;
876
+ const s = Un(50, 250);
877
+ return _n((o) => {
878
+ const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), u = i <= c;
879
+ r = i;
880
+ const h = {
881
+ loaded: i,
882
+ total: c,
883
+ progress: c ? i / c : void 0,
884
+ bytes: f,
885
+ rate: l || void 0,
886
+ estimated: l && c && u ? (c - i) / l : void 0,
887
+ event: o,
888
+ lengthComputable: c != null,
889
+ [t ? "download" : "upload"]: !0
890
+ };
891
+ e(h);
892
+ }, n);
893
+ }, ke = (e, t) => {
894
+ const n = e != null;
895
+ return [(r) => t[0]({
896
+ lengthComputable: n,
897
+ total: e,
898
+ loaded: r
899
+ }), t[1]];
900
+ }, De = (e) => (...t) => a.asap(() => e(...t)), Ln = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, R.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
901
+ new URL(R.origin),
902
+ R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
903
+ ) : () => !0, Bn = R.hasStandardBrowserEnv ? (
904
+ // Standard browser envs support document.cookie
905
+ {
906
+ write(e, t, n, r, s, o, i) {
907
+ if (typeof document > "u") return;
908
+ const c = [`${e}=${encodeURIComponent(t)}`];
909
+ a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), a.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
910
+ },
911
+ read(e) {
912
+ if (typeof document > "u") return null;
913
+ const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
914
+ return t ? decodeURIComponent(t[1]) : null;
915
+ },
916
+ remove(e) {
917
+ this.write(e, "", Date.now() - 864e5, "/");
918
+ }
919
+ }
920
+ ) : (
921
+ // Non-standard browser env (web workers, react-native) lack needed support.
922
+ {
923
+ write() {
924
+ },
925
+ read() {
926
+ return null;
927
+ },
928
+ remove() {
929
+ }
930
+ }
931
+ );
932
+ function kn(e) {
933
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
934
+ }
935
+ function Dn(e, t) {
936
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
937
+ }
938
+ function lt(e, t, n) {
939
+ let r = !kn(t);
940
+ return e && (r || n == !1) ? Dn(e, t) : t;
941
+ }
942
+ const je = (e) => e instanceof T ? { ...e } : e;
943
+ function I(e, t) {
944
+ t = t || {};
945
+ const n = {};
946
+ function r(l, u, h, b) {
947
+ return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: b }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
948
+ }
949
+ function s(l, u, h, b) {
950
+ if (a.isUndefined(u)) {
951
+ if (!a.isUndefined(l))
952
+ return r(void 0, l, h, b);
953
+ } else return r(l, u, h, b);
954
+ }
955
+ function o(l, u) {
956
+ if (!a.isUndefined(u))
957
+ return r(void 0, u);
958
+ }
959
+ function i(l, u) {
960
+ if (a.isUndefined(u)) {
961
+ if (!a.isUndefined(l))
962
+ return r(void 0, l);
963
+ } else return r(void 0, u);
964
+ }
965
+ function c(l, u, h) {
966
+ if (h in t)
967
+ return r(l, u);
968
+ if (h in e)
969
+ return r(void 0, l);
970
+ }
971
+ const f = {
972
+ url: o,
973
+ method: o,
974
+ data: o,
975
+ baseURL: i,
976
+ transformRequest: i,
977
+ transformResponse: i,
978
+ paramsSerializer: i,
979
+ timeout: i,
980
+ timeoutMessage: i,
981
+ withCredentials: i,
982
+ withXSRFToken: i,
983
+ adapter: i,
984
+ responseType: i,
985
+ xsrfCookieName: i,
986
+ xsrfHeaderName: i,
987
+ onUploadProgress: i,
988
+ onDownloadProgress: i,
989
+ decompress: i,
990
+ maxContentLength: i,
991
+ maxBodyLength: i,
992
+ beforeRedirect: i,
993
+ transport: i,
994
+ httpAgent: i,
995
+ httpsAgent: i,
996
+ cancelToken: i,
997
+ socketPath: i,
998
+ responseEncoding: i,
999
+ validateStatus: c,
1000
+ headers: (l, u, h) => s(je(l), je(u), h, !0)
1001
+ };
1002
+ return a.forEach(Object.keys({ ...e, ...t }), function(u) {
1003
+ const h = f[u] || s, b = h(e[u], t[u], u);
1004
+ a.isUndefined(b) && h !== c || (n[u] = b);
1005
+ }), n;
1006
+ }
1007
+ const ft = (e) => {
1008
+ const t = I({}, e);
1009
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
1010
+ if (t.headers = i = T.from(i), t.url = ot(lt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
1011
+ "Authorization",
1012
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1013
+ ), a.isFormData(n)) {
1014
+ if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
1015
+ i.setContentType(void 0);
1016
+ else if (a.isFunction(n.getHeaders)) {
1017
+ const f = n.getHeaders(), l = ["content-type", "content-length"];
1018
+ Object.entries(f).forEach(([u, h]) => {
1019
+ l.includes(u.toLowerCase()) && i.set(u, h);
1020
+ });
1021
+ }
1022
+ }
1023
+ if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Ln(t.url))) {
1024
+ const f = s && o && Bn.read(o);
1025
+ f && i.set(s, f);
1026
+ }
1027
+ return t;
1028
+ }, jn = typeof XMLHttpRequest < "u", In = jn && function(e) {
1029
+ return new Promise(function(n, r) {
1030
+ const s = ft(e);
1031
+ let o = s.data;
1032
+ const i = T.from(s.headers).normalize();
1033
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, b, S, d;
1034
+ function m() {
1035
+ S && S(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1036
+ }
1037
+ let p = new XMLHttpRequest();
1038
+ p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
1039
+ function E() {
1040
+ if (!p)
1041
+ return;
1042
+ const g = T.from(
1043
+ "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1044
+ ), N = {
1045
+ data: !c || c === "text" || c === "json" ? p.responseText : p.response,
1046
+ status: p.status,
1047
+ statusText: p.statusText,
1048
+ headers: g,
1049
+ config: e,
1050
+ request: p
1051
+ };
1052
+ ut(function(x) {
1053
+ n(x), m();
1054
+ }, function(x) {
1055
+ r(x), m();
1056
+ }, N), p = null;
1057
+ }
1058
+ "onloadend" in p ? p.onloadend = E : p.onreadystatechange = function() {
1059
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(E);
1060
+ }, p.onabort = function() {
1061
+ p && (r(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
1062
+ }, p.onerror = function(O) {
1063
+ const N = O && O.message ? O.message : "Network Error", B = new y(N, y.ERR_NETWORK, e, p);
1064
+ B.event = O || null, r(B), p = null;
1065
+ }, p.ontimeout = function() {
1066
+ let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1067
+ const N = s.transitional || it;
1068
+ s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new y(
1069
+ O,
1070
+ N.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1071
+ e,
1072
+ p
1073
+ )), p = null;
1074
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(O, N) {
1075
+ p.setRequestHeader(N, O);
1076
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([b, d] = ne(l, !0), p.addEventListener("progress", b)), f && p.upload && ([h, S] = ne(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (u = (g) => {
1077
+ p && (r(!g || g.type ? new M(null, e, p) : g), p.abort(), p = null);
1078
+ }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1079
+ const C = Fn(s.url);
1080
+ if (C && R.protocols.indexOf(C) === -1) {
1081
+ r(new y("Unsupported protocol " + C + ":", y.ERR_BAD_REQUEST, e));
1082
+ return;
1083
+ }
1084
+ p.send(o || null);
1085
+ });
1086
+ }, qn = (e, t) => {
1087
+ const { length: n } = e = e ? e.filter(Boolean) : [];
1088
+ if (t || n) {
1089
+ let r = new AbortController(), s;
1090
+ const o = function(l) {
1091
+ if (!s) {
1092
+ s = !0, c();
1093
+ const u = l instanceof Error ? l : this.reason;
1094
+ r.abort(u instanceof y ? u : new M(u instanceof Error ? u.message : u));
1095
+ }
1096
+ };
1097
+ let i = t && setTimeout(() => {
1098
+ i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1099
+ }, t);
1100
+ const c = () => {
1101
+ e && (i && clearTimeout(i), i = null, e.forEach((l) => {
1102
+ l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
1103
+ }), e = null);
1104
+ };
1105
+ e.forEach((l) => l.addEventListener("abort", o));
1106
+ const { signal: f } = r;
1107
+ return f.unsubscribe = () => a.asap(c), f;
1108
+ }
1109
+ }, $n = function* (e, t) {
1110
+ let n = e.byteLength;
1111
+ if (n < t) {
1112
+ yield e;
1113
+ return;
1114
+ }
1115
+ let r = 0, s;
1116
+ for (; r < n; )
1117
+ s = r + t, yield e.slice(r, s), r = s;
1118
+ }, Hn = async function* (e, t) {
1119
+ for await (const n of Mn(e))
1120
+ yield* $n(n, t);
1121
+ }, Mn = async function* (e) {
1122
+ if (e[Symbol.asyncIterator]) {
1123
+ yield* e;
1124
+ return;
1125
+ }
1126
+ const t = e.getReader();
1127
+ try {
1128
+ for (; ; ) {
1129
+ const { done: n, value: r } = await t.read();
1130
+ if (n)
1131
+ break;
1132
+ yield r;
1133
+ }
1134
+ } finally {
1135
+ await t.cancel();
1136
+ }
1137
+ }, Ie = (e, t, n, r) => {
1138
+ const s = Hn(e, t);
1139
+ let o = 0, i, c = (f) => {
1140
+ i || (i = !0, r && r(f));
1141
+ };
1142
+ return new ReadableStream({
1143
+ async pull(f) {
1144
+ try {
1145
+ const { done: l, value: u } = await s.next();
1146
+ if (l) {
1147
+ c(), f.close();
1148
+ return;
1149
+ }
1150
+ let h = u.byteLength;
1151
+ if (n) {
1152
+ let b = o += h;
1153
+ n(b);
1154
+ }
1155
+ f.enqueue(new Uint8Array(u));
1156
+ } catch (l) {
1157
+ throw c(l), l;
1158
+ }
1159
+ },
1160
+ cancel(f) {
1161
+ return c(f), s.return();
1162
+ }
1163
+ }, {
1164
+ highWaterMark: 2
1165
+ });
1166
+ }, qe = 64 * 1024, { isFunction: Z } = a, vn = (({ Request: e, Response: t }) => ({
1167
+ Request: e,
1168
+ Response: t
1169
+ }))(a.global), {
1170
+ ReadableStream: $e,
1171
+ TextEncoder: He
1172
+ } = a.global, Me = (e, ...t) => {
1173
+ try {
1174
+ return !!e(...t);
1175
+ } catch {
1176
+ return !1;
1177
+ }
1178
+ }, zn = (e) => {
1179
+ e = a.merge.call({
1180
+ skipUndefined: !0
1181
+ }, vn, e);
1182
+ const { fetch: t, Request: n, Response: r } = e, s = t ? Z(t) : typeof fetch == "function", o = Z(n), i = Z(r);
1183
+ if (!s)
1184
+ return !1;
1185
+ const c = s && Z($e), f = s && (typeof He == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new He()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), l = o && c && Me(() => {
1186
+ let d = !1;
1187
+ const m = new n(R.origin, {
1188
+ body: new $e(),
1189
+ method: "POST",
1190
+ get duplex() {
1191
+ return d = !0, "half";
1192
+ }
1193
+ }).headers.has("Content-Type");
1194
+ return d && !m;
1195
+ }), u = i && c && Me(() => a.isReadableStream(new r("").body)), h = {
1196
+ stream: u && ((d) => d.body)
1197
+ };
1198
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1199
+ !h[d] && (h[d] = (m, p) => {
1200
+ let E = m && m[d];
1201
+ if (E)
1202
+ return E.call(m);
1203
+ throw new y(`Response type '${d}' is not supported`, y.ERR_NOT_SUPPORT, p);
1204
+ });
1205
+ });
1206
+ const b = async (d) => {
1207
+ if (d == null)
1208
+ return 0;
1209
+ if (a.isBlob(d))
1210
+ return d.size;
1211
+ if (a.isSpecCompliantForm(d))
1212
+ return (await new n(R.origin, {
1213
+ method: "POST",
1214
+ body: d
1215
+ }).arrayBuffer()).byteLength;
1216
+ if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
1217
+ return d.byteLength;
1218
+ if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
1219
+ return (await f(d)).byteLength;
1220
+ }, S = async (d, m) => {
1221
+ const p = a.toFiniteNumber(d.getContentLength());
1222
+ return p ?? b(m);
1223
+ };
1224
+ return async (d) => {
1225
+ let {
1226
+ url: m,
1227
+ method: p,
1228
+ data: E,
1229
+ signal: C,
1230
+ cancelToken: g,
1231
+ timeout: O,
1232
+ onDownloadProgress: N,
1233
+ onUploadProgress: B,
1234
+ responseType: x,
1235
+ headers: ue,
1236
+ withCredentials: X = "same-origin",
1237
+ fetchOptions: Oe
1238
+ } = ft(d), Ae = t || fetch;
1239
+ x = x ? (x + "").toLowerCase() : "text";
1240
+ let G = qn([C, g && g.toAbortSignal()], O), v = null;
1241
+ const k = G && G.unsubscribe && (() => {
1242
+ G.unsubscribe();
1243
+ });
1244
+ let Te;
1245
+ try {
1246
+ if (B && l && p !== "get" && p !== "head" && (Te = await S(ue, E)) !== 0) {
1247
+ let L = new n(m, {
1248
+ method: "POST",
1249
+ body: E,
1250
+ duplex: "half"
1251
+ }), q;
1252
+ if (a.isFormData(E) && (q = L.headers.get("content-type")) && ue.setContentType(q), L.body) {
1253
+ const [le, Q] = ke(
1254
+ Te,
1255
+ ne(De(B))
1256
+ );
1257
+ E = Ie(L.body, qe, le, Q);
1258
+ }
1259
+ }
1260
+ a.isString(X) || (X = X ? "include" : "omit");
1261
+ const F = o && "credentials" in n.prototype, Ce = {
1262
+ ...Oe,
1263
+ signal: G,
1264
+ method: p.toUpperCase(),
1265
+ headers: ue.normalize().toJSON(),
1266
+ body: E,
1267
+ duplex: "half",
1268
+ credentials: F ? X : void 0
1269
+ };
1270
+ v = o && new n(m, Ce);
1271
+ let _ = await (o ? Ae(v, Oe) : Ae(m, Ce));
1272
+ const xe = u && (x === "stream" || x === "response");
1273
+ if (u && (N || xe && k)) {
1274
+ const L = {};
1275
+ ["status", "statusText", "headers"].forEach((Ne) => {
1276
+ L[Ne] = _[Ne];
1277
+ });
1278
+ const q = a.toFiniteNumber(_.headers.get("content-length")), [le, Q] = N && ke(
1279
+ q,
1280
+ ne(De(N), !0)
1281
+ ) || [];
1282
+ _ = new r(
1283
+ Ie(_.body, qe, le, () => {
1284
+ Q && Q(), k && k();
1285
+ }),
1286
+ L
1287
+ );
1288
+ }
1289
+ x = x || "text";
1290
+ let wt = await h[a.findKey(h, x) || "text"](_, d);
1291
+ return !xe && k && k(), await new Promise((L, q) => {
1292
+ ut(L, q, {
1293
+ data: wt,
1294
+ headers: T.from(_.headers),
1295
+ status: _.status,
1296
+ statusText: _.statusText,
1297
+ config: d,
1298
+ request: v
1299
+ });
1300
+ });
1301
+ } catch (F) {
1302
+ throw k && k(), F && F.name === "TypeError" && /Load failed|fetch/i.test(F.message) ? Object.assign(
1303
+ new y("Network Error", y.ERR_NETWORK, d, v),
1304
+ {
1305
+ cause: F.cause || F
1306
+ }
1307
+ ) : y.from(F, F && F.code, d, v);
1308
+ }
1309
+ };
1310
+ }, Jn = /* @__PURE__ */ new Map(), dt = (e) => {
1311
+ let t = e && e.env || {};
1312
+ const { fetch: n, Request: r, Response: s } = t, o = [
1313
+ r,
1314
+ s,
1315
+ n
1316
+ ];
1317
+ let i = o.length, c = i, f, l, u = Jn;
1318
+ for (; c--; )
1319
+ f = o[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() : zn(t)), u = l;
1320
+ return l;
1321
+ };
1322
+ dt();
1323
+ const Re = {
1324
+ http: cn,
1325
+ xhr: In,
1326
+ fetch: {
1327
+ get: dt
1328
+ }
1329
+ };
1330
+ a.forEach(Re, (e, t) => {
1331
+ if (e) {
1332
+ try {
1333
+ Object.defineProperty(e, "name", { value: t });
1334
+ } catch {
1335
+ }
1336
+ Object.defineProperty(e, "adapterName", { value: t });
1337
+ }
1338
+ });
1339
+ const ve = (e) => `- ${e}`, Vn = (e) => a.isFunction(e) || e === null || e === !1;
1340
+ function Wn(e, t) {
1341
+ e = a.isArray(e) ? e : [e];
1342
+ const { length: n } = e;
1343
+ let r, s;
1344
+ const o = {};
1345
+ for (let i = 0; i < n; i++) {
1346
+ r = e[i];
1347
+ let c;
1348
+ if (s = r, !Vn(r) && (s = Re[(c = String(r)).toLowerCase()], s === void 0))
1349
+ throw new y(`Unknown adapter '${c}'`);
1350
+ if (s && (a.isFunction(s) || (s = s.get(t))))
1351
+ break;
1352
+ o[c || "#" + i] = s;
1353
+ }
1354
+ if (!s) {
1355
+ const i = Object.entries(o).map(
1356
+ ([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
1357
+ );
1358
+ let c = n ? i.length > 1 ? `since :
1359
+ ` + i.map(ve).join(`
1360
+ `) : " " + ve(i[0]) : "as no adapter specified";
1361
+ throw new y(
1362
+ "There is no suitable adapter to dispatch the request " + c,
1363
+ "ERR_NOT_SUPPORT"
1364
+ );
1365
+ }
1366
+ return s;
1367
+ }
1368
+ const pt = {
1369
+ /**
1370
+ * Resolve an adapter from a list of adapter names or functions.
1371
+ * @type {Function}
1372
+ */
1373
+ getAdapter: Wn,
1374
+ /**
1375
+ * Exposes all known adapters
1376
+ * @type {Object<string, Function|Object>}
1377
+ */
1378
+ adapters: Re
1379
+ };
1380
+ function he(e) {
1381
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1382
+ throw new M(null, e);
1383
+ }
1384
+ function ze(e) {
1385
+ return he(e), e.headers = T.from(e.headers), e.data = pe.call(
1386
+ e,
1387
+ e.transformRequest
1388
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pt.getAdapter(e.adapter || K.adapter, e)(e).then(function(r) {
1389
+ return he(e), r.data = pe.call(
1390
+ e,
1391
+ e.transformResponse,
1392
+ r
1393
+ ), r.headers = T.from(r.headers), r;
1394
+ }, function(r) {
1395
+ return ct(r) || (he(e), r && r.response && (r.response.data = pe.call(
1396
+ e,
1397
+ e.transformResponse,
1398
+ r.response
1399
+ ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1400
+ });
1401
+ }
1402
+ const ht = "1.13.2", ce = {};
1403
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1404
+ ce[e] = function(r) {
1405
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1406
+ };
1407
+ });
1408
+ const Je = {};
1409
+ ce.transitional = function(t, n, r) {
1410
+ function s(o, i) {
1411
+ return "[Axios v" + ht + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1412
+ }
1413
+ return (o, i, c) => {
1414
+ if (t === !1)
1415
+ throw new y(
1416
+ s(i, " has been removed" + (n ? " in " + n : "")),
1417
+ y.ERR_DEPRECATED
1418
+ );
1419
+ return n && !Je[i] && (Je[i] = !0, console.warn(
1420
+ s(
1421
+ i,
1422
+ " has been deprecated since v" + n + " and will be removed in the near future"
1423
+ )
1424
+ )), t ? t(o, i, c) : !0;
1425
+ };
1426
+ };
1427
+ ce.spelling = function(t) {
1428
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1429
+ };
1430
+ function Kn(e, t, n) {
1431
+ if (typeof e != "object")
1432
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1433
+ const r = Object.keys(e);
1434
+ let s = r.length;
1435
+ for (; s-- > 0; ) {
1436
+ const o = r[s], i = t[o];
1437
+ if (i) {
1438
+ const c = e[o], f = c === void 0 || i(c, o, e);
1439
+ if (f !== !0)
1440
+ throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
1441
+ continue;
1442
+ }
1443
+ if (n !== !0)
1444
+ throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1445
+ }
1446
+ }
1447
+ const te = {
1448
+ assertOptions: Kn,
1449
+ validators: ce
1450
+ }, U = te.validators;
1451
+ let j = class {
1452
+ constructor(t) {
1453
+ this.defaults = t || {}, this.interceptors = {
1454
+ request: new Le(),
1455
+ response: new Le()
1456
+ };
1457
+ }
1458
+ /**
1459
+ * Dispatch a request
1460
+ *
1461
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1462
+ * @param {?Object} config
1463
+ *
1464
+ * @returns {Promise} The Promise to be fulfilled
1465
+ */
1466
+ async request(t, n) {
1467
+ try {
1468
+ return await this._request(t, n);
1469
+ } catch (r) {
1470
+ if (r instanceof Error) {
1471
+ let s = {};
1472
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1473
+ const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1474
+ try {
1475
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1476
+ ` + o) : r.stack = o;
1477
+ } catch {
1478
+ }
1479
+ }
1480
+ throw r;
1481
+ }
1482
+ }
1483
+ _request(t, n) {
1484
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = I(this.defaults, n);
1485
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1486
+ r !== void 0 && te.assertOptions(r, {
1487
+ silentJSONParsing: U.transitional(U.boolean),
1488
+ forcedJSONParsing: U.transitional(U.boolean),
1489
+ clarifyTimeoutError: U.transitional(U.boolean)
1490
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1491
+ serialize: s
1492
+ } : te.assertOptions(s, {
1493
+ encode: U.function,
1494
+ serialize: U.function
1495
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), te.assertOptions(n, {
1496
+ baseUrl: U.spelling("baseURL"),
1497
+ withXsrfToken: U.spelling("withXSRFToken")
1498
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1499
+ let i = o && a.merge(
1500
+ o.common,
1501
+ o[n.method]
1502
+ );
1503
+ o && a.forEach(
1504
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1505
+ (d) => {
1506
+ delete o[d];
1507
+ }
1508
+ ), n.headers = T.concat(i, o);
1509
+ const c = [];
1510
+ let f = !0;
1511
+ this.interceptors.request.forEach(function(m) {
1512
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1513
+ });
1514
+ const l = [];
1515
+ this.interceptors.response.forEach(function(m) {
1516
+ l.push(m.fulfilled, m.rejected);
1517
+ });
1518
+ let u, h = 0, b;
1519
+ if (!f) {
1520
+ const d = [ze.bind(this), void 0];
1521
+ for (d.unshift(...c), d.push(...l), b = d.length, u = Promise.resolve(n); h < b; )
1522
+ u = u.then(d[h++], d[h++]);
1523
+ return u;
1524
+ }
1525
+ b = c.length;
1526
+ let S = n;
1527
+ for (; h < b; ) {
1528
+ const d = c[h++], m = c[h++];
1529
+ try {
1530
+ S = d(S);
1531
+ } catch (p) {
1532
+ m.call(this, p);
1533
+ break;
1534
+ }
1535
+ }
1536
+ try {
1537
+ u = ze.call(this, S);
1538
+ } catch (d) {
1539
+ return Promise.reject(d);
1540
+ }
1541
+ for (h = 0, b = l.length; h < b; )
1542
+ u = u.then(l[h++], l[h++]);
1543
+ return u;
1544
+ }
1545
+ getUri(t) {
1546
+ t = I(this.defaults, t);
1547
+ const n = lt(t.baseURL, t.url, t.allowAbsoluteUrls);
1548
+ return ot(n, t.params, t.paramsSerializer);
1549
+ }
1550
+ };
1551
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1552
+ j.prototype[t] = function(n, r) {
1553
+ return this.request(I(r || {}, {
1554
+ method: t,
1555
+ url: n,
1556
+ data: (r || {}).data
1557
+ }));
1558
+ };
1559
+ });
1560
+ a.forEach(["post", "put", "patch"], function(t) {
1561
+ function n(r) {
1562
+ return function(o, i, c) {
1563
+ return this.request(I(c || {}, {
1564
+ method: t,
1565
+ headers: r ? {
1566
+ "Content-Type": "multipart/form-data"
1567
+ } : {},
1568
+ url: o,
1569
+ data: i
1570
+ }));
1571
+ };
1572
+ }
1573
+ j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
1574
+ });
1575
+ let Xn = class mt {
1576
+ constructor(t) {
1577
+ if (typeof t != "function")
1578
+ throw new TypeError("executor must be a function.");
1579
+ let n;
1580
+ this.promise = new Promise(function(o) {
1581
+ n = o;
1582
+ });
1583
+ const r = this;
1584
+ this.promise.then((s) => {
1585
+ if (!r._listeners) return;
1586
+ let o = r._listeners.length;
1587
+ for (; o-- > 0; )
1588
+ r._listeners[o](s);
1589
+ r._listeners = null;
1590
+ }), this.promise.then = (s) => {
1591
+ let o;
1592
+ const i = new Promise((c) => {
1593
+ r.subscribe(c), o = c;
1594
+ }).then(s);
1595
+ return i.cancel = function() {
1596
+ r.unsubscribe(o);
1597
+ }, i;
1598
+ }, t(function(o, i, c) {
1599
+ r.reason || (r.reason = new M(o, i, c), n(r.reason));
1600
+ });
1601
+ }
1602
+ /**
1603
+ * Throws a `CanceledError` if cancellation has been requested.
1604
+ */
1605
+ throwIfRequested() {
1606
+ if (this.reason)
1607
+ throw this.reason;
1608
+ }
1609
+ /**
1610
+ * Subscribe to the cancel signal
1611
+ */
1612
+ subscribe(t) {
1613
+ if (this.reason) {
1614
+ t(this.reason);
1615
+ return;
1616
+ }
1617
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1618
+ }
1619
+ /**
1620
+ * Unsubscribe from the cancel signal
1621
+ */
1622
+ unsubscribe(t) {
1623
+ if (!this._listeners)
1624
+ return;
1625
+ const n = this._listeners.indexOf(t);
1626
+ n !== -1 && this._listeners.splice(n, 1);
1627
+ }
1628
+ toAbortSignal() {
1629
+ const t = new AbortController(), n = (r) => {
1630
+ t.abort(r);
1631
+ };
1632
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1633
+ }
1634
+ /**
1635
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1636
+ * cancels the `CancelToken`.
1637
+ */
1638
+ static source() {
1639
+ let t;
1640
+ return {
1641
+ token: new mt(function(s) {
1642
+ t = s;
1643
+ }),
1644
+ cancel: t
1645
+ };
1646
+ }
1647
+ };
1648
+ function Gn(e) {
1649
+ return function(n) {
1650
+ return e.apply(null, n);
1651
+ };
1652
+ }
1653
+ function Qn(e) {
1654
+ return a.isObject(e) && e.isAxiosError === !0;
1655
+ }
1656
+ const we = {
1657
+ Continue: 100,
1658
+ SwitchingProtocols: 101,
1659
+ Processing: 102,
1660
+ EarlyHints: 103,
1661
+ Ok: 200,
1662
+ Created: 201,
1663
+ Accepted: 202,
1664
+ NonAuthoritativeInformation: 203,
1665
+ NoContent: 204,
1666
+ ResetContent: 205,
1667
+ PartialContent: 206,
1668
+ MultiStatus: 207,
1669
+ AlreadyReported: 208,
1670
+ ImUsed: 226,
1671
+ MultipleChoices: 300,
1672
+ MovedPermanently: 301,
1673
+ Found: 302,
1674
+ SeeOther: 303,
1675
+ NotModified: 304,
1676
+ UseProxy: 305,
1677
+ Unused: 306,
1678
+ TemporaryRedirect: 307,
1679
+ PermanentRedirect: 308,
1680
+ BadRequest: 400,
1681
+ Unauthorized: 401,
1682
+ PaymentRequired: 402,
1683
+ Forbidden: 403,
1684
+ NotFound: 404,
1685
+ MethodNotAllowed: 405,
1686
+ NotAcceptable: 406,
1687
+ ProxyAuthenticationRequired: 407,
1688
+ RequestTimeout: 408,
1689
+ Conflict: 409,
1690
+ Gone: 410,
1691
+ LengthRequired: 411,
1692
+ PreconditionFailed: 412,
1693
+ PayloadTooLarge: 413,
1694
+ UriTooLong: 414,
1695
+ UnsupportedMediaType: 415,
1696
+ RangeNotSatisfiable: 416,
1697
+ ExpectationFailed: 417,
1698
+ ImATeapot: 418,
1699
+ MisdirectedRequest: 421,
1700
+ UnprocessableEntity: 422,
1701
+ Locked: 423,
1702
+ FailedDependency: 424,
1703
+ TooEarly: 425,
1704
+ UpgradeRequired: 426,
1705
+ PreconditionRequired: 428,
1706
+ TooManyRequests: 429,
1707
+ RequestHeaderFieldsTooLarge: 431,
1708
+ UnavailableForLegalReasons: 451,
1709
+ InternalServerError: 500,
1710
+ NotImplemented: 501,
1711
+ BadGateway: 502,
1712
+ ServiceUnavailable: 503,
1713
+ GatewayTimeout: 504,
1714
+ HttpVersionNotSupported: 505,
1715
+ VariantAlsoNegotiates: 506,
1716
+ InsufficientStorage: 507,
1717
+ LoopDetected: 508,
1718
+ NotExtended: 510,
1719
+ NetworkAuthenticationRequired: 511,
1720
+ WebServerIsDown: 521,
1721
+ ConnectionTimedOut: 522,
1722
+ OriginIsUnreachable: 523,
1723
+ TimeoutOccurred: 524,
1724
+ SslHandshakeFailed: 525,
1725
+ InvalidSslCertificate: 526
1726
+ };
1727
+ Object.entries(we).forEach(([e, t]) => {
1728
+ we[t] = e;
1729
+ });
1730
+ function yt(e) {
1731
+ const t = new j(e), n = We(j.prototype.request, t);
1732
+ return a.extend(n, j.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1733
+ return yt(I(e, s));
1734
+ }, n;
1735
+ }
1736
+ const w = yt(K);
1737
+ w.Axios = j;
1738
+ w.CanceledError = M;
1739
+ w.CancelToken = Xn;
1740
+ w.isCancel = ct;
1741
+ w.VERSION = ht;
1742
+ w.toFormData = ae;
1743
+ w.AxiosError = y;
1744
+ w.Cancel = w.CanceledError;
1745
+ w.all = function(t) {
1746
+ return Promise.all(t);
1747
+ };
1748
+ w.spread = Gn;
1749
+ w.isAxiosError = Qn;
1750
+ w.mergeConfig = I;
1751
+ w.AxiosHeaders = T;
1752
+ w.formToJSON = (e) => at(a.isHTMLForm(e) ? new FormData(e) : e);
1753
+ w.getAdapter = pt.getAdapter;
1754
+ w.HttpStatusCode = we;
1755
+ w.default = w;
1756
+ const {
1757
+ Axios: ur,
1758
+ AxiosError: Zn,
1759
+ CanceledError: lr,
1760
+ isCancel: fr,
1761
+ CancelToken: dr,
1762
+ VERSION: pr,
1763
+ all: hr,
1764
+ Cancel: mr,
1765
+ isAxiosError: yr,
1766
+ spread: br,
1767
+ toFormData: wr,
1768
+ AxiosHeaders: Er,
1769
+ HttpStatusCode: gr,
1770
+ formToJSON: Sr,
1771
+ getAdapter: Rr,
1772
+ mergeConfig: Or
1773
+ } = w;
1774
+ class Yn extends Error {
1775
+ constructor(t, n) {
1776
+ super(t), this.status = n, this.name = "ApiError";
1777
+ }
1778
+ }
1779
+ const bt = (e) => (t) => {
1780
+ var s;
1781
+ const n = ((s = re().sessionUser.value) == null ? void 0 : s.token) ?? St.token;
1782
+ if (!n) throw new Error("Invalid token");
1783
+ const r = w.create({
1784
+ baseURL: `${e}/${t}`,
1785
+ headers: {
1786
+ Authorization: `Bearer ${n}`
1787
+ },
1788
+ // NestJS @Query() reads repeated keys (key=a&key=b), not Axios default bracket notation (key[]=a).
1789
+ paramsSerializer: (o) => {
1790
+ const i = [];
1791
+ for (const [c, f] of Object.entries(o))
1792
+ if (f != null)
1793
+ if (Array.isArray(f))
1794
+ for (const l of f)
1795
+ i.push(`${encodeURIComponent(c)}=${encodeURIComponent(l)}`);
1796
+ else
1797
+ i.push(`${encodeURIComponent(c)}=${encodeURIComponent(String(f))}`);
1798
+ return i.join("&");
1799
+ }
1800
+ });
1801
+ return r.interceptors.response.use(
1802
+ (o) => o,
1803
+ async (o) => {
1804
+ var i, c;
1805
+ if (o instanceof Zn) {
1806
+ const f = (i = o.response) == null ? void 0 : i.data, l = (f == null ? void 0 : f.message) || (f == null ? void 0 : f.error) || `${o.message}` || `${o}`, u = ((c = o.response) == null ? void 0 : c.status) ?? 0;
1807
+ return Promise.reject(new Yn(l, u));
1808
+ }
1809
+ return Promise.reject(o);
1810
+ }
1811
+ ), r;
1812
+ }, er = (e) => {
1813
+ var n;
1814
+ const t = re();
1815
+ if (t.currentBusiness.value) {
1816
+ const r = `businesses/${(n = t.currentBusiness.value) == null ? void 0 : n.id}${e ? `/${e}` : ""}`;
1817
+ return Ve(r);
1818
+ } else
1819
+ throw new Error("Invalid business");
1820
+ }, Ar = () => {
1821
+ var o;
1822
+ const t = (o = re().currentCountry.value) == null ? void 0 : o.toLowerCase(), r = "feedmeapidev.com", s = !t || t === "my" ? `https://query-engine.${r}` : `https://query-engine.${t}.${r}`;
1823
+ return bt(s)("");
1824
+ }, Tr = () => bt("https://account.feedmedev.cc/api")(""), Cr = () => Ve("user/bypass/validate/");
1825
+ function tr(e) {
1826
+ return e.data;
1827
+ }
1828
+ const nr = {
1829
+ async readRestaurants() {
1830
+ return tr(await er().get("/hr-restaurants"));
1831
+ }
1832
+ }, rr = Et("restaurant", () => {
1833
+ const { currentBusiness: e } = re(), t = fe([]), n = fe(!1), r = fe(null);
1834
+ let s = null, o = null;
1835
+ async function i(c = !1) {
1836
+ var l, u;
1837
+ const f = ((l = e.value) == null ? void 0 : l._id) ?? ((u = e.value) == null ? void 0 : u.id) ?? null;
1838
+ if (!f) {
1839
+ t.value = [], r.value = null, s = null, o = null;
1840
+ return;
1841
+ }
1842
+ if (r.value !== f && (t.value = [], r.value = null, s = null, o = null), !(!c && r.value === f)) {
1843
+ if (!c && s && o === f)
1844
+ return await s;
1845
+ try {
1846
+ n.value = !0;
1847
+ const h = (async () => {
1848
+ t.value = await nr.readRestaurants(), r.value = f;
1849
+ })();
1850
+ s = h, o = f, await h;
1851
+ } finally {
1852
+ s = null, o = null, n.value = !1;
1853
+ }
1854
+ }
1855
+ }
1856
+ return {
1857
+ restaurants: t,
1858
+ isLoading: n,
1859
+ readRestaurants: i
1860
+ };
1861
+ }), xr = () => {
1862
+ const e = rr();
1863
+ return {
1864
+ ...e,
1865
+ ...gt(e)
1866
+ };
1867
+ };
1868
+ export {
1869
+ Yn as A,
1870
+ Cr as a,
1871
+ er as b,
1872
+ Tr as c,
1873
+ tr as g,
1874
+ Ar as q,
1875
+ xr as u
1876
+ };