@ozdao/prometheus-framework 0.0.87 → 0.0.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-300fcb55.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-afba007a.mjs +1944 -0
  3. package/dist/ButtonFollow-001c4a65.mjs +130 -0
  4. package/dist/ButtonFollow-48043cc7.js +1 -0
  5. package/dist/CardHeader-0677d446.js +1 -0
  6. package/dist/CardHeader-e361dada.mjs +96 -0
  7. package/dist/CardOrganization-51309400.js +1 -0
  8. package/dist/CardOrganization-bacc2ef6.mjs +202 -0
  9. package/dist/Feed-4b28adc5.mjs +423 -0
  10. package/dist/Feed-51e4e232.js +1 -0
  11. package/dist/Feed-5d8d5c21.js +1 -0
  12. package/dist/Feed-76b2997e.mjs +367 -0
  13. package/dist/Feed-dc8b66bf.mjs +367 -0
  14. package/dist/Feed-eeb63363.js +1 -0
  15. package/dist/IconEdit-3028a3b7.js +1 -0
  16. package/dist/IconEdit-8df23653.mjs +205 -0
  17. package/dist/Image-30f04604.js +9 -0
  18. package/dist/Image-6c7584f5.mjs +477 -0
  19. package/dist/Image-6ec294f3.mjs +477 -0
  20. package/dist/Image-9a870c88.js +9 -0
  21. package/dist/PlaceholderUserpic-10fd9026.js +1 -0
  22. package/dist/PlaceholderUserpic-eb9820ce.mjs +28 -0
  23. package/dist/Popup-7c331e1c.js +1 -0
  24. package/dist/Popup-bdf043ba.mjs +76 -0
  25. package/dist/Product-1724d88d.mjs +837 -0
  26. package/dist/Product-a94d8b65.js +7 -0
  27. package/dist/Product-b233e2a3.js +7 -0
  28. package/dist/Product-eb00f35e.mjs +837 -0
  29. package/dist/ProductEdit-57484f1e.mjs +349 -0
  30. package/dist/ProductEdit-61413d02.mjs +349 -0
  31. package/dist/ProductEdit-ef301baa.js +1 -0
  32. package/dist/ProductEdit-fca68ff9.js +1 -0
  33. package/dist/ProfileBlogposts-6704a38c.js +1 -0
  34. package/dist/ProfileBlogposts-775b1cfa.mjs +63 -0
  35. package/dist/ProfileComments-175e42da.js +1 -0
  36. package/dist/ProfileComments-fd7d66bf.mjs +43 -0
  37. package/dist/ProfileEvents-1cfe6858.mjs +55 -0
  38. package/dist/ProfileEvents-4f2a5f00.js +1 -0
  39. package/dist/ProfileEvents-7a51a9e6.mjs +55 -0
  40. package/dist/ProfileEvents-d8e16509.js +1 -0
  41. package/dist/ProfileLikes-20a8a3c9.mjs +43 -0
  42. package/dist/ProfileLikes-b3b1350a.js +1 -0
  43. package/dist/ProfileOrganizations-4b866823.mjs +211 -0
  44. package/dist/ProfileOrganizations-6d3a43e4.js +1 -0
  45. package/dist/Publics-0e44c61e.mjs +122 -0
  46. package/dist/Publics-4e1c14fc.js +1 -0
  47. package/dist/Tab-a243605d.mjs +46 -0
  48. package/dist/UploadImage-6e312c46.mjs +83 -0
  49. package/dist/UploadImage-9e7e7468.js +1 -0
  50. package/dist/auth-2bc18d1e.js +8 -0
  51. package/dist/auth-fefd15a3.mjs +1503 -0
  52. package/dist/auth.client.cjs +1 -1
  53. package/dist/auth.client.js +5 -5
  54. package/dist/auth.validation-4a617c0b.mjs +20 -0
  55. package/dist/auth.validation-78a90fed.js +1 -0
  56. package/dist/community.client.cjs +1 -1
  57. package/dist/community.client.js +206 -222
  58. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  59. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  60. package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
  61. package/dist/events.client.cjs +1 -1
  62. package/dist/events.client.js +332 -312
  63. package/dist/events.server.js +77 -0
  64. package/dist/events.server.mjs +77 -0
  65. package/dist/inputs.validation-14e8e01f.mjs +93 -0
  66. package/dist/main.css +1 -1
  67. package/dist/organizations-1581c013.mjs +121 -0
  68. package/dist/organizations-c455dad7.js +1 -0
  69. package/dist/organizations.client-040ec107.js +3 -0
  70. package/dist/organizations.client-686845be.mjs +3179 -0
  71. package/dist/organizations.client-7937e180.mjs +3037 -0
  72. package/dist/organizations.client-99bfc474.js +3 -0
  73. package/dist/organizations.client.cjs +1 -1
  74. package/dist/organizations.client.js +39 -39
  75. package/dist/organizations.server.js +7 -3
  76. package/dist/organizations.server.mjs +7 -3
  77. package/dist/prometheus-framework.cjs.js +1 -1
  78. package/dist/prometheus-framework.es.js +3 -2
  79. package/dist/style.css +1 -1
  80. package/dist/users.client.cjs +1 -1
  81. package/dist/users.client.js +265 -256
  82. package/dist/users.server.js +2 -2
  83. package/dist/users.server.mjs +2 -2
  84. package/package.json +1 -1
  85. package/src/components/Field/Field.vue +2 -1
  86. package/src/modules/community/components/pages/CreateBlogPost.vue +2 -1
  87. package/src/modules/events/components/blocks/CardEvent.vue +1 -1
  88. package/src/modules/events/components/pages/EditEvent.vue +9 -3
  89. package/src/modules/events/components/pages/Event.vue +43 -4
  90. package/src/modules/events/middlewares/server/index.js +10 -0
  91. package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
  92. package/src/modules/events/routes/events.routes.js +14 -1
  93. package/src/modules/organizations/components/blocks/Socials.vue +16 -3
  94. package/src/modules/organizations/components/pages/OrganizationEdit.vue +39 -15
  95. package/src/modules/organizations/components/sections/DetailsTab.vue +13 -9
  96. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  97. package/src/modules/organizations/models/organization.model.js +6 -2
  98. package/src/modules/organizations/store/organizations.js +2 -2
  99. package/src/modules/users/components/pages/Profile.vue +26 -11
  100. package/src/modules/users/components/pages/ProfileEdit.vue +28 -10
  101. package/src/modules/users/models/user.model.js +2 -2
  102. package/src/modules/users/store/users.js +1 -2
