@ozdao/prometheus-framework 0.1.16 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-2426cb6f.mjs +1945 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-579e2c7a.mjs +1945 -0
  3. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-c6aba800.js +1 -0
  4. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js +1 -0
  5. package/dist/ButtonFollow-23c4d9fc.mjs +132 -0
  6. package/dist/ButtonFollow-351486b0.js +1 -0
  7. package/dist/ButtonFollow-3a05d29f.mjs +132 -0
  8. package/dist/ButtonFollow-bf5e6d42.js +1 -0
  9. package/dist/CardOrganization-4d22037e.js +1 -0
  10. package/dist/CardOrganization-63dcc83b.js +1 -0
  11. package/dist/CardOrganization-8c5b582b.mjs +230 -0
  12. package/dist/CardOrganization-e530c9d5.mjs +230 -0
  13. package/dist/Chips-3dac276c.js +1 -0
  14. package/dist/Feed-416d84b0.mjs +439 -0
  15. package/dist/Feed-44beaa4c.mjs +368 -0
  16. package/dist/Feed-4d9001aa.mjs +368 -0
  17. package/dist/Feed-51eef23f.js +1 -0
  18. package/dist/Feed-8a151970.js +1 -0
  19. package/dist/Feed-c9e6190e.js +1 -0
  20. package/dist/Feed-d78d4b91.mjs +439 -0
  21. package/dist/Feed-f4e9769e.js +1 -0
  22. package/dist/Gallery-1f82841a.mjs +357 -0
  23. package/dist/Gallery-9305f294.mjs +357 -0
  24. package/dist/Gallery-dd29c7f6.js +1 -0
  25. package/dist/Gallery-dea27e94.js +1 -0
  26. package/dist/Image-22e17cef.js +9 -0
  27. package/dist/Image-a2c2ab9c.js +9 -0
  28. package/dist/Image-ad6d4f0f.mjs +477 -0
  29. package/dist/Image-c0ae2c5f.mjs +477 -0
  30. package/dist/Popup-383abb2e.js +1 -0
  31. package/dist/Popup-ad5f59d0.js +1 -0
  32. package/dist/Popup-e7c9a43e.mjs +76 -0
  33. package/dist/Popup-f7a5e86b.mjs +76 -0
  34. package/dist/Product-2d05acc8.mjs +839 -0
  35. package/dist/Product-b32fb0e1.js +7 -0
  36. package/dist/Product-d01e3a0d.mjs +839 -0
  37. package/dist/Product-d9c3b9b9.js +7 -0
  38. package/dist/ProductEdit-2b4d1d88.js +1 -0
  39. package/dist/ProductEdit-5e479343.mjs +300 -0
  40. package/dist/ProductEdit-ab0530e8.js +1 -0
  41. package/dist/ProductEdit-aca44ef7.mjs +300 -0
  42. package/dist/ProfileBlogposts-070cb7e9.mjs +65 -0
  43. package/dist/ProfileBlogposts-2063c511.mjs +65 -0
  44. package/dist/ProfileBlogposts-b6bf0c42.js +1 -0
  45. package/dist/ProfileBlogposts-eaecd267.js +1 -0
  46. package/dist/ProfileComments-1ae70859.js +1 -0
  47. package/dist/ProfileComments-78231e6a.mjs +44 -0
  48. package/dist/ProfileComments-8a0c489c.mjs +44 -0
  49. package/dist/ProfileComments-f0000ea6.js +1 -0
  50. package/dist/ProfileEvents-4a2fa422.mjs +57 -0
  51. package/dist/ProfileEvents-8b88287a.js +1 -0
  52. package/dist/ProfileEvents-90448f97.js +1 -0
  53. package/dist/ProfileEvents-d978617d.mjs +57 -0
  54. package/dist/ProfileLikes-74c78a16.mjs +44 -0
  55. package/dist/ProfileLikes-b48ce0ef.js +1 -0
  56. package/dist/ProfileLikes-d5f9f058.js +1 -0
  57. package/dist/ProfileLikes-f5ad4497.mjs +44 -0
  58. package/dist/ProfileOrganizations-422d1fa5.js +1 -0
  59. package/dist/ProfileOrganizations-43710687.js +1 -0
  60. package/dist/ProfileOrganizations-6b1bc5b2.mjs +213 -0
  61. package/dist/ProfileOrganizations-cf8a12f5.mjs +213 -0
  62. package/dist/Publics-5472f70c.mjs +123 -0
  63. package/dist/Publics-640d32fc.mjs +123 -0
  64. package/dist/Publics-71b9efbe.js +1 -0
  65. package/dist/Publics-8595ab7e.js +1 -0
  66. package/dist/Socials-43293869.js +1 -0
  67. package/dist/Tab-dcd62005.js +1 -0
  68. package/dist/UploadImage-0f488170.js +1 -0
  69. package/dist/UploadImage-3c627d89.mjs +83 -0
  70. package/dist/UploadImage-dfb36cdb.js +1 -0
  71. package/dist/UploadImage-e4418b43.mjs +83 -0
  72. package/dist/UploadImageMultiple-c9a7b54f.js +1 -0
  73. package/dist/UploadImageMultiple-cb6c7188.mjs +58 -0
  74. package/dist/UploadImageMultiple-d2d48f39.mjs +58 -0
  75. package/dist/UploadImageMultiple-eddaac87.js +1 -0
  76. package/dist/auth-4415a97a.js +7 -0
  77. package/dist/auth-45a454f2.js +7 -0
  78. package/dist/auth-5cd34aae.mjs +905 -0
  79. package/dist/auth-afa25b86.mjs +905 -0
  80. package/dist/auth.client.cjs +8 -8
  81. package/dist/auth.client.js +16 -15
  82. package/dist/auth.validation-3e93dc23.mjs +20 -0
  83. package/dist/auth.validation-4b016fa5.js +1 -0
  84. package/dist/auth.validation-a17cd085.js +1 -0
  85. package/dist/auth.validation-a52304cf.mjs +20 -0
  86. package/dist/backoffice.client.cjs +1 -0
  87. package/dist/backoffice.client.js +69 -0
  88. package/dist/carousel.es-cdfb392c.js +5 -0
  89. package/dist/community.client.cjs +1 -1
  90. package/dist/community.client.js +23 -22
  91. package/dist/components/EditImages/EditImages.vue.d.ts +7 -0
  92. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  93. package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
  94. package/dist/events.client.cjs +2 -2
  95. package/dist/events.client.js +17 -16
  96. package/dist/files.server.js +149 -112
  97. package/dist/files.server.mjs +149 -112
  98. package/dist/gallery.server.js +148 -0
  99. package/dist/gallery.server.mjs +149 -0
  100. package/dist/index-2059e444.js +2 -0
  101. package/dist/index-4e469a71.mjs +941 -0
  102. package/dist/index-a661083c.mjs +934 -0
  103. package/dist/index-b41aac19.js +2 -0
  104. package/dist/landing.client.cjs +1 -1
  105. package/dist/modules/gallery/components/sections/Gallery.vue.d.ts +2 -0
  106. package/dist/modules/icons/navigation/IconChevronRight.vue.d.ts +13 -1
  107. package/dist/modules/mobile/components/Menu/MenuItem.vue.d.ts +14 -2
  108. package/dist/organizations-65937ba4.js +1 -0
  109. package/dist/organizations-81e762e7.mjs +122 -0
  110. package/dist/organizations-af965fcf.mjs +122 -0
  111. package/dist/organizations-cf1ab766.js +1 -0
  112. package/dist/organizations.client-1e9361ec.js +3 -0
  113. package/dist/organizations.client-43816e25.mjs +3018 -0
  114. package/dist/organizations.client-b692a78a.mjs +3018 -0
  115. package/dist/organizations.client-bdc9b044.js +3 -0
  116. package/dist/organizations.client.cjs +1 -1
  117. package/dist/organizations.client.js +44 -43
  118. package/dist/style.css +1 -1
  119. package/dist/users.client.cjs +1 -1
  120. package/dist/users.client.js +224 -184
  121. package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
  122. package/dist/vuex.esm-bundler-685cf29f.js +5 -0
  123. package/package.json +10 -1
  124. package/src/components/EditImages/EditImages.vue +55 -0
  125. package/src/configurator/components/layouts/layoutConfigurator.vue +0 -40
  126. package/src/modules/backoffice/backoffice.client.js +15 -0
  127. package/src/modules/backoffice/components/layouts/Account.vue +48 -58
  128. package/src/modules/backoffice/router/backoffice.js +20 -0
  129. package/src/modules/files/controllers/files.controller.js +27 -131
  130. package/src/modules/files/middlewares/server/index.js +10 -0
  131. package/src/modules/files/middlewares/server/md.js +151 -0
  132. package/src/modules/files/middlewares/server/middlewareMulter.js +121 -0
  133. package/src/modules/files/routes/files.routes.js +20 -6
  134. package/src/modules/gallery/components/sections/Gallery.vue +414 -0
  135. package/src/modules/gallery/controllers/gallery.controller.js +87 -73
  136. package/src/modules/gallery/gallery.client.js +17 -0
  137. package/src/modules/gallery/gallery.server.js +13 -0
  138. package/src/modules/gallery/models/photo.model.js +20 -14
  139. package/src/modules/gallery/routes/gallery.routes.js +18 -9
  140. package/src/modules/gallery/store/gallery.js +25 -19
  141. package/src/modules/icons/navigation/IconChevronRight.vue +14 -2
  142. package/src/modules/mobile/components/Menu/Menu.vue +1 -1
  143. package/src/modules/mobile/components/Menu/MenuItem.vue +8 -2
  144. package/src/modules/users/components/pages/Profile.vue +22 -1
  145. package/src/modules/backoffice/components/pages/Profile.vue +0 -109
  146. package/src/modules/backoffice/components/pages/profile/ProfileEdit.vue +0 -132
