@ozdao/prometheus-framework 0.1.39 → 0.1.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/ButtonToggleMembership-738720bd.js +1 -0
- package/dist/ButtonToggleMembership-e337e704.mjs +90 -0
- package/dist/CardBlogpost-c7adb0a7.mjs +246 -0
- package/dist/CardBlogpost-f308ff64.js +1 -0
- package/dist/CardOrganization-22beb83d.js +1 -0
- package/dist/CardOrganization-ae384e54.mjs +234 -0
- package/dist/Chips-edf2b573.js +1 -0
- package/dist/Chips-f06ec38f.mjs +213 -0
- package/dist/Community-04b25965.mjs +130 -0
- package/dist/Community-2f6fee0f.js +1 -0
- package/dist/Events-41d71b0e.js +1 -0
- package/dist/Events-af7170ed.mjs +134 -0
- package/dist/Feed-04fe1f7a.mjs +361 -0
- package/dist/Feed-23758089.mjs +124 -0
- package/dist/Feed-36e83be3.mjs +156 -0
- package/dist/Feed-5653cf8b.js +1 -0
- package/dist/Feed-5a359bb7.js +1 -0
- package/dist/Feed-6ca0541a.js +1 -0
- package/dist/Image-39955d9d.mjs +480 -0
- package/dist/Image-c2d190d8.js +9 -0
- package/dist/LeftoverAdd-21311275.js +1 -0
- package/dist/LeftoverAdd-ccf4595f.mjs +228 -0
- package/dist/Members-7251dd52.mjs +109 -0
- package/dist/Members-d35ab7e8.js +1 -0
- package/dist/Organizations-a964d4b6.mjs +72 -0
- package/dist/Organizations-ed6d36d6.js +1 -0
- package/dist/Product-299070ad.mjs +652 -0
- package/dist/Product-aacb05f3.js +7 -0
- package/dist/ProductEdit-70bed802.mjs +296 -0
- package/dist/ProductEdit-e5a2e0f6.js +1 -0
- package/dist/ProductsBackoffice-3c182d6a.mjs +86 -0
- package/dist/ProductsBackoffice-b684913d.js +1 -0
- package/dist/ProfileBlogposts-6bf526fb.js +1 -0
- package/dist/ProfileBlogposts-d4b17535.mjs +77 -0
- package/dist/ProfileEvents-3eeb4320.mjs +68 -0
- package/dist/ProfileEvents-90e09978.js +1 -0
- package/dist/ProfileOrganizations-e838925f.js +1 -0
- package/dist/ProfileOrganizations-edf657ca.mjs +72 -0
- package/dist/Publics-a31d7fe7.js +1 -0
- package/dist/Publics-a8f31413.mjs +45 -0
- package/dist/Wallet-2043b611.mjs +24682 -0
- package/dist/Wallet-8fa7386a.js +55 -0
- package/dist/auth-076a83d0.mjs +625 -0
- package/dist/auth-df5a20c6.js +7 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +4 -4
- package/dist/auth.validation-80b133df.js +1 -0
- package/dist/auth.validation-fd9ae66f.mjs +24 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +11 -11
- package/dist/categories-4327a81c.js +1 -0
- package/dist/categories-52a561a4.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +10 -10
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +9 -9
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +1 -1
- package/dist/main.css +1 -1
- package/dist/modules/gallery/components/pages/Gallery.vue.d.ts +2 -0
- package/dist/modules/gallery/components/sections/GalleryWithCategories.vue.d.ts +2 -0
- package/dist/modules/globals/components/sections/Title.vue.d.ts +6 -0
- package/dist/organizations-966e1cd2.mjs +122 -0
- package/dist/organizations-d12c42b6.js +1 -0
- package/dist/organizations.client-8f263e28.js +3 -0
- package/dist/organizations.client-9ffc023f.mjs +2996 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +15 -15
- package/dist/products-7e4253eb.js +1 -0
- package/dist/products-aabe5c02.mjs +108 -0
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +2 -2
- package/dist/states.validation-4594b33c.mjs +13 -0
- package/dist/states.validation-69003e66.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +198 -166
- package/package.json +1 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/LocationSelection/LocationSelection.vue +1 -1
- package/src/components/Navigation/Navigation.vue +12 -1
- package/src/modules/auth/store/auth.js +7 -4
- package/src/modules/files/middlewares/server/md.js +1 -0
- package/src/modules/gallery/components/pages/Gallery.vue +21 -0
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +408 -0
- package/src/modules/gallery/gallery.client.js +11 -14
- package/src/modules/gallery/router/gallery.router.js +10 -0
- package/src/modules/globals/components/sections/Title.vue +22 -0
- package/src/modules/marketplace/router/marketplace.js +4 -3
- package/src/modules/organizations/components/sections/Feed.vue +2 -2
- package/src/modules/products/components/pages/ProductRecommmendation.vue +5 -3
- package/src/modules/products/components/sections/SectionProduct.vue +17 -5
- package/src/modules/products/controllers/products.controller.js +83 -0
- package/src/modules/products/routes/products.routes.js +5 -5
- package/src/modules/spots/components/layouts/Spots.vue +16 -11
- package/src/modules/spots/components/pages/Map.vue +9 -7
- package/src/modules/users/components/pages/Profile.vue +15 -5
- package/src/modules/users/router/users.js +10 -0
- package/src/modules/wallet/components/pages/Wallet.vue +104 -23
package/dist/auth.client.js
CHANGED
@@ -5,8 +5,8 @@ import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
|
5
5
|
import { C as xt, S as kt } from "./carousel.es-44c501bc.mjs";
|
6
6
|
import { useI18n as B } from "vue-i18n";
|
7
7
|
import { useRoute as L, useRouter as x } from "vue-router";
|
8
|
-
import { b as ie, c as pt, s as m, a as K } from "./auth-
|
9
|
-
import { d as U1, t as G1 } from "./auth-
|
8
|
+
import { b as ie, c as pt, s as m, a as K } from "./auth-076a83d0.mjs";
|
9
|
+
import { d as U1, t as G1 } from "./auth-076a83d0.mjs";
|
10
10
|
import { v as R, a as mt, b as be, c as _e } from "./inputs.validation-db65277a.mjs";
|
11
11
|
import { s as z } from "./globals-96ba60e4.mjs";
|
12
12
|
import { F as M } from "./Field-e5ad88d3.mjs";
|
@@ -15,8 +15,8 @@ import { a as jt } from "./index-a661083c.mjs";
|
|
15
15
|
import { _ as Ce } from "./Tab-054b61f7.mjs";
|
16
16
|
import { c as Bt } from "./click-outside-6101836c.mjs";
|
17
17
|
import { _ as Ut } from "./_plugin-vue_export-helper-dad06003.mjs";
|
18
|
-
import { r as oe, c as Te } from "./states.validation-
|
19
|
-
import { b as G } from "./auth.validation-
|
18
|
+
import { r as oe, c as Te } from "./states.validation-4594b33c.mjs";
|
19
|
+
import { b as G } from "./auth.validation-fd9ae66f.mjs";
|
20
20
|
const Gt = { class: "parent-div" }, Vt = { class: "mn-small" }, Ht = { class: "mn-big mn-r-small mn-l-small" }, L1 = {
|
21
21
|
__name: "SliderFeatures",
|
22
22
|
setup(e) {
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const o=require("vue-router"),e=require("./auth-df5a20c6.js");o.useRouter();function n(t,i,s){if(e.state.access.status!==!0)return s("/auth/signin");s()}function c(t,i,s){var u;if(((u=e.state.access.roles)!=null&&u.includes("ROLE_ADMIN")?e.state.access.roles.includes("ROLE_ADMIN"):!1)!==!0)return s("/404");s()}function a(t,i,s){if(e.state.access.status)return s("/profile/"+e.state.user._id);s()}exports.requiresAdmin=c;exports.requiresAuth=n;exports.requiresNoAuth=a;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { useRouter as u } from "vue-router";
|
2
|
+
import { s as i } from "./auth-076a83d0.mjs";
|
3
|
+
u();
|
4
|
+
function a(r, o, s) {
|
5
|
+
if (i.access.status !== !0)
|
6
|
+
return s("/auth/signin");
|
7
|
+
s();
|
8
|
+
}
|
9
|
+
function f(r, o, s) {
|
10
|
+
var e;
|
11
|
+
if (((e = i.access.roles) != null && e.includes("ROLE_ADMIN") ? i.access.roles.includes("ROLE_ADMIN") : !1) !== !0)
|
12
|
+
return s("/404");
|
13
|
+
s();
|
14
|
+
}
|
15
|
+
function m(r, o, s) {
|
16
|
+
if (i.access.status)
|
17
|
+
return s("/profile/" + i.user._id);
|
18
|
+
s();
|
19
|
+
}
|
20
|
+
export {
|
21
|
+
a,
|
22
|
+
m as b,
|
23
|
+
f as r
|
24
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./_plugin-vue_export-helper-f246444f.js"),o=require("./auth.validation-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./_plugin-vue_export-helper-f246444f.js"),o=require("./auth.validation-80b133df.js");require("vue-router");require("./auth-df5a20c6.js");require("./index-b41aac19.js");require("./globals-928eb13c.js");require("vue-i18n");const c={},s={id:"account",class:"cols-1 gap-medium pd-medium"},m={class:"w-100"};function u(t,p){const r=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",s,[e.createElementVNode("div",m,[e.createVNode(r,null,{default:e.withCtx(({Component:n,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:i.path}))]),_:2},1024)]),_:1})])])}const f=a._export_sfc(c,[["render",u]]),l=[{path:"backoffice",component:f,beforeEnter:[o.requiresAdmin],children:[{path:"",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Dashboard-73b50724.js"))},{path:"gallery",name:"Backoffice Gallery",meta:{title:{en:"Backoffice Gallery",ru:"Управление Галерей"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./BackofficeGallery-568b55bb.js"))},{path:"reports",name:"Backoffice Reports",meta:{title:{en:"Backoffice Reports",ru:"Управление Жалобами"}},component:()=>Promise.resolve().then(()=>require("./BackofficeReports-d021871f.js"))},{path:"organizations",name:"Backoffice Organizations",meta:{title:{en:"Backoffice Organizations",ru:"Управление Организациями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Organizations-ed6d36d6.js"))},{path:"events",name:"Backoffice Events",meta:{title:{en:"Backoffice Events",ru:"Управление Событиями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Events-41d71b0e.js")).then(t=>t.Events)},{path:"community",name:"Backoffice Community",meta:{title:{en:"Backoffice Community",ru:"Управление Сообществом"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Community-2f6fee0f.js"))},{path:"products",name:"Backoffice Products",meta:{title:{en:"Backoffice Products",ru:"Управление Продуктами"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./ProductsBackoffice-b684913d.js"))},{path:"products/add",name:"AddProduct",component:()=>Promise.resolve().then(()=>require("./ProductEdit-e5a2e0f6.js"))},{path:"products/:product",name:"Product Backofffice",meta:{title:{en:"Product",ru:"Продукт"}},component:()=>Promise.resolve().then(()=>require("./Product-aacb05f3.js"))},{path:"products/:product/edit",name:"ProductEdit",beforeEnter:[o.requiresAuth],component:()=>Promise.resolve().then(()=>require("./ProductEdit-e5a2e0f6.js"))},{path:"leftovers",name:"Backoffice Leftovers",meta:{title:{en:"Backoffice Leftovers",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Leftovers-296c0042.js"))},{path:"leftovers/add",name:"LeftoverAdd",meta:{title:{en:"Backoffice Leftovers",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./LeftoverAdd-21311275.js"))},{path:"leftovers/:_id",name:"LeftoverEdit",meta:{title:{en:"Backoffice Leftovers",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./LeftoverAdd-21311275.js"))},{path:"orders",name:"Backoffice Orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Orders-b64e8cb9.js"))},{path:"orders/add",name:"AdminOrder",component:()=>Promise.resolve().then(()=>require("./EditOrder-c070d474.js"))},{path:"orders/:_id",name:"AdminOrderEdit",component:()=>Promise.resolve().then(()=>require("./EditOrder-c070d474.js"))},{path:"payments",name:"Backoffice Payments",meta:{title:{en:"Backoffice Payments",ru:"Управление Платежами"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Payments-53e5fecf.js"))}]}];exports.backofficeRoutes=l;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { resolveComponent as i, openBlock as t, createElementBlock as m, createElementVNode as p, createVNode as o, withCtx as r, Transition as f, createBlock as s, resolveDynamicComponent as u } from "vue";
|
2
2
|
import { _ as d } from "./_plugin-vue_export-helper-dad06003.mjs";
|
3
|
-
import { r as l, a as h } from "./auth.validation-
|
3
|
+
import { r as l, a as h } from "./auth.validation-fd9ae66f.mjs";
|
4
4
|
import "vue-router";
|
5
|
-
import "./auth-
|
5
|
+
import "./auth-076a83d0.mjs";
|
6
6
|
import "./index-a661083c.mjs";
|
7
7
|
import "./globals-96ba60e4.mjs";
|
8
8
|
import "vue-i18n";
|
@@ -97,7 +97,7 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
97
97
|
},
|
98
98
|
component: () => import(
|
99
99
|
/* webpackChunkName: 'BackofficeOrganizations' */
|
100
|
-
"./Organizations-
|
100
|
+
"./Organizations-a964d4b6.mjs"
|
101
101
|
)
|
102
102
|
},
|
103
103
|
{
|
@@ -112,7 +112,7 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
112
112
|
},
|
113
113
|
component: () => import(
|
114
114
|
/* webpackChunkName: 'BackofficeEvents' */
|
115
|
-
"./Events-
|
115
|
+
"./Events-af7170ed.mjs"
|
116
116
|
).then((e) => e.E)
|
117
117
|
},
|
118
118
|
{
|
@@ -127,7 +127,7 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
127
127
|
},
|
128
128
|
component: () => import(
|
129
129
|
/* webpackChunkName: 'BackofficeCommunity' */
|
130
|
-
"./Community-
|
130
|
+
"./Community-04b25965.mjs"
|
131
131
|
)
|
132
132
|
},
|
133
133
|
{
|
@@ -142,13 +142,13 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
142
142
|
},
|
143
143
|
component: () => import(
|
144
144
|
/* webpackChunkName: 'BackofficeProducts' */
|
145
|
-
"./ProductsBackoffice-
|
145
|
+
"./ProductsBackoffice-3c182d6a.mjs"
|
146
146
|
)
|
147
147
|
},
|
148
148
|
{
|
149
149
|
path: "products/add",
|
150
150
|
name: "AddProduct",
|
151
|
-
component: () => import("./ProductEdit-
|
151
|
+
component: () => import("./ProductEdit-70bed802.mjs")
|
152
152
|
},
|
153
153
|
{
|
154
154
|
path: "products/:product",
|
@@ -159,13 +159,13 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
159
159
|
ru: "Продукт"
|
160
160
|
}
|
161
161
|
},
|
162
|
-
component: () => import("./Product-
|
162
|
+
component: () => import("./Product-299070ad.mjs")
|
163
163
|
},
|
164
164
|
{
|
165
165
|
path: "products/:product/edit",
|
166
166
|
name: "ProductEdit",
|
167
167
|
beforeEnter: [h],
|
168
|
-
component: () => import("./ProductEdit-
|
168
|
+
component: () => import("./ProductEdit-70bed802.mjs")
|
169
169
|
},
|
170
170
|
{
|
171
171
|
path: "leftovers",
|
@@ -194,7 +194,7 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
194
194
|
},
|
195
195
|
component: () => import(
|
196
196
|
/* webpackChunkName: 'LeftoverEdit' */
|
197
|
-
"./LeftoverAdd-
|
197
|
+
"./LeftoverAdd-ccf4595f.mjs"
|
198
198
|
)
|
199
199
|
},
|
200
200
|
{
|
@@ -209,7 +209,7 @@ const y = /* @__PURE__ */ d(k, [["render", v]]), b = [{
|
|
209
209
|
},
|
210
210
|
component: () => import(
|
211
211
|
/* webpackChunkName: 'LeftoverEdit' */
|
212
|
-
"./LeftoverAdd-
|
212
|
+
"./LeftoverAdd-ccf4595f.mjs"
|
213
213
|
)
|
214
214
|
},
|
215
215
|
{
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),g=require("vue-router"),k=require("vue-i18n"),a=require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./auth-df5a20c6.js");const v=require("./index-b41aac19.js"),w={class:"breadcrumbs flex-row flex-nowrap flex-left flex","aria-label":"breadcrumbs"},B={key:0,class:"i-small mn-r-thin",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L=e.createElementVNode("path",{fill:"black",d:"M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"},null,-1),x=[L],E={key:2},b={key:3,class:"i-small chevron",viewBox:"0 0 4 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V=e.createElementVNode("path",{d:"M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z",fill:"black"},null,-1),P=[V],y={__name:"Breadcrumbs",setup(t){const r=g.useRoute(),{t:p,locale:c}=k.useI18n(),u=e.computed(()=>r.matched.map(s=>{var h,C,_;const m=(h=s.meta)==null?void 0:h.title,d=c==null?void 0:c.value,i=m&&d&&m[d],o=s.path.replace(/:.+?\//g,j=>""),f=(_=(C=s.meta)==null?void 0:C.breadcrumbs)==null?void 0:_.hidden;return{name:i,path:o,isHidden:f}}).filter(s=>s.name&&!s.isHidden));return(s,m)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("ol",w,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(i,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["flex-v-center flex-nowrap flex",{"t-main":o===e.unref(u).length-1}])},[o===0?(e.openBlock(),e.createElementBlock("svg",B,x)):e.createCommentVNode("",!0),o!==e.unref(u).length-1?(e.openBlock(),e.createBlock(d,{key:1,to:o===0?"/":i.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.name),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(i.name),1)),o!==e.unref(u).length-1?(e.openBlock(),e.createElementBlock("svg",b,P)):e.createCommentVNode("",!0)],2))),128))])}}},q=process.env.API_URL,l=v.axios.create({baseURL:q,withCredentials:!0}),n=e.reactive({all:[],current:{order:"1",name:"",url:"",subcategories:[],filters:[],localization:[]}}),H={async fetchCategories(){return await l.get("/categories").then(t=>(n.all=t.data,Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategories(t){return l.post("/categories",t).then(r=>(n.all=t,Promise.resolve(t)),r=>(a.setError(r),Promise.reject(r)))},fetchCategory(t){return l.get("/categories/"+t).then(r=>(n.current=r.data,Promise.resolve(r.data)),r=>(a.setError(r),Promise.reject(r)))},addCategory(){return l.post("/categories/add",n.current).then(t=>(n.all.push(t.data),Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategory(t){return l.post("/categories/"+t,n.current).then(r=>(n.current=r.data,Promise.resolve(r.data)),r=>(a.setError(r),Promise.reject(r)))},deleteCategory(t){return l.delete("/categories/"+t).then(r=>{const p=n.all.findIndex(c=>c.url===t);n.all.splice(p,1)},r=>{a.setError(r)})}};e.watch(n,t=>{});exports._sfc_main=y;exports.actions=H;exports.state=n;
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import { computed as b, resolveComponent as k, openBlock as a, createElementBlock as o, Fragment as P, renderList as V, unref as p, normalizeClass as y, createCommentVNode as w, createBlock as H, withCtx as B, createTextVNode as j, toDisplayString as v, createElementVNode as L, reactive as U, watch as E } from "vue";
|
2
|
+
import { useRoute as I } from "vue-router";
|
3
|
+
import { useI18n as M } from "vue-i18n";
|
4
|
+
import { s as l } from "./globals-96ba60e4.mjs";
|
5
|
+
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
6
|
+
import "./auth-076a83d0.mjs";
|
7
|
+
import { a as N } from "./index-a661083c.mjs";
|
8
|
+
const R = {
|
9
|
+
class: "breadcrumbs flex-row flex-nowrap flex-left flex",
|
10
|
+
"aria-label": "breadcrumbs"
|
11
|
+
}, Z = {
|
12
|
+
key: 0,
|
13
|
+
class: "i-small mn-r-thin",
|
14
|
+
viewBox: "0 0 10 9",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, z = /* @__PURE__ */ L("path", {
|
18
|
+
fill: "black",
|
19
|
+
d: "M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"
|
20
|
+
}, null, -1), S = [
|
21
|
+
z
|
22
|
+
], A = { key: 2 }, D = {
|
23
|
+
key: 3,
|
24
|
+
class: "i-small chevron",
|
25
|
+
viewBox: "0 0 4 8",
|
26
|
+
fill: "none",
|
27
|
+
xmlns: "http://www.w3.org/2000/svg"
|
28
|
+
}, F = /* @__PURE__ */ L("path", {
|
29
|
+
d: "M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z",
|
30
|
+
fill: "black"
|
31
|
+
}, null, -1), T = [
|
32
|
+
F
|
33
|
+
], Y = {
|
34
|
+
__name: "Breadcrumbs",
|
35
|
+
setup(e) {
|
36
|
+
const t = I(), { t: C, locale: i } = M(), m = b(() => t.matched.map((n) => {
|
37
|
+
var _, f, g;
|
38
|
+
const h = (_ = n.meta) == null ? void 0 : _.title, d = i == null ? void 0 : i.value, u = h && d && h[d], s = n.path.replace(/:.+?\//g, (q) => ""), x = (g = (f = n.meta) == null ? void 0 : f.breadcrumbs) == null ? void 0 : g.hidden;
|
39
|
+
return { name: u, path: s, isHidden: x };
|
40
|
+
}).filter((n) => n.name && !n.isHidden));
|
41
|
+
return (n, h) => {
|
42
|
+
const d = k("router-link");
|
43
|
+
return a(), o("ol", R, [
|
44
|
+
(a(!0), o(P, null, V(p(m), (u, s) => (a(), o("li", {
|
45
|
+
key: s,
|
46
|
+
class: y(["flex-v-center flex-nowrap flex", { "t-main": s === p(m).length - 1 }])
|
47
|
+
}, [
|
48
|
+
s === 0 ? (a(), o("svg", Z, S)) : w("", !0),
|
49
|
+
s !== p(m).length - 1 ? (a(), H(d, {
|
50
|
+
key: 1,
|
51
|
+
to: s === 0 ? "/" : u.path
|
52
|
+
}, {
|
53
|
+
default: B(() => [
|
54
|
+
j(v(u.name), 1)
|
55
|
+
]),
|
56
|
+
_: 2
|
57
|
+
}, 1032, ["to"])) : (a(), o("span", A, v(u.name), 1)),
|
58
|
+
s !== p(m).length - 1 ? (a(), o("svg", D, T)) : w("", !0)
|
59
|
+
], 2))), 128))
|
60
|
+
]);
|
61
|
+
};
|
62
|
+
}
|
63
|
+
}, $ = process.env.API_URL, c = N.create({ baseURL: $, withCredentials: !0 }), r = U({
|
64
|
+
all: [],
|
65
|
+
current: {
|
66
|
+
order: "1",
|
67
|
+
name: "",
|
68
|
+
url: "",
|
69
|
+
subcategories: [],
|
70
|
+
filters: [],
|
71
|
+
localization: []
|
72
|
+
}
|
73
|
+
}), ee = {
|
74
|
+
async fetchCategories() {
|
75
|
+
return await c.get("/categories").then(
|
76
|
+
(e) => (r.all = e.data, Promise.resolve(e.data)),
|
77
|
+
(e) => (l(e), Promise.reject(e))
|
78
|
+
);
|
79
|
+
},
|
80
|
+
updateCategories(e) {
|
81
|
+
return c.post("/categories", e).then(
|
82
|
+
(t) => (r.all = e, Promise.resolve(e)),
|
83
|
+
(t) => (l(t), Promise.reject(t))
|
84
|
+
);
|
85
|
+
},
|
86
|
+
fetchCategory(e) {
|
87
|
+
return c.get("/categories/" + e).then(
|
88
|
+
(t) => (r.current = t.data, Promise.resolve(t.data)),
|
89
|
+
(t) => (l(t), Promise.reject(t))
|
90
|
+
);
|
91
|
+
},
|
92
|
+
addCategory() {
|
93
|
+
return c.post("/categories/add", r.current).then(
|
94
|
+
(e) => (r.all.push(e.data), Promise.resolve(e.data)),
|
95
|
+
(e) => (l(e), Promise.reject(e))
|
96
|
+
);
|
97
|
+
},
|
98
|
+
updateCategory(e) {
|
99
|
+
return c.post("/categories/" + e, r.current).then(
|
100
|
+
(t) => (r.current = t.data, Promise.resolve(t.data)),
|
101
|
+
(t) => (l(t), Promise.reject(t))
|
102
|
+
);
|
103
|
+
},
|
104
|
+
deleteCategory(e) {
|
105
|
+
return c.delete("/categories/" + e).then(
|
106
|
+
(t) => {
|
107
|
+
const C = r.all.findIndex((i) => i.url === e);
|
108
|
+
r.all.splice(C, 1);
|
109
|
+
},
|
110
|
+
(t) => {
|
111
|
+
l(t);
|
112
|
+
}
|
113
|
+
);
|
114
|
+
}
|
115
|
+
};
|
116
|
+
E(r, (e) => {
|
117
|
+
});
|
118
|
+
export {
|
119
|
+
Y as _,
|
120
|
+
ee as a,
|
121
|
+
r as s
|
122
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),M=require("./Select-3ca5ab39.js"),m=require("./CardBlogpost-ae3b4d23.js"),h=require("./auth-06d35b82.js"),x=require("./Image-268e2a1b.js"),I=require("./Popup-eb11fa82.js"),z=require("./BlockTags-8cddaef7.js"),D=require("./Checkbox-76f09248.js"),F=require("./SelectMulti-c25765cf.js"),O=require("./Button-7643c9aa.js"),j=require("./organizations-4d18a2e2.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const L=require("./EmptyState-d65bab5b.js"),$=require("./_plugin-vue_export-helper-f246444f.js"),U=require("./Publics-0762210a.js"),H=require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const V=require("./Feed-09b0790d.js"),A=require("./Field-e2a43424.js"),R=require("./Chips-3a07f374.js");require("./index-b41aac19.js");require("./IconEdit-c0469b45.js");require("./vue-draggable-next.esm-bundler-21a209c6.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./CardOrganization-d93c9bdb.js");require("./ButtonToggleMembership-15f149cb.js");require("./memberships-393765d8.js");require("./Loader-21f016da.js");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./Dropdown-f2564c92.js");require("./reports-270f69df.js");require("./click-outside-0b0727d1.js");const J={class:"min-h-100vh pd-thin"},G={class:"mn-thin flex-v-center t-left flex-nowrap flex"},Q={class:"flex-v-center flex-nowrap flex t-left"},W=e.createElementVNode("span",{class:""},"Topics for ",-1),K={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},X={class:""},P={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const u=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("header",G,[e.createElementVNode("h2",Q,[W,e.createVNode(M.Select,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>m.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",K,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"t-medium pd-thin 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"},"t-medium pd-thin 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"},"t-medium pd-thin radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),h.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-thin 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",X,[e.createVNode(u,null,{default:e.withCtx(({Component:o,route:d})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:d.query}))]),_:2},1024)]),_:1})])])}}},Y={class:"pd-thin"},Z={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},ee={class:"w-full h-full"},te={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},oe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ne=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),ae=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),re={key:0,class:"mn-thin"},se={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},T={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const u=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await m.read({user:h.state.user._id,url:r.params.url});t.value=i.pop()}else m.clean(),t.value=m.state.current;t.value.owner||(t.value.owner={target:h.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:h.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 j.actions.read({user:h.state.user._id,postable:h.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 d=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(d.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!u.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){u.value.length>0&&u.value.map(l=>l.text),t.value.status="draft",r.params.url?m.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):m.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?m.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):m.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?")&&m.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",Y,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",Z,[e.createElementVNode("div",ee,[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]=g=>e.unref(t).content=g)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",te,[e.createElementVNode("div",oe,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=g=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=g=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=g=>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,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[ne,e.createVNode(z._sfc_main,{onTagsChanged:i[4]||(i[4]=g=>e.unref(t).tags=g),tags:e.unref(t).tags},null,8,["tags"]),ae,e.createVNode(F.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=g=>o.value=g),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",re,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(D.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=g=>e.unref(t).creator.hidden=g),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(O._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"])]))}},E=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"})),le={},ie={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},ce=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),ue=[ce];function de(c,r){return e.openBlock(),e.createElementBlock("svg",ie,ue)}const me=$._export_sfc(le,[["render",de]]),pe={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 m.read({user:h.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 u(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,d)=>(e.openBlock(),e.createElementBlock("section",pe,[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(me,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(L._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(m._sfc_main,{key:0,onClick:d[0]||(d[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:h.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"},u(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode(U._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:h.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ge=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),S={__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"};m.state.filter=a}}),e.watch(()=>m.state.filter,(t,a)=>{const u={...r.query};Object.keys(a).forEach(d=>{u[d]&&delete u[d]});const o=Object.fromEntries(Object.entries(t).filter(([d,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([d,s])=>[d,Array.isArray(s)?s.join(","):s]));Object.assign(u,o),n.replace({query:u})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(V._sfc_main,{category:e.unref(r).params.category,user:h.state.user._id,period:e.unref(r).query.period,following:e.unref(r).params.category==="following"?h.state.user._id:null},null,8,["category","user","period","following"])]))}},fe=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),he={class:"w-100 cols-4 t-left flex-nowrap flex"},_e={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),be={class:"t-semi uppercase"},ye=e.createElementVNode("br",null,null,-1),we={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ke=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),xe={class:"t-semi uppercase"},Be=e.createElementVNode("br",null,null,-1),Ne={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},Ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),Ce={class:"t-semi uppercase"},Ee=e.createElementVNode("br",null,null,-1),$e={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",he,[c.likes?(e.openBlock(),e.createElementBlock("div",_e,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(c.likes),1),ye,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(c.comments),1),Be,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",Ne,[Ve,e.createElementVNode("span",Ce,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),Ee,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Pe={class:"pd-thin radius-extra flex-nowrap flex"},Te=["innerHTML"],qe={__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}=H.useI18n();let u=e.ref(0),o=e.ref(n.input),d=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(_){r("update:input",_),b.value=_}function l(){u.value=(u.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),d.value=n.placeholder,b.value||(o.value="")}function g(){!b.value&&n.enableTyping&&(s.value=!0,d.value="",C())}function C(){let _=n.placeholderTexts[a.value][u.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=_.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=_.substring(0,f)+(v.value&&f%2?"|":""),f++),f>_.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=_.substring(0,f)},333),f===0&&y&&(y=!1,l(),_=n.placeholderTexts[a.value][u.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&C()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(_,f)=>(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(A.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(d),onInput:l,onFocus:i,onBlur:g,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,Te)):e.createCommentVNode("",!0)]))}};const Se={class:"pd-thin"},Me={class:"o-hidden t-black bg-main pd-big radius-big"},Ie=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),ze={class:"z-index-1 mn-big w-100 flex-nowrap flex"},De=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),Fe={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Se,[e.createElementVNode("div",Me,[Ie,e.createElementVNode("div",ze,[e.createVNode(qe,{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"])]),De])]))}};const Oe={class:"container container-joinus"},je={class:"content"},Le={class:"h0 mn-big"},Ue=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),He=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Ae={__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(()=>{u(),t()});const u=()=>{n.value.forEach((o,d)=>{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,d)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",je,[e.createElementVNode("span",Le,e.toDisplayString(r.value.toLocaleString()),1),Ue,He])]))}};const Re=c=>(e.pushScopeId("data-v-2591cab6"),c=c(),e.popScopeId(),c),Je={class:"community-feed"},Ge=Re(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),Qe={__name:"HotPosts",setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",Je,[Ge,e.createVNode(V._sfc_main,{skip:0,limit:3,user:h.state.user._id,period:"year",class:"cols-2 gap-thin"},null,8,["user"])]))}},We=$._export_sfc(Qe,[["__scopeId","data-v-2591cab6"]]),Ke=[{path:"community",component:P,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(()=>fe)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>E)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ge)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>E)}];exports.CardBlogpost=m._sfc_main;exports.FooterBlogpost=m._sfc_main$1;exports.blogpostsStore=m.blogposts;exports.Comments=x._sfc_main$2;exports.Feed=V._sfc_main;exports.reactionsStore=R.reactions;exports.Activity=$e;exports.Blog=S;exports.BlogPost=q;exports.Community=P;exports.CreateBlogPost=T;exports.HotPosts=We;exports.JoinUs=Ae;exports.SubscribeNewsletter=Fe;exports.blogpostsRoutes=Ke;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),M=require("./Select-3ca5ab39.js"),m=require("./CardBlogpost-f308ff64.js"),h=require("./auth-df5a20c6.js"),x=require("./Image-c2d190d8.js"),I=require("./Popup-eb11fa82.js"),z=require("./BlockTags-8cddaef7.js"),D=require("./Checkbox-76f09248.js"),F=require("./SelectMulti-c25765cf.js"),O=require("./Button-7643c9aa.js"),j=require("./organizations-d12c42b6.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const L=require("./EmptyState-d65bab5b.js"),$=require("./_plugin-vue_export-helper-f246444f.js"),U=require("./Publics-a31d7fe7.js"),H=require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const V=require("./Feed-5a359bb7.js"),A=require("./Field-e2a43424.js"),R=require("./Chips-edf2b573.js");require("./index-b41aac19.js");require("./IconEdit-c0469b45.js");require("./vue-draggable-next.esm-bundler-21a209c6.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./CardOrganization-22beb83d.js");require("./ButtonToggleMembership-738720bd.js");require("./memberships-393765d8.js");require("./Loader-21f016da.js");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./Dropdown-f2564c92.js");require("./reports-270f69df.js");require("./click-outside-0b0727d1.js");const J={class:"min-h-100vh pd-thin"},G={class:"mn-thin flex-v-center t-left flex-nowrap flex"},Q={class:"flex-v-center flex-nowrap flex t-left"},W=e.createElementVNode("span",{class:""},"Topics for ",-1),K={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},X={class:""},P={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const u=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("header",G,[e.createElementVNode("h2",Q,[W,e.createVNode(M.Select,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>m.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",K,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"t-medium pd-thin 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"},"t-medium pd-thin 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"},"t-medium pd-thin radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),h.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-thin 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",X,[e.createVNode(u,null,{default:e.withCtx(({Component:o,route:d})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:d.query}))]),_:2},1024)]),_:1})])])}}},Y={class:"pd-thin"},Z={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},ee={class:"w-full h-full"},te={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},oe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ne=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),ae=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),re={key:0,class:"mn-thin"},se={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},T={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const u=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await m.read({user:h.state.user._id,url:r.params.url});t.value=i.pop()}else m.clean(),t.value=m.state.current;t.value.owner||(t.value.owner={target:h.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:h.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 j.actions.read({user:h.state.user._id,postable:h.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 d=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(d.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!u.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){u.value.length>0&&u.value.map(l=>l.text),t.value.status="draft",r.params.url?m.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):m.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?m.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):m.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?")&&m.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",Y,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",Z,[e.createElementVNode("div",ee,[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]=g=>e.unref(t).content=g)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",te,[e.createElementVNode("div",oe,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=g=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=g=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=g=>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,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[ne,e.createVNode(z._sfc_main,{onTagsChanged:i[4]||(i[4]=g=>e.unref(t).tags=g),tags:e.unref(t).tags},null,8,["tags"]),ae,e.createVNode(F.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=g=>o.value=g),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",re,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(D.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=g=>e.unref(t).creator.hidden=g),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(O._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"])]))}},E=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"})),le={},ie={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},ce=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),ue=[ce];function de(c,r){return e.openBlock(),e.createElementBlock("svg",ie,ue)}const me=$._export_sfc(le,[["render",de]]),pe={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 m.read({user:h.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 u(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,d)=>(e.openBlock(),e.createElementBlock("section",pe,[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(me,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(L._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(m._sfc_main,{key:0,onClick:d[0]||(d[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:h.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"},u(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode(U._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:h.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ge=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),S={__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"};m.state.filter=a}}),e.watch(()=>m.state.filter,(t,a)=>{const u={...r.query};Object.keys(a).forEach(d=>{u[d]&&delete u[d]});const o=Object.fromEntries(Object.entries(t).filter(([d,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([d,s])=>[d,Array.isArray(s)?s.join(","):s]));Object.assign(u,o),n.replace({query:u})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(V._sfc_main,{category:e.unref(r).params.category,user:h.state.user._id,period:e.unref(r).query.period,following:e.unref(r).params.category==="following"?h.state.user._id:null},null,8,["category","user","period","following"])]))}},fe=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),he={class:"w-100 cols-4 t-left flex-nowrap flex"},_e={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),be={class:"t-semi uppercase"},ye=e.createElementVNode("br",null,null,-1),we={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ke=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),xe={class:"t-semi uppercase"},Be=e.createElementVNode("br",null,null,-1),Ne={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},Ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),Ce={class:"t-semi uppercase"},Ee=e.createElementVNode("br",null,null,-1),$e={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",he,[c.likes?(e.openBlock(),e.createElementBlock("div",_e,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(c.likes),1),ye,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(c.comments),1),Be,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",Ne,[Ve,e.createElementVNode("span",Ce,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),Ee,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Pe={class:"pd-thin radius-extra flex-nowrap flex"},Te=["innerHTML"],qe={__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}=H.useI18n();let u=e.ref(0),o=e.ref(n.input),d=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(_){r("update:input",_),b.value=_}function l(){u.value=(u.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),d.value=n.placeholder,b.value||(o.value="")}function g(){!b.value&&n.enableTyping&&(s.value=!0,d.value="",C())}function C(){let _=n.placeholderTexts[a.value][u.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=_.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=_.substring(0,f)+(v.value&&f%2?"|":""),f++),f>_.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=_.substring(0,f)},333),f===0&&y&&(y=!1,l(),_=n.placeholderTexts[a.value][u.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&C()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(_,f)=>(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(A.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(d),onInput:l,onFocus:i,onBlur:g,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,Te)):e.createCommentVNode("",!0)]))}};const Se={class:"pd-thin"},Me={class:"o-hidden t-black bg-main pd-big radius-big"},Ie=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),ze={class:"z-index-1 mn-big w-100 flex-nowrap flex"},De=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),Fe={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Se,[e.createElementVNode("div",Me,[Ie,e.createElementVNode("div",ze,[e.createVNode(qe,{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"])]),De])]))}};const Oe={class:"container container-joinus"},je={class:"content"},Le={class:"h0 mn-big"},Ue=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),He=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Ae={__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(()=>{u(),t()});const u=()=>{n.value.forEach((o,d)=>{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,d)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",je,[e.createElementVNode("span",Le,e.toDisplayString(r.value.toLocaleString()),1),Ue,He])]))}};const Re=c=>(e.pushScopeId("data-v-2591cab6"),c=c(),e.popScopeId(),c),Je={class:"community-feed"},Ge=Re(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),Qe={__name:"HotPosts",setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",Je,[Ge,e.createVNode(V._sfc_main,{skip:0,limit:3,user:h.state.user._id,period:"year",class:"cols-2 gap-thin"},null,8,["user"])]))}},We=$._export_sfc(Qe,[["__scopeId","data-v-2591cab6"]]),Ke=[{path:"community",component:P,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(()=>fe)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>E)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ge)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>E)}];exports.CardBlogpost=m._sfc_main;exports.FooterBlogpost=m._sfc_main$1;exports.blogpostsStore=m.blogposts;exports.Comments=x._sfc_main$2;exports.Feed=V._sfc_main;exports.reactionsStore=R.reactions;exports.Activity=$e;exports.Blog=S;exports.BlogPost=q;exports.Community=P;exports.CreateBlogPost=T;exports.HotPosts=We;exports.JoinUs=Ae;exports.SubscribeNewsletter=Fe;exports.blogpostsRoutes=Ke;
|
package/dist/community.client.js
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
import { resolveComponent as Y, openBlock as i, createElementBlock as m, createElementVNode as o, createVNode as g, normalizeClass as B, unref as u, createCommentVNode as f, withCtx as k, Transition as J, createBlock as I, resolveDynamicComponent as G, ref as _, onMounted as F, computed as L, createTextVNode as T, createStaticVNode as Z, TransitionGroup as A, Fragment as E, renderList as V, mergeProps as ee, watch as te, toDisplayString as N, watchEffect as se, isRef as Q, pushScopeId as ae, popScopeId as oe } from "vue";
|
2
2
|
import { useRoute as z, useRouter as D } from "vue-router";
|
3
3
|
import { S as ne } from "./Select-11ddabf5.mjs";
|
4
|
-
import { s as M, r as W, c as le, u as H, b as q, a as re, _ as ie } from "./CardBlogpost-
|
5
|
-
import { d as gs, e as _s } from "./CardBlogpost-
|
6
|
-
import { s as w } from "./auth-
|
7
|
-
import { _ as ue, a as ce, b as pe, c as me } from "./Image-
|
4
|
+
import { s as M, r as W, c as le, u as H, b as q, a as re, _ as ie } from "./CardBlogpost-c7adb0a7.mjs";
|
5
|
+
import { d as gs, e as _s } from "./CardBlogpost-c7adb0a7.mjs";
|
6
|
+
import { s as w } from "./auth-076a83d0.mjs";
|
7
|
+
import { _ as ue, a as ce, b as pe, c as me } from "./Image-39955d9d.mjs";
|
8
8
|
import { _ as de } from "./Popup-0d8e1392.mjs";
|
9
9
|
import { _ as ge } from "./BlockTags-ee310572.mjs";
|
10
10
|
import { C as _e } from "./Checkbox-5dbe7b23.mjs";
|
11
11
|
import { S as he } from "./SelectMulti-58704d69.mjs";
|
12
12
|
import { _ as fe } from "./Button-9e1a9284.mjs";
|
13
|
-
import { a as ve } from "./organizations-
|
13
|
+
import { a as ve } from "./organizations-966e1cd2.mjs";
|
14
14
|
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
15
15
|
import { _ as be } from "./EmptyState-e404b05d.mjs";
|
16
16
|
import { _ as K } from "./_plugin-vue_export-helper-dad06003.mjs";
|
17
|
-
import { _ as ye } from "./Publics-
|
17
|
+
import { _ as ye } from "./Publics-a8f31413.mjs";
|
18
18
|
import { useI18n as we } from "vue-i18n";
|
19
19
|
import "./globals-96ba60e4.mjs";
|
20
20
|
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
21
|
-
import { _ as X } from "./Feed-
|
21
|
+
import { _ as X } from "./Feed-23758089.mjs";
|
22
22
|
import { F as xe } from "./Field-e5ad88d3.mjs";
|
23
|
-
import { r as fs } from "./Chips-
|
23
|
+
import { r as fs } from "./Chips-f06ec38f.mjs";
|
24
24
|
import "./index-a661083c.mjs";
|
25
25
|
import "./IconEdit-9edfd74d.mjs";
|
26
26
|
import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
27
27
|
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
28
28
|
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
29
|
-
import "./CardOrganization-
|
30
|
-
import "./ButtonToggleMembership-
|
29
|
+
import "./CardOrganization-ae384e54.mjs";
|
30
|
+
import "./ButtonToggleMembership-e337e704.mjs";
|
31
31
|
import "./memberships-12210953.mjs";
|
32
32
|
import "./Loader-cd422786.mjs";
|
33
33
|
import "./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs";
|