@ozdao/prometheus-framework 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-ec801e39.mjs +1945 -0
  3. package/dist/ButtonFollow-d4552677.mjs +131 -0
  4. package/dist/ButtonFollow-daa0e9e4.js +1 -0
  5. package/dist/CardOrganization-79eb2b6f.js +1 -0
  6. package/dist/CardOrganization-d3a9d898.mjs +230 -0
  7. package/dist/Feed-2c92ceed.js +1 -0
  8. package/dist/Feed-536c8a92.mjs +439 -0
  9. package/dist/Feed-a5229528.js +1 -0
  10. package/dist/Feed-bbe44c17.mjs +368 -0
  11. package/dist/Image-89b2a540.js +9 -0
  12. package/dist/Image-d42a89db.mjs +477 -0
  13. package/dist/Popup-f5cdd3c1.js +1 -0
  14. package/dist/Popup-fca78130.mjs +76 -0
  15. package/dist/Product-9170a446.mjs +838 -0
  16. package/dist/Product-dc5024f6.js +7 -0
  17. package/dist/ProductEdit-d74fddb1.mjs +350 -0
  18. package/dist/ProductEdit-e22cc4ef.js +1 -0
  19. package/dist/ProfileBlogposts-bf3cd8e5.mjs +64 -0
  20. package/dist/ProfileBlogposts-d1d3326e.js +1 -0
  21. package/dist/ProfileComments-1e0d72cc.mjs +44 -0
  22. package/dist/ProfileComments-c3290211.js +1 -0
  23. package/dist/ProfileEvents-314eadc3.js +1 -0
  24. package/dist/ProfileEvents-ba769f57.mjs +56 -0
  25. package/dist/ProfileLikes-36373ac1.mjs +44 -0
  26. package/dist/ProfileLikes-a2c1b585.js +1 -0
  27. package/dist/ProfileOrganizations-1f9f1841.js +1 -0
  28. package/dist/ProfileOrganizations-974a50ca.mjs +212 -0
  29. package/dist/Publics-5ae33b91.mjs +123 -0
  30. package/dist/Publics-8bc74cc3.js +1 -0
  31. package/dist/UploadImage-39483aee.mjs +83 -0
  32. package/dist/UploadImage-802b81db.js +1 -0
  33. package/dist/auth-3dedf391.js +8 -0
  34. package/dist/auth-c3234662.mjs +1836 -0
  35. package/dist/auth.client.cjs +1 -1
  36. package/dist/auth.client.js +3 -3
  37. package/dist/auth.validation-892bea9b.js +1 -0
  38. package/dist/auth.validation-c8d5adf5.mjs +20 -0
  39. package/dist/community.client.cjs +1 -1
  40. package/dist/community.client.js +10 -10
  41. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  42. package/dist/events.client.cjs +1 -1
  43. package/dist/events.client.js +8 -8
  44. package/dist/main.css +1 -1
  45. package/dist/organizations-e1bfd3a8.mjs +121 -0
  46. package/dist/organizations-e74f4f84.js +1 -0
  47. package/dist/organizations.client-37ec4817.js +3 -0
  48. package/dist/organizations.client-52d2951c.mjs +3017 -0
  49. package/dist/organizations.client.cjs +1 -1
  50. package/dist/organizations.client.js +10 -10
  51. package/dist/prometheus-framework.cjs.js +1 -1
  52. package/dist/prometheus-framework.es.js +1 -1
  53. package/dist/style.css +1 -1
  54. package/dist/users.client.cjs +1 -1
  55. package/dist/users.client.js +9 -9
  56. package/package.json +1 -1
  57. package/src/components/Field/Field.svlt +73 -0
  58. package/src/components/Field/Field.vue +18 -19
  59. package/src/modules/community/components/sections/Feed.vue +3 -3
