@ozdao/prometheus-framework 0.0.87 → 0.0.88

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,31 +1,31 @@
1
- import { r as F, a as J, s as D, c as K, u as V, b as A, S as X, _ as Z } from "./Feed-ecf37814.mjs";
2
- import { e as ft } from "./Feed-ecf37814.mjs";
3
- import { openBlock as c, createElementBlock as v, createStaticVNode as ee, ref as y, onMounted as z, createVNode as g, TransitionGroup as I, withCtx as w, Fragment as O, renderList as j, createBlock as $, createCommentVNode as h, Transition as q, normalizeClass as U, createElementVNode as _, unref as p, toDisplayString as N, watch as H, resolveComponent as te, resolveDynamicComponent as ae, createTextVNode as W, reactive as re } from "vue";
4
- import { _ as Y } from "./EmptyState-34d85f10.mjs";
5
- import { _ as G, s as k, F as P, b as Q, a as ne } from "./auth-35ef1791.mjs";
6
- import { useRoute as L, useRouter as B } from "vue-router";
7
- import { _ as se, S as oe, C as le } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs";
8
- import { _ as ie, a as ue } from "./Comments-c5afa4d6.mjs";
9
- import { _ as ce } from "./Popup-82fb2c8a.mjs";
10
- import { _ as de } from "./UploadImage-ff8f9a0c.mjs";
11
- import { a as pe } from "./organizations-1b4c84ee.mjs";
12
- import { s as T } from "./globals-96ba60e4.mjs";
1
+ import { r as F, a as J, s as D, c as X, u as V, b as A, S as Z, _ as ee } from "./Feed-dc8b66bf.mjs";
2
+ import { e as vt } from "./Feed-dc8b66bf.mjs";
3
+ import { openBlock as d, createElementBlock as _, createStaticVNode as te, ref as w, onMounted as j, createVNode as v, TransitionGroup as U, withCtx as x, Fragment as P, renderList as T, createBlock as $, createCommentVNode as b, Transition as q, normalizeClass as N, createElementVNode as h, unref as m, toDisplayString as L, watch as W, resolveComponent as ae, resolveDynamicComponent as Y, createTextVNode as B, reactive as re, mergeProps as ne } from "vue";
4
+ import { _ as G } from "./EmptyState-34d85f10.mjs";
5
+ import { _ as Q, s as k, F as C, b as K, a as se } from "./auth-35ef1791.mjs";
6
+ import { useRoute as z, useRouter as M } from "vue-router";
7
+ import { _ as oe, S as le, C as ie } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs";
8
+ import { _ as ue, a as ce, b as de } from "./Image-6c7584f5.mjs";
9
+ import { _ as pe } from "./Popup-82fb2c8a.mjs";
10
+ import { _ as me } from "./UploadImage-ff8f9a0c.mjs";
11
+ import { a as fe } from "./organizations-1b4c84ee.mjs";
12
+ import { s as I } from "./globals-96ba60e4.mjs";
13
13
  import "vue-i18n";
14
14
  import "./CardHeader-ce5a1a75.mjs";
15
15
  import "./PlaceholderUserpic-995da0fc.mjs";
16
16
  import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