@@ -1,15 +1,16 @@
1
1
  import { ref as C, onMounted as ut, openBlock as g, createBlock as ce, unref as f, withCtx as w, createElementBlock as b, Fragment as fe, renderList as ct, createElementVNode as p, normalizeStyle as q, toDisplayString as h, resolveComponent as be, createVNode as y, Transition as R, resolveDynamicComponent as Ft, reactive as ft, watch as pt, withDirectives as I, vModelText as J, withAsyncContext as Dt, defineComponent as Rt, resolveDirective as Mt, normalizeClass as K, withKeys as ie, createCommentVNode as L, vShow as X, vModelDynamic as zt, renderSlot as Lt, createTextVNode as D, inject as Te } from "vue";
2
2
  import { v as M, b as mt, c as _e, d as Ce } from "./inputs.validation-14e8e01f.mjs";
3
- import { c as oe, d as ht, s as m, a as xt, F as z, _ as G, b as V } from "./auth-962e3b73.mjs";
4
- import { e as Fi, t as Di } from "./auth-962e3b73.mjs";
5
- import { C as kt, S as jt } from "./carousel.es-44c501bc.mjs";
3
+ import { b as oe, c as ht, s as m, F as z, _ as G, a as V } from "./auth-afa25b86.mjs";
4
+ import { d as Di, t as Ri } from "./auth-afa25b86.mjs";
5
+ import { C as xt, S as kt } from "./carousel.es-44c501bc.mjs";
6
6
  import { useI18n as H } from "vue-i18n";
7
7
  import { useRoute as k, useRouter as j } from "vue-router";
8
8
  import { s as x } from "./globals-96ba60e4.mjs";
9
+ import { a as jt } from "./index-a661083c.mjs";
9
10
  import { _ as we } from "./Tab-a243605d.mjs";
10
11
  import { _ as Bt } from "./_plugin-vue_export-helper-dad06003.mjs";