@@ -0,0 +1,44 @@
1
+ import { ref as l, watch as p, openBlock as s, createElementBlock as c, createVNode as d, createBlock as _, unref as a, createCommentVNode as f, createElementVNode as m } from "vue";
2
+ import { useRoute as b, useRouter as h } from "vue-router";
3
+ import { _ as v } from "./Tab-a243605d.mjs";
4
+ import { _ as y } from "./Feed-536c8a92.mjs";
5
+ import "./inputs.validation-14e8e01f.mjs";
6
+ import "./globals-96ba60e4.mjs";
7
+ import "vue-i18n";
8
+ import "./EmptyState-34d85f10.mjs";
9
+ import "./_plugin-vue_export-helper-dad06003.mjs";
10
+ import "./Chips-03ff0c34.mjs";
11
+ import "./IconEdit-eacf3856.mjs";
12
+ import "./auth-c3234662.mjs";
13
+ const k = { class: "pd-thin" }, g = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
14
+ /* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Likes")
15
+ ], -1), M = {
16
+ __name: "ProfileLikes",
17
+ setup(q) {
18
+ const e = b(), n = h();
19
+ let i = e.query.tab ? e.query.tab : "posts";
20
+ const t = l(i);
21
+ return e.query.tab = t.value, p(t, (r) => {
22
+ n.replace({ query: { ...e.query, tab: r } });
23
+ }), (r, o) => (s(), c("div", k, [
24
+ g,
25
+ d(v, {
26
+ selected: t.value,
27
+ "onUpdate:selected": o[0] || (o[0] = (u) => t.value = u),
28
+ tabs: [
29
+ { name: "My posts", value: "posts" },
30
+ { name: "Following", value: "hubs" }
31
+ ],
32
+ class: "mn-r-medium o-hidden h5 radius-big bg-grey"
33
+ }, null, 8, ["selected"]),
34
+ t.value === "posts" ? (s(), _(y, {
35
+ key: 0,
36
+ user: a(e).params._id,
37
+ owner: a(e).params._id
38
+ }, null, 8, ["user", "owner"])) : f("", !0)
39
+ ]));
40
+ }
41
+ };
42
+ export {
43
+ M as default
44
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),l=require("./Tab-6f0a4909.js"),c=require("./Feed-a5229528.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./auth-3dedf391.js");const d={class:"pd-thin"},m=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Likes")],-1),q={__name:"ProfileLikes",setup(p){const r=o.useRoute(),a=o.useRouter();let n=r.query.tab?r.query.tab:"posts";const t=e.ref(n);return r.query.tab=t.value,e.watch(t,u=>{a.replace({query:{...r.query,tab:u}})}),(u,s)=>(e.openBlock(),e.createElementBlock("div",d,[m,e.createVNode(l._sfc_main,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=i=>t.value=i),tabs:[{name:"My posts",value:"posts"},{name:"Following",value:"hubs"}],class:"mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="posts"?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,user:e.unref(r).params._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]))}};exports.default=q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("vue-router"),f=require("./Tab-6f0a4909.js"),y=require("./EmptyState-7658d7d6.js"),h=require("./CardOrganization-79eb2b6f.js"),k=require("./_plugin-vue_export-helper-f246444f.js"),g=require("./organizations-e74f4f84.js"),d=require("./auth-3dedf391.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./ButtonFollow-daa0e9e4.js");const _={},v={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},w=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),x=[w];function B(u,t){return e.openBlock(),e.createElementBlock("svg",v,x)}const C=k._export_sfc(_,[["render",B]]),N={class:"feed"},p={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(u){const t=u,a=e.ref([]),o=e.ref(!1),r=e.ref(!0),l=e.ref(0),n=e.ref(20),c=async()=>{if(o.value){l.value+=n.value;const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=[...a.value,...i]}};return e.onMounted(async()=>{r.value=!0,console.log(t.selectedDate);const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=i,r.value=!1}),(i,O)=>(e.openBlock(),e.createElementBlock("section",N,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,s=>(e.openBlock(),e.createBlock(C,{key:s}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!r.value&&a.value.length<1?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!r.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(s,b)=>(e.openBlock(),e.createBlock(h._sfc_main,{onClick:E=>i.$router.push({name:"Organization",params:{_id:s._id}}),key:s._id,organization:s,user:u.user,type:"normal",class:e.normalizeClass(["w-100 radius-big mn-medium",{"br-b br-solid br-black-transp-10":b!==a.value.length-1}])},null,8,["onClick","organization","user","class"]))),128)):e.createCommentVNode("",!0),o.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}},z={class:"pd-thin"},q={class:"mn-medium flex-v-center flex-nowrap flex"},V=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),S={__name:"ProfileOrganizations",setup(u){const t=m.useRoute(),a=m.useRouter();let o=t.query.tab?t.query.tab:"member";const r=e.ref(o);return t.query.tab=r.value,e.watch(r,l=>{a.replace({query:{...t.query,tab:l}})}),(l,n)=>(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("header",q,[V,d.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=c=>l.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(f._sfc_main,{selected:r.value,"onUpdate:selected":n[1]||(n[1]=c=>r.value=c),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=S;
@@ -0,0 +1,212 @@
1
+ import { openBlock as r, createElementBlock as o, createStaticVNode as $, ref as c, onMounted as C, createVNode as d, TransitionGroup as v, withCtx as g, Fragment as k, renderList as w, createBlock as f, createCommentVNode as u, Transition as h, normalizeClass as N, watch as q, createElementVNode as O, unref as y } from "vue";
2
+ import { useRoute as M, useRouter as D } from "vue-router";
3
+ import { _ as F } from "./Tab-a243605d.mjs";
4
+ import { _ as L } from "./EmptyState-34d85f10.mjs";
5
+ import { _ as V } from "./CardOrganization-d3a9d898.mjs";
6
+ import { _ as B } from "./_plugin-vue_export-helper-dad06003.mjs";
7
+ import { a as x } from "./organizations-e1bfd3a8.mjs";
8
+ import { s as _ } from "./auth-c3234662.mjs";
9
+ import "./inputs.validation-14e8e01f.mjs";
10
+ import "./globals-96ba60e4.mjs";
11
+ import "vue-i18n";
12
+ import "./ButtonFollow-d4552677.mjs";
13
+ const E = {}, G = {
14
+ width: "100%",
15
+ height: "20rem",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, P = /* @__PURE__ */ $('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), R = [
18
+ P
19
+ ];
20
+ function T(b, e) {
21
+ return r(), o("svg", G, R);
22
+ }
23
+ const U = /* @__PURE__ */ B(E, [["render", T]]), j = { class: "feed" }, z = {
24
+ __name: "Feed",
25
+ props: {
26
+ category: {
27
+ type: String,
28
+ default: null
29
+ },
30
+ selectedDate: {
31
+ type: String,
32
+ default: null
33
+ },
34
+ organization: {
35
+ type: String,
36
+ default: null
37
+ },
38
+ owner: {
39
+ type: String,
40
+ default: null
41
+ },
42
+ user: {
43
+ type: [String, Number],
44
+ default: null
45
+ },
46
+ member: {
47
+ type: [String, Number],
48
+ default: null
49
+ },
50
+ subscriber: {
51
+ type: [String, Number],
52
+ default: null
53
+ },
54
+ sortOrder: {
55
+ type: String,
56
+ default: "desc"
57
+ },
58
+ participant: {
59
+ type: String,
60
+ default: null
61
+ },
62
+ period: {
63
+ type: String,
64
+ default: null
65
+ },
66
+ status: {
67
+ type: String,
68
+ default: null
69
+ }
70
+ },
71
+ setup(b) {
72
+ const e = b, a = c([]), n = c(!1), t = c(!0), i = c(0), s = c(20), p = async () => {
73
+ if (n.value) {
74
+ i.value += s.value;
75
+ const l = await x.read({
76
+ skip: i.value,
77
+ limit: s.value,
78
+ category: e.category,
79
+ sortOrder: e.sortOrder,
80
+ member: e.member,
81
+ subscriber: e.subscriber,
82
+ onlyuser: e.onlyuser,
83
+ user: e.user,
84
+ date: e.selectedDate,
85
+ owner: e.owner,
86
+ organization: e.organization,
87
+ period: e.period,
88
+ status: e.status
89
+ });
90
+ l.length === 0 ? n.value = !1 : n.value = !0, a.value = [...a.value, ...l];
91
+ }
92
+ };
93
+ return C(async () => {
94
+ t.value = !0, console.log(e.selectedDate);
95
+ const l = await x.read({
96
+ skip: i.value,
97
+ limit: s.value,
98
+ category: e.category,
99
+ member: e.member,
100
+ subscriber: e.subscriber,
101
+ onlyuser: e.onlyuser,
102
+ sortOrder: e.sortOrder,
103
+ user: e.user,
104
+ owner: e.owner,
105
+ date: e.selectedDate,
106
+ organization: e.organization,
107
+ period: e.period,
108
+ status: e.status
109
+ });
110
+ l.length === 0 ? n.value = !1 : n.value = !0, a.value = l, t.value = !1;
111
+ }), (l, J) => (r(), o("section", j, [
112
+ d(v, {
113
+ tag: "ul",
114
+ name: "fade",
115
+ class: "o-hidden bg-grey radius-big"
116
+ }, {
117
+ default: g(() => [
118
+ t.value ? (r(!0), o(k, { key: 0 }, w(s.value, (m) => (r(), f(U, { key: m }))), 128)) : u("", !0)
119
+ ]),
120
+ _: 1
121
+ }),
122
+ d(h, { name: "fade" }, {
123
+ default: g(() => [
124
+ !t.value && a.value.length < 1 ? (r(), f(L, {
125
+ key: 0,
126
+ title: "No Organizations Found",
127
+ description: "Currently, there are no organizations available. Please check back later.",
128
+ class: "pd-medium mn-thin bg-grey radius-big"
129
+ })) : u("", !0)
130
+ ]),
131
+ _: 1
132
+ }),
133
+ d(v, {
134
+ tag: "ul",
135
+ name: "fade",
136
+ class: "container"
137
+ }, {
138
+ default: g(() => [
139
+ !t.value && a.value.length > 0 ? (r(!0), o(k, { key: 0 }, w(a.value, (m, S) => (r(), f(V, {
140
+ onClick: (K) => l.$router.push({ name: "Organization", params: { _id: m._id } }),
141
+ key: m._id,
142
+ organization: m,
143
+ user: b.user,
144
+ type: "normal",
145
+ class: N(["w-100 radius-big mn-medium", {
146
+ "br-b br-solid br-black-transp-10": S !== a.value.length - 1
147
+ }])
148
+ }, null, 8, ["onClick", "organization", "user", "class"]))), 128)) : u("", !0),
149
+ n.value && a.value.length > 0 ? (r(), o("button", {
150
+ key: 1,
151
+ onClick: p,
152
+ class: "w-100 bg-main button"
153
+ }, "Load more")) : u("", !0)
154
+ ]),
155
+ _: 1
156
+ })
157
+ ]));
158
+ }
159
+ }, A = { class: "pd-thin" }, H = { class: "mn-medium flex-v-center flex-nowrap flex" }, I = /* @__PURE__ */ O("h2", { class: "mn-r-medium" }, "Groups", -1), le = {
160
+ __name: "ProfileOrganizations",
161
+ setup(b) {
162
+ const e = M(), a = D();
163
+ let n = e.query.tab ? e.query.tab : "member";
164
+ const t = c(n);
165
+ return e.query.tab = t.value, q(t, (i) => {
166
+ a.replace({ query: { ...e.query, tab: i } });
167
+ }), (i, s) => (r(), o("div", A, [
168
+ O("header", H, [
169
+ I,
170
+ _.user._id === y(e).params._id ? (r(), o("button", {
171
+ key: 0,
172
+ onClick: s[0] || (s[0] = (p) => i.$router.push({
173
+ name: "Create Organization"
174
+ })),
175
+ class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
176
+ }, " + ")) : u("", !0)
177
+ ]),
178
+ d(F, {
179
+ selected: t.value,
180
+ "onUpdate:selected": s[1] || (s[1] = (p) => t.value = p),
181
+ tabs: [
182
+ { name: "Member", value: "member" },
183
+ { name: "Follower", value: "follower" }
184
+ ],
185
+ class: "mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"
186
+ }, null, 8, ["selected"]),
187
+ d(h, { name: "slide-fade" }, {
188
+ default: g(() => [
189
+ t.value === "member" ? (r(), f(z, {
190
+ key: 0,
191
+ user: _.user._id,
192
+ owner: y(e).params._id
193
+ }, null, 8, ["user", "owner"])) : u("", !0)
194
+ ]),
195
+ _: 1
196
+ }),
197
+ d(h, { name: "slide-fade" }, {
198
+ default: g(() => [
199
+ t.value === "follower" ? (r(), f(z, {
200
+ key: 0,
201
+ user: _.user._id,
202
+ subscriber: y(e).params._id
203
+ }, null, 8, ["user", "subscriber"])) : u("", !0)
204
+ ]),
205
+ _: 1
206
+ })
207
+ ]));
208
+ }
209
+ };
210
+ export {
211
+ le as default
212
+ };
@@ -0,0 +1,123 @@
1
+ import { ref as _, watch as C, computed as S, openBlock as e, createElementBlock as t, Fragment as h, createElementVNode as m, normalizeClass as b, toDisplayString as p, createCommentVNode as c, withModifiers as z, createVNode as y, Transition as g, withCtx as k, renderList as M, unref as u, onMounted as B, createBlock as w } from "vue";
2
+ import "./Breadcrumbs.vue_vue_type_style_index_0_lang-ec801e39.mjs";
3
+ import { _ as O } from "./_plugin-vue_export-helper-dad06003.mjs";
4
+ import { _ as U } from "./CardOrganization-d3a9d898.mjs";
5
+ import { _ as E } from "./EmptyState-34d85f10.mjs";
6
+ import { s as x } from "./auth-c3234662.mjs";
7
+ import { a as N } from "./organizations-e1bfd3a8.mjs";
8
+ import { m as P } from "./ButtonFollow-d4552677.mjs";
9
+ const V = {
10
+ key: 0,
11
+ class: "t-transp mn-r-small"
12
+ }, L = ["onClick"], j = ["onClick"], A = {
13
+ key: 0,
14
+ class: "mn-t-thin invalid-feedback"
15
+ }, D = {
16
+ __name: "Select",
17
+ props: {
18
+ label: String,
19
+ select: [String, Object],
20
+ placeholder: { type: String, default: "Please select an item" },
21
+ options: { type: Array, default: () => [] },
22
+ validation: Boolean
23
+ },
24
+ emits: ["update:select", "focus", "blur"],
25
+ setup(o, { emit: s }) {
26
+ const a = o, l = _(a.select), i = _(!1);
27
+ C(() => a.select, (n) => {
28
+ l.value = n;
29
+ });
30
+ const r = S(() => a.select ? a.options.filter((n) => n !== a.select) : a.options), f = () => {
31
+ i.value = !i.value, s(i.value ? "focus" : "blur");
32
+ }, $ = (n) => {
33
+ l.value = n, f(), s("update:select", l.value);
34
+ };
35
+ return (n, T) => {
36
+ var v;
37
+ return e(), t(h, null, [
38
+ m("div", {
39
+ class: b([n.$attrs.class, "flex-nowrap flex"])
40
+ }, [
41
+ o.label ? (e(), t("div", V, [
42
+ m("span", null, p(o.label), 1)
43
+ ])) : c("", !0),
44
+ m("li", {
45
+ onClick: z(f, ["stop"]),
46
+ class: "w-100"
47
+ }, [
48
+ m("span", null, p(((v = l.value) == null ? void 0 : v.name) || l.value || o.placeholder), 1)
49
+ ], 8, L),
50
+ y(g, {
51
+ mode: "out-in",
52
+ name: "fade"
53
+ }, {
54
+ default: k(() => [
55
+ i.value ? (e(), t("ul", {
56
+ key: 0,
57
+ class: b([n.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
58
+ }, [
59
+ (e(!0), t(h, null, M(u(r), (d) => (e(), t("li", null, [
60
+ d ? (e(), t("span", {
61
+ key: 0,
62
+ onClick: (q) => $(d),
63
+ class: "w-100"
64
+ }, p(d.name || d), 9, j)) : c("", !0)
65
+ ]))), 256))
66
+ ], 2)) : c("", !0)
67
+ ]),
68
+ _: 1
69
+ })
70
+ ], 2),
71
+ y(g, {
72
+ mode: "out-in",
73
+ name: "fade"
74
+ }, {
75
+ default: k(() => [
76
+ o.validation ? (e(), t("div", A, " * " + p(o.validation.message), 1)) : c("", !0)
77
+ ]),
78
+ _: 1
79
+ })
80
+ ], 64);
81
+ };
82
+ }
83
+ }, Y = /* @__PURE__ */ O(D, [["__scopeId", "data-v-a78dbba1"]]);
84
+ const F = { class: "w-100 o-scroll" }, I = {
85
+ key: 1,
86
+ class: "w-max gap-thin flex-nowrap flex"
87
+ }, Z = {
88
+ __name: "Publics",
89
+ setup(o) {
90
+ let s = _(null);
91
+ B(async () => {
92
+ s.value = await N.read({
93
+ user: x.user._id,
94
+ sort: "numberOfMemberships",
95
+ limit: 10,
96
+ types: ["public"]
97
+ });
98
+ });
99
+ const a = ({ membership: l, isMember: i, targetId: r }) => {
100
+ P.handleMembershipUpdate(s.value, l, i, r);
101
+ };
102
+ return (l, i) => (e(), t("div", F, [
103
+ !u(s) || u(s).length < 1 ? (e(), w(E, {
104
+ key: 0,
105
+ title: "Unfortunately, we couldn't find any recommendations for you",
106
+ description: "Explore and find a community or organization that suits your interests.",
107
+ class: "radius-big bg-grey pd-medium"
108
+ })) : (e(), t("div", I, [
109
+ u(s) ? (e(!0), t(h, { key: 0 }, M(u(s), (r, f) => (e(), w(U, {
110
+ key: r._id,
111
+ organization: r,
112
+ user: x.user,
113
+ onUpdateMembership: a,
114
+ class: "flex-child-1 flex-child w-25r"
115
+ }, null, 8, ["organization", "user"]))), 128)) : c("", !0)
116
+ ]))
117
+ ]));
118
+ }
119
+ };
120
+ export {
121
+ Y as S,
122
+ Z as _
123
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js");const p=require("./_plugin-vue_export-helper-f246444f.js"),f=require("./CardOrganization-79eb2b6f.js"),k=require("./EmptyState-7658d7d6.js"),d=require("./auth-3dedf391.js"),_=require("./organizations-e74f4f84.js"),h=require("./ButtonFollow-daa0e9e4.js"),y={key:0,class:"t-transp mn-r-small"},B=["onClick"],g=["onClick"],v={key:0,class:"mn-t-thin invalid-feedback"},b={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(a,{emit:t}){const n=a,l=e.ref(n.select),s=e.ref(!1);e.watch(()=>n.select,o=>{l.value=o});const c=e.computed(()=>n.select?n.options.filter(o=>o!==n.select):n.options),i=()=>{s.value=!s.value,t(s.value?"focus":"blur")},m=o=>{l.value=o,i(),t("update:select",l.value)};return(o,V)=>{var u;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([o.$attrs.class,"flex-nowrap flex"])},[a.label?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",null,e.toDisplayString(a.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(i,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((u=l.value)==null?void 0:u.name)||l.value||a.placeholder),1)],8,B),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([o.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),r=>(e.openBlock(),e.createElementBlock("li",null,[r?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:N=>m(r),class:"w-100"},e.toDisplayString(r.name||r),9,g)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[a.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(a.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},w=p._export_sfc(b,[["__scopeId","data-v-a78dbba1"]]);const E={class:"w-100 o-scroll"},x={key:1,class:"w-max gap-thin flex-nowrap flex"},C={__name:"Publics",setup(a){let t=e.ref(null);e.onMounted(async()=>{t.value=await _.actions.read({user:d.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const n=({membership:l,isMember:s,targetId:c})=>{h.mutations.handleMembershipUpdate(t.value,l,s,c)};return(l,s)=>(e.openBlock(),e.createElementBlock("div",E,[!e.unref(t)||e.unref(t).length<1?(e.openBlock(),e.createBlock(k._sfc_main,{key:0,title:"Unfortunately, we couldn't find any recommendations for you",description:"Explore and find a community or organization that suits your interests.",class:"radius-big bg-grey pd-medium"})):(e.openBlock(),e.createElementBlock("div",x,[e.unref(t)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(t),(c,i)=>(e.openBlock(),e.createBlock(f._sfc_main,{key:c._id,organization:c,user:d.state.user,onUpdateMembership:n,class:"flex-child-1 flex-child w-25r"},null,8,["organization","user"]))),128)):e.createCommentVNode("",!0)]))]))}};exports.Select=w;exports._sfc_main=C;
@@ -0,0 +1,83 @@
1
+ import { ref as d, watch as v, openBlock as l, createElementBlock as n, withModifiers as g, createElementVNode as i } from "vue";
2
+ import { a as w } from "./auth-c3234662.mjs";
3
+ const x = ["src"], _ = {
4
+ key: 1,
5
+ class: "flex-v-center flex-h-center flex w-100 h-100 bg-second"
6
+ }, y = /* @__PURE__ */ i("svg", {
7
+ class: "i-medium",
8
+ width: "104",
9
+ height: "104",
10
+ viewBox: "0 0 104 104",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, [
14
+ /* @__PURE__ */ i("path", {
15
+ fill: "white",
16
+ d: "M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"
17
+ })
18
+ ], -1), k = [
19
+ y
20
+ ], D = {
21
+ __name: "UploadImage",
22
+ props: [
23
+ "uploadPath",
24
+ // only necessary prop
25
+ "photo"
26
+ // new prop for holding the image url
27
+ ],
28
+ emits: ["update:photo"],
29
+ setup(a, { emit: u }) {
30
+ const r = a, t = d(null), s = d(null);
31
+ v(r, ({ photo: e }) => {
32
+ e && (t.value = e);
33
+ });
34
+ function h() {
35
+ s.value.click();
36
+ }
37
+ async function c(e) {
38
+ let o = e.target.files[0], p = new FormData();
39
+ p.append("file", o);
40
+ try {
41
+ let m = await w.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(r.uploadPath)}`, p, {
42
+ headers: {
43
+ "Content-Type": "multipart/form-data"
44
+ }
45
+ });
46
+ t.value = m.data.filepath, u("update:photo", t.value);
47
+ } catch (f) {
48
+ console.error(f);
49
+ }
50
+ }
51
+ function C(e) {
52
+ e.preventDefault(), c({
53
+ target: {
54
+ files: e.dataTransfer.files
55
+ }
56
+ });
57
+ }
58
+ return (e, o) => (l(), n("div", {
59
+ onClick: h,
60
+ onDrop: C,
61
+ onDragover: o[0] || (o[0] = g(() => {
62
+ }, ["prevent"])),
63
+ class: "image-upload-area flex-v-center flex-h-center flex"
64
+ }, [
65
+ t.value || a.photo ? (l(), n("img", {
66
+ key: 0,
67
+ src: (e.FILE_SERVER_URL || "") + (t.value || a.photo),
68
+ alt: "Uploaded image",
69
+ class: "w-100 h-100 object-fit-cover"
70
+ }, null, 8, x)) : (l(), n("div", _, k)),
71
+ i("input", {
72
+ type: "file",
73
+ ref_key: "fileInput",
74
+ ref: s,
75
+ onChange: c,
76
+ style: { display: "none" }
77
+ }, null, 544)
78
+ ], 32));
79
+ }
80
+ };
81
+ export {
82
+ D as _
83
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),h=require("./auth-3dedf391.js"),C=["src"],m={key:1,class:"flex-v-center flex-h-center flex w-100 h-100 bg-second"},v=e.createElementVNode("svg",{class:"i-medium",width:"104",height:"104",viewBox:"0 0 104 104",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{fill:"white",d:"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"})],-1),g=[v],w={__name:"UploadImage",props:["uploadPath","photo"],emits:["update:photo"],setup(l,{emit:p}){const a=l,o=e.ref(null),r=e.ref(null);e.watch(a,({photo:t})=>{t&&(o.value=t)});function f(){r.value.click()}async function i(t){let n=t.target.files[0],s=new FormData;s.append("file",n);try{let d=await h.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(a.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}});o.value=d.data.filepath,p("update:photo",o.value)}catch(c){console.error(c)}}function u(t){t.preventDefault(),i({target:{files:t.dataTransfer.files}})}return(t,n)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:u,onDragover:n[0]||(n[0]=e.withModifiers(()=>{},["prevent"])),class:"image-upload-area flex-v-center flex-h-center flex"},[o.value||l.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+(o.value||l.photo),alt:"Uploaded image",class:"w-100 h-100 object-fit-cover"},null,8,C)):(e.openBlock(),e.createElementBlock("div",m,g)),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:r,onChange:i,style:{display:"none"}},null,544)],32))}};exports._sfc_main=w;
@@ -0,0 +1,8 @@
1
+ "use strict";const u=require("vue"),qt=require("./_plugin-vue_export-helper-f246444f.js"),M=require("./globals-928eb13c.js");const It={key:0,class:"t-transp mn-r-small"},Ft={class:"w-100"},Vt=["type","value","placeholder"],Mt=["value","placeholder"],Ht={key:0,class:"mn-t-thin mn-thin mn-b-thin invalid-feedback"},Wt={__name:"Field",props:{label:null,type:"text",placeholder:"Enter something here",field:null,validation:!1,disabled:!1},emits:["update:field","focus","blur"],setup(t,{emit:e}){const r=t,s=u.ref(r.field);return(n,a)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",{class:u.normalizeClass([[n.$attrs.class,{"bg-fourth-nano":t.validation}],"flex-center flex-nowrap flex"])},[t.label?(u.openBlock(),u.createElementBlock("div",It,[u.createElementVNode("span",null,u.toDisplayString(t.label),1)])):u.createCommentVNode("",!0),u.createElementVNode("div",Ft,[t.type!=="textarea"?(u.openBlock(),u.createElementBlock("input",{key:0,onInput:a[0]||(a[0]=o=>s.value=e("update:field",o.target.value)),onFocus:a[1]||(a[1]=o=>e("focus",o)),onBlur:a[2]||(a[2]=o=>e("blur",o)),type:t.type,class:"w-100",value:t.field,placeholder:t.placeholder},null,40,Vt)):(u.openBlock(),u.createElementBlock("textarea",{key:1,onInput:a[3]||(a[3]=o=>s.value=e("update:field",o.target.value)),onFocus:a[4]||(a[4]=o=>e("focus",o)),onBlur:a[5]||(a[5]=o=>e("blur",o)),class:"w-100",value:t.field,placeholder:t.placeholder},null,40,Mt))])],2),u.createVNode(u.Transition,{name:"fade"},{default:u.withCtx(()=>[t.validation?(u.openBlock(),u.createElementBlock("div",Ht," * "+u.toDisplayString(t.validation.message),1)):u.createCommentVNode("",!0)]),_:1})],64))}},Jt=qt._export_sfc(Wt,[["__scopeId","data-v-e4056b41"]]);const zt=["onClick","disabled"],Kt={key:0},Gt={key:0,class:"loading"},Xt=u.createElementVNode("span",null,[u.createElementVNode("svg",{class:"i-small",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[u.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[u.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),u.createTextVNode(),u.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),u.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[u.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),u.createTextVNode(),u.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),u.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[u.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),u.createTextVNode(),u.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),u.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[u.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),u.createTextVNode(),u.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),u.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[u.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),u.createTextVNode(),u.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])])],-1),Qt=[Xt],Yt={key:0,class:"h4 loading"},Zt=u.createElementVNode("span",{class:"p-small t-white"},"✔",-1),er=[Zt],tr={key:0,class:"error"},rr={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},validation:{type:Boolean,default:!1}},setup(t){const e=t,r=u.ref(null),s=u.ref(null),n=u.ref(!1),a=u.ref(!1);async function o(){r.value.style["pointer-events"]="none",s.value=null,n.value=!0;try{await e.submit(),r.value.classList.replace("bg-main","bg-light-main"),n.value=!1,a.value=!0,setTimeout(()=>{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)},500),e.callback&&setTimeout(()=>e.callback(),e.callbackDelay)}catch{r.value.classList.replace("bg-main","bg-fourth-nano"),s.value="❌",setTimeout(()=>{r.value.classList.replace("bg-fourth-nano","bg-main"),r.value.style.pointerEvents="auto",n.value=!1,a.value=!1,s.value=null},1330)}}return(i,l)=>(u.openBlock(),u.createElementBlock("button",{onClick:u.withModifiers(o,["stop"]),disabled:t.validation,ref_key:"button",ref:r,class:"w-100 bg-main button"},[u.createVNode(u.Transition,{mode:"out-in",name:"fadeIn"},{default:u.withCtx(()=>[!n.value&&!s.value&&!a.value?(u.openBlock(),u.createElementBlock("span",Kt,[u.renderSlot(i.$slots,"default")])):u.createCommentVNode("",!0)]),_:3}),u.createVNode(u.Transition,{mode:"out-in",name:"fadeIn"},{default:u.withCtx(()=>[n.value&&!s.value?(u.openBlock(),u.createElementBlock("div",Gt,Qt)):u.createCommentVNode("",!0)]),_:1}),u.createVNode(u.Transition,{mode:"out-in",name:"fadeIn"},{default:u.withCtx(()=>[a.value?(u.openBlock(),u.createElementBlock("div",Yt,er)):u.createCommentVNode("",!0)]),_:1}),u.createVNode(u.Transition,{mode:"out-in",name:"fadeIn"},{default:u.withCtx(()=>[s.value?(u.openBlock(),u.createElementBlock("div",tr,[u.createElementVNode("span",null,u.toDisplayString(s.value),1)])):u.createCommentVNode("",!0)]),_:1})],8,zt))}};function Le(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ue={exports:{}},mt=function(e,r){return function(){for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];return e.apply(r,n)}},nr=mt,Be=Object.prototype.toString,De=function(t){return function(e){var r=Be.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function H(t){return t=t.toLowerCase(),function(r){return De(r)===t}}function je(t){return Array.isArray(t)}function ie(t){return typeof t>"u"}function ar(t){return t!==null&&!ie(t)&&t.constructor!==null&&!ie(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var vt=H("ArrayBuffer");function sr(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&vt(t.buffer),e}function or(t){return typeof t=="string"}function ir(t){return typeof t=="number"}function wt(t){return t!==null&&typeof t=="object"}function se(t){if(De(t)!=="object")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}var ur=H("Date"),lr=H("File"),cr=H("Blob"),dr=H("FileList");function $e(t){return Be.call(t)==="[object Function]"}function fr(t){return wt(t)&&$e(t.pipe)}function pr(t){var e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||Be.call(t)===e||$e(t.toString)&&t.toString()===e)}var hr=H("URLSearchParams");function mr(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function vr(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function qe(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),je(t))for(var r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}function Te(){var t={};function e(n,a){se(t[a])&&se(n)?t[a]=Te(t[a],n):se(n)?t[a]=Te({},n):je(n)?t[a]=n.slice():t[a]=n}for(var r=0,s=arguments.length;r<s;r++)qe(arguments[r],e);return t}function wr(t,e,r){return qe(e,function(n,a){r&&typeof n=="function"?t[a]=nr(n,r):t[a]=n}),t}function br(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}function yr(t,e,r,s){t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,r&&Object.assign(t.prototype,r)}function gr(t,e,r){var s,n,a,o={};e=e||{};do{for(s=Object.getOwnPropertyNames(t),n=s.length;n-- >0;)a=s[n],o[a]||(e[a]=t[a],o[a]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e}function Er(t,e,r){t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;var s=t.indexOf(e,r);return s!==-1&&s===r}function Cr(t){if(!t)return null;var e=t.length;if(ie(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r}var Pr=function(t){return function(e){return t&&e instanceof t}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),E={isArray:je,isArrayBuffer:vt,isBuffer:ar,isFormData:pr,isArrayBufferView:sr,isString:or,isNumber:ir,isObject:wt,isPlainObject:se,isUndefined:ie,isDate:ur,isFile:lr,isBlob:cr,isFunction:$e,isStream:fr,isURLSearchParams:hr,isStandardBrowserEnv:vr,forEach:qe,merge:Te,extend:wr,trim:mr,stripBOM:br,inherits:yr,toFlatObject:gr,kindOf:De,kindOfTest:H,endsWith:Er,toArray:Cr,isTypedArray:Pr,isFileList:dr},z=E;function He(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var bt=function(e,r,s){if(!r)return e;var n;if(s)n=s(r);else if(z.isURLSearchParams(r))n=r.toString();else{var a=[];z.forEach(r,function(l,d){l===null||typeof l>"u"||(z.isArray(l)?d=d+"[]":l=[l],z.forEach(l,function(f){z.isDate(f)?f=f.toISOString():z.isObject(f)&&(f=JSON.stringify(f)),a.push(He(d)+"="+He(f))}))}),n=a.join("&")}if(n){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e},Or=E;function le(){this.handlers=[]}le.prototype.use=function(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1};le.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};le.prototype.forEach=function(e){Or.forEach(this.handlers,function(s){s!==null&&e(s)})};var Rr=le,xr=E,_r=function(e,r){xr.forEach(e,function(n,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[a])})},yt=E;function G(t,e,r,s,n){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n)}yt.inherits(G,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var gt=G.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(t){Et[t]={value:t}});Object.defineProperties(G,Et);Object.defineProperty(gt,"isAxiosError",{value:!0});G.from=function(t,e,r,s,n,a){var o=Object.create(gt);return yt.toFlatObject(t,o,function(l){return l!==Error.prototype}),G.call(o,t.message,e,r,s,n),o.name=t.name,a&&Object.assign(o,a),o};var Z=G,Ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},N=E;function Sr(t,e){e=e||new FormData;var r=[];function s(a){return a===null?"":N.isDate(a)?a.toISOString():N.isArrayBuffer(a)||N.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function n(a,o){if(N.isPlainObject(a)||N.isArray(a)){if(r.indexOf(a)!==-1)throw Error("Circular reference detected in "+o);r.push(a),N.forEach(a,function(l,d){if(!N.isUndefined(l)){var p=o?o+"."+d:d,f;if(l&&!o&&typeof l=="object"){if(N.endsWith(d,"{}"))l=JSON.stringify(l);else if(N.endsWith(d,"[]")&&(f=N.toArray(l))){f.forEach(function(c){!N.isUndefined(c)&&e.append(p,s(c))});return}}n(l,p)}}),r.pop()}else e.append(o,s(a))}return n(t),e}var Pt=Sr,me,We;function Ar(){if(We)return me;We=1;var t=Z;return me=function(r,s,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?r(n):s(new t("Request failed with status code "+n.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))},me}var ve,Je;function Nr(){if(Je)return ve;Je=1;var t=E;return ve=t.isStandardBrowserEnv()?function(){return{write:function(s,n,a,o,i,l){var d=[];d.push(s+"="+encodeURIComponent(n)),t.isNumber(a)&&d.push("expires="+new Date(a).toGMTString()),t.isString(o)&&d.push("path="+o),t.isString(i)&&d.push("domain="+i),l===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(s){var n=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ve}var kr=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Tr=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},Lr=kr,Ur=Tr,Ot=function(e,r){return e&&!Lr(r)?Ur(e,r):r},we,ze;function Br(){if(ze)return we;ze=1;var t=E,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return we=function(s){var n={},a,o,i;return s&&t.forEach(s.split(`
2
+ `),function(d){if(i=d.indexOf(":"),a=t.trim(d.substr(0,i)).toLowerCase(),o=t.trim(d.substr(i+1)),a){if(n[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?n[a]=(n[a]?n[a]:[]).concat([o]):n[a]=n[a]?n[a]+", "+o:o}}),n},we}var be,Ke;function Dr(){if(Ke)return be;Ke=1;var t=E;return be=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),n;function a(o){var i=o;return r&&(s.setAttribute("href",i),i=s.href),s.setAttribute("href",i),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return n=a(window.location.href),function(i){var l=t.isString(i)?a(i):i;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}(),be}var ye,Ge;function ce(){if(Ge)return ye;Ge=1;var t=Z,e=E;function r(s){t.call(this,s??"canceled",t.ERR_CANCELED),this.name="CanceledError"}return e.inherits(r,t,{__CANCEL__:!0}),ye=r,ye}var ge,Xe;function jr(){return Xe||(Xe=1,ge=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}),ge}var Ee,Qe;function Ye(){if(Qe)return Ee;Qe=1;var t=E,e=Ar(),r=Nr(),s=bt,n=Ot,a=Br(),o=Dr(),i=Ct,l=Z,d=ce(),p=jr();return Ee=function(c){return new Promise(function(_,y){var S=c.data,k=c.headers,V=c.responseType,j;function W(){c.cancelToken&&c.cancelToken.unsubscribe(j),c.signal&&c.signal.removeEventListener("abort",j)}t.isFormData(S)&&t.isStandardBrowserEnv()&&delete k["Content-Type"];var h=new XMLHttpRequest;if(c.auth){var pe=c.auth.username||"",w=c.auth.password?unescape(encodeURIComponent(c.auth.password)):"";k.Authorization="Basic "+btoa(pe+":"+w)}var m=n(c.baseURL,c.url);h.open(c.method.toUpperCase(),s(m,c.params,c.paramsSerializer),!0),h.timeout=c.timeout;function B(){if(h){var b="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,$=!V||V==="text"||V==="json"?h.responseText:h.response,D={data:$,status:h.status,statusText:h.statusText,headers:b,config:c,request:h};e(function(J){_(J),W()},function(J){y(J),W()},D),h=null}}if("onloadend"in h?h.onloadend=B:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(B)},h.onabort=function(){h&&(y(new l("Request aborted",l.ECONNABORTED,c,h)),h=null)},h.onerror=function(){y(new l("Network Error",l.ERR_NETWORK,c,h,h)),h=null},h.ontimeout=function(){var $=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",D=c.transitional||i;c.timeoutErrorMessage&&($=c.timeoutErrorMessage),y(new l($,D.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,c,h)),h=null},t.isStandardBrowserEnv()){var T=(c.withCredentials||o(m))&&c.xsrfCookieName?r.read(c.xsrfCookieName):void 0;T&&(k[c.xsrfHeaderName]=T)}"setRequestHeader"in h&&t.forEach(k,function($,D){typeof S>"u"&&D.toLowerCase()==="content-type"?delete k[D]:h.setRequestHeader(D,$)}),t.isUndefined(c.withCredentials)||(h.withCredentials=!!c.withCredentials),V&&V!=="json"&&(h.responseType=c.responseType),typeof c.onDownloadProgress=="function"&&h.addEventListener("progress",c.onDownloadProgress),typeof c.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",c.onUploadProgress),(c.cancelToken||c.signal)&&(j=function(b){h&&(y(!b||b&&b.type?new d:b),h.abort(),h=null)},c.cancelToken&&c.cancelToken.subscribe(j),c.signal&&(c.signal.aborted?j():c.signal.addEventListener("abort",j))),S||(S=null);var L=p(m);if(L&&["http","https","file"].indexOf(L)===-1){y(new l("Unsupported protocol "+L+":",l.ERR_BAD_REQUEST,c));return}h.send(S)})},Ee}var Ce,Ze;function $r(){return Ze||(Ze=1,Ce=null),Ce}var g=E,et=_r,tt=Z,qr=Ct,Ir=Pt,Fr={"Content-Type":"application/x-www-form-urlencoded"};function rt(t,e){!g.isUndefined(t)&&g.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Vr(){var t;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(t=Ye()),t}function Mr(t,e,r){if(g.isString(t))try{return(e||JSON.parse)(t),g.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}var de={transitional:qr,adapter:Vr(),transformRequest:[function(e,r){if(et(r,"Accept"),et(r,"Content-Type"),g.isFormData(e)||g.isArrayBuffer(e)||g.isBuffer(e)||g.isStream(e)||g.isFile(e)||g.isBlob(e))return e;if(g.isArrayBufferView(e))return e.buffer;if(g.isURLSearchParams(e))return rt(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var s=g.isObject(e),n=r&&r["Content-Type"],a;if((a=g.isFileList(e))||s&&n==="multipart/form-data"){var o=this.env&&this.env.FormData;return Ir(a?{"files[]":e}:e,o&&new o)}else if(s||n==="application/json")return rt(r,"application/json"),Mr(e);return e}],transformResponse:[function(e){var r=this.transitional||de.transitional,s=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,a=!s&&this.responseType==="json";if(a||n&&g.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?tt.from(o,tt.ERR_BAD_RESPONSE,this,null,this.response):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r()},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};g.forEach(["delete","get","head"],function(e){de.headers[e]={}});g.forEach(["post","put","patch"],function(e){de.headers[e]=g.merge(Fr)});var Ie=de,Hr=E,Wr=Ie,Jr=function(e,r,s){var n=this||Wr;return Hr.forEach(s,function(o){e=o.call(n,e,r)}),e},Pe,nt;function Rt(){return nt||(nt=1,Pe=function(e){return!!(e&&e.__CANCEL__)}),Pe}var at=E,Oe=Jr,zr=Rt(),Kr=Ie,Gr=ce();function Re(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Gr}var Xr=function(e){Re(e),e.headers=e.headers||{},e.data=Oe.call(e,e.data,e.headers,e.transformRequest),e.headers=at.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),at.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||Kr.adapter;return r(e).then(function(n){return Re(e),n.data=Oe.call(e,n.data,n.headers,e.transformResponse),n},function(n){return zr(n)||(Re(e),n&&n.response&&(n.response.data=Oe.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})},x=E,xt=function(e,r){r=r||{};var s={};function n(p,f){return x.isPlainObject(p)&&x.isPlainObject(f)?x.merge(p,f):x.isPlainObject(f)?x.merge({},f):x.isArray(f)?f.slice():f}function a(p){if(x.isUndefined(r[p])){if(!x.isUndefined(e[p]))return n(void 0,e[p])}else return n(e[p],r[p])}function o(p){if(!x.isUndefined(r[p]))return n(void 0,r[p])}function i(p){if(x.isUndefined(r[p])){if(!x.isUndefined(e[p]))return n(void 0,e[p])}else return n(void 0,r[p])}function l(p){if(p in r)return n(e[p],r[p]);if(p in e)return n(void 0,e[p])}var d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l};return x.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var c=d[f]||a,v=c(f);x.isUndefined(v)&&c!==l||(s[f]=v)}),s},xe,st;function _t(){return st||(st=1,xe={version:"0.27.2"}),xe}var Qr=_t().version,F=Z,Fe={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Fe[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});var ot={};Fe.transitional=function(e,r,s){function n(a,o){return"[Axios v"+Qr+"] Transitional option '"+a+"'"+o+(s?". "+s:"")}return function(a,o,i){if(e===!1)throw new F(n(o," has been removed"+(r?" in "+r:"")),F.ERR_DEPRECATED);return r&&!ot[o]&&(ot[o]=!0,console.warn(n(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,i):!0}};function Yr(t,e,r){if(typeof t!="object")throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);for(var s=Object.keys(t),n=s.length;n-- >0;){var a=s[n],o=e[a];if(o){var i=t[a],l=i===void 0||o(i,a,t);if(l!==!0)throw new F("option "+a+" must be "+l,F.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new F("Unknown option "+a,F.ERR_BAD_OPTION)}}var Zr={assertOptions:Yr,validators:Fe},St=E,en=bt,it=Rr,ut=Xr,fe=xt,tn=Ot,At=Zr,K=At.validators;function X(t){this.defaults=t,this.interceptors={request:new it,response:new it}}X.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=fe(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var s=r.transitional;s!==void 0&&At.assertOptions(s,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean)},!1);var n=[],a=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(a=a&&v.synchronous,n.unshift(v.fulfilled,v.rejected))});var o=[];this.interceptors.response.forEach(function(v){o.push(v.fulfilled,v.rejected)});var i;if(!a){var l=[ut,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(r);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=r;n.length;){var p=n.shift(),f=n.shift();try{d=p(d)}catch(c){f(c);break}}try{i=ut(d)}catch(c){return Promise.reject(c)}for(;o.length;)i=i.then(o.shift(),o.shift());return i};X.prototype.getUri=function(e){e=fe(this.defaults,e);var r=tn(e.baseURL,e.url);return en(r,e.params,e.paramsSerializer)};St.forEach(["delete","get","head","options"],function(e){X.prototype[e]=function(r,s){return this.request(fe(s||{},{method:e,url:r,data:(s||{}).data}))}});St.forEach(["post","put","patch"],function(e){function r(s){return function(a,o,i){return this.request(fe(i||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}X.prototype[e]=r(),X.prototype[e+"Form"]=r(!0)});var rn=X,_e,lt;function nn(){if(lt)return _e;lt=1;var t=ce();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var s;this.promise=new Promise(function(o){s=o});var n=this;this.promise.then(function(a){if(n._listeners){var o,i=n._listeners.length;for(o=0;o<i;o++)n._listeners[o](a);n._listeners=null}}),this.promise.then=function(a){var o,i=new Promise(function(l){n.subscribe(l),o=l}).then(a);return i.cancel=function(){n.unsubscribe(o)},i},r(function(o){n.reason||(n.reason=new t(o),s(n.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]},e.prototype.unsubscribe=function(s){if(this._listeners){var n=this._listeners.indexOf(s);n!==-1&&this._listeners.splice(n,1)}},e.source=function(){var s,n=new e(function(o){s=o});return{token:n,cancel:s}},_e=e,_e}var Se,ct;function an(){return ct||(ct=1,Se=function(e){return function(s){return e.apply(null,s)}}),Se}var Ae,dt;function sn(){if(dt)return Ae;dt=1;var t=E;return Ae=function(r){return t.isObject(r)&&r.isAxiosError===!0},Ae}var ft=E,on=mt,oe=rn,un=xt,ln=Ie;function Nt(t){var e=new oe(t),r=on(oe.prototype.request,e);return ft.extend(r,oe.prototype,e),ft.extend(r,e),r.create=function(n){return Nt(un(t,n))},r}var R=Nt(ln);R.Axios=oe;R.CanceledError=ce();R.CancelToken=nn();R.isCancel=Rt();R.VERSION=_t().version;R.toFormData=Pt;R.AxiosError=Z;R.Cancel=R.CanceledError;R.all=function(e){return Promise.all(e)};R.spread=an();R.isAxiosError=sn();Ue.exports=R;Ue.exports.default=R;var cn=Ue.exports,dn=cn;const Ve=Le(dn);var kt={exports:{}};/*!
3
+ * JavaScript Cookie v2.2.1
4
+ * https://github.com/js-cookie/js-cookie
5
+ *
6
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
+ * Released under the MIT license
8
+ */(function(t,e){(function(r){var s;if(t.exports=r(),s=!0,!s){var n=window.Cookies,a=window.Cookies=r();a.noConflict=function(){return window.Cookies=n,a}}})(function(){function r(){for(var a=0,o={};a<arguments.length;a++){var i=arguments[a];for(var l in i)o[l]=i[l]}return o}function s(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function n(a){function o(){}function i(d,p,f){if(!(typeof document>"u")){f=r({path:"/"},o.defaults,f),typeof f.expires=="number"&&(f.expires=new Date(new Date*1+f.expires*864e5)),f.expires=f.expires?f.expires.toUTCString():"";try{var c=JSON.stringify(p);/^[\{\[]/.test(c)&&(p=c)}catch{}p=a.write?a.write(p,d):encodeURIComponent(String(p)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),d=encodeURIComponent(String(d)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var v="";for(var _ in f)f[_]&&(v+="; "+_,f[_]!==!0&&(v+="="+f[_].split(";")[0]));return document.cookie=d+"="+p+v}}function l(d,p){if(!(typeof document>"u")){for(var f={},c=document.cookie?document.cookie.split("; "):[],v=0;v<c.length;v++){var _=c[v].split("="),y=_.slice(1).join("=");!p&&y.charAt(0)==='"'&&(y=y.slice(1,-1));try{var S=s(_[0]);if(y=(a.read||a)(y,S)||s(y),p)try{y=JSON.parse(y)}catch{}if(f[S]=y,d===S)break}catch{}}return d?f[d]:f}}return o.set=i,o.get=function(d){return l(d,!1)},o.getJSON=function(d){return l(d,!0)},o.remove=function(d,p){i(d,"",r(p,{expires:-1}))},o.defaults={},o.withConverter=n,o}return n(function(){})})})(kt);var fn=kt.exports;const re=Le(fn);/*! Capacitor: https://capacitorjs.com/ - MIT License */const pn=t=>{const e=new Map;e.set("web",{name:"web"});const r=t.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},s=(a,o)=>{r.platforms.set(a,o)},n=a=>{r.platforms.has(a)&&(r.currentPlatform=r.platforms.get(a))};return r.addPlatform=s,r.setPlatform=n,r},hn=t=>t.CapacitorPlatforms=pn(t),Tt=hn(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Tt.addPlatform;Tt.setPlatform;var Q;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(Q||(Q={}));class Ne extends Error{constructor(e,r,s){super(e),this.message=e,this.code=r,this.data=s}}const mn=t=>{var e,r;return t!=null&&t.androidBridge?"android":!((r=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||r===void 0)&&r.bridge?"ios":"web"},vn=t=>{var e,r,s,n,a;const o=t.CapacitorCustomPlatform||null,i=t.Capacitor||{},l=i.Plugins=i.Plugins||{},d=t.CapacitorPlatforms,p=()=>o!==null?o.name:mn(t),f=((e=d==null?void 0:d.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||p,c=()=>f()!=="web",v=((r=d==null?void 0:d.currentPlatform)===null||r===void 0?void 0:r.isNativePlatform)||c,_=w=>{const m=W.get(w);return!!(m!=null&&m.platforms.has(f())||k(w))},y=((s=d==null?void 0:d.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||_,S=w=>{var m;return(m=i.PluginHeaders)===null||m===void 0?void 0:m.find(B=>B.name===w)},k=((n=d==null?void 0:d.currentPlatform)===null||n===void 0?void 0:n.getPluginHeader)||S,V=w=>t.console.error(w),j=(w,m,B)=>Promise.reject(`${B} does not have an implementation of "${m}".`),W=new Map,h=(w,m={})=>{const B=W.get(w);if(B)return console.warn(`Capacitor plugin "${w}" already registered. Cannot register plugins twice.`),B.proxy;const T=f(),L=k(w);let b;const $=async()=>(!b&&T in m?b=typeof m[T]=="function"?b=await m[T]():b=m[T]:o!==null&&!b&&"web"in m&&(b=typeof m.web=="function"?b=await m.web():b=m.web),b),D=(C,O)=>{var U,q;if(L){const I=L==null?void 0:L.methods.find(A=>O===A.name);if(I)return I.rtype==="promise"?A=>i.nativePromise(w,O.toString(),A):(A,ne)=>i.nativeCallback(w,O.toString(),A,ne);if(C)return(U=C[O])===null||U===void 0?void 0:U.bind(C)}else{if(C)return(q=C[O])===null||q===void 0?void 0:q.bind(C);throw new Ne(`"${w}" plugin is not implemented on ${T}`,Q.Unimplemented)}},ee=C=>{let O;const U=(...q)=>{const I=$().then(A=>{const ne=D(A,C);if(ne){const ae=ne(...q);return O=ae==null?void 0:ae.remove,ae}else throw new Ne(`"${w}.${C}()" is not implemented on ${T}`,Q.Unimplemented)});return C==="addListener"&&(I.remove=async()=>O()),I};return U.toString=()=>`${C.toString()}() { [capacitor code] }`,Object.defineProperty(U,"name",{value:C,writable:!1,configurable:!1}),U},J=ee("addListener"),Me=ee("removeListener"),$t=(C,O)=>{const U=J({eventName:C},O),q=async()=>{const A=await U;Me({eventName:C,callbackId:A},O)},I=new Promise(A=>U.then(()=>A({remove:q})));return I.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await q()},I},he=new Proxy({},{get(C,O){switch(O){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return L?$t:J;case"removeListener":return Me;default:return ee(O)}}});return l[w]=he,W.set(w,{name:w,proxy:he,platforms:new Set([...Object.keys(m),...L?[T]:[]])}),he},pe=((a=d==null?void 0:d.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||h;return i.convertFileSrc||(i.convertFileSrc=w=>w),i.getPlatform=f,i.handleError=V,i.isNativePlatform=v,i.isPluginAvailable=y,i.pluginMethodNoop=j,i.registerPlugin=pe,i.Exception=Ne,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},wn=t=>t.Capacitor=vn(t),ue=wn(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Lt=ue.registerPlugin;ue.Plugins;class Ut{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,r){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(r);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const a=async()=>this.removeListener(e,r),o=Promise.resolve({remove:a});return Object.defineProperty(o,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await a()}}),o}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,r){const s=this.listeners[e];s&&s.forEach(n=>n(r))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,r){this.windowListeners[r]={registered:!1,windowEventName:e,pluginEventName:r,handler:s=>{this.notifyListeners(r,s)}}}unimplemented(e="not implemented"){return new ue.Exception(e,Q.Unimplemented)}unavailable(e="not available"){return new ue.Exception(e,Q.Unavailable)}async removeListener(e,r){const s=this.listeners[e];if(!s)return;const n=s.indexOf(r);this.listeners[e].splice(n,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const pt=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),ht=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class bn extends Ut{async getCookies(){const e=document.cookie,r={};return e.split(";").forEach(s=>{if(s.length<=0)return;let[n,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=ht(n).trim(),a=ht(a).trim(),r[n]=a}),r}async setCookie(e){try{const r=pt(e.key),s=pt(e.value),n=`; expires=${(e.expires||"").replace("expires=","")}`,a=(e.path||"/").replace("path=",""),o=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${r}=${s||""}${n}; path=${a}; ${o};`}catch(r){return Promise.reject(r)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const r of e)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}const Bt=Lt("CapacitorCookies",{web:()=>new bn}),yn=async t=>new Promise((e,r)=>{const s=new FileReader;s.onload=()=>{const n=s.result;e(n.indexOf(",")>=0?n.split(",")[1]:n)},s.onerror=n=>r(n),s.readAsDataURL(t)}),gn=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(n=>n.toLocaleLowerCase()).reduce((n,a,o)=>(n[a]=t[e[o]],n),{})},En=(t,e=!0)=>t?Object.entries(t).reduce((s,n)=>{const[a,o]=n;let i,l;return Array.isArray(o)?(l="",o.forEach(d=>{i=e?encodeURIComponent(d):d,l+=`${a}=${i}&`}),l.slice(0,-1)):(i=e?encodeURIComponent(o):o,l=`${a}=${i}`),`${s}&${l}`},"").substr(1):null,Cn=(t,e={})=>{const r=Object.assign({method:t.method||"GET",headers:t.headers},e),n=gn(t.headers)["content-type"]||"";if(typeof t.data=="string")r.body=t.data;else if(n.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[o,i]of Object.entries(t.data||{}))a.set(o,i);r.body=a.toString()}else if(n.includes("multipart/form-data")){const a=new FormData;if(t.data instanceof FormData)t.data.forEach((i,l)=>{a.append(l,i)});else for(const i of Object.keys(t.data))a.append(i,t.data[i]);r.body=a;const o=new Headers(r.headers);o.delete("content-type"),r.headers=o}else(n.includes("application/json")||typeof t.data=="object")&&(r.body=JSON.stringify(t.data));return r};class Pn extends Ut{async request(e){const r=Cn(e,e.webFetchExtra),s=En(e.params,e.shouldEncodeUrlParams),n=s?`${e.url}?${s}`:e.url,a=await fetch(n,r),o=a.headers.get("content-type")||"";let{responseType:i="text"}=a.ok?e:{};o.includes("application/json")&&(i="json");let l,d;switch(i){case"arraybuffer":case"blob":d=await a.blob(),l=await yn(d);break;case"json":l=await a.json();break;case"document":case"text":default:l=await a.text()}const p={};return a.headers.forEach((f,c)=>{p[c]=f}),{data:l,headers:p,status:a.status,url:a.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}Lt("CapacitorHttp",{web:()=>new Pn});const On=Ve.create({baseURL:process.env.API_URL,withCredentials:!0}),Y=u.reactive({code:{value:"",type:"",method:"",isSended:!1,isValid:!1}});async function Dt(t,e,r){return await On.post("/api/twofa/sendcode",{phone:t.phone.number,email:t.email,method:e,type:r}).then(s=>(Y.code=s.data,Y.code.isSended=!0,Promise.resolve(s.data)),s=>(console.log(s),M.setError(s),Promise.reject(s)))}u.watch(Y,(t,e)=>{});const Rn=Object.freeze(Object.defineProperty({__proto__:null,sendCode:Dt,state:Y},Symbol.toStringTag,{value:"Module"})),te=Ve.create({baseURL:process.env.API_URL,withCredentials:!0}),P=u.reactive({user:{_id:"",username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});if(re.get("user")){const{_id:t,email:e,phone:r,roles:s,accessToken:n}=JSON.parse(re.get("user"));Object.assign(P.user,{_id:t,email:e,phone:r}),Object.assign(P.access,{token:n,roles:s,status:!!n}),te.interceptors.request.use(a=>(n&&(a.headers["x-access-token"]=n),a),a=>Promise.reject(a))}const jt={async login(t,e){try{const r=await te.post("/api/auth/signin",{...t,type:e});return ke("user",r.data),Object.assign(P.user,{...r.data}),Object.assign(P.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){return Object.assign(P.access,{token:null,status:!1,roles:null}),M.setError(r),Promise.reject(r)}},async signup(t,e,r){const{password:s,passwordRepeat:n}=P.user;if(s!==n){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw M.setError(a),new Error(a.response.status)}try{t.phone=t.phone.number;const a=await te.post("/api/auth/signup",{...t,type:e,inviteCode:r});return a.data.accessToken&&ke("user",a.data),Object.assign(P.user,{...a.data}),Object.assign(P.access,{token:a.data.accessToken,status:!0,roles:a.data.roles}),a.data}catch(a){throw M.setError(a),console.log("Sign up falied"),a}},logout(){_n("user"),Object.assign(P.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(P.access,{token:null,status:!1})},async resetPassword(t,e){try{const r=await te.post("/api/auth/reset-password",{email:t.email,phone:t.phone.number,type:e});return Object.assign(Y.code,{...r.data,isSended:!0}),r.data}catch(r){return M.setError(r),Promise.reject(r)}},async updatePassword(t,e){const{password:r,passwordRepeat:s}=P.user;if(r!==s){const n={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw M.setError(n),new Error(n.response.status)}try{const n=await te.post("/api/auth/update-password",{email:t.email,phone:t.phone.number,password:t.password,passwordRepeat:t.passwordRepeat,type:e});return n.data.accessToken&&ke("user",n.data),Object.assign(P.user,{...n.data}),Object.assign(P.access,{token:n.data.accessToken,status:!0}),n.data}catch(n){return M.setError(n),Promise.reject(n)}}},xn={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function ke(t,e,r=process.env.NODE_ENV){process.env.MOBILE_APP?Bt.setCookie({url:process.env.API_URL,key:t,value:JSON.stringify(e)}):re.set(t,JSON.stringify(e),xn[r])}function _n(t,e=process.env.NODE_ENV){if(process.env.MOBILE_APP)Bt.deleteCookie({url:process.env.API_URL,key:t});else{const r=e==="production"?{domain:process.env.API_URL}:{};re.remove(t,r)}}u.watch(P,(t,e)=>{});const Sn=Object.freeze(Object.defineProperty({__proto__:null,actions:jt,state:P},Symbol.toStringTag,{value:"Module"}));exports.Cookies=re;exports.Field=Jt;exports._sfc_main=rr;exports.actions=jt;exports.auth=Sn;exports.axios=Ve;exports.getDefaultExportFromCjs=Le;exports.sendCode=Dt;exports.state=P;exports.state$1=Y;exports.twofa=Rn;