@@ -0,0 +1,1503 @@
1
+ import { ref as H, openBlock as C, createElementBlock as _, Fragment as At, createElementVNode as h, normalizeClass as Nt, toDisplayString as ge, createCommentVNode as j, createVNode as J, Transition as V, withCtx as W, withModifiers as Tt, renderSlot as Pt, createTextVNode as M, reactive as at, watch as st } from "vue";
2
+ import { s as P } from "./globals-96ba60e4.mjs";
3
+ const Dt = (e, t) => {
4
+ const r = e.__vccOpts || e;
5
+ for (const [s, n] of t)
6
+ r[s] = n;
7
+ return r;
8
+ }, Ut = {
9
+ key: 0,
10
+ class: "t-transp mn-r-small"
11
+ }, Bt = { class: "w-100" }, kt = ["type", "value", "placeholder"], Lt = ["value", "placeholder"], jt = {
12
+ key: 0,
13
+ class: "mn-t-thin mn-thin mn-b-thin invalid-feedback"
14
+ }, qt = {
15
+ __name: "Field",
16
+ props: {
17
+ label: null,
18
+ type: "text",
19
+ placeholder: "Enter something here",
20
+ field: null,
21
+ validation: !1,
22
+ disabled: !1
23
+ },
24
+ emits: ["update:field", "focus", "blur"],
25
+ setup(e, { emit: t }) {
26
+ const s = H(e.field);
27
+ return (n, a) => (C(), _(At, null, [
28
+ h("div", {
29
+ class: Nt([[n.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
30
+ }, [
31
+ e.label ? (C(), _("div", Ut, [
32
+ h("span", null, ge(e.label), 1)
33
+ ])) : j("", !0),
34
+ h("div", Bt, [
35
+ e.type !== "textarea" ? (C(), _("input", {
36
+ key: 0,
37
+ onInput: a[0] || (a[0] = (i) => s.value = t("update:field", i.target.value)),
38
+ onFocus: a[1] || (a[1] = (i) => t("focus", i)),
39
+ onBlur: a[2] || (a[2] = (i) => t("blur", i)),
40
+ type: e.type,
41
+ class: "w-100",
42
+ value: e.field,
43
+ placeholder: e.placeholder
44
+ }, null, 40, kt)) : (C(), _("textarea", {
45
+ key: 1,
46
+ onInput: a[3] || (a[3] = (i) => s.value = t("update:field", i.target.value)),
47
+ onFocus: a[4] || (a[4] = (i) => t("focus", i)),
48
+ onBlur: a[5] || (a[5] = (i) => t("blur", i)),
49
+ class: "w-100",
50
+ value: e.field,
51
+ placeholder: e.placeholder
52
+ }, null, 40, Lt))
53
+ ])
54
+ ], 2),
55
+ J(V, { name: "fade" }, {
56
+ default: W(() => [
57
+ e.validation ? (C(), _("div", jt, " * " + ge(e.validation.message), 1)) : j("", !0)
58
+ ]),
59
+ _: 1
60
+ })
61
+ ], 64));
62
+ }
63
+ }, fn = /* @__PURE__ */ Dt(qt, [["__scopeId", "data-v-deecbd0c"]]);
64
+ const Ft = ["onClick", "disabled"], It = { key: 0 }, $t = {
65
+ key: 0,
66
+ class: "loading"
67
+ }, Mt = /* @__PURE__ */ h("span", null, [
68
+ /* @__PURE__ */ h("svg", {
69
+ class: "i-small",
70
+ width: "135",
71
+ height: "140",
72
+ viewBox: "0 0 135 140",
73
+ xmlns: "http://www.w3.org/2000/svg",
74
+ fill: "#fff"
75
+ }, [
76
+ /* @__PURE__ */ h("rect", {
77
+ y: "10",
78
+ width: "15",
79
+ height: "120",
80
+ rx: "6"
81
+ }, [
82
+ /* @__PURE__ */ h("animate", {
83
+ attributeName: "height",
84
+ begin: "0.5s",
85
+ dur: "1s",
86
+ values: "120;110;100;90;80;70;60;50;40;140;120",
87
+ calcMode: "linear",
88
+ repeatCount: "indefinite"
89
+ }),
90
+ /* @__PURE__ */ M(),
91
+ /* @__PURE__ */ h("animate", {
92
+ attributeName: "y",
93
+ begin: "0.5s",
94
+ dur: "1s",
95
+ values: "10;15;20;25;30;35;40;45;50;0;10",
96
+ calcMode: "linear",
97
+ repeatCount: "indefinite"
98
+ })
99
+ ]),
100
+ /* @__PURE__ */ h("rect", {
101
+ x: "30",
102
+ y: "10",
103
+ width: "15",
104
+ height: "120",
105
+ rx: "6"
106
+ }, [
107
+ /* @__PURE__ */ h("animate", {
108
+ attributeName: "height",
109
+ begin: "0.25s",
110
+ dur: "1s",
111
+ values: "120;110;100;90;80;70;60;50;40;140;120",
112
+ calcMode: "linear",
113
+ repeatCount: "indefinite"
114
+ }),
115
+ /* @__PURE__ */ M(),
116
+ /* @__PURE__ */ h("animate", {
117
+ attributeName: "y",
118
+ begin: "0.25s",
119
+ dur: "1s",
120
+ values: "10;15;20;25;30;35;40;45;50;0;10",
121
+ calcMode: "linear",
122
+ repeatCount: "indefinite"
123
+ })
124
+ ]),
125
+ /* @__PURE__ */ h("rect", {
126
+ x: "60",
127
+ width: "15",
128
+ height: "140",
129
+ rx: "6"
130
+ }, [
131
+ /* @__PURE__ */ h("animate", {
132
+ attributeName: "height",
133
+ begin: "0s",
134
+ dur: "1s",
135
+ values: "120;110;100;90;80;70;60;50;40;140;120",
136
+ calcMode: "linear",
137
+ repeatCount: "indefinite"
138
+ }),
139
+ /* @__PURE__ */ M(),
140
+ /* @__PURE__ */ h("animate", {
141
+ attributeName: "y",
142
+ begin: "0s",
143
+ dur: "1s",
144
+ values: "10;15;20;25;30;35;40;45;50;0;10",
145
+ calcMode: "linear",
146
+ repeatCount: "indefinite"
147
+ })
148
+ ]),
149
+ /* @__PURE__ */ h("rect", {
150
+ x: "90",
151
+ y: "10",
152
+ width: "15",
153
+ height: "120",
154
+ rx: "6"
155
+ }, [
156
+ /* @__PURE__ */ h("animate", {
157
+ attributeName: "height",
158
+ begin: "0.25s",
159
+ dur: "1s",
160
+ values: "120;110;100;90;80;70;60;50;40;140;120",
161
+ calcMode: "linear",
162
+ repeatCount: "indefinite"
163
+ }),
164
+ /* @__PURE__ */ M(),
165
+ /* @__PURE__ */ h("animate", {
166
+ attributeName: "y",
167
+ begin: "0.25s",
168
+ dur: "1s",
169
+ values: "10;15;20;25;30;35;40;45;50;0;10",
170
+ calcMode: "linear",
171
+ repeatCount: "indefinite"
172
+ })
173
+ ]),
174
+ /* @__PURE__ */ h("rect", {
175
+ x: "120",
176
+ y: "10",
177
+ width: "15",
178
+ height: "120",
179
+ rx: "6"
180
+ }, [
181
+ /* @__PURE__ */ h("animate", {
182
+ attributeName: "height",
183
+ begin: "0.5s",
184
+ dur: "1s",
185
+ values: "120;110;100;90;80;70;60;50;40;140;120",
186
+ calcMode: "linear",
187
+ repeatCount: "indefinite"
188
+ }),
189
+ /* @__PURE__ */ M(),
190
+ /* @__PURE__ */ h("animate", {
191
+ attributeName: "y",
192
+ begin: "0.5s",
193
+ dur: "1s",
194
+ values: "10;15;20;25;30;35;40;45;50;0;10",
195
+ calcMode: "linear",
196
+ repeatCount: "indefinite"
197
+ })
198
+ ])
199
+ ])
200
+ ], -1), Ht = [
201
+ Mt
202
+ ], Jt = {
203
+ key: 0,
204
+ class: "h4 loading"
205
+ }, Vt = /* @__PURE__ */ h("span", { class: "p-small t-white" }, "✔", -1), Wt = [
206
+ Vt
207
+ ], zt = {
208
+ key: 0,
209
+ class: "error"
210
+ }, dn = {
211
+ __name: "Button",
212
+ props: {
213
+ submit: {
214
+ type: Function,
215
+ default: async () => {
216
+ console.log("Button click.");
217
+ }
218
+ },
219
+ callback: {
220
+ type: Function,
221
+ default: async () => {
222
+ console.log("Button callback.");
223
+ }
224
+ },
225
+ callbackDelay: {
226
+ type: Number,
227
+ default: 750
228
+ },
229
+ validation: {
230
+ type: Boolean,
231
+ default: !1
232
+ }
233
+ },
234
+ setup(e) {
235
+ const t = e, r = H(null), s = H(null), n = H(!1), a = H(!1);
236
+ async function i() {
237
+ r.value.style["pointer-events"] = "none", s.value = null, n.value = !0;
238
+ try {
239
+ await t.submit(), r.value.classList.replace("bg-main", "bg-light-main"), n.value = !1, a.value = !0, setTimeout(() => {
240
+ r.value && (r.value.classList.replace("bg-light-main", "bg-main"), r.value.style.pointerEvents = "auto", n.value = !1, a.value = !1, s.value = null);
241
+ }, 500), t.callback && setTimeout(() => t.callback(), t.callbackDelay);
242
+ } catch {
243
+ r.value.classList.replace("bg-main", "bg-fourth-nano"), s.value = "❌", setTimeout(() => {
244
+ r.value.classList.replace("bg-fourth-nano", "bg-main"), r.value.style.pointerEvents = "auto", n.value = !1, a.value = !1, s.value = null;
245
+ }, 1330);
246
+ }
247
+ }
248
+ return (o, l) => (C(), _("button", {
249
+ onClick: Tt(i, ["stop"]),
250
+ disabled: e.validation,
251
+ ref_key: "button",
252
+ ref: r,
253
+ class: "w-100 bg-main button"
254
+ }, [
255
+ J(V, {
256
+ mode: "out-in",
257
+ name: "fadeIn"
258
+ }, {
259
+ default: W(() => [
260
+ !n.value && !s.value && !a.value ? (C(), _("span", It, [
261
+ Pt(o.$slots, "default")
262
+ ])) : j("", !0)
263
+ ]),
264
+ _: 3
265
+ }),
266
+ J(V, {
267
+ mode: "out-in",
268
+ name: "fadeIn"
269
+ }, {
270
+ default: W(() => [
271
+ n.value && !s.value ? (C(), _("div", $t, Ht)) : j("", !0)
272
+ ]),
273
+ _: 1
274
+ }),
275
+ J(V, {
276
+ mode: "out-in",
277
+ name: "fadeIn"
278
+ }, {
279
+ default: W(() => [
280
+ a.value ? (C(), _("div", Jt, Wt)) : j("", !0)
281
+ ]),
282
+ _: 1
283
+ }),
284
+ J(V, {
285
+ mode: "out-in",
286
+ name: "fadeIn"
287
+ }, {
288
+ default: W(() => [
289
+ s.value ? (C(), _("div", zt, [
290
+ h("span", null, ge(s.value), 1)
291
+ ])) : j("", !0)
292
+ ]),
293
+ _: 1
294
+ })
295
+ ], 8, Ft));
296
+ }
297
+ };
298
+ function it(e) {
299
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
300
+ }
301
+ var Ce = { exports: {} }, ot = function(t, r) {
302
+ return function() {
303
+ for (var n = new Array(arguments.length), a = 0; a < n.length; a++)
304
+ n[a] = arguments[a];
305
+ return t.apply(r, n);
306
+ };
307
+ }, Xt = ot, _e = Object.prototype.toString, xe = function(e) {
308
+ return function(t) {
309
+ var r = _e.call(t);
310
+ return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
311
+ };
312
+ }(/* @__PURE__ */ Object.create(null));
313
+ function D(e) {
314
+ return e = e.toLowerCase(), function(r) {
315
+ return xe(r) === e;
316
+ };
317
+ }
318
+ function Se(e) {
319
+ return Array.isArray(e);
320
+ }
321
+ function Y(e) {
322
+ return typeof e > "u";
323
+ }
324
+ function Kt(e) {
325
+ return e !== null && !Y(e) && e.constructor !== null && !Y(e.constructor) && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
326
+ }
327
+ var ut = D("ArrayBuffer");
328
+ function Qt(e) {
329
+ var t;
330
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ut(e.buffer), t;
331
+ }
332
+ function Yt(e) {
333
+ return typeof e == "string";
334
+ }
335
+ function Gt(e) {
336
+ return typeof e == "number";
337
+ }
338
+ function lt(e) {
339
+ return e !== null && typeof e == "object";
340
+ }
341
+ function K(e) {
342
+ if (xe(e) !== "object")
343
+ return !1;
344
+ var t = Object.getPrototypeOf(e);
345
+ return t === null || t === Object.prototype;
346
+ }
347
+ var Zt = D("Date"), er = D("File"), tr = D("Blob"), rr = D("FileList");
348
+ function Ae(e) {
349
+ return _e.call(e) === "[object Function]";
350
+ }
351
+ function nr(e) {
352
+ return lt(e) && Ae(e.pipe);
353
+ }
354
+ function ar(e) {
355
+ var t = "[object FormData]";
356
+ return e && (typeof FormData == "function" && e instanceof FormData || _e.call(e) === t || Ae(e.toString) && e.toString() === t);
357
+ }
358
+ var sr = D("URLSearchParams");
359
+ function ir(e) {
360
+ return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
361
+ }
362
+ function or() {
363
+ return typeof navigator < "u" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS") ? !1 : typeof window < "u" && typeof document < "u";
364
+ }
365
+ function Ne(e, t) {
366
+ if (!(e === null || typeof e > "u"))
367
+ if (typeof e != "object" && (e = [e]), Se(e))
368
+ for (var r = 0, s = e.length; r < s; r++)
369
+ t.call(null, e[r], r, e);
370
+ else
371
+ for (var n in e)
372
+ Object.prototype.hasOwnProperty.call(e, n) && t.call(null, e[n], n, e);
373
+ }
374
+ function Oe() {
375
+ var e = {};
376
+ function t(n, a) {
377
+ K(e[a]) && K(n) ? e[a] = Oe(e[a], n) : K(n) ? e[a] = Oe({}, n) : Se(n) ? e[a] = n.slice() : e[a] = n;
378
+ }
379
+ for (var r = 0, s = arguments.length; r < s; r++)
380
+ Ne(arguments[r], t);
381
+ return e;
382
+ }
383
+ function ur(e, t, r) {
384
+ return Ne(t, function(n, a) {
385
+ r && typeof n == "function" ? e[a] = Xt(n, r) : e[a] = n;
386
+ }), e;
387
+ }
388
+ function lr(e) {
389
+ return e.charCodeAt(0) === 65279 && (e = e.slice(1)), e;
390
+ }
391
+ function cr(e, t, r, s) {
392
+ e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, r && Object.assign(e.prototype, r);
393
+ }
394
+ function fr(e, t, r) {
395
+ var s, n, a, i = {};
396
+ t = t || {};
397
+ do {
398
+ for (s = Object.getOwnPropertyNames(e), n = s.length; n-- > 0; )
399
+ a = s[n], i[a] || (t[a] = e[a], i[a] = !0);
400
+ e = Object.getPrototypeOf(e);
401
+ } while (e && (!r || r(e, t)) && e !== Object.prototype);
402
+ return t;
403
+ }
404
+ function dr(e, t, r) {
405
+ e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
406
+ var s = e.indexOf(t, r);
407
+ return s !== -1 && s === r;
408
+ }
409
+ function pr(e) {
410
+ if (!e)
411
+ return null;
412
+ var t = e.length;
413
+ if (Y(t))
414
+ return null;
415
+ for (var r = new Array(t); t-- > 0; )
416
+ r[t] = e[t];
417
+ return r;
418
+ }
419
+ var hr = function(e) {
420
+ return function(t) {
421
+ return e && t instanceof e;
422
+ };
423
+ }(typeof Uint8Array < "u" && Object.getPrototypeOf(Uint8Array)), b = {
424
+ isArray: Se,
425
+ isArrayBuffer: ut,
426
+ isBuffer: Kt,
427
+ isFormData: ar,
428
+ isArrayBufferView: Qt,
429
+ isString: Yt,
430
+ isNumber: Gt,
431
+ isObject: lt,
432
+ isPlainObject: K,
433
+ isUndefined: Y,
434
+ isDate: Zt,
435
+ isFile: er,
436
+ isBlob: tr,
437
+ isFunction: Ae,
438
+ isStream: nr,
439
+ isURLSearchParams: sr,
440
+ isStandardBrowserEnv: or,
441
+ forEach: Ne,
442
+ merge: Oe,
443
+ extend: ur,
444
+ trim: ir,
445
+ stripBOM: lr,
446
+ inherits: cr,
447
+ toFlatObject: fr,
448
+ kindOf: xe,
449
+ kindOfTest: D,
450
+ endsWith: dr,
451
+ toArray: pr,
452
+ isTypedArray: hr,
453
+ isFileList: rr
454
+ }, k = b;
455
+ function ke(e) {
456
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
457
+ }
458
+ var ct = function(t, r, s) {
459
+ if (!r)
460
+ return t;
461
+ var n;
462
+ if (s)
463
+ n = s(r);
464
+ else if (k.isURLSearchParams(r))
465
+ n = r.toString();
466
+ else {
467
+ var a = [];
468
+ k.forEach(r, function(l, f) {
469
+ l === null || typeof l > "u" || (k.isArray(l) ? f = f + "[]" : l = [l], k.forEach(l, function(d) {
470
+ k.isDate(d) ? d = d.toISOString() : k.isObject(d) && (d = JSON.stringify(d)), a.push(ke(f) + "=" + ke(d));
471
+ }));
472
+ }), n = a.join("&");
473
+ }
474
+ if (n) {
475
+ var i = t.indexOf("#");
476
+ i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + n;
477
+ }
478
+ return t;
479
+ }, vr = b;
480
+ function Z() {
481
+ this.handlers = [];
482
+ }
483
+ Z.prototype.use = function(t, r, s) {
484
+ return this.handlers.push({
485
+ fulfilled: t,
486
+ rejected: r,
487
+ synchronous: s ? s.synchronous : !1,
488
+ runWhen: s ? s.runWhen : null
489
+ }), this.handlers.length - 1;
490
+ };
491
+ Z.prototype.eject = function(t) {
492
+ this.handlers[t] && (this.handlers[t] = null);
493
+ };
494
+ Z.prototype.forEach = function(t) {
495
+ vr.forEach(this.handlers, function(s) {
496
+ s !== null && t(s);
497
+ });
498
+ };
499
+ var mr = Z, yr = b, br = function(t, r) {
500
+ yr.forEach(t, function(n, a) {
501
+ a !== r && a.toUpperCase() === r.toUpperCase() && (t[r] = n, delete t[a]);
502
+ });
503
+ }, ft = b;
504
+ function q(e, t, r, s, n) {
505
+ Error.call(this), this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), s && (this.request = s), n && (this.response = n);
506
+ }
507
+ ft.inherits(q, Error, {
508
+ toJSON: function() {
509
+ return {
510
+ // Standard
511
+ message: this.message,
512
+ name: this.name,
513
+ // Microsoft
514
+ description: this.description,
515
+ number: this.number,
516
+ // Mozilla
517
+ fileName: this.fileName,
518
+ lineNumber: this.lineNumber,
519
+ columnNumber: this.columnNumber,
520
+ stack: this.stack,
521
+ // Axios
522
+ config: this.config,
523
+ code: this.code,
524
+ status: this.response && this.response.status ? this.response.status : null
525
+ };
526
+ }
527
+ });
528
+ var dt = q.prototype, pt = {};
529
+ [
530
+ "ERR_BAD_OPTION_VALUE",
531
+ "ERR_BAD_OPTION",
532
+ "ECONNABORTED",
533
+ "ETIMEDOUT",
534
+ "ERR_NETWORK",
535
+ "ERR_FR_TOO_MANY_REDIRECTS",
536
+ "ERR_DEPRECATED",
537
+ "ERR_BAD_RESPONSE",
538
+ "ERR_BAD_REQUEST",
539
+ "ERR_CANCELED"
540
+ // eslint-disable-next-line func-names
541
+ ].forEach(function(e) {
542
+ pt[e] = { value: e };
543
+ });
544
+ Object.defineProperties(q, pt);
545
+ Object.defineProperty(dt, "isAxiosError", { value: !0 });
546
+ q.from = function(e, t, r, s, n, a) {
547
+ var i = Object.create(dt);
548
+ return ft.toFlatObject(e, i, function(l) {
549
+ return l !== Error.prototype;
550
+ }), q.call(i, e.message, t, r, s, n), i.name = e.name, a && Object.assign(i, a), i;
551
+ };
552
+ var I = q, ht = {
553
+ silentJSONParsing: !0,
554
+ forcedJSONParsing: !0,
555
+ clarifyTimeoutError: !1
556
+ }, O = b;
557
+ function wr(e, t) {
558
+ t = t || new FormData();
559
+ var r = [];
560
+ function s(a) {
561
+ return a === null ? "" : O.isDate(a) ? a.toISOString() : O.isArrayBuffer(a) || O.isTypedArray(a) ? typeof Blob == "function" ? new Blob([a]) : Buffer.from(a) : a;
562
+ }
563
+ function n(a, i) {
564
+ if (O.isPlainObject(a) || O.isArray(a)) {
565
+ if (r.indexOf(a) !== -1)
566
+ throw Error("Circular reference detected in " + i);
567
+ r.push(a), O.forEach(a, function(l, f) {
568
+ if (!O.isUndefined(l)) {
569
+ var c = i ? i + "." + f : f, d;
570
+ if (l && !i && typeof l == "object") {
571
+ if (O.endsWith(f, "{}"))
572
+ l = JSON.stringify(l);
573
+ else if (O.endsWith(f, "[]") && (d = O.toArray(l))) {
574
+ d.forEach(function(u) {
575
+ !O.isUndefined(u) && t.append(c, s(u));
576
+ });
577
+ return;
578
+ }
579
+ }
580
+ n(l, c);
581
+ }
582
+ }), r.pop();
583
+ } else
584
+ t.append(i, s(a));
585
+ }
586
+ return n(e), t;
587
+ }
588
+ var vt = wr, ie, Le;
589
+ function Er() {
590
+ if (Le)
591
+ return ie;
592
+ Le = 1;
593
+ var e = I;
594
+ return ie = function(r, s, n) {
595
+ var a = n.config.validateStatus;
596
+ !n.status || !a || a(n.status) ? r(n) : s(new e(
597
+ "Request failed with status code " + n.status,
598
+ [e.ERR_BAD_REQUEST, e.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
599
+ n.config,
600
+ n.request,
601
+ n
602
+ ));
603
+ }, ie;
604
+ }
605
+ var oe, je;
606
+ function Rr() {
607
+ if (je)
608
+ return oe;
609
+ je = 1;
610
+ var e = b;
611
+ return oe = e.isStandardBrowserEnv() ? (
612
+ // Standard browser envs support document.cookie
613
+ function() {
614
+ return {
615
+ write: function(s, n, a, i, o, l) {
616
+ var f = [];
617
+ f.push(s + "=" + encodeURIComponent(n)), e.isNumber(a) && f.push("expires=" + new Date(a).toGMTString()), e.isString(i) && f.push("path=" + i), e.isString(o) && f.push("domain=" + o), l === !0 && f.push("secure"), document.cookie = f.join("; ");
618
+ },
619
+ read: function(s) {
620
+ var n = document.cookie.match(new RegExp("(^|;\\s*)(" + s + ")=([^;]*)"));
621
+ return n ? decodeURIComponent(n[3]) : null;
622
+ },
623
+ remove: function(s) {
624
+ this.write(s, "", Date.now() - 864e5);
625
+ }
626
+ };
627
+ }()
628
+ ) : (
629
+ // Non standard browser env (web workers, react-native) lack needed support.
630
+ function() {
631
+ return {
632
+ write: function() {
633
+ },
634
+ read: function() {
635
+ return null;
636
+ },
637
+ remove: function() {
638
+ }
639
+ };
640
+ }()
641
+ ), oe;
642
+ }
643
+ var gr = function(t) {
644
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
645
+ }, Or = function(t, r) {
646
+ return r ? t.replace(/\/+$/, "") + "/" + r.replace(/^\/+/, "") : t;
647
+ }, Cr = gr, _r = Or, mt = function(t, r) {
648
+ return t && !Cr(r) ? _r(t, r) : r;
649
+ }, ue, qe;
650
+ function xr() {
651
+ if (qe)
652
+ return ue;
653
+ qe = 1;
654
+ var e = b, t = [
655
+ "age",
656
+ "authorization",
657
+ "content-length",
658
+ "content-type",
659
+ "etag",
660
+ "expires",
661
+ "from",
662
+ "host",
663
+ "if-modified-since",
664
+ "if-unmodified-since",
665
+ "last-modified",
666
+ "location",
667
+ "max-forwards",
668
+ "proxy-authorization",
669
+ "referer",
670
+ "retry-after",
671
+ "user-agent"
672
+ ];
673
+ return ue = function(s) {
674
+ var n = {}, a, i, o;
675
+ return s && e.forEach(s.split(`
676
+ `), function(f) {
677
+ if (o = f.indexOf(":"), a = e.trim(f.substr(0, o)).toLowerCase(), i = e.trim(f.substr(o + 1)), a) {
678
+ if (n[a] && t.indexOf(a) >= 0)
679
+ return;
680
+ a === "set-cookie" ? n[a] = (n[a] ? n[a] : []).concat([i]) : n[a] = n[a] ? n[a] + ", " + i : i;
681
+ }
682
+ }), n;
683
+ }, ue;
684
+ }
685
+ var le, Fe;
686
+ function Sr() {
687
+ if (Fe)
688
+ return le;
689
+ Fe = 1;
690
+ var e = b;
691
+ return le = e.isStandardBrowserEnv() ? (
692
+ // Standard browser envs have full support of the APIs needed to test
693
+ // whether the request URL is of the same origin as current location.
694
+ function() {
695
+ var r = /(msie|trident)/i.test(navigator.userAgent), s = document.createElement("a"), n;
696
+ function a(i) {
697
+ var o = i;
698
+ return r && (s.setAttribute("href", o), o = s.href), s.setAttribute("href", o), {
699
+ href: s.href,
700
+ protocol: s.protocol ? s.protocol.replace(/:$/, "") : "",
701
+ host: s.host,
702
+ search: s.search ? s.search.replace(/^\?/, "") : "",
703
+ hash: s.hash ? s.hash.replace(/^#/, "") : "",
704
+ hostname: s.hostname,
705
+ port: s.port,
706
+ pathname: s.pathname.charAt(0) === "/" ? s.pathname : "/" + s.pathname
707
+ };
708
+ }
709
+ return n = a(window.location.href), function(o) {
710
+ var l = e.isString(o) ? a(o) : o;
711
+ return l.protocol === n.protocol && l.host === n.host;
712
+ };
713
+ }()
714
+ ) : (
715
+ // Non standard browser envs (web workers, react-native) lack needed support.
716
+ function() {
717
+ return function() {
718
+ return !0;
719
+ };
720
+ }()
721
+ ), le;
722
+ }
723
+ var ce, Ie;
724
+ function ee() {
725
+ if (Ie)
726
+ return ce;
727
+ Ie = 1;
728
+ var e = I, t = b;
729
+ function r(s) {
730
+ e.call(this, s ?? "canceled", e.ERR_CANCELED), this.name = "CanceledError";
731
+ }
732
+ return t.inherits(r, e, {
733
+ __CANCEL__: !0
734
+ }), ce = r, ce;
735
+ }
736
+ var fe, $e;
737
+ function Ar() {
738
+ return $e || ($e = 1, fe = function(t) {
739
+ var r = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
740
+ return r && r[1] || "";
741
+ }), fe;
742
+ }
743
+ var de, Me;
744
+ function He() {
745
+ if (Me)
746
+ return de;
747
+ Me = 1;
748
+ var e = b, t = Er(), r = Rr(), s = ct, n = mt, a = xr(), i = Sr(), o = ht, l = I, f = ee(), c = Ar();
749
+ return de = function(u) {
750
+ return new Promise(function(x, y) {
751
+ var S = u.data, N = u.headers, $ = u.responseType, U;
752
+ function De() {
753
+ u.cancelToken && u.cancelToken.unsubscribe(U), u.signal && u.signal.removeEventListener("abort", U);
754
+ }
755
+ e.isFormData(S) && e.isStandardBrowserEnv() && delete N["Content-Type"];
756
+ var p = new XMLHttpRequest();
757
+ if (u.auth) {
758
+ var _t = u.auth.username || "", xt = u.auth.password ? unescape(encodeURIComponent(u.auth.password)) : "";
759
+ N.Authorization = "Basic " + btoa(_t + ":" + xt);
760
+ }
761
+ var ne = n(u.baseURL, u.url);
762
+ p.open(u.method.toUpperCase(), s(ne, u.params, u.paramsSerializer), !0), p.timeout = u.timeout;
763
+ function Ue() {
764
+ if (p) {
765
+ var g = "getAllResponseHeaders" in p ? a(p.getAllResponseHeaders()) : null, B = !$ || $ === "text" || $ === "json" ? p.responseText : p.response, T = {
766
+ data: B,
767
+ status: p.status,
768
+ statusText: p.statusText,
769
+ headers: g,
770
+ config: u,
771
+ request: p
772
+ };
773
+ t(function(se) {
774
+ x(se), De();
775
+ }, function(se) {
776
+ y(se), De();
777
+ }, T), p = null;
778
+ }
779
+ }
780
+ if ("onloadend" in p ? p.onloadend = Ue : p.onreadystatechange = function() {
781
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(Ue);
782
+ }, p.onabort = function() {
783
+ p && (y(new l("Request aborted", l.ECONNABORTED, u, p)), p = null);
784
+ }, p.onerror = function() {
785
+ y(new l("Network Error", l.ERR_NETWORK, u, p, p)), p = null;
786
+ }, p.ontimeout = function() {
787
+ var B = u.timeout ? "timeout of " + u.timeout + "ms exceeded" : "timeout exceeded", T = u.transitional || o;
788
+ u.timeoutErrorMessage && (B = u.timeoutErrorMessage), y(new l(
789
+ B,
790
+ T.clarifyTimeoutError ? l.ETIMEDOUT : l.ECONNABORTED,
791
+ u,
792
+ p
793
+ )), p = null;
794
+ }, e.isStandardBrowserEnv()) {
795
+ var Be = (u.withCredentials || i(ne)) && u.xsrfCookieName ? r.read(u.xsrfCookieName) : void 0;
796
+ Be && (N[u.xsrfHeaderName] = Be);
797
+ }
798
+ "setRequestHeader" in p && e.forEach(N, function(B, T) {
799
+ typeof S > "u" && T.toLowerCase() === "content-type" ? delete N[T] : p.setRequestHeader(T, B);
800
+ }), e.isUndefined(u.withCredentials) || (p.withCredentials = !!u.withCredentials), $ && $ !== "json" && (p.responseType = u.responseType), typeof u.onDownloadProgress == "function" && p.addEventListener("progress", u.onDownloadProgress), typeof u.onUploadProgress == "function" && p.upload && p.upload.addEventListener("progress", u.onUploadProgress), (u.cancelToken || u.signal) && (U = function(g) {
801
+ p && (y(!g || g && g.type ? new f() : g), p.abort(), p = null);
802
+ }, u.cancelToken && u.cancelToken.subscribe(U), u.signal && (u.signal.aborted ? U() : u.signal.addEventListener("abort", U))), S || (S = null);
803
+ var ae = c(ne);
804
+ if (ae && ["http", "https", "file"].indexOf(ae) === -1) {
805
+ y(new l("Unsupported protocol " + ae + ":", l.ERR_BAD_REQUEST, u));
806
+ return;
807
+ }
808
+ p.send(S);
809
+ });
810
+ }, de;
811
+ }
812
+ var pe, Je;
813
+ function Nr() {
814
+ return Je || (Je = 1, pe = null), pe;
815
+ }
816
+ var m = b, Ve = br, We = I, Tr = ht, Pr = vt, Dr = {
817
+ "Content-Type": "application/x-www-form-urlencoded"
818
+ };
819
+ function ze(e, t) {
820
+ !m.isUndefined(e) && m.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t);
821
+ }
822
+ function Ur() {
823
+ var e;
824
+ return (typeof XMLHttpRequest < "u" || typeof process < "u" && Object.prototype.toString.call(process) === "[object process]") && (e = He()), e;
825
+ }
826
+ function Br(e, t, r) {
827
+ if (m.isString(e))
828
+ try {
829
+ return (t || JSON.parse)(e), m.trim(e);
830
+ } catch (s) {
831
+ if (s.name !== "SyntaxError")
832
+ throw s;
833
+ }
834
+ return (r || JSON.stringify)(e);
835
+ }
836
+ var te = {
837
+ transitional: Tr,
838
+ adapter: Ur(),
839
+ transformRequest: [function(t, r) {
840
+ if (Ve(r, "Accept"), Ve(r, "Content-Type"), m.isFormData(t) || m.isArrayBuffer(t) || m.isBuffer(t) || m.isStream(t) || m.isFile(t) || m.isBlob(t))
841
+ return t;
842
+ if (m.isArrayBufferView(t))
843
+ return t.buffer;
844
+ if (m.isURLSearchParams(t))
845
+ return ze(r, "application/x-www-form-urlencoded;charset=utf-8"), t.toString();
846
+ var s = m.isObject(t), n = r && r["Content-Type"], a;
847
+ if ((a = m.isFileList(t)) || s && n === "multipart/form-data") {
848
+ var i = this.env && this.env.FormData;
849
+ return Pr(a ? { "files[]": t } : t, i && new i());
850
+ } else if (s || n === "application/json")
851
+ return ze(r, "application/json"), Br(t);
852
+ return t;
853
+ }],
854
+ transformResponse: [function(t) {
855
+ var r = this.transitional || te.transitional, s = r && r.silentJSONParsing, n = r && r.forcedJSONParsing, a = !s && this.responseType === "json";
856
+ if (a || n && m.isString(t) && t.length)
857
+ try {
858
+ return JSON.parse(t);
859
+ } catch (i) {
860
+ if (a)
861
+ throw i.name === "SyntaxError" ? We.from(i, We.ERR_BAD_RESPONSE, this, null, this.response) : i;
862
+ }
863
+ return t;
864
+ }],
865
+ /**
866
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
867
+ * timeout is not created.
868
+ */
869
+ timeout: 0,
870
+ xsrfCookieName: "XSRF-TOKEN",
871
+ xsrfHeaderName: "X-XSRF-TOKEN",
872
+ maxContentLength: -1,
873
+ maxBodyLength: -1,
874
+ env: {
875
+ FormData: Nr()
876
+ },
877
+ validateStatus: function(t) {
878
+ return t >= 200 && t < 300;
879
+ },
880
+ headers: {
881
+ common: {
882
+ Accept: "application/json, text/plain, */*"
883
+ }
884
+ }
885
+ };
886
+ m.forEach(["delete", "get", "head"], function(t) {
887
+ te.headers[t] = {};
888
+ });
889
+ m.forEach(["post", "put", "patch"], function(t) {
890
+ te.headers[t] = m.merge(Dr);
891
+ });
892
+ var Te = te, kr = b, Lr = Te, jr = function(t, r, s) {
893
+ var n = this || Lr;
894
+ return kr.forEach(s, function(i) {
895
+ t = i.call(n, t, r);
896
+ }), t;
897
+ }, he, Xe;
898
+ function yt() {
899
+ return Xe || (Xe = 1, he = function(t) {
900
+ return !!(t && t.__CANCEL__);
901
+ }), he;
902
+ }
903
+ var Ke = b, ve = jr, qr = yt(), Fr = Te, Ir = ee();
904
+ function me(e) {
905
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
906
+ throw new Ir();
907
+ }
908
+ var $r = function(t) {
909
+ me(t), t.headers = t.headers || {}, t.data = ve.call(
910
+ t,
911
+ t.data,
912
+ t.headers,
913
+ t.transformRequest
914
+ ), t.headers = Ke.merge(
915
+ t.headers.common || {},
916
+ t.headers[t.method] || {},
917
+ t.headers
918
+ ), Ke.forEach(
919
+ ["delete", "get", "head", "post", "put", "patch", "common"],
920
+ function(n) {
921
+ delete t.headers[n];
922
+ }
923
+ );
924
+ var r = t.adapter || Fr.adapter;
925
+ return r(t).then(function(n) {
926
+ return me(t), n.data = ve.call(
927
+ t,
928
+ n.data,
929
+ n.headers,
930
+ t.transformResponse
931
+ ), n;
932
+ }, function(n) {
933
+ return qr(n) || (me(t), n && n.response && (n.response.data = ve.call(
934
+ t,
935
+ n.response.data,
936
+ n.response.headers,
937
+ t.transformResponse
938
+ ))), Promise.reject(n);
939
+ });
940
+ }, R = b, bt = function(t, r) {
941
+ r = r || {};
942
+ var s = {};
943
+ function n(c, d) {
944
+ return R.isPlainObject(c) && R.isPlainObject(d) ? R.merge(c, d) : R.isPlainObject(d) ? R.merge({}, d) : R.isArray(d) ? d.slice() : d;
945
+ }
946
+ function a(c) {
947
+ if (R.isUndefined(r[c])) {
948
+ if (!R.isUndefined(t[c]))
949
+ return n(void 0, t[c]);
950
+ } else
951
+ return n(t[c], r[c]);
952
+ }
953
+ function i(c) {
954
+ if (!R.isUndefined(r[c]))
955
+ return n(void 0, r[c]);
956
+ }
957
+ function o(c) {
958
+ if (R.isUndefined(r[c])) {
959
+ if (!R.isUndefined(t[c]))
960
+ return n(void 0, t[c]);
961
+ } else
962
+ return n(void 0, r[c]);
963
+ }
964
+ function l(c) {
965
+ if (c in r)
966
+ return n(t[c], r[c]);
967
+ if (c in t)
968
+ return n(void 0, t[c]);
969
+ }
970
+ var f = {
971
+ url: i,
972
+ method: i,
973
+ data: i,
974
+ baseURL: o,
975
+ transformRequest: o,
976
+ transformResponse: o,
977
+ paramsSerializer: o,
978
+ timeout: o,
979
+ timeoutMessage: o,
980
+ withCredentials: o,
981
+ adapter: o,
982
+ responseType: o,
983
+ xsrfCookieName: o,
984
+ xsrfHeaderName: o,
985
+ onUploadProgress: o,
986
+ onDownloadProgress: o,
987
+ decompress: o,
988
+ maxContentLength: o,
989
+ maxBodyLength: o,
990
+ beforeRedirect: o,
991
+ transport: o,
992
+ httpAgent: o,
993
+ httpsAgent: o,
994
+ cancelToken: o,
995
+ socketPath: o,
996
+ responseEncoding: o,
997
+ validateStatus: l
998
+ };
999
+ return R.forEach(Object.keys(t).concat(Object.keys(r)), function(d) {
1000
+ var u = f[d] || a, v = u(d);
1001
+ R.isUndefined(v) && u !== l || (s[d] = v);
1002
+ }), s;
1003
+ }, ye, Qe;
1004
+ function wt() {
1005
+ return Qe || (Qe = 1, ye = {
1006
+ version: "0.27.2"
1007
+ }), ye;
1008
+ }
1009
+ var Mr = wt().version, A = I, Pe = {};
1010
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(e, t) {
1011
+ Pe[e] = function(s) {
1012
+ return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
1013
+ };
1014
+ });
1015
+ var Ye = {};
1016
+ Pe.transitional = function(t, r, s) {
1017
+ function n(a, i) {
1018
+ return "[Axios v" + Mr + "] Transitional option '" + a + "'" + i + (s ? ". " + s : "");
1019
+ }
1020
+ return function(a, i, o) {
1021
+ if (t === !1)
1022
+ throw new A(
1023
+ n(i, " has been removed" + (r ? " in " + r : "")),
1024
+ A.ERR_DEPRECATED
1025
+ );
1026
+ return r && !Ye[i] && (Ye[i] = !0, console.warn(
1027
+ n(
1028
+ i,
1029
+ " has been deprecated since v" + r + " and will be removed in the near future"
1030
+ )
1031
+ )), t ? t(a, i, o) : !0;
1032
+ };
1033
+ };
1034
+ function Hr(e, t, r) {
1035
+ if (typeof e != "object")
1036
+ throw new A("options must be an object", A.ERR_BAD_OPTION_VALUE);
1037
+ for (var s = Object.keys(e), n = s.length; n-- > 0; ) {
1038
+ var a = s[n], i = t[a];
1039
+ if (i) {
1040
+ var o = e[a], l = o === void 0 || i(o, a, e);
1041
+ if (l !== !0)
1042
+ throw new A("option " + a + " must be " + l, A.ERR_BAD_OPTION_VALUE);
1043
+ continue;
1044
+ }
1045
+ if (r !== !0)
1046
+ throw new A("Unknown option " + a, A.ERR_BAD_OPTION);
1047
+ }
1048
+ }
1049
+ var Jr = {
1050
+ assertOptions: Hr,
1051
+ validators: Pe
1052
+ }, Et = b, Vr = ct, Ge = mr, Ze = $r, re = bt, Wr = mt, Rt = Jr, L = Rt.validators;
1053
+ function F(e) {
1054
+ this.defaults = e, this.interceptors = {
1055
+ request: new Ge(),
1056
+ response: new Ge()
1057
+ };
1058
+ }
1059
+ F.prototype.request = function(t, r) {
1060
+ typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = re(this.defaults, r), r.method ? r.method = r.method.toLowerCase() : this.defaults.method ? r.method = this.defaults.method.toLowerCase() : r.method = "get";
1061
+ var s = r.transitional;
1062
+ s !== void 0 && Rt.assertOptions(s, {
1063
+ silentJSONParsing: L.transitional(L.boolean),
1064
+ forcedJSONParsing: L.transitional(L.boolean),
1065
+ clarifyTimeoutError: L.transitional(L.boolean)
1066
+ }, !1);
1067
+ var n = [], a = !0;
1068
+ this.interceptors.request.forEach(function(v) {
1069
+ typeof v.runWhen == "function" && v.runWhen(r) === !1 || (a = a && v.synchronous, n.unshift(v.fulfilled, v.rejected));
1070
+ });
1071
+ var i = [];
1072
+ this.interceptors.response.forEach(function(v) {
1073
+ i.push(v.fulfilled, v.rejected);
1074
+ });
1075
+ var o;
1076
+ if (!a) {
1077
+ var l = [Ze, void 0];
1078
+ for (Array.prototype.unshift.apply(l, n), l = l.concat(i), o = Promise.resolve(r); l.length; )
1079
+ o = o.then(l.shift(), l.shift());
1080
+ return o;
1081
+ }
1082
+ for (var f = r; n.length; ) {
1083
+ var c = n.shift(), d = n.shift();
1084
+ try {
1085
+ f = c(f);
1086
+ } catch (u) {
1087
+ d(u);
1088
+ break;
1089
+ }
1090
+ }
1091
+ try {
1092
+ o = Ze(f);
1093
+ } catch (u) {
1094
+ return Promise.reject(u);
1095
+ }
1096
+ for (; i.length; )
1097
+ o = o.then(i.shift(), i.shift());
1098
+ return o;
1099
+ };
1100
+ F.prototype.getUri = function(t) {
1101
+ t = re(this.defaults, t);
1102
+ var r = Wr(t.baseURL, t.url);
1103
+ return Vr(r, t.params, t.paramsSerializer);
1104
+ };
1105
+ Et.forEach(["delete", "get", "head", "options"], function(t) {
1106
+ F.prototype[t] = function(r, s) {
1107
+ return this.request(re(s || {}, {
1108
+ method: t,
1109
+ url: r,
1110
+ data: (s || {}).data
1111
+ }));
1112
+ };
1113
+ });
1114
+ Et.forEach(["post", "put", "patch"], function(t) {
1115
+ function r(s) {
1116
+ return function(a, i, o) {
1117
+ return this.request(re(o || {}, {
1118
+ method: t,
1119
+ headers: s ? {
1120
+ "Content-Type": "multipart/form-data"
1121
+ } : {},
1122
+ url: a,
1123
+ data: i
1124
+ }));
1125
+ };
1126
+ }
1127
+ F.prototype[t] = r(), F.prototype[t + "Form"] = r(!0);
1128
+ });
1129
+ var zr = F, be, et;
1130
+ function Xr() {
1131
+ if (et)
1132
+ return be;
1133
+ et = 1;
1134
+ var e = ee();
1135
+ function t(r) {
1136
+ if (typeof r != "function")
1137
+ throw new TypeError("executor must be a function.");
1138
+ var s;
1139
+ this.promise = new Promise(function(i) {
1140
+ s = i;
1141
+ });
1142
+ var n = this;
1143
+ this.promise.then(function(a) {
1144
+ if (n._listeners) {
1145
+ var i, o = n._listeners.length;
1146
+ for (i = 0; i < o; i++)
1147
+ n._listeners[i](a);
1148
+ n._listeners = null;
1149
+ }
1150
+ }), this.promise.then = function(a) {
1151
+ var i, o = new Promise(function(l) {
1152
+ n.subscribe(l), i = l;
1153
+ }).then(a);
1154
+ return o.cancel = function() {
1155
+ n.unsubscribe(i);
1156
+ }, o;
1157
+ }, r(function(i) {
1158
+ n.reason || (n.reason = new e(i), s(n.reason));
1159
+ });
1160
+ }
1161
+ return t.prototype.throwIfRequested = function() {
1162
+ if (this.reason)
1163
+ throw this.reason;
1164
+ }, t.prototype.subscribe = function(s) {
1165
+ if (this.reason) {
1166
+ s(this.reason);
1167
+ return;
1168
+ }
1169
+ this._listeners ? this._listeners.push(s) : this._listeners = [s];
1170
+ }, t.prototype.unsubscribe = function(s) {
1171
+ if (this._listeners) {
1172
+ var n = this._listeners.indexOf(s);
1173
+ n !== -1 && this._listeners.splice(n, 1);
1174
+ }
1175
+ }, t.source = function() {
1176
+ var s, n = new t(function(i) {
1177
+ s = i;
1178
+ });
1179
+ return {
1180
+ token: n,
1181
+ cancel: s
1182
+ };
1183
+ }, be = t, be;
1184
+ }
1185
+ var we, tt;
1186
+ function Kr() {
1187
+ return tt || (tt = 1, we = function(t) {
1188
+ return function(s) {
1189
+ return t.apply(null, s);
1190
+ };
1191
+ }), we;
1192
+ }
1193
+ var Ee, rt;
1194
+ function Qr() {
1195
+ if (rt)
1196
+ return Ee;
1197
+ rt = 1;
1198
+ var e = b;
1199
+ return Ee = function(r) {
1200
+ return e.isObject(r) && r.isAxiosError === !0;
1201
+ }, Ee;
1202
+ }
1203
+ var nt = b, Yr = ot, Q = zr, Gr = bt, Zr = Te;
1204
+ function gt(e) {
1205
+ var t = new Q(e), r = Yr(Q.prototype.request, t);
1206
+ return nt.extend(r, Q.prototype, t), nt.extend(r, t), r.create = function(n) {
1207
+ return gt(Gr(e, n));
1208
+ }, r;
1209
+ }
1210
+ var E = gt(Zr);
1211
+ E.Axios = Q;
1212
+ E.CanceledError = ee();
1213
+ E.CancelToken = Xr();
1214
+ E.isCancel = yt();
1215
+ E.VERSION = wt().version;
1216
+ E.toFormData = vt;
1217
+ E.AxiosError = I;
1218
+ E.Cancel = E.CanceledError;
1219
+ E.all = function(t) {
1220
+ return Promise.all(t);
1221
+ };
1222
+ E.spread = Kr();
1223
+ E.isAxiosError = Qr();
1224
+ Ce.exports = E;
1225
+ Ce.exports.default = E;
1226
+ var en = Ce.exports, tn = en;
1227
+ const Ot = /* @__PURE__ */ it(tn);
1228
+ var Ct = { exports: {} };
1229
+ /*!
1230
+ * JavaScript Cookie v2.2.1
1231
+ * https://github.com/js-cookie/js-cookie
1232
+ *
1233
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
1234
+ * Released under the MIT license
1235
+ */
1236
+ (function(e, t) {
1237
+ (function(r) {
1238
+ var s;
1239
+ if (e.exports = r(), s = !0, !s) {
1240
+ var n = window.Cookies, a = window.Cookies = r();
1241
+ a.noConflict = function() {
1242
+ return window.Cookies = n, a;
1243
+ };
1244
+ }
1245
+ })(function() {
1246
+ function r() {
1247
+ for (var a = 0, i = {}; a < arguments.length; a++) {
1248
+ var o = arguments[a];
1249
+ for (var l in o)
1250
+ i[l] = o[l];
1251
+ }
1252
+ return i;
1253
+ }
1254
+ function s(a) {
1255
+ return a.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
1256
+ }
1257
+ function n(a) {
1258
+ function i() {
1259
+ }
1260
+ function o(f, c, d) {
1261
+ if (!(typeof document > "u")) {
1262
+ d = r({
1263
+ path: "/"
1264
+ }, i.defaults, d), typeof d.expires == "number" && (d.expires = new Date(/* @__PURE__ */ new Date() * 1 + d.expires * 864e5)), d.expires = d.expires ? d.expires.toUTCString() : "";
1265
+ try {
1266
+ var u = JSON.stringify(c);
1267
+ /^[\{\[]/.test(u) && (c = u);
1268
+ } catch {
1269
+ }
1270
+ c = a.write ? a.write(c, f) : encodeURIComponent(String(c)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), f = encodeURIComponent(String(f)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
1271
+ var v = "";
1272
+ for (var x in d)
1273
+ d[x] && (v += "; " + x, d[x] !== !0 && (v += "=" + d[x].split(";")[0]));
1274
+ return document.cookie = f + "=" + c + v;
1275
+ }
1276
+ }
1277
+ function l(f, c) {
1278
+ if (!(typeof document > "u")) {
1279
+ for (var d = {}, u = document.cookie ? document.cookie.split("; ") : [], v = 0; v < u.length; v++) {
1280
+ var x = u[v].split("="), y = x.slice(1).join("=");
1281
+ !c && y.charAt(0) === '"' && (y = y.slice(1, -1));
1282
+ try {
1283
+ var S = s(x[0]);
1284
+ if (y = (a.read || a)(y, S) || s(y), c)
1285
+ try {
1286
+ y = JSON.parse(y);
1287
+ } catch {
1288
+ }
1289
+ if (d[S] = y, f === S)
1290
+ break;
1291
+ } catch {
1292
+ }
1293
+ }
1294
+ return f ? d[f] : d;
1295
+ }
1296
+ }
1297
+ return i.set = o, i.get = function(f) {
1298
+ return l(
1299
+ f,
1300
+ !1
1301
+ /* read as raw */
1302
+ );
1303
+ }, i.getJSON = function(f) {
1304
+ return l(
1305
+ f,
1306
+ !0
1307
+ /* read as json */
1308
+ );
1309
+ }, i.remove = function(f, c) {
1310
+ o(f, "", r(c, {
1311
+ expires: -1
1312
+ }));
1313
+ }, i.defaults = {}, i.withConverter = n, i;
1314
+ }
1315
+ return n(function() {
1316
+ });
1317
+ });
1318
+ })(Ct);
1319
+ var rn = Ct.exports;
1320
+ const G = /* @__PURE__ */ it(rn), nn = Ot.create({ baseURL: process.env.API_URL, withCredentials: !0 }), X = at({
1321
+ code: {
1322
+ value: "",
1323
+ type: "",
1324
+ method: "",
1325
+ isSended: !1,
1326
+ isValid: !1
1327
+ }
1328
+ });
1329
+ async function an(e, t, r) {
1330
+ return await nn.post("/api/twofa/sendcode", {
1331
+ phone: e.phone.number,
1332
+ email: e.email,
1333
+ method: t,
1334
+ type: r
1335
+ }).then(
1336
+ (s) => (X.code = s.data, X.code.isSended = !0, Promise.resolve(s.data)),
1337
+ (s) => (console.log(s), P(s), Promise.reject(s))
1338
+ );
1339
+ }
1340
+ st(X, (e, t) => {
1341
+ });
1342
+ const pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1343
+ __proto__: null,
1344
+ sendCode: an,
1345
+ state: X
1346
+ }, Symbol.toStringTag, { value: "Module" })), z = Ot.create({ baseURL: process.env.API_URL, withCredentials: !0 }), w = at({
1347
+ user: {
1348
+ _id: "",
1349
+ username: "",
1350
+ email: "",
1351
+ phone: "",
1352
+ password: "",
1353
+ passwordRepeat: ""
1354
+ },
1355
+ access: {
1356
+ roles: null,
1357
+ token: null,
1358
+ status: !1
1359
+ }
1360
+ });
1361
+ if (G.get("user")) {
1362
+ const { _id: e, email: t, phone: r, roles: s, accessToken: n } = JSON.parse(G.get("user"));
1363
+ Object.assign(w.user, { _id: e, email: t, phone: r }), Object.assign(w.access, { token: n, roles: s, status: !!n }), z.interceptors.request.use((a) => (n && (a.headers["x-access-token"] = n), a), (a) => Promise.reject(a));
1364
+ }
1365
+ const sn = {
1366
+ async login(e, t) {
1367
+ try {
1368
+ console.log(e.phone.number);
1369
+ const r = await z.post("/api/auth/signin", {
1370
+ email: e.email,
1371
+ phone: e.phone.number,
1372
+ password: e.password,
1373
+ passwordRepeat: "",
1374
+ type: t
1375
+ });
1376
+ return Re("user", r.data), console.log(r.data), Object.assign(w.user, {
1377
+ ...r.data
1378
+ }), Object.assign(w.access, {
1379
+ token: r.data.accessToken,
1380
+ status: !0,
1381
+ roles: r.data.roles
1382
+ }), r.data;
1383
+ } catch (r) {
1384
+ return Object.assign(w.access, {
1385
+ token: null,
1386
+ status: !1
1387
+ }), P(r), Promise.reject(r);
1388
+ }
1389
+ },
1390
+ async signup(e, t, r) {
1391
+ const { password: s, passwordRepeat: n } = w.user;
1392
+ if (s !== n) {
1393
+ const a = {
1394
+ response: {
1395
+ data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
1396
+ }
1397
+ };
1398
+ throw P(a), new Error(a.response.status);
1399
+ }
1400
+ try {
1401
+ e.phone = e.phone.number;
1402
+ const a = await z.post("/api/auth/signup", {
1403
+ ...e,
1404
+ type: t,
1405
+ inviteCode: r
1406
+ });
1407
+ return a.data.accessToken && Re("user", a.data), Object.assign(w.user, {
1408
+ ...a.data
1409
+ }), Object.assign(w.access, {
1410
+ token: a.data.accessToken,
1411
+ status: !0,
1412
+ roles: a.data.roles
1413
+ }), a.data;
1414
+ } catch (a) {
1415
+ throw P(a), console.log("Sign up falied"), a;
1416
+ }
1417
+ },
1418
+ logout() {
1419
+ un("user"), Object.assign(w.user, {
1420
+ email: "",
1421
+ phone: "",
1422
+ password: "",
1423
+ passwordRepeat: ""
1424
+ }), Object.assign(w.access, {
1425
+ token: null,
1426
+ status: !1
1427
+ });
1428
+ },
1429
+ async resetPassword(e, t) {
1430
+ try {
1431
+ const r = await z.post("/api/auth/reset-password", {
1432
+ email: e.email,
1433
+ phone: e.phone.number,
1434
+ type: t
1435
+ });
1436
+ return Object.assign(X.code, {
1437
+ ...r.data,
1438
+ isSended: !0
1439
+ }), r.data;
1440
+ } catch (r) {
1441
+ return P(r), Promise.reject(r);
1442
+ }
1443
+ },
1444
+ async updatePassword(e, t) {
1445
+ const { password: r, passwordRepeat: s } = w.user;
1446
+ if (r !== s) {
1447
+ const n = {
1448
+ response: {
1449
+ data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
1450
+ }
1451
+ };
1452
+ throw P(n), new Error(n.response.status);
1453
+ }
1454
+ try {
1455
+ const n = await z.post("/api/auth/update-password", {
1456
+ email: e.email,
1457
+ phone: e.phone.number,
1458
+ password: e.password,
1459
+ passwordRepeat: e.passwordRepeat,
1460
+ type: t
1461
+ });
1462
+ return n.data.accessToken && Re("user", n.data), Object.assign(w.user, {
1463
+ ...n.data
1464
+ }), Object.assign(w.access, {
1465
+ token: n.data.accessToken,
1466
+ status: !0
1467
+ }), n.data;
1468
+ } catch (n) {
1469
+ return P(n), Promise.reject(n);
1470
+ }
1471
+ }
1472
+ }, on = {
1473
+ development: { secure: !1, expires: 1 },
1474
+ production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
1475
+ };
1476
+ function Re(e, t, r = process.env.NODE_ENV) {
1477
+ G.set(e, JSON.stringify(t), on[r]);
1478
+ }
1479
+ function un(e, t = process.env.NODE_ENV) {
1480
+ const r = t === "production" ? { domain: process.env.API_URL } : {};
1481
+ G.remove(e, r);
1482
+ }
1483
+ st(w, (e, t) => {
1484
+ });
1485
+ const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1486
+ __proto__: null,
1487
+ actions: sn,
1488
+ state: w
1489
+ }, Symbol.toStringTag, { value: "Module" }));
1490
+ export {
1491
+ G as C,
1492
+ fn as F,
1493
+ Dt as _,
1494
+ Ot as a,
1495
+ dn as b,
1496
+ sn as c,
1497
+ an as d,
1498
+ X as e,
1499
+ hn as f,
1500
+ it as g,
1501
+ w as s,
1502
+ pn as t
1503
+ };