11
- import { r as W, a as ae, c as Ae } from "./auth.validation-1b60cef5.mjs";
12
- const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "mn-big mn-r-small mn-l-small" }, Ii = {
12
+ import { r as W, a as ae, c as Ae } from "./auth.validation-3e93dc23.mjs";
13
+ const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "mn-big mn-r-small mn-l-small" }, Ni = {
13
14
  __name: "SliderFeatures",
14
15
  setup(e) {
15
16
  const n = C(null), t = {
@@ -60,7 +61,7 @@ const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "m
60
61
  setTimeout(() => {
61
62
  n.value.restartCarousel(), i.value = !0;
62
63
  }, "500");
63
- }), (o, a) => (g(), ce(f(kt), {
64
+ }), (o, a) => (g(), ce(f(xt), {
64
65
  ref_key: "ImagesSlider",
65
66
  ref: n,
66
67
  "items-to-show": 1,
@@ -71,7 +72,7 @@ const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "m
71
72
  class: "bg-grey w-100"
72
73
  }, {
73
74
  default: w(() => [
74
- (g(!0), b(fe, null, ct(f(d)("features"), (l, s) => (g(), ce(f(jt), {
75
+ (g(!0), b(fe, null, ct(f(d)("features"), (l, s) => (g(), ce(f(kt), {
75
76
  key: s,
76
77
  class: "w-100 flex-v-center flex"
77
78
  }, {
@@ -1978,7 +1979,7 @@ typeof it == "function" && it(Pt);
1978
1979
  const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1979
1980
  __proto__: null,
1980
1981
  default: Pt
1981
- }, Symbol.toStringTag, { value: "Module" })), U = xt.create({ baseURL: process.env.API_URL, withCredentials: !0 });
1982
+ }, Symbol.toStringTag, { value: "Module" })), U = jt.create({ baseURL: process.env.API_URL, withCredentials: !0 });
1982
1983
  U.defaults.withCredentials = !0;
1983
1984
  const T = ft({
1984
1985
  invites: [],
@@ -2023,7 +2024,7 @@ const T = ft({
2023
2024
  };
2024
2025
  pt(T, (e, n) => {
2025
2026
  });
2026
- const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2027
+ const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2027
2028
  __proto__: null,
2028
2029
  actions: Ot,
2029
2030
  state: T
@@ -3769,7 +3770,7 @@ typeof $t == "function" && $t(Et);
3769
3770
  const hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3770
3771
  __proto__: null,
3771
3772
  default: Et
3772
- }, Symbol.toStringTag, { value: "Module" })), Ei = [
3773
+ }, Symbol.toStringTag, { value: "Module" })), Ti = [
3773
3774
  {
3774
3775
  path: "auth",
3775
3776
  name: "Authentication",
@@ -3871,9 +3872,9 @@ export {
3871
3872
  It as ResetPassword,
3872
3873
  Et as SignIn,
3873
3874
  Nt as SignUp,
3874
- Ii as SliderFeatures,
3875
- Ei as authRoutes,
3876
- Fi as authStore,
3877
- Ni as invitesStore,
3878
- Di as twofaStore
3875
+ Ni as SliderFeatures,
3876
+ Ti as authRoutes,
3877
+ Di as authStore,
3878
+ Ei as invitesStore,
3879
+ Ri as twofaStore
3879
3880
  };
@@ -0,0 +1,20 @@
1
+ import { useRouter as i } from "vue-router";
2
+ import { s } from "./auth-afa25b86.mjs";
3
+ i();
4
+ function n(r, o, e) {
5
+ e(), s.user.phone = "", s.user.email = "", s.user.password = "", s.user.passwordRepeat = "";
6
+ }
7
+ function f(r, o, e) {
8
+ console.log(s.user), s.user.phone === "" && s.user.email === "" ? e("/auth/signin") : e();
9
+ }
10
+ i();
11
+ function c(r, o, e) {
12
+ if (s.access.status)
13
+ return e("/profile/" + s.user._id);
14
+ e();
15
+ }
16
+ export {
17
+ n as a,
18
+ f as c,
19
+ c as r
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("vue-router"),e=require("./auth-45a454f2.js");u.useRouter();function o(t,r,s){s(),e.state.user.phone="",e.state.user.email="",e.state.user.password="",e.state.user.passwordRepeat=""}function i(t,r,s){console.log(e.state.user),e.state.user.phone===""&&e.state.user.email===""?s("/auth/signin"):s()}u.useRouter();function a(t,r,s){if(e.state.access.status)return s("/profile/"+e.state.user._id);s()}exports.checkUser=i;exports.requiresNoAuth=a;exports.resetUser=o;
@@ -0,0 +1 @@
1
+ "use strict";const u=require("vue-router"),e=require("./auth-4415a97a.js");u.useRouter();function o(t,r,s){s(),e.state.user.phone="",e.state.user.email="",e.state.user.password="",e.state.user.passwordRepeat=""}function i(t,r,s){console.log(e.state.user),e.state.user.phone===""&&e.state.user.email===""?s("/auth/signin"):s()}u.useRouter();function a(t,r,s){if(e.state.access.status)return s("/profile/"+e.state.user._id);s()}exports.checkUser=i;exports.requiresNoAuth=a;exports.resetUser=o;
@@ -0,0 +1,20 @@
1
+ import { useRouter as i } from "vue-router";
2
+ import { s } from "./auth-5cd34aae.mjs";
3
+ i();
4
+ function n(r, o, e) {
5
+ e(), s.user.phone = "", s.user.email = "", s.user.password = "", s.user.passwordRepeat = "";
6
+ }
7
+ function f(r, o, e) {
8
+ console.log(s.user), s.user.phone === "" && s.user.email === "" ? e("/auth/signin") : e();
9
+ }
10
+ i();
11
+ function c(r, o, e) {
12
+ if (s.access.status)
13
+ return e("/profile/" + s.user._id);
14
+ e();
15
+ }
16
+ export {
17
+ n as a,
18
+ f as c,
19
+ c as r
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("vue-router");const u={id:"account",class:"cols-2-1_3 gap-medium pd-medium"},l={class:"pd-medium menu-tabs"},i={class:"w-100"},m={__name:"Account",setup(p){n.useRoute(),n.useRouter();let a=e.reactive({currentTab:"user"});return e.toRefs(a),(t,o)=>{const r=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",u,[e.createElementVNode("div",l,[t.store.auth.state.access.roles.includes("ROLE_ADMIN")?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:o[0]||(o[0]=c=>t.$router.push("/account/community")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/community"},"mn-small product-tab"])}," Blog ",2)):e.createCommentVNode("",!0),t.store.auth.state.access.roles.includes("ROLE_ADMIN")?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[1]||(o[1]=c=>t.$router.push("/account/gallery")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/gallery"},"product-tab"])}," Gallery ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",i,[e.createVNode(r,null,{default:e.withCtx(({Component:c,route:s})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c),{ref:"page",key:s.path}))]),_:2},1024)]),_:1})])])}}},d=[{path:"backoffice",component:m,children:[{path:":_id",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Gallery-dea27e94.js"))}]}];exports.backofficeRoutes=d;
@@ -0,0 +1,69 @@
1
+ import { reactive as d, toRefs as _, resolveComponent as f, openBlock as o, createElementBlock as c, createElementVNode as n, normalizeClass as s, createCommentVNode as r, createVNode as u, withCtx as i, Transition as v, createBlock as h, resolveDynamicComponent as k } from "vue";
2
+ import { useRoute as y, useRouter as b } from "vue-router";
3
+ const C = {
4
+ id: "account",
5
+ class: "cols-2-1_3 gap-medium pd-medium"
6
+ }, g = { class: "pd-medium menu-tabs" }, B = { class: "w-100" }, R = {
7
+ __name: "Account",
8
+ setup($) {
9
+ y(), b();
10
+ let l = d({ currentTab: "user" });
11
+ return _(l), (e, t) => {
12
+ const m = f("router-view");
13
+ return o(), c("section", C, [
14
+ n("div", g, [
15
+ e.store.auth.state.access.roles.includes("ROLE_ADMIN") ? (o(), c("button", {
16
+ key: 0,
17
+ onClick: t[0] || (t[0] = (a) => e.$router.push("/account/community")),
18
+ class: s([{ "product-tab-active": e.$route.path === "/account/community" }, "mn-small product-tab"])
19
+ }, " Blog ", 2)) : r("", !0),
20
+ e.store.auth.state.access.roles.includes("ROLE_ADMIN") ? (o(), c("button", {
21
+ key: 1,
22
+ onClick: t[1] || (t[1] = (a) => e.$router.push("/account/gallery")),
23
+ class: s([{ "product-tab-active": e.$route.path === "/account/gallery" }, "product-tab"])
24
+ }, " Gallery ", 2)) : r("", !0)
25
+ ]),
26
+ n("div", B, [
27
+ u(m, null, {
28
+ default: i(({ Component: a, route: p }) => [
29
+ u(v, {
30
+ name: "scaleIn",
31
+ mode: "out-in"
32
+ }, {
33
+ default: i(() => [
34
+ (o(), h(k(a), {
35
+ ref: "page",
36
+ key: p.path
37
+ }))
38
+ ]),
39
+ _: 2
40
+ }, 1024)
41
+ ]),
42
+ _: 1
43
+ })
44
+ ])
45
+ ]);
46
+ };
47
+ }
48
+ }, A = [{
49
+ path: "backoffice",
50
+ component: R,
51
+ children: [{
52
+ path: ":_id",
53
+ name: "Backoffice",
54
+ meta: {
55
+ title: {
56
+ en: "Backoffice",
57
+ ru: "Управление"
58
+ },
59
+ authorize: []
60
+ },
61
+ component: () => import(
62
+ /* webpackChunkName: 'Account' */
63
+ "./Gallery-9305f294.mjs"
64
+ )
65
+ }]
66
+ }];
67
+ export {
68
+ A as backofficeRoutes
69
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";const t=require("vue");/**
2
+ * Vue 3 Carousel 0.1.48
3
+ * (c) 2022
4
+ * @license MIT
5
+ */const f={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0},ne={itemsToShow:{default:f.itemsToShow,type:Number},itemsToScroll:{default:f.itemsToScroll,type:Number},wrapAround:{default:f.wrapAround,type:Boolean},snapAlign:{default:f.snapAlign,validator(n){return["start","end","center","center-even","center-odd"].includes(n)}},transition:{default:f.transition,type:Number},breakpoints:{default:f.breakpoints,type:Object},autoplay:{default:f.autoplay,type:Number},pauseAutoplayOnHover:{default:f.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:f.mouseDrag,type:Boolean},touchDrag:{default:f.touchDrag,type:Boolean},dir:{default:f.dir,validator(n){return["rtl","ltr"].includes(n)}},settings:{default(){return{}},type:Object}};function se(n,o){let i;return function(...l){i&&clearTimeout(i),i=setTimeout(()=>{n(...l),i=null},o)}}function ce(n,o){let i;return function(...l){const g=this;i||(n.apply(g,l),i=!0,setTimeout(()=>i=!1,o))}}function de(n){var o,i,l;return n?((i=(o=n[0])===null||o===void 0?void 0:o.type)===null||i===void 0?void 0:i.name)==="CarouselSlide"?n:((l=n[0])===null||l===void 0?void 0:l.children)||[]:[]}function fe(n,o){if(n.wrapAround)return o-1;switch(n.snapAlign){case"start":return o-n.itemsToShow;case"end":return o-1;case"center":case"center-odd":return o-Math.ceil(n.itemsToShow/2);case"center-even":return o-Math.ceil(n.itemsToShow/2);default:return 0}}function ve(n){if(n.wrapAround)return 0;switch(n.snapAlign){case"start":return 0;case"end":return n.itemsToShow-1;case"center":case"center-odd":return Math.floor((n.itemsToShow-1)/2);case"center-even":return Math.floor((n.itemsToShow-2)/2);default:return 0}}function re(n,o,i,l){return n.wrapAround?o:Math.min(Math.max(o,l),i)}function me({slidesBuffer:n,currentSlide:o,snapAlign:i,itemsToShow:l,wrapAround:g,slidesCount:p}){let c=n.indexOf(o);if(c===-1&&(c=n.indexOf(Math.ceil(o))),i==="center"||i==="center-odd"?c-=(l-1)/2:i==="center-even"?c-=(l-2)/2:i==="end"&&(c-=l-1),!g){const w=p-l,y=0;c=Math.max(Math.min(c,w),y)}return c}var he=t.defineComponent({name:"Carousel",props:ne,setup(n,{slots:o,emit:i,expose:l}){var g;const p=t.ref(null),c=t.ref([]),w=t.ref([]),y=t.ref(0),u=t.ref(1);let x,_,T=t.ref({}),h=Object.assign({},f);const r=t.reactive(Object.assign({},h)),d=t.ref((g=r.modelValue)!==null&&g!==void 0?g:0),oe=t.ref(0),$=t.ref(0),A=t.ref(0),O=t.ref(0);t.provide("config",r),t.provide("slidesBuffer",w),t.provide("slidesCount",u),t.provide("currentSlide",d),t.provide("maxSlide",A),t.provide("minSlide",O);function H(){const e=Object.assign(Object.assign({},n),n.settings);T=t.ref(Object.assign({},e.breakpoints)),h=Object.assign(Object.assign({},e),{settings:void 0,breakpoints:void 0}),Y(h)}function C(){const e=Object.keys(T.value).map(s=>Number(s)).sort((s,m)=>+m-+s);let a=Object.assign({},h);e.some(s=>window.matchMedia(`(min-width: ${s}px)`).matches?(a=Object.assign(Object.assign({},a),T.value[s]),!0):!1),Y(a)}function Y(e){for(let a in e)r[a]=e[a]}const ie=se(()=>{T.value&&(C(),j()),E()},16);function E(){if(!p.value)return;const e=p.value.getBoundingClientRect();y.value=e.width/r.itemsToShow}function j(){u.value=Math.max(c.value.length,1),!(u.value<=0)&&($.value=Math.ceil((u.value-1)/2),A.value=fe(r,u.value),O.value=ve(r),d.value=re(r,d.value,A.value,O.value))}function D(){const e=[...Array(u.value).keys()];if(r.wrapAround&&r.itemsToShow+1<=u.value){let m=(r.itemsToShow!==1?Math.round((u.value-r.itemsToShow)/2):0)-d.value;if(r.snapAlign==="end"?m+=Math.floor(r.itemsToShow-1):(r.snapAlign==="center"||r.snapAlign==="center-odd")&&m++,m<0)for(let S=m;S<0;S++)e.push(Number(e.shift()));else for(let S=0;S<m;S++)e.unshift(Number(e.pop()))}w.value=e}t.onMounted(()=>{T.value&&(C(),j()),t.nextTick(()=>setTimeout(E,16)),z(),window.addEventListener("resize",ie,{passive:!0})}),t.onUnmounted(()=>{_&&clearTimeout(_),x&&clearInterval(x)});let v=!1;const B={x:0,y:0},V={x:0,y:0},M=t.reactive({x:0,y:0}),N=t.ref(!1),le=()=>{N.value=!0},ae=()=>{N.value=!1};function U(e){v=e.type==="touchstart",!(!v&&e.button!==0||k.value)&&(v||e.preventDefault(),B.x=v?e.touches[0].clientX:e.clientX,B.y=v?e.touches[0].clientY:e.clientY,document.addEventListener(v?"touchmove":"mousemove",W,!0),document.addEventListener(v?"touchend":"mouseup",q,!0))}const W=ce(e=>{V.x=v?e.touches[0].clientX:e.clientX,V.y=v?e.touches[0].clientY:e.clientY;const a=V.x-B.x,s=V.y-B.y;M.y=s,M.x=a},16);function q(){const e=r.dir==="rtl"?-1:1,a=Math.sign(M.x)*.4,s=Math.round(M.x/y.value+a)*e;let m=re(r,d.value-s,A.value,O.value);if(s&&!v){const S=X=>{X.stopPropagation(),window.removeEventListener("click",S,!0)};window.addEventListener("click",S,!0)}b(m),M.x=0,M.y=0,document.removeEventListener(v?"touchmove":"mousemove",W,!0),document.removeEventListener(v?"touchend":"mouseup",q,!0)}function z(){!r.autoplay||r.autoplay<=0||(x=setInterval(()=>{r.pauseAutoplayOnHover&&N.value||I()},r.autoplay))}function R(){x&&(clearInterval(x),x=null),z()}const k=t.ref(!1);function b(e,a=!1){if(d.value===e||k.value)return;R();const s=u.value-1;if(e>s)return b(e-u.value);if(e<0)return b(e+u.value);k.value=!0,oe.value=d.value,d.value=e,a||i("update:modelValue",d.value),_=setTimeout(()=>{r.wrapAround&&D(),k.value=!1},r.transition)}function I(){let e=d.value+r.itemsToScroll;r.wrapAround||(e=Math.min(e,A.value)),b(e)}function G(){let e=d.value-r.itemsToScroll;r.wrapAround||(e=Math.max(e,O.value)),b(e)}const F={slideTo:b,next:I,prev:G};t.provide("nav",F);const J=t.computed(()=>me({slidesBuffer:w.value,itemsToShow:r.itemsToShow,snapAlign:r.snapAlign,wrapAround:!!r.wrapAround,currentSlide:d.value,slidesCount:u.value}));t.provide("slidesToScroll",J);const ue=t.computed(()=>{const e=r.dir==="rtl"?-1:1,a=J.value*y.value*e;return{transform:`translateX(${M.x-a}px)`,transition:`${k.value?r.transition:0}ms`}});function K(){H()}function Q(){H(),C(),j(),D(),E(),R()}function Z(){j(),D()}Object.keys(ne).forEach(e=>{["modelValue"].includes(e)||t.watch(()=>n[e],Q)}),K(),t.watchEffect(()=>{const e=u.value!==c.value.length;n.modelValue!==void 0&&d.value!==n.modelValue&&b(Number(n.modelValue),!0),e&&Z()});const ee={config:r,slidesBuffer:w,slidesCount:u,slideWidth:y,currentSlide:d,maxSlide:A,minSlide:O,middleSlide:$};l({updateBreakpointsConfigs:C,updateSlidesData:j,updateSlideWidth:E,updateSlidesBuffer:D,initCarousel:K,restartCarousel:Q,updateCarousel:Z,slideTo:b,next:I,prev:G,nav:F,data:ee});const L=o.default||o.slides,P=o.addons,te=t.reactive(ee);return()=>{const e=de(L==null?void 0:L(te)),a=(P==null?void 0:P(te))||[];c.value=e,e.forEach((S,X)=>S.props.index=X);const s=t.h("ol",{class:"carousel__track",style:ue.value,onMousedown:r.mouseDrag?t.withModifiers(U,["capture"]):null,onTouchstart:r.touchDrag?t.withModifiers(U,["capture"]):null},e),m=t.h("div",{class:"carousel__viewport"},s);return t.h("section",{ref:p,class:{carousel:!0,"carousel--rtl":r.dir==="rtl"},dir:r.dir,"aria-label":"Gallery",onMouseenter:le,onMouseleave:ae},[m,a])}}}),pe=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1}},setup(n,{slots:o}){const i=t.inject("config",t.reactive(Object.assign({},f))),l=t.inject("slidesBuffer",t.ref([])),g=t.inject("currentSlide",t.ref(0)),p=t.inject("slidesToScroll",t.ref(0)),c=t.ref(n.index);i.wrapAround&&(w(),t.watch(l,w));function w(){c.value=l.value.indexOf(n.index)}const y=t.computed(()=>({width:`${1/i.itemsToShow*100}%`,order:c.value.toString()})),u=()=>n.index===g.value,x=()=>{const h=Math.ceil(p.value),r=Math.floor(p.value+i.itemsToShow);return l.value.slice(h,r).includes(n.index)},_=()=>n.index===l.value[Math.ceil(p.value)-1],T=()=>n.index===l.value[Math.floor(p.value+i.itemsToShow)];return()=>{var h;return t.h("li",{style:y.value,class:{carousel__slide:!0,"carousel__slide--active":u(),"carousel__slide--visible":x(),"carousel__slide--prev":_(),"carousel__slide--next":T()}},(h=o.default)===null||h===void 0?void 0:h.call(o))}}});exports.Carousel=he;exports.Slide=pe;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-8bc74cc3.js"),u=require("./Feed-a5229528.js"),g=require("./auth-3dedf391.js"),x=require("./Image-89b2a540.js"),I=require("./Popup-f5cdd3c1.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js"),z=require("./organizations-e74f4f84.js"),D=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),F=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-79eb2b6f.js");require("./ButtonFollow-daa0e9e4.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");const O={class:"min-h-100vh pd-thin"},L={class:"mn-thin flex-v-center t-left flex-nowrap flex"},j={class:"flex-v-center flex-nowrap flex t-left"},U=e.createElementVNode("span",{class:""},"Topics for ",-1),A={class:"w-max bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},H={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",L,[e.createElementVNode("h2",j,[U,e.createVNode($.Select,{options:["today","week","month","year"],select:u.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>u.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",A,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),g.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-small radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",H,[e.createVNode(d,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},R={class:"pd-thin"},J={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},G={class:"w-full h-full"},Q={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},W={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},K={class:"w-m-66r t-left pd-big bg-white radius-big"},X=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),Y=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Z={key:0,class:"mn-thin"},ee={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const d=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await u.read({user:g.state.user._id,url:r.params.url});t.value=i.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:g.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:g.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await z.actions.read({user:g.state.user._id,postable:g.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!d.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){d.value.length>0&&d.value.map(l=>l.text),t.value.status="draft",r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&u.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,i)=>(e.openBlock(),e.createElementBlock("article",R,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",J,[e.createElementVNode("div",G,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=_=>e.unref(t).content=_)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",Q,[e.createElementVNode("div",W,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=_=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=_=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=_=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(I._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",K,[X,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=_=>e.unref(t).tags=_),tags:e.unref(t).tags},null,8,["tags"]),Y,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=_=>o.value=_),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",Z,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=_=>e.unref(t).creator.hidden=_),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(g._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),te={},oe={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},ne=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),ae=[ne];function re(c,r){return e.openBlock(),e.createElementBlock("svg",oe,ae)}const se=P._export_sfc(te,[["render",re]]),le={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:g.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$3};function d(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",le,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(se,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(D._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts 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(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(u._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:g.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},d(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ie=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"week"};u.state.filter=a}}),e.watch(()=>u.state.filter,(t,a)=>{const d={...r.query};Object.keys(a).forEach(m=>{d[m]&&delete d[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(d,o),n.replace({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:g.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},ce=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),ue={class:"w-100 cols-4 t-left flex-nowrap flex"},de={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},me=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),pe={class:"t-semi uppercase"},ge=e.createElementVNode("br",null,null,-1),_e={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},fe=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),he={class:"t-semi uppercase"},ve=e.createElementVNode("br",null,null,-1),be={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ye=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),we={class:"t-semi uppercase"},ke=e.createElementVNode("br",null,null,-1),xe={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",ue,[c.likes?(e.openBlock(),e.createElementBlock("div",de,[me,e.createElementVNode("span",pe,[e.createTextVNode(e.toDisplayString(c.likes),1),ge,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",_e,[fe,e.createElementVNode("span",he,[e.createTextVNode(e.toDisplayString(c.comments),1),ve,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",be,[ye,e.createElementVNode("span",we,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),ke,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Be={class:"pd-thin radius-extra flex-nowrap flex"},Ne=["innerHTML"],Ve={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(c,{emit:r}){const n=c,{t,locale:a}=F.useI18n();let d=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){d.value=(d.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function _(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],f=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f++),f>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,f)},333),f===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][d.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,f)=>(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:_,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:c.action},null,8,Ne)):e.createCommentVNode("",!0)]))}};const Ee={class:"pd-thin"},Ce={class:"o-hidden t-black bg-main pd-big radius-big"},$e=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Pe={class:"z-index-1 mn-big w-100 flex-nowrap flex"},Te=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Se={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Ee,[e.createElementVNode("div",Ce,[$e,e.createElementVNode("div",Pe,[e.createVNode(Ve,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),Te])]))}};const qe={class:"container container-joinus"},Me={class:"content"},Ie={class:"h0 mn-big"},ze=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),De=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Fe={__name:"JoinUs",setup(c){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{d(),t()});const d=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Me,[e.createElementVNode("span",Ie,e.toDisplayString(r.value.toLocaleString()),1),ze,De])]))}};const Oe=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Le={class:"community-feed"},je=Oe(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),Ue={class:"grid-container"},Ae={__name:"HotPosts",async setup(c){let r,n;const t=e.ref([]),a=async()=>{const o=await u.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const d=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Le,[je,e.createElementVNode("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(u._sfc_main$1,{blogpost:s,owner:g.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},He=P._export_sfc(Ae,[["__scopeId","data-v-18db0d1b"]]),Re=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>ce)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ie)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=u._sfc_main$1;exports.Feed=u._sfc_main;exports.FooterBlogpost=u._sfc_main$2;exports.blogpostsStore=u.blogposts;exports.reactionsStore=u.reactions;exports.Comments=x._sfc_main$2;exports.Activity=xe;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=He;exports.JoinUs=Fe;exports.SubscribeNewsletter=Se;exports.blogpostsRoutes=Re;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-71b9efbe.js"),u=require("./Feed-c9e6190e.js"),g=require("./auth-4415a97a.js"),x=require("./Image-22e17cef.js"),I=require("./Popup-ad5f59d0.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-c6aba800.js"),z=require("./organizations-65937ba4.js"),D=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),F=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-4d22037e.js");require("./ButtonFollow-351486b0.js");require("./index-b41aac19.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./vue-draggable-next.esm-bundler-21a209c6.js");const O={class:"min-h-100vh pd-thin"},L={class:"mn-thin flex-v-center t-left flex-nowrap flex"},j={class:"flex-v-center flex-nowrap flex t-left"},U=e.createElementVNode("span",{class:""},"Topics for ",-1),A={class:"w-max bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},H={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",L,[e.createElementVNode("h2",j,[U,e.createVNode($.Select,{options:["today","week","month","year"],select:u.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>u.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",A,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),g.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-small radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",H,[e.createVNode(d,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},R={class:"pd-thin"},J={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},G={class:"w-full h-full"},Q={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},W={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},K={class:"w-m-66r t-left pd-big bg-white radius-big"},X=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),Y=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Z={key:0,class:"mn-thin"},ee={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const d=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await u.read({user:g.state.user._id,url:r.params.url});t.value=i.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:g.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:g.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await z.actions.read({user:g.state.user._id,postable:g.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!d.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){d.value.length>0&&d.value.map(l=>l.text),t.value.status="draft",r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&u.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,i)=>(e.openBlock(),e.createElementBlock("article",R,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",J,[e.createElementVNode("div",G,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=_=>e.unref(t).content=_)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",Q,[e.createElementVNode("div",W,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=_=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=_=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=_=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(I._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",K,[X,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=_=>e.unref(t).tags=_),tags:e.unref(t).tags},null,8,["tags"]),Y,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=_=>o.value=_),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",Z,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=_=>e.unref(t).creator.hidden=_),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(g._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),te={},oe={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},ne=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),ae=[ne];function re(c,r){return e.openBlock(),e.createElementBlock("svg",oe,ae)}const se=P._export_sfc(te,[["render",re]]),le={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:g.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$3};function d(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",le,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(se,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(D._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts 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(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(u._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:g.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},d(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ie=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"week"};u.state.filter=a}}),e.watch(()=>u.state.filter,(t,a)=>{const d={...r.query};Object.keys(a).forEach(m=>{d[m]&&delete d[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(d,o),n.replace({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:g.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},ce=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),ue={class:"w-100 cols-4 t-left flex-nowrap flex"},de={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},me=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),pe={class:"t-semi uppercase"},ge=e.createElementVNode("br",null,null,-1),_e={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},fe=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),he={class:"t-semi uppercase"},ve=e.createElementVNode("br",null,null,-1),be={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ye=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),we={class:"t-semi uppercase"},ke=e.createElementVNode("br",null,null,-1),xe={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",ue,[c.likes?(e.openBlock(),e.createElementBlock("div",de,[me,e.createElementVNode("span",pe,[e.createTextVNode(e.toDisplayString(c.likes),1),ge,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",_e,[fe,e.createElementVNode("span",he,[e.createTextVNode(e.toDisplayString(c.comments),1),ve,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",be,[ye,e.createElementVNode("span",we,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),ke,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Be={class:"pd-thin radius-extra flex-nowrap flex"},Ne=["innerHTML"],Ve={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(c,{emit:r}){const n=c,{t,locale:a}=F.useI18n();let d=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){d.value=(d.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function _(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],f=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f++),f>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,f)},333),f===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][d.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,f)=>(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:_,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:c.action},null,8,Ne)):e.createCommentVNode("",!0)]))}};const Ee={class:"pd-thin"},Ce={class:"o-hidden t-black bg-main pd-big radius-big"},$e=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Pe={class:"z-index-1 mn-big w-100 flex-nowrap flex"},Te=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Se={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Ee,[e.createElementVNode("div",Ce,[$e,e.createElementVNode("div",Pe,[e.createVNode(Ve,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),Te])]))}};const qe={class:"container container-joinus"},Me={class:"content"},Ie={class:"h0 mn-big"},ze=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),De=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Fe={__name:"JoinUs",setup(c){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{d(),t()});const d=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Me,[e.createElementVNode("span",Ie,e.toDisplayString(r.value.toLocaleString()),1),ze,De])]))}};const Oe=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Le={class:"community-feed"},je=Oe(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),Ue={class:"grid-container"},Ae={__name:"HotPosts",async setup(c){let r,n;const t=e.ref([]),a=async()=>{const o=await u.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const d=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Le,[je,e.createElementVNode("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(u._sfc_main$1,{blogpost:s,owner:g.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},He=P._export_sfc(Ae,[["__scopeId","data-v-18db0d1b"]]),Re=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>ce)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ie)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=u._sfc_main$1;exports.Feed=u._sfc_main;exports.FooterBlogpost=u._sfc_main$2;exports.blogpostsStore=u.blogposts;exports.reactionsStore=u.reactions;exports.Comments=x._sfc_main$2;exports.Activity=xe;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=He;exports.JoinUs=Fe;exports.SubscribeNewsletter=Se;exports.blogpostsRoutes=Re;
@@ -1,19 +1,20 @@
1
1
  import { resolveComponent as Y, openBlock as i, createElementBlock as p, createElementVNode as o, createVNode as h, normalizeClass as B, unref as c, createCommentVNode as v, withCtx as k, Transition as G, createBlock as I, resolveDynamicComponent as Q, ref as g, onMounted as F, computed as V, createTextVNode as T, createStaticVNode as Z, TransitionGroup as H, Fragment as D, renderList as U, mergeProps as ee, watch as te, toDisplayString as N, watchEffect as se, isRef as W, withAsyncContext as ae, pushScopeId as oe, popScopeId as ne } from "vue";
2
2
  import { useRoute as z, useRouter as A } from "vue-router";
3
- import { S as le, _ as re } from "./Publics-bed70f0c.mjs";
4
- import { s as M, r as L, c as ie, u as q, a as R, b as ue, d as K, _ as ce } from "./Feed-f3b2bd74.mjs";
5
- import { e as ts, f as ss, g as as } from "./Feed-f3b2bd74.mjs";
6
- import { s as w, _ as pe, F as de } from "./auth-962e3b73.mjs";
7
- import { _ as me, a as ge, b as _e, c as he } from "./Image-58efaf35.mjs";
8
- import { _ as fe } from "./Popup-709634dc.mjs";
9
- import { _ as ve, S as be, C as ye } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-e60b6b7d.mjs";
10
- import { a as we } from "./organizations-8408770b.mjs";
3
+ import { S as le, _ as re } from "./Publics-5472f70c.mjs";
4
+ import { s as M, r as L, c as ie, u as q, a as R, b as ue, d as K, _ as ce } from "./Feed-416d84b0.mjs";
5
+ import { e as ss, f as as, g as os } from "./Feed-416d84b0.mjs";
6
+ import { s as w, _ as pe, F as de } from "./auth-afa25b86.mjs";
7
+ import { _ as me, a as ge, b as _e, c as he } from "./Image-c0ae2c5f.mjs";
8
+ import { _ as fe } from "./Popup-e7c9a43e.mjs";
9
+ import { _ as ve, S as be, C as ye } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-2426cb6f.mjs";
10
+ import { a as we } from "./organizations-af965fcf.mjs";
11
11
  import { _ as xe } from "./EmptyState-34d85f10.mjs";
12
12
  import { _ as X } from "./_plugin-vue_export-helper-dad06003.mjs";
13
13
  import { useI18n as $e } from "vue-i18n";
14
14
  import "./globals-96ba60e4.mjs";
15
- import "./CardOrganization-522845c7.mjs";
16
- import "./ButtonFollow-f0cefb85.mjs";
15
+ import "./CardOrganization-8c5b582b.mjs";
16
+ import "./ButtonFollow-3a05d29f.mjs";
17
+ import "./index-a661083c.mjs";
17
18
  import "./Chips-03ff0c34.mjs";
18
19
  import "./IconEdit-eacf3856.mjs";
19
20
  import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
@@ -393,7 +394,7 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
393
394
  }, nt = /* @__PURE__ */ o("p", { class: "h4 i-medium mn-r-small" }, "💬", -1), lt = { class: "t-semi uppercase" }, rt = /* @__PURE__ */ o("br", null, null, -1), it = {
394
395
  key: 2,
395
396
  class: "w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"
396
- }, ut = /* @__PURE__ */ o("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), ct = { class: "t-semi uppercase" }, pt = /* @__PURE__ */ o("br", null, null, -1), Qt = {
397
+ }, ut = /* @__PURE__ */ o("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), ct = { class: "t-semi uppercase" }, pt = /* @__PURE__ */ o("br", null, null, -1), Wt = {
397
398
  __name: "Activity",
398
399
  props: {
399
400
  likes: Number,
@@ -519,7 +520,7 @@ const _t = { class: "pd-thin" }, ht = { class: "o-hidden t-black bg-main pd-big
519
520
  /* @__PURE__ */ o("p", { class: "t-transp p-big" }, "Subscribe to our newsletter for news, insights, and more from the Weeder universe.")
520
521
  ], -1), vt = { class: "z-index-1 mn-big w-100 flex-nowrap flex" }, bt = /* @__PURE__ */ o("div", { class: "w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid" }, [
521
522
  /* @__PURE__ */ o("div", { class: "spiral" })
522
- ], -1), Wt = {
523
+ ], -1), Kt = {
523
524
  __name: "SubscribeNewsletter",
524
525
  setup(d) {
525
526
  let n = g("");
@@ -544,7 +545,7 @@ const _t = { class: "pd-thin" }, ht = { class: "o-hidden t-black bg-main pd-big
544
545
  ]));
545
546
  }
546
547
  };
547
- const yt = { class: "container container-joinus" }, wt = { class: "content" }, xt = { class: "h0 mn-big" }, $t = /* @__PURE__ */ o("p", { class: "w-m-33r t-center mn-small p-big" }, "Together, we're shaping the future of the globals cannabis community.", -1), kt = /* @__PURE__ */ o("button", { class: "bg-black t-white button" }, "Join Now", -1), Kt = {
548
+ const yt = { class: "container container-joinus" }, wt = { class: "content" }, xt = { class: "h0 mn-big" }, $t = /* @__PURE__ */ o("p", { class: "w-m-33r t-center mn-small p-big" }, "Together, we're shaping the future of the globals cannabis community.", -1), kt = /* @__PURE__ */ o("button", { class: "bg-black t-white button" }, "Join Now", -1), Xt = {
548
549
  __name: "JoinUs",
549
550
  setup(d) {
550
551
  const n = g(120950), s = g([
@@ -626,7 +627,7 @@ const Pt = (d) => (oe("data-v-18db0d1b"), d = d(), ne(), d), Ct = { class: "comm
626
627
  ])
627
628
  ]));
628
629
  }
629
- }, Xt = /* @__PURE__ */ X(Bt, [["__scopeId", "data-v-18db0d1b"]]), Yt = [
630
+ }, Yt = /* @__PURE__ */ X(Bt, [["__scopeId", "data-v-18db0d1b"]]), Zt = [
630
631
  {
631
632
  path: "community",
632
633
  component: Ie,
@@ -687,7 +688,7 @@ const Pt = (d) => (oe("data-v-18db0d1b"), d = d(), ne(), d), Ct = { class: "comm
687
688
  }
688
689
  ];
689
690
  export {
690
- Qt as Activity,
691
+ Wt as Activity,
691
692
  Xe as Blog,
692
693
  We as BlogPost,
693
694
  K as CardBlogpost,
@@ -695,11 +696,11 @@ export {
695
696
  Ie as Community,
696
697
  Ee as CreateBlogPost,
697
698
  ce as Feed,
698
- ts as FooterBlogpost,
699
- Xt as HotPosts,
700
- Kt as JoinUs,
701
- Wt as SubscribeNewsletter,
702
- Yt as blogpostsRoutes,
703
- ss as blogpostsStore,
704
- as as reactionsStore
699
+ ss as FooterBlogpost,
700
+ Yt as HotPosts,
701
+ Xt as JoinUs,
702
+ Kt as SubscribeNewsletter,
703
+ Zt as blogpostsRoutes,
704
+ as as blogpostsStore,
705
+ os as reactionsStore
705
706
  };
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ $props: {
3
+ readonly images?: unknown[] | undefined;
4
+ };
5
+ $emit: (event: "update", ...args: any[]) => void;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
7
+ export default _default;
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {
20
20
  $props: {
21
21
  readonly mode?: string | undefined;
22
+ readonly modelValue?: string | undefined;
22
23
  readonly disabled?: boolean | undefined;
23
24
  readonly allCountries?: unknown[] | undefined;
24
25
  readonly autoFormat?: boolean | undefined;
@@ -32,7 +33,6 @@ declare const _default: {
32
33
  readonly onlyCountries?: unknown[] | undefined;
33
34
  readonly preferredCountries?: unknown[] | undefined;
34
35
  readonly validCharactersOnly?: boolean | undefined;
35
- readonly modelValue?: string | undefined;
36
36
  readonly badClass?: string | Record<string, any> | unknown[] | undefined;
37
37
  readonly goodClass?: string | Record<string, any> | unknown[] | undefined;
38
38
  readonly badStyle?: string | Record<string, any> | unknown[] | undefined;
@@ -75,6 +75,7 @@ declare const _default: {
75
75
  } & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{
76
76
  $props: {
77
77
  readonly mode?: string | undefined;
78
+ readonly modelValue?: string | undefined;
78
79
  readonly disabled?: boolean | undefined;
79
80
  readonly allCountries?: unknown[] | undefined;
80
81
  readonly autoFormat?: boolean | undefined;
@@ -88,7 +89,6 @@ declare const _default: {
88
89
  readonly onlyCountries?: unknown[] | undefined;
89
90
  readonly preferredCountries?: unknown[] | undefined;
90
91
  readonly validCharactersOnly?: boolean | undefined;
91
- readonly modelValue?: string | undefined;
92
92
  readonly badClass?: string | Record<string, any> | unknown[] | undefined;
93
93
  readonly goodClass?: string | Record<string, any> | unknown[] | undefined;
94
94
  readonly badStyle?: string | Record<string, any> | unknown[] | undefined;
@@ -115,6 +115,7 @@ declare const _default: {
115
115
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {
116
116
  $props: {
117
117
  readonly mode?: string | undefined;
118
+ readonly modelValue?: string | undefined;
118
119
  readonly disabled?: boolean | undefined;
119
120
  readonly allCountries?: unknown[] | undefined;
120
121
  readonly autoFormat?: boolean | undefined;
@@ -128,7 +129,6 @@ declare const _default: {
128
129
  readonly onlyCountries?: unknown[] | undefined;
129
130
  readonly preferredCountries?: unknown[] | undefined;
130
131
  readonly validCharactersOnly?: boolean | undefined;
131
- readonly modelValue?: string | undefined;
132
132
  readonly badClass?: string | Record<string, any> | unknown[] | undefined;
133
133
  readonly goodClass?: string | Record<string, any> | unknown[] | undefined;
134
134
  readonly badStyle?: string | Record<string, any> | unknown[] | undefined;
@@ -522,6 +522,7 @@ declare const _default: import("vue").DefineComponent<{
522
522
  }>>, {
523
523
  validation: boolean | Record<string, any>;
524
524
  mode: string;
525
+ modelValue: string;
525
526
  disabled: boolean;
526
527
  allCountries: unknown[];
527
528
  autoFormat: boolean;
@@ -535,7 +536,6 @@ declare const _default: import("vue").DefineComponent<{
535
536
  onlyCountries: unknown[];
536
537
  preferredCountries: unknown[];
537
538
  validCharactersOnly: boolean;
538
- modelValue: string;
539
539
  badClass: string | Record<string, any> | unknown[];
540
540
  goodClass: string | Record<string, any> | unknown[];
541
541
  badStyle: string | Record<string, any> | unknown[];