17
- const me = {}, fe = {
17
+ const ge = {}, ve = {
18
18
  width: "100%",
19
19
  height: "50",
20
20
  xmlns: "http://www.w3.org/2000/svg"
21
- }, ge = /* @__PURE__ */ ee('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 7), ve = [
22
- ge
21
+ }, _e = /* @__PURE__ */ te('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 7), he = [
22
+ _e
23
23
  ];
24
- function _e(i, t) {
25
- return c(), v("svg", fe, ve);
24
+ function ye(p, t) {
25
+ return d(), _("svg", ve, he);
26
26
  }
27
- const he = /* @__PURE__ */ G(me, [["render", _e]]);
28
- const ye = { class: "today-events" }, ct = {
27
+ const be = /* @__PURE__ */ Q(ge, [["render", ye]]);
28
+ const we = { class: "today-events" }, pt = {
29
29
  __name: "List",
30
30
  props: {
31
31
  category: {
@@ -53,12 +53,12 @@ const ye = { class: "today-events" }, ct = {
53
53
  default: null
54
54
  }
55
55
  },
56
- setup(i) {
57
- const t = i, r = y([]), e = y(!0), s = y(0), f = y(5);
58
- return z(async () => {
56
+ setup(p) {
57
+ const t = p, r = w([]), e = w(!0), l = w(0), i = w(5);
58
+ return j(async () => {
59
59
  const a = await F({
60
- skip: s.value,
61
- limit: f.value,
60
+ skip: l.value,
61
+ limit: i.value,
62
62
  sortOrder: "desc",
63
63
  category: t.category,
64
64
  user: t.user,
@@ -68,160 +68,160 @@ const ye = { class: "today-events" }, ct = {
68
68
  status: t.status
69
69
  });
70
70
  r.value = a, e.value = !1;
71
- }), (a, u) => (c(), v("section", ye, [
72
- g(I, {
71
+ }), (a, n) => (d(), _("section", we, [
72
+ v(U, {
73
73
  tag: "ul",
74
74
  name: "fade",
75
75
  class: "o-hidden bg-grey radius-big"
76
76
  }, {
77
- default: w(() => [
78
- e.value ? (c(!0), v(O, { key: 0 }, j(f.value, (m) => (c(), $(he, { key: m }))), 128)) : h("", !0)
77
+ default: x(() => [
78
+ e.value ? (d(!0), _(P, { key: 0 }, T(i.value, (c) => (d(), $(be, { key: c }))), 128)) : b("", !0)
79
79
  ]),
80
80
  _: 1
81
81
  }),
82
- g(q, { name: "fade" }, {
83
- default: w(() => [
84
- !e.value && r.value.length < 1 ? (c(), $(Y, {
82
+ v(q, { name: "fade" }, {
83
+ default: x(() => [
84
+ !e.value && r.value.length < 1 ? (d(), $(G, {
85
85
  key: 0,
86
86
  title: "No Events Today",
87
87
  description: "Today, are no events available. Please check back later.",
88
88
  class: "pd-medium mn-thin bg-grey radius-big"
89
- })) : h("", !0)
89
+ })) : b("", !0)
90
90
  ]),
91
91
  _: 1
92
92
  }),
93
- g(I, {
93
+ v(U, {
94
94
  tag: "ul",
95
95
  name: "fade",
96
96
  class: "container"
97
97
  }, {
98
- default: w(() => [
99
- !e.value && r.value.length > 0 ? (c(!0), v(O, { key: 0 }, j(r.value, (m, x) => (c(), $(J, {
100
- onClick: (b) => a.$router.push({ name: "Event", params: { url: m.url } }),
101
- key: m._id,
102
- event: m,
103
- owner: i.user,
98
+ default: x(() => [
99
+ !e.value && r.value.length > 0 ? (d(!0), _(P, { key: 0 }, T(r.value, (c, g) => (d(), $(J, {
100
+ onClick: (y) => a.$router.push({ name: "Event", params: { url: c.url } }),
101
+ key: c._id,
102
+ event: c,
103
+ owner: p.user,
104
104
  type: "short",
105
- class: U(["pd-medium", {
106
- "br-b br-solid br-black-transp-10": x !== r.value.length - 1
105
+ class: N(["pd-medium", {
106
+ "br-b br-solid br-black-transp-10": g !== r.value.length - 1
107
107
  }])
108
- }, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : h("", !0)
108
+ }, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : b("", !0)
109
109
  ]),
110
110
  _: 1
111
111
  })
112
112
  ]));
113
113
  }
114
- }, be = ["onClick"], ke = { class: "t-transp" }, we = {
114
+ }, ke = ["onClick"], xe = { class: "t-transp" }, $e = {
115
115
  __name: "DatePicker",
116
116
  props: ["date", "locale"],
117
- setup(i, { emit: t }) {
118
- const r = i, e = y(null);
119
- let s;
117
+ setup(p, { emit: t }) {
118
+ const r = p, e = w(null);
119
+ let l;
120
120
  if (r.date) {
121
- const l = parseInt(r.date.substring(0, 2)), E = parseInt(r.date.substring(2, 4)) - 1, n = parseInt(r.date.substring(4));
122
- s = new Date(n, E, l), console.log("Data" + s);
121
+ const u = parseInt(r.date.substring(0, 2)), E = parseInt(r.date.substring(2, 4)) - 1, s = parseInt(r.date.substring(4));
122
+ l = new Date(s, E, u), console.log("Data" + l);
123
123
  } else
124
- s = /* @__PURE__ */ new Date(), console.log("No data" + s);
125
- s.setHours(0, 0, 0, 0);
126
- const f = y(new Date(s)), a = b(s, 30);
127
- z(() => {
124
+ l = /* @__PURE__ */ new Date(), console.log("No data" + l);
125
+ l.setHours(0, 0, 0, 0);
126
+ const i = w(new Date(l)), a = y(l, 30);
127
+ j(() => {
128
128
  if (e.value) {
129
- const l = e.value.getElementsByClassName("selected")[0] || e.value.getElementsByClassName("bg-main")[0];
130
- l && (e.value.scrollLeft = l.offsetLeft - e.value.offsetWidth / 2 + l.offsetWidth / 2);
129
+ const u = e.value.getElementsByClassName("selected")[0] || e.value.getElementsByClassName("bg-main")[0];
130
+ u && (e.value.scrollLeft = u.offsetLeft - e.value.offsetWidth / 2 + u.offsetWidth / 2);
131
131
  }
132
132
  });
133
- function u(l) {
134
- f.value = l;
135
- const E = m(l);
133
+ function n(u) {
134
+ i.value = u;
135
+ const E = c(u);
136
136
  t("update:date", E);
137
137
  }
138
- function m(l) {
139
- return `${l.getDate().toString().padStart(2, "0")}${(l.getMonth() + 1).toString().padStart(2, "0")}${l.getFullYear()}`;
138
+ function c(u) {
139
+ return `${u.getDate().toString().padStart(2, "0")}${(u.getMonth() + 1).toString().padStart(2, "0")}${u.getFullYear()}`;
140
140
  }
141
- function x(l) {
142
- return l.toLocaleDateString(r.locale ? r.locale : "en", { weekday: "narrow" }).toUpperCase();
141
+ function g(u) {
142
+ return u.toLocaleDateString(r.locale ? r.locale : "en", { weekday: "narrow" }).toUpperCase();
143
143
  }
144
- function b(l, E) {
145
- const n = [];
144
+ function y(u, E) {
145
+ const s = [];
146
146
  for (let o = -15; o < E - 15; o++) {
147
- const d = new Date(l);
148
- d.setDate(l.getDate() + o), d.setHours(0, 0, 0, 0), n.push(d);
147
+ const f = new Date(u);
148
+ f.setDate(u.getDate() + o), f.setHours(0, 0, 0, 0), s.push(f);
149
149
  }
150
- return n;
150
+ return s;
151
151
  }
152
- return (l, E) => (c(), v("div", null, [
153
- _("div", {
152
+ return (u, E) => (d(), _("div", null, [
153
+ h("div", {
154
154
  class: "w-100 o-scroll flex-nowrap flex",
155
155
  ref_key: "scrollContainer",
156
156
  ref: e,
157
157
  style: { "scroll-snap-type": "x mandatory" }
158
158
  }, [
159
- (c(!0), v(O, null, j(p(a), (n) => (c(), v("div", {
160
- key: n.toString(),
161
- onClick: (o) => u(n),
162
- class: U([{
163
- selected: f.value.toDateString() === n.toDateString()
159
+ (d(!0), _(P, null, T(m(a), (s) => (d(), _("div", {
160
+ key: s.toString(),
161
+ onClick: (o) => n(s),
162
+ class: N([{
163
+ selected: i.value.toDateString() === s.toDateString()
164
164
  }, "cursor-pointer mn-r-small mn-l-small flex-column flex-center flex"])
165
165
  }, [
166
- _("span", ke, N(x(n)), 1),
167
- _("span", {
168
- class: U([{
169
- "bg-main": f.value.toDateString() === n.toDateString()
166
+ h("span", xe, L(g(s)), 1),
167
+ h("span", {
168
+ class: N([{
169
+ "bg-main": i.value.toDateString() === s.toDateString()
170
170
  }, "transition-ease-in-out t-semi flex-center flex radius-big i-semi day-number"])
171
- }, N(n.getDate()), 3)
172
- ], 10, be))), 128))
171
+ }, L(s.getDate()), 3)
172
+ ], 10, ke))), 128))
173
173
  ], 512)
174
174
  ]));
175
175
  }
176
- }, xe = { class: "pd-thin min-h-100vh" }, $e = /* @__PURE__ */ _("div", { class: "mn-thin br-solid br-1px br-grey bg-grey radius-big" }, null, -1), Ee = { class: "" }, De = {
176
+ }, Ee = { class: "pd-thin min-h-100vh" }, De = /* @__PURE__ */ h("div", { class: "mn-thin br-solid br-1px br-grey bg-grey radius-big" }, null, -1), Se = { class: "" }, Pe = {
177
177
  __name: "layoutEvents",
178
- setup(i) {
179
- const t = L(), r = B(), s = f(/* @__PURE__ */ new Date());
180
- function f(a) {
178
+ setup(p) {
179
+ const t = z(), r = M(), l = i(/* @__PURE__ */ new Date());
180
+ function i(a) {
181
181
  return `${a.getDate().toString().padStart(2, "0")}${(a.getMonth() + 1).toString().padStart(2, "0")}${a.getFullYear()}`;
182
182
  }
183
183
  if (t.query) {
184
- const a = t.query, u = {
184
+ const a = t.query, n = {
185
185
  tags: a.tags ? a.tags.split(",") : null,
186
- date: a.date ? a.date : s
186
+ date: a.date ? a.date : l
187
187
  };
188
- D.filter = u;
188
+ D.filter = n;
189
189
  } else {
190
190
  const a = {
191
- date: s
191
+ date: l
192
192
  };
193
193
  D.filter = a;
194
194
  }
195
- return H(() => D.filter, (a, u) => {
196
- const m = { ...t.query };
197
- Object.keys(u).forEach((b) => {
198
- m[b] && delete m[b];
195
+ return W(() => D.filter, (a, n) => {
196
+ const c = { ...t.query };
197
+ Object.keys(n).forEach((y) => {
198
+ c[y] && delete c[y];
199
199
  });
200
- const x = Object.fromEntries(
201
- Object.entries(a).filter(([b, l]) => Array.isArray(l) && l.length > 0 || typeof l == "string" && l).map(([b, l]) => [b, Array.isArray(l) ? l.join(",") : l])
200
+ const g = Object.fromEntries(
201
+ Object.entries(a).filter(([y, u]) => Array.isArray(u) && u.length > 0 || typeof u == "string" && u).map(([y, u]) => [y, Array.isArray(u) ? u.join(",") : u])
202
202
  );
203
- Object.assign(m, x), r.push({ query: m });
204
- }, { deep: !0 }), (a, u) => {
205
- const m = te("router-view");
206
- return c(), v("div", xe, [
207
- g(we, {
203
+ Object.assign(c, g), r.push({ query: c });
204
+ }, { deep: !0 }), (a, n) => {
205
+ const c = ae("router-view");
206
+ return d(), _("div", Ee, [
207
+ v($e, {
208
208
  date: D.filter.date,
209
- "onUpdate:date": u[0] || (u[0] = (x) => D.filter.date = x),
209
+ "onUpdate:date": n[0] || (n[0] = (g) => D.filter.date = g),
210
210
  locale: a.$i18n.locale,
211
211
  class: "radius-small bg-grey pd-l-zero pd-r-zero pd-medium"
212
212
  }, null, 8, ["date", "locale"]),
213
- $e,
214
- _("section", Ee, [
215
- g(m, null, {
216
- default: w(({ Component: x, route: b }) => [
217
- g(q, {
213
+ De,
214
+ h("section", Se, [
215
+ v(c, null, {
216
+ default: x(({ Component: g, route: y }) => [
217
+ v(q, {
218
218
  name: "scaleIn",
219
219
  mode: "out-in"
220
220
  }, {
221
- default: w(() => [
222
- (c(), $(ae(x), {
221
+ default: x(() => [
222
+ (d(), $(Y(g), {
223
223
  ref: "page",
224
- key: b.query
224
+ key: y.query
225
225
  }))
226
226
  ]),
227
227
  _: 2
@@ -233,33 +233,33 @@ const ye = { class: "today-events" }, ct = {
233
233
  ]);
234
234
  };
235
235
  }
236
- }, Se = {
236
+ }, Te = {
237
237
  key: 0,
238
238
  class: "pd-thin"
239
- }, Pe = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, Te = /* @__PURE__ */ _("h4", null, "Upload Event Cover", -1), Ce = /* @__PURE__ */ _("h3", { class: "mn-small" }, "Date", -1), Ie = /* @__PURE__ */ _("h3", { class: "mn-small" }, "Description", -1), Oe = {
239
+ }, Ce = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, Ie = /* @__PURE__ */ h("h4", null, "Upload Event Cover", -1), Oe = /* @__PURE__ */ h("h3", { class: "mn-small" }, "Date", -1), Ue = /* @__PURE__ */ h("h3", { class: "mn-small" }, "Description", -1), Le = {
240
240
  key: 0,
241
- class: "w-100 bg-grey pd-big radius-big"
241
+ class: "pd-b-extra w-100 bg-grey pd-big radius-big"
242
242
  }, je = {
243
243
  key: 1,
244
244
  class: "pd-thin pos-fixed pos-l-0 pos-b-0 w-100"
245
- }, Ue = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, ze = { class: "w-m-66r t-left pd-big bg-white radius-big" }, Le = /* @__PURE__ */ _("h3", { class: "mn-small" }, "Final Touches", -1), Ne = /* @__PURE__ */ _("h5", { class: "mn-thin" }, "Add to public:", -1), Fe = {
245
+ }, ze = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Ne = { class: "w-m-66r t-left pd-big bg-white radius-big" }, Be = /* @__PURE__ */ h("h3", { class: "mn-small" }, "Final Touches", -1), Fe = /* @__PURE__ */ h("h5", { class: "mn-thin" }, "Add to public:", -1), qe = {
246
246
  key: 0,
247
247
  class: "mn-thin"
248
- }, qe = {
248
+ }, Me = {
249
249
  key: 1,
250
250
  class: "mn-medium br-grey br-2px br-solid pd-small radius-big"
251
- }, Be = {
251
+ }, Ve = {
252
252
  __name: "EditEvent",
253
- setup(i) {
254
- const t = L(), r = B();
255
- let e = y(null), s = y(null);
256
- const f = y([]), a = y(null);
257
- z(async () => {
253
+ setup(p) {
254
+ const t = z(), r = M();
255
+ let e = w(null), l = w(null);
256
+ const i = w([]), a = w(null);
257
+ j(async () => {
258
258
  if (t.params.url) {
259
259
  const o = await F({ user: k.user._id, url: t.params.url });
260
- e.value = o.pop();
260
+ e.value = o.pop(), e.value.date.start = e.value.date.start.slice(0, 16), e.value.date.end = e.value.date.end.slice(0, 16);
261
261
  } else
262
- K(), e.value = D.current;
262
+ X(), e.value = D.current;
263
263
  e.value.owner || (e.value.owner = {
264
264
  target: k.user._id,
265
265
  type: "user"
@@ -272,136 +272,137 @@ const ye = { class: "today-events" }, ct = {
272
272
  name: e.value.owner.target.profile.name,
273
273
  photo: e.value.owner.target.profile.photo
274
274
  });
275
- const n = await pe.read({
275
+ const s = await fe.read({
276
276
  user: k.user._id,
277
277
  postable: k.user._id
278
278
  });
279
- s.value = n.map((o) => ({
279
+ l.value = s.map((o) => ({
280
280
  name: o.profile.name,
281
281
  _id: o._id,
282
282
  photo: o.profile.photo
283
283
  }));
284
284
  });
285
- const u = y(!1);
286
- function m() {
287
- u.value = !0;
285
+ const n = w(!1);
286
+ function c() {
287
+ n.value = !0;
288
288
  }
289
- function x() {
290
- u.value = !1;
289
+ function g() {
290
+ n.value = !1;
291
291
  }
292
- function b() {
293
- f.value.length > 0 && f.value.map((n) => n.text), e.value.status = "draft", t.params.url ? V(e.value).then((n) => {
294
- r.push({ name: "Event", params: { url: n.url } });
295
- }).catch((n) => {
296
- console.error(n);
297
- }) : A(e.value).then((n) => {
298
- r.push({ name: "Event", params: { url: n.url } });
299
- }).catch((n) => {
300
- console.error(n);
292
+ function y() {
293
+ i.value.length > 0 && i.value.map((s) => s.text), e.value.status = "draft", t.params.url ? V(e.value).then((s) => {
294
+ r.push({ name: "Event", params: { url: s.url } });
295
+ }).catch((s) => {
296
+ console.error(s);
297
+ }) : A(e.value).then((s) => {
298
+ r.push({ name: "Event", params: { url: s.url } });
299
+ }).catch((s) => {
300
+ console.error(s);
301
301
  });
302
302
  }
303
- function l() {
304
- confirm("Are you sure you want to delete this event?") && (void 0)(e.value._id).then((n) => {
303
+ function u() {
304
+ confirm("Are you sure you want to delete this event?") && (void 0)(e.value._id).then((s) => {
305
305
  r.push({ name: "Drafts" });
306
- }).catch((n) => {
307
- console.error(n);
306
+ }).catch((s) => {
307
+ console.error(s);
308
308
  });
309
309
  }
310
310
  function E() {
311
311
  a.value && (e.value.owner = {
312
312
  target: a.value._id,
313
313
  type: "organization"
314
- }), a.value || (e.value.creator.hidden = !1), a.value || (e.value.organization = e.value.creator), e.value.status = "published", console.log(e.value), t.params.url ? V(e.value).then((n) => {
315
- r.push({ name: "Blogevent", params: { url: n.url } });
316
- }).catch((n) => {
317
- console.log(n);
318
- }) : A(e.value).then((n) => {
319
- r.push({ name: "Blogevent", params: { url: n.url } });
320
- }).catch((n) => {
321
- console.log(n);
314
+ }), a.value || (e.value.creator.hidden = !1), a.value || (e.value.organization = e.value.creator), e.value.status = "published", console.log(e.value), t.params.url ? V(e.value).then((s) => {
315
+ r.push({ name: "Blogevent", params: { url: s.url } });
316
+ }).catch((s) => {
317
+ console.log(s);
318
+ }) : A(e.value).then((s) => {
319
+ r.push({ name: "Event", params: { url: s.url } });
320
+ }).catch((s) => {
321
+ console.log(s);
322
322
  });
323
323
  }
324
- return (n, o) => p(e) ? (c(), v("article", Se, [
325
- _("div", Pe, [
326
- g(de, {
327
- photo: p(e).cover,
328
- "onUpdate:photo": o[0] || (o[0] = (d) => p(e).cover = d),
324
+ return (s, o) => m(e) ? (d(), _("article", Te, [
325
+ h("div", Ce, [
326
+ v(me, {
327
+ photo: m(e).cover,
328
+ "onUpdate:photo": o[0] || (o[0] = (f) => m(e).cover = f),
329
329
  uploadPath: "users/" + k.user._id + "/events",
330
330
  class: "h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"
331
331
  }, null, 8, ["photo", "uploadPath"]),
332
- Te
332
+ Ie
333
333
  ]),
334
- g(P, {
335
- field: p(e).name,
336
- "onUpdate:field": o[1] || (o[1] = (d) => p(e).name = d),
334
+ v(C, {
335
+ field: m(e).name,
336
+ "onUpdate:field": o[1] || (o[1] = (f) => m(e).name = f),
337
337
  placeholder: "Event name",
338
338
  class: "mn-thin w-100 bg-grey pd-medium radius-small"
339
339
  }, null, 8, ["field"]),
340
- g(P, {
341
- field: p(e).description,
342
- "onUpdate:field": o[2] || (o[2] = (d) => p(e).description = d),
340
+ v(C, {
341
+ field: m(e).description,
342
+ "onUpdate:field": o[2] || (o[2] = (f) => m(e).description = f),
343
343
  type: "textfield",
344
344
  placeholder: "Enter short description",
345
345
  class: "mn-thin w-100 bg-grey pd-medium radius-small"
346
346
  }, null, 8, ["field"]),
347
- Ce,
348
- g(P, {
349
- field: p(e).date.start,
350
- "onUpdate:field": o[3] || (o[3] = (d) => p(e).date.start = d),
347
+ Oe,
348
+ B(" " + L(m(e).date.start) + " ", 1),
349
+ v(C, {
350
+ field: m(e).date.start,
351
+ "onUpdate:field": o[3] || (o[3] = (f) => m(e).date.start = f),
351
352
  label: "Start",
352
353
  type: "datetime-local",
353
354
  placeholder: "Not specified",
354
355
  class: "mn-thin w-100 bg-grey pd-medium radius-small"
355
356
  }, null, 8, ["field"]),
356
- g(P, {
357
- field: p(e).date.end,
358
- "onUpdate:field": o[4] || (o[4] = (d) => p(e).date.end = d),
357
+ v(C, {
358
+ field: m(e).date.end,
359
+ "onUpdate:field": o[4] || (o[4] = (f) => m(e).date.end = f),
359
360
  label: "End",
360
361
  type: "datetime-local",
361
362
  placeholder: "Not specified",
362
363
  class: "mn-thin w-100 bg-grey pd-medium radius-small"
363
364
  }, null, 8, ["field"]),
364
- Ie,
365
- p(e) ? (c(), v("section", Oe, [
366
- g(ie, {
367
- content: p(e).content,
368
- onUpdate: o[5] || (o[5] = (d) => p(e).content = d)
365
+ Ue,
366
+ m(e) ? (d(), _("section", Le, [
367
+ v(ue, {
368
+ content: m(e).content,
369
+ onUpdate: o[5] || (o[5] = (f) => m(e).content = f)
369
370
  }, null, 8, ["content"])
370
- ])) : h("", !0),
371
- p(e) ? (c(), v("section", je, [
372
- _("div", Ue, [
373
- p(t).params.url ? (c(), v("a", {
371
+ ])) : b("", !0),
372
+ m(e) ? (d(), _("section", je, [
373
+ h("div", ze, [
374
+ m(t).params.url ? (d(), _("a", {
374
375
  key: 0,
375
- onClick: o[6] || (o[6] = (d) => l()),
376
+ onClick: o[6] || (o[6] = (f) => u()),
376
377
  class: "mn-r-auto bg-red t-white t-black button"
377
- }, "Delete")) : h("", !0),
378
- _("a", {
379
- onClick: o[7] || (o[7] = (d) => b()),
378
+ }, "Delete")) : b("", !0),
379
+ h("a", {
380
+ onClick: o[7] || (o[7] = (f) => y()),
380
381
  class: "mn-l-auto bg-white t-black button"
381
382
  }, "To Drafts"),
382
- _("a", {
383
- onClick: o[8] || (o[8] = (d) => m()),
383
+ h("a", {
384
+ onClick: o[8] || (o[8] = (f) => c()),
384
385
  class: "mn-l-thin bg-black t-white button"
385
386
  }, "Publish")
386
387
  ])
387
- ])) : h("", !0),
388
- g(ce, {
388
+ ])) : b("", !0),
389
+ v(pe, {
389
390
  title: "Добавить участника",
390
- onClosePopup: x,
391
- isPopupOpen: u.value
391
+ onClosePopup: g,
392
+ isPopupOpen: n.value
392
393
  }, {
393
- default: w(() => [
394
- _("div", ze, [
395
- Le,
396
- g(se, {
397
- onTagsChanged: o[9] || (o[9] = (d) => p(e).tags = d),
398
- tags: p(e).tags
394
+ default: x(() => [
395
+ h("div", Ne, [
396
+ Be,
397
+ v(oe, {
398
+ onTagsChanged: o[9] || (o[9] = (f) => m(e).tags = f),
399
+ tags: m(e).tags
399
400
  }, null, 8, ["tags"]),
400
- Ne,
401
- g(oe, {
401
+ Fe,
402
+ v(le, {
402
403
  modelValue: a.value,
403
- "onUpdate:modelValue": o[10] || (o[10] = (d) => a.value = d),
404
- options: p(s),
404
+ "onUpdate:modelValue": o[10] || (o[10] = (f) => a.value = f),
405
+ options: m(l),
405
406
  multiple: !1,
406
407
  taggable: !1,
407
408
  placeholder: "Type to search or add tag",
@@ -409,23 +410,23 @@ const ye = { class: "today-events" }, ct = {
409
410
  "track-by": "_id",
410
411
  class: "mn-medium bg-grey radius-medium pd-small"
411
412
  }, null, 8, ["modelValue", "options"]),
412
- a.value ? (c(), v("h5", Fe, "Options:")) : h("", !0),
413
- a.value ? (c(), v("div", qe, [
414
- g(le, {
413
+ a.value ? (d(), _("h5", qe, "Options:")) : b("", !0),
414
+ a.value ? (d(), _("div", Me, [
415
+ v(ie, {
415
416
  label: "Hide Author",
416
- radio: p(e).creator.hidden,
417
- "onUpdate:radio": o[11] || (o[11] = (d) => p(e).creator.hidden = d),
417
+ radio: m(e).creator.hidden,
418
+ "onUpdate:radio": o[11] || (o[11] = (f) => m(e).creator.hidden = f),
418
419
  name: "prices",
419
420
  class: "w-100"
420
421
  }, null, 8, ["radio"])
421
- ])) : h("", !0),
422
- g(Q, {
422
+ ])) : b("", !0),
423
+ v(K, {
423
424
  submit: E,
424
- callback: n.redirectTo,
425
+ callback: s.redirectTo,
425
426
  class: "w-100 bg-black t-white"
426
427
  }, {
427
- default: w(() => [
428
- W("Publish")
428
+ default: x(() => [
429
+ B("Publish")
429
430
  ]),
430
431
  _: 1
431
432
  }, 8, ["callback"])
@@ -433,65 +434,65 @@ const ye = { class: "today-events" }, ct = {
433
434
  ]),
434
435
  _: 1
435
436
  }, 8, ["isPopupOpen"])
436
- ])) : h("", !0);
437
+ ])) : b("", !0);
437
438
  }
438
- }, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
439
+ }, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
439
440
  __proto__: null,
440
- default: Be
441
- }, Symbol.toStringTag, { value: "Module" })), C = ne.create({
441
+ default: Ve
442
+ }, Symbol.toStringTag, { value: "Module" })), O = se.create({
442
443
  baseURL: process.env.API_URL,
443
444
  withCredentials: !0
444
445
  }), S = re({
445
446
  tickets: [],
446
447
  error: null
447
448
  }), R = {
448
- async read({ user: i, type: t, target: r, role: e }) {
449
+ async read({ user: p, type: t, target: r, role: e }) {
449
450
  try {
450
- const s = await C.get("/api/tickets", { params: { user: i, type: t, target: r, role: e } });
451
- return S.error = null, S.tickets = s.data, Promise.resolve(s.data);
452
- } catch (s) {
453
- return T(s), Promise.reject(s);
451
+ const l = await O.get("/api/tickets", { params: { user: p, type: t, target: r, role: e } });
452
+ return S.error = null, S.tickets = l.data, Promise.resolve(l.data);
453
+ } catch (l) {
454
+ return I(l), Promise.reject(l);
454
455
  }
455
456
  },
456
- async create(i) {
457
+ async create(p) {
457
458
  try {
458
- const t = await C.post("/api/tickets/create", i);
459
+ const t = await O.post("/api/tickets/create", p);
459
460
  return S.error = null, Promise.resolve(t.data);
460
461
  } catch (t) {
461
- return T(t), Promise.reject(t);
462
+ return I(t), Promise.reject(t);
462
463
  }
463
464
  },
464
- async update(i) {
465
+ async update(p) {
465
466
  try {
466
- const t = await C.post("/api/tickets/update", i);
467
+ const t = await O.post("/api/tickets/update", p);
467
468
  return S.error = null, Promise.resolve(t.data);
468
469
  } catch (t) {
469
- return T(t), Promise.reject(t);
470
+ return I(t), Promise.reject(t);
470
471
  }
471
472
  },
472
- async delete(i) {
473
+ async delete(p) {
473
474
  try {
474
- const t = await C.post("/api/tickets/delete", i);
475
+ const t = await O.post("/api/tickets/delete", p);
475
476
  return S.error = null, Promise.resolve(t.data);
476
477
  } catch (t) {
477
- return T(t), Promise.reject(t);
478
+ return I(t), Promise.reject(t);
478
479
  }
479
480
  }
480
- }, Ve = {
481
- handleTicketUpdate(i, t, r) {
481
+ }, Ae = {
482
+ handleTicketUpdate(p, t, r) {
482
483
  let e;
483
- if (Array.isArray(i) ? e = i.find((s) => s._id === t.target) : typeof i == "object" && i._id === t.target && (e = i), e)
484
+ if (Array.isArray(p) ? e = p.find((l) => l._id === t.target) : typeof p == "object" && p._id === t.target && (e = p), e)
484
485
  if (e.hasTicket = r, r)
485
486
  e.tickets.push(t), e.numberOfTickets += 1;
486
487
  else {
487
- const s = e.tickets.findIndex((f) => f._id === t._id);
488
- s !== -1 && (e.tickets.splice(s, 1), e.numberOfTickets -= 1);
488
+ const l = e.tickets.findIndex((i) => i._id === t._id);
489
+ l !== -1 && (e.tickets.splice(l, 1), e.numberOfTickets -= 1);
489
490
  }
490
491
  }
491
492
  };
492
- H(S, (i) => {
493
+ W(S, (p) => {
493
494
  });
494
- const Ae = {
495
+ const He = {
495
496
  __name: "ButtonJoin",
496
497
  props: {
497
498
  type: {
@@ -513,143 +514,161 @@ const Ae = {
513
514
  }
514
515
  },
515
516
  emits: ["updateTicket"],
516
- setup(i, { emit: t }) {
517
- const r = i, e = async () => {
518
- r.hasTicket ? await f(r.targetId) : await s(r.targetId);
517
+ setup(p, { emit: t }) {
518
+ const r = p, e = async () => {
519
+ r.hasTicket ? await i(r.targetId) : await l(r.targetId);
519
520
  };
520
- async function s(a) {
521
+ async function l(a) {
521
522
  try {
522
- const u = {
523
+ const n = {
523
524
  // Renamed membershipData to ticketData
524
525
  type: r.type,
525
526
  target: a,
526
527
  user: r.userId
527
- }, m = await R.create(u);
528
- t("updateTicket", { ticket: m, hasTicket: !0, targetId: r.targetId });
529
- } catch (u) {
530
- throw console.log(u), u;
528
+ }, c = await R.create(n);
529
+ t("updateTicket", { ticket: c, hasTicket: !0, targetId: r.targetId });
530
+ } catch (n) {
531
+ throw console.log(n), n;
531
532
  }
532
533
  }
533
- async function f(a) {
534
- const u = {
534
+ async function i(a) {
535
+ const n = {
535
536
  // Renamed membershipData to ticketData
536
537
  type: r.type,
537
538
  target: a,
538
539
  user: r.userId
539
540
  };
540
541
  try {
541
- const m = await R.delete(u);
542
- t("updateTicket", { ticket: m, hasTicket: !1, targetId: r.targetId });
543
- } catch (m) {
544
- throw console.log(m), m;
542
+ const c = await R.delete(n);
543
+ t("updateTicket", { ticket: c, hasTicket: !1, targetId: r.targetId });
544
+ } catch (c) {
545
+ throw console.log(c), c;
545
546
  }
546
547
  }
547
- return (a, u) => (c(), $(Q, {
548
+ return (a, n) => (d(), $(K, {
548
549
  submit: e,
549
550
  class: "bg-main button-small button"
550
551
  }, {
551
- default: w(() => [
552
- W(N(i.hasTicket ? "Leave" : "Join"), 1)
552
+ default: x(() => [
553
+ B(L(p.hasTicket ? "Leave" : "Join"), 1)
553
554
  ]),
554
555
  _: 1
555
556
  }));
556
557
  }
557
- }, Me = /* @__PURE__ */ G(Ae, [["__scopeId", "data-v-d5c351bb"]]), Re = { class: "pd-thin" }, Je = {
558
+ }, Re = /* @__PURE__ */ Q(He, [["__scopeId", "data-v-d5c351bb"]]), Je = { class: "pd-thin" }, We = {
558
559
  __name: "Event",
559
- setup(i) {
560
- const t = L(), r = ({ ticket: f, hasTicket: a, targetId: u }) => {
561
- Ve.handleTicketUpdate(e.value, f, a, u);
562
- }, e = y(null), s = y(!0);
563
- return z(async () => {
564
- s.value = !0;
565
- const f = await F({ user: k.user._id, url: t.params.url });
566
- e.value = f[0], s.value = !1;
567
- }), (f, a) => (c(), v("section", Re, [
568
- g(I, {
560
+ setup(p) {
561
+ const t = z(), r = ({ ticket: n, hasTicket: c, targetId: g }) => {
562
+ Ae.handleTicketUpdate(i.value, n, c, g);
563
+ }, e = {
564
+ Textarea: "p",
565
+ H2: "h2",
566
+ Bullets: "p",
567
+ Caption: "p",
568
+ ImageUpload: de
569
+ };
570
+ function l(n) {
571
+ return n.type === "Textarea" ? { innerHTML: n.content, class: "p-medium" } : n.type === "H2" ? { innerHTML: n.content, class: "h3" } : n.type === "Caption" ? { innerHTML: n.content } : n.type === "ImageUpload" ? { src: n.content } : {};
572
+ }
573
+ const i = w(null), a = w(!0);
574
+ return j(async () => {
575
+ a.value = !0;
576
+ const n = await F({ user: k.user._id, url: t.params.url });
577
+ i.value = n[0], a.value = !1;
578
+ }), (n, c) => (d(), _("section", Je, [
579
+ v(U, {
569
580
  tag: "ul",
570
581
  name: "fade",
571
582
  class: "o-hidden bg-grey radius-big"
572
583
  }, {
573
- default: w(() => [
574
- s.value ? (c(), v(O, { key: 0 }, j(3, (u) => g(X, { key: u })), 64)) : h("", !0)
584
+ default: x(() => [
585
+ a.value ? (d(), _(P, { key: 0 }, T(3, (g) => v(Z, { key: g })), 64)) : b("", !0)
575
586
  ]),
576
587
  _: 1
577
588
  }),
578
- g(q, { name: "fade" }, {
579
- default: w(() => [
580
- !s.value && !e.value ? (c(), $(Y, {
589
+ v(q, { name: "fade" }, {
590
+ default: x(() => [
591
+ !a.value && !i.value ? (d(), $(G, {
581
592
  key: 0,
582
593
  title: "No Event Found",
583
594
  description: "Currently, there are no events available. Please check back later.",
584
595
  class: "pd-medium mn-thin bg-grey radius-big"
585
- })) : h("", !0)
596
+ })) : b("", !0)
586
597
  ]),
587
598
  _: 1
588
599
  }),
589
- g(I, {
600
+ v(U, {
590
601
  tag: "ul",
591
602
  name: "fade",
592
603
  class: "container"
593
604
  }, {
594
- default: w(() => [
595
- !s.value && e.value ? (c(), $(J, {
605
+ default: x(() => [
606
+ !a.value && i.value ? (d(), $(J, {
596
607
  key: 0,
597
- onClick: a[0] || (a[0] = (u) => f.$router.push({ name: "Event", params: { url: e.value.url } })),
598
- event: e.value,
599
- owner: e.value.owner,
608
+ onClick: c[0] || (c[0] = (g) => n.$router.push({ name: "Event", params: { url: i.value.url } })),
609
+ event: i.value,
610
+ owner: i.value.owner,
600
611
  user: k.user._id,
601
612
  type: "normal",
602
- class: U(["mn-medium", {
603
- "br-b br-solid br-black-transp-10": f.index !== e.value.length - 1
604
- }])
613
+ class: "mn-medium bg-grey radius-big"
605
614
  }, {
606
- default: w(() => [
607
- k.user._id ? (c(), $(Me, {
615
+ default: x(() => [
616
+ k.user._id ? (d(), $(Re, {
608
617
  key: 0,
609
618
  type: "event",
610
- hasTicket: e.value.hasTicket,
611
- targetId: e.value._id,
619
+ hasTicket: i.value.hasTicket,
620
+ targetId: i.value._id,
612
621
  userId: k.user._id,
613
622
  class: "mn-small w-100 pd-medium mn-auto",
614
623
  onUpdateTicket: r
615
- }, null, 8, ["hasTicket", "targetId", "userId"])) : h("", !0)
624
+ }, null, 8, ["hasTicket", "targetId", "userId"])) : b("", !0),
625
+ h("section", null, [
626
+ i.value && i.value.content ? (d(!0), _(P, { key: 0 }, T(i.value.content, (g, y) => (d(), $(Y(e[g.type]), ne({
627
+ key: y,
628
+ index: y,
629
+ component: g,
630
+ prop: g,
631
+ class: g.class,
632
+ content: "content"
633
+ }, l(g), { class: "mn-regular" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : b("", !0)
634
+ ])
616
635
  ]),
617
636
  _: 1
618
- }, 8, ["event", "owner", "user", "class"])) : h("", !0),
619
- !s.value && e.value ? (c(), $(ue, {
637
+ }, 8, ["event", "owner", "user"])) : b("", !0),
638
+ !a.value && i.value ? (d(), $(ce, {
620
639
  key: 1,
621
640
  type: "event",
622
- target: e.value._id,
641
+ target: i.value._id,
623
642
  owner: k.user._id
624
- }, null, 8, ["target", "owner"])) : h("", !0)
643
+ }, null, 8, ["target", "owner"])) : b("", !0)
625
644
  ]),
626
645
  _: 1
627
646
  })
628
647
  ]));
629
648
  }
630
- }, He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
649
+ }, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
631
650
  __proto__: null,
632
- default: Je
633
- }, Symbol.toStringTag, { value: "Module" })), We = {
651
+ default: We
652
+ }, Symbol.toStringTag, { value: "Module" })), Ge = {
634
653
  __name: "Events",
635
- setup(i) {
636
- const t = L();
637
- return B(), (r, e) => (c(), v("section", null, [
638
- g(Z, {
639
- category: p(t).params.category,
654
+ setup(p) {
655
+ const t = z();
656
+ return M(), (r, e) => (d(), _("section", null, [
657
+ v(ee, {
658
+ category: m(t).params.category,
640
659
  user: k.user._id,
641
- period: p(t).query.period,
660
+ period: m(t).query.period,
642
661
  selectedDate: D.filter.date
643
662
  }, null, 8, ["category", "user", "period", "selectedDate"])
644
663
  ]));
645
664
  }
646
- }, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
665
+ }, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
647
666
  __proto__: null,
648
- default: We
649
- }, Symbol.toStringTag, { value: "Module" })), dt = [
667
+ default: Ge
668
+ }, Symbol.toStringTag, { value: "Module" })), mt = [
650
669
  {
651
670
  path: "events",
652
- component: De,
671
+ component: Pe,
653
672
  meta: {
654
673
  title: {
655
674
  en: "Events",
@@ -659,7 +678,7 @@ const Ae = {
659
678
  children: [{
660
679
  path: ":category?",
661
680
  name: "Events",
662
- component: () => Promise.resolve().then(() => Ye)
681
+ component: () => Promise.resolve().then(() => Qe)
663
682
  }]
664
683
  },
665
684
  {
@@ -672,7 +691,7 @@ const Ae = {
672
691
  },
673
692
  authorize: []
674
693
  },
675
- component: () => Promise.resolve().then(() => M)
694
+ component: () => Promise.resolve().then(() => H)
676
695
  },
677
696
  {
678
697
  path: "events/:url",
@@ -683,23 +702,23 @@ const Ae = {
683
702
  ru: "Событие"
684
703
  }
685
704
  },
686
- component: () => Promise.resolve().then(() => He)
705
+ component: () => Promise.resolve().then(() => Ye)
687
706
  },
688
707
  {
689
708
  path: "events/:url/edit",
690
709
  name: "Edit Event",
691
710
  meta: { authorize: [] },
692
- component: () => Promise.resolve().then(() => M)
711
+ component: () => Promise.resolve().then(() => H)
693
712
  }
694
713
  ];
695
714
  export {
696
715
  J as CardEvent,
697
- Be as EditEvent,
698
- Je as EventPage,
699
- De as EventsLayout,
700
- We as EventsPage,
701
- Z as Feed,
702
- ct as List,
703
- dt as eventsRoutes,
704
- ft as eventsStore
716
+ Ve as EditEvent,
717
+ We as EventPage,
718
+ Pe as EventsLayout,
719
+ Ge as EventsPage,
720
+ ee as Feed,
721
+ pt as List,
722
+ mt as eventsRoutes,
723
+ vt as eventsStore
705
724
  };