@ozdao/prometheus-framework 0.0.87 → 0.0.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-300fcb55.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-afba007a.mjs +1944 -0
  3. package/dist/ButtonFollow-001c4a65.mjs +130 -0
  4. package/dist/ButtonFollow-48043cc7.js +1 -0
  5. package/dist/CardHeader-0677d446.js +1 -0
  6. package/dist/CardHeader-e361dada.mjs +96 -0
  7. package/dist/CardOrganization-51309400.js +1 -0
  8. package/dist/CardOrganization-bacc2ef6.mjs +202 -0
  9. package/dist/Feed-4b28adc5.mjs +423 -0
  10. package/dist/Feed-51e4e232.js +1 -0
  11. package/dist/Feed-5d8d5c21.js +1 -0
  12. package/dist/Feed-76b2997e.mjs +367 -0
  13. package/dist/Feed-dc8b66bf.mjs +367 -0
  14. package/dist/Feed-eeb63363.js +1 -0
  15. package/dist/IconEdit-3028a3b7.js +1 -0
  16. package/dist/IconEdit-8df23653.mjs +205 -0
  17. package/dist/Image-30f04604.js +9 -0
  18. package/dist/Image-6c7584f5.mjs +477 -0
  19. package/dist/Image-6ec294f3.mjs +477 -0
  20. package/dist/Image-9a870c88.js +9 -0
  21. package/dist/PlaceholderUserpic-10fd9026.js +1 -0
  22. package/dist/PlaceholderUserpic-eb9820ce.mjs +28 -0
  23. package/dist/Popup-7c331e1c.js +1 -0
  24. package/dist/Popup-bdf043ba.mjs +76 -0
  25. package/dist/Product-1724d88d.mjs +837 -0
  26. package/dist/Product-a94d8b65.js +7 -0
  27. package/dist/Product-b233e2a3.js +7 -0
  28. package/dist/Product-eb00f35e.mjs +837 -0
  29. package/dist/ProductEdit-57484f1e.mjs +349 -0
  30. package/dist/ProductEdit-61413d02.mjs +349 -0
  31. package/dist/ProductEdit-ef301baa.js +1 -0
  32. package/dist/ProductEdit-fca68ff9.js +1 -0
  33. package/dist/ProfileBlogposts-6704a38c.js +1 -0
  34. package/dist/ProfileBlogposts-775b1cfa.mjs +63 -0
  35. package/dist/ProfileComments-175e42da.js +1 -0
  36. package/dist/ProfileComments-fd7d66bf.mjs +43 -0
  37. package/dist/ProfileEvents-1cfe6858.mjs +55 -0
  38. package/dist/ProfileEvents-4f2a5f00.js +1 -0
  39. package/dist/ProfileEvents-7a51a9e6.mjs +55 -0
  40. package/dist/ProfileEvents-d8e16509.js +1 -0
  41. package/dist/ProfileLikes-20a8a3c9.mjs +43 -0
  42. package/dist/ProfileLikes-b3b1350a.js +1 -0
  43. package/dist/ProfileOrganizations-4b866823.mjs +211 -0
  44. package/dist/ProfileOrganizations-6d3a43e4.js +1 -0
  45. package/dist/Publics-0e44c61e.mjs +122 -0
  46. package/dist/Publics-4e1c14fc.js +1 -0
  47. package/dist/Tab-a243605d.mjs +46 -0
  48. package/dist/UploadImage-6e312c46.mjs +83 -0
  49. package/dist/UploadImage-9e7e7468.js +1 -0
  50. package/dist/auth-2bc18d1e.js +8 -0
  51. package/dist/auth-fefd15a3.mjs +1503 -0
  52. package/dist/auth.client.cjs +1 -1
  53. package/dist/auth.client.js +5 -5
  54. package/dist/auth.validation-4a617c0b.mjs +20 -0
  55. package/dist/auth.validation-78a90fed.js +1 -0
  56. package/dist/community.client.cjs +1 -1
  57. package/dist/community.client.js +206 -222
  58. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  59. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  60. package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
  61. package/dist/events.client.cjs +1 -1
  62. package/dist/events.client.js +332 -312
  63. package/dist/events.server.js +77 -0
  64. package/dist/events.server.mjs +77 -0
  65. package/dist/inputs.validation-14e8e01f.mjs +93 -0
  66. package/dist/main.css +1 -1
  67. package/dist/organizations-1581c013.mjs +121 -0
  68. package/dist/organizations-c455dad7.js +1 -0
  69. package/dist/organizations.client-040ec107.js +3 -0
  70. package/dist/organizations.client-686845be.mjs +3179 -0
  71. package/dist/organizations.client-7937e180.mjs +3037 -0
  72. package/dist/organizations.client-99bfc474.js +3 -0
  73. package/dist/organizations.client.cjs +1 -1
  74. package/dist/organizations.client.js +39 -39
  75. package/dist/organizations.server.js +7 -3
  76. package/dist/organizations.server.mjs +7 -3
  77. package/dist/prometheus-framework.cjs.js +1 -1
  78. package/dist/prometheus-framework.es.js +3 -2
  79. package/dist/style.css +1 -1
  80. package/dist/users.client.cjs +1 -1
  81. package/dist/users.client.js +265 -256
  82. package/dist/users.server.js +2 -2
  83. package/dist/users.server.mjs +2 -2
  84. package/package.json +1 -1
  85. package/src/components/Field/Field.vue +2 -1
  86. package/src/modules/community/components/pages/CreateBlogPost.vue +2 -1
  87. package/src/modules/events/components/blocks/CardEvent.vue +1 -1
  88. package/src/modules/events/components/pages/EditEvent.vue +9 -3
  89. package/src/modules/events/components/pages/Event.vue +43 -4
  90. package/src/modules/events/middlewares/server/index.js +10 -0
  91. package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
  92. package/src/modules/events/routes/events.routes.js +14 -1
  93. package/src/modules/organizations/components/blocks/Socials.vue +16 -3
  94. package/src/modules/organizations/components/pages/OrganizationEdit.vue +39 -15
  95. package/src/modules/organizations/components/sections/DetailsTab.vue +13 -9
  96. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  97. package/src/modules/organizations/models/organization.model.js +6 -2
  98. package/src/modules/organizations/store/organizations.js +2 -2
  99. package/src/modules/users/components/pages/Profile.vue +26 -11
  100. package/src/modules/users/components/pages/ProfileEdit.vue +28 -10
  101. package/src/modules/users/models/user.model.js +2 -2
  102. package/src/modules/users/store/users.js +1 -2
@@ -1,13 +1,13 @@
1
1
  import { ref as _, onMounted as Et, openBlock as v, createBlock as ce, unref as c, withCtx as C, createElementBlock as b, Fragment as fe, renderList as $t, createElementVNode as u, normalizeStyle as H, toDisplayString as y, resolveComponent as be, createVNode as g, Transition as F, resolveDynamicComponent as Tt, reactive as ut, withDirectives as S, vModelText as Z, watch as At, withAsyncContext as Ft, defineComponent as Dt, resolveDirective as Rt, normalizeClass as G, withKeys as ie, createCommentVNode as M, vShow as K, vModelDynamic as Mt, renderSlot as xt, createTextVNode as x } from "vue";
2
- import { v as D, a as ct, b as _e, c as Ce } from "./inputs.validation-6960f71b.mjs";
3
- import { d as ft, s as p, e as oe, a as zt, F as R, b as Y, c as W, _ as kt } from "./auth-35ef1791.mjs";
4
- import { f as D1, t as R1 } from "./auth-35ef1791.mjs";
2
+ import { v as D, b as ct, c as _e, d as Ce } from "./inputs.validation-14e8e01f.mjs";
3
+ import { d as ft, s as p, e as oe, a as zt, F as R, b as Y, c as W, _ as kt } from "./auth-fefd15a3.mjs";
4
+ import { f as D1, t as R1 } from "./auth-fefd15a3.mjs";
5
5
  import { C as Lt, S as jt } from "./carousel.es-44c501bc.mjs";
6
6
  import { useI18n as B } from "vue-i18n";
7
7
  import { useRoute as z, useRouter as k } from "vue-router";
8
8
  import { s as A } from "./globals-96ba60e4.mjs";
9
- import { _ as we } from "./Tab-58cd105f.mjs";
10
- import { r as V, a as ae, c as Te } from "./auth.validation-29113f37.mjs";
9
+ import { _ as we } from "./Tab-a243605d.mjs";
10
+ import { r as V, a as ae, c as Te } from "./auth.validation-4a617c0b.mjs";
11
11
  const Bt = { class: "parent-div" }, Ut = { class: "mn-small" }, Gt = { class: "mn-big mn-r-small mn-l-small" }, N1 = {
12
12
  __name: "SliderFeatures",
13
13
  setup(e) {
@@ -0,0 +1,20 @@
1
+ import { useRouter as i } from "vue-router";
2
+ import { s } from "./auth-fefd15a3.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-2bc18d1e.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;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-3f277c17.js"),u=require("./Feed-55c5907a.js"),g=require("./auth-5aa8e90c.js"),x=require("./Comments-63f154a6.js"),M=require("./Popup-105ef2c3.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js"),I=require("./organizations-af43bda4.js"),z=require("./EmptyState-7658d7d6.js"),D=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-ee5c34ab.js");require("./ButtonFollow-2ce169ca.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");const F={class:"min-h-100vh pd-thin"},O={class:"mn-thin flex-v-center t-left flex-nowrap flex"},j={class:"flex-v-center flex-nowrap flex t-left"},L=e.createElementVNode("span",{class:""},"Topics for ",-1),U={class:"bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},A={class:""},P={__name:"Community",setup(i){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("header",O,[e.createElementVNode("h2",j,[L,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",U,[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",A,[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})])])}}},H={class:"pd-thin"},R={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},J={class:"w-full h-full"},G={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},Q={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},W={class:"w-m-66r t-left pd-big bg-white radius-big"},K=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),X=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Y={key:0,class:"mn-thin"},Z={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},T={__name:"CreateBlogPost",setup(i){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 c=await u.read({user:g.state.user._id,url:r.params.url});t.value=c.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 I.actions.read({user:g.state.user._id,postable:g.state.user._id});console.log(l),a.value=l.map(c=>({name:c.profile.name,_id:c._id,photo:c.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(c=>c.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,c)=>(e.openBlock(),e.createElementBlock("article",H,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",R,[e.createElementVNode("div",J,[e.createVNode(x._sfc_main$2,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main,{content:e.unref(t).content,onUpdate:c[0]||(c[0]=f=>e.unref(t).content=f)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",G,[e.createElementVNode("div",Q,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:c[1]||(c[1]=f=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:c[2]||(c[2]=f=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:c[3]||(c[3]=f=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(M._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",W,[K,e.createVNode(V._sfc_main,{onTagsChanged:c[4]||(c[4]=f=>e.unref(t).tags=f),tags:e.unref(t).tags},null,8,["tags"]),X,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":c[5]||(c[5]=f=>o.value=f),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",Y,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":c[6]||(c[6]=f=>e.unref(t).creator.hidden=f),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:T},Symbol.toStringTag,{value:"Module"})),ee={},te={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},oe=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),ne=[oe];function ae(i,r){return e.openBlock(),e.createElementBlock("svg",te,ne)}const re=g._export_sfc(ee,[["render",ae]]),se={class:"w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small"},le=["src"],ie={__name:"Image",props:["label","value","prop"],setup(i){return e.ref(null),(r,n)=>(e.openBlock(),e.createElementBlock("div",se,[i.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,le)):e.createCommentVNode("",!0)]))}},ce={class:"pd-thin"},S={__name:"BlogPost",setup(i){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:ie};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",ce,[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(re,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(z._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$1,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ue=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),q={__name:"Blog",setup(i){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:"year"};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.push({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"])]))}},de=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),me={class:"w-100 cols-4 t-left flex-nowrap flex"},pe={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ge=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),fe={class:"t-semi uppercase"},_e=e.createElementVNode("br",null,null,-1),he={key:1,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:2,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={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(i){return(r,n)=>(e.openBlock(),e.createElementBlock("section",me,[i.likes?(e.openBlock(),e.createElementBlock("div",pe,[ge,e.createElementVNode("span",fe,[e.createTextVNode(e.toDisplayString(i.likes),1),_e,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),i.comments?(e.openBlock(),e.createElementBlock("div",he,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(i.comments),1),ye,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),i.subscriptions?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(i.subscriptions),1),Be,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Ve={class:"pd-thin radius-extra flex-nowrap flex"},Ee=["innerHTML"],Ce={__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(i,{emit:r}){const n=i,{t,locale:a}=D.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 c(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function f(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],_=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,_)+(v.value&&_%2?"|":""),_--):(o.value=h.substring(0,_)+(v.value&&_%2?"|":""),_++),_>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,_)},333),_===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,_)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[_[0]||(_[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:c,onBlur:f,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),i.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:i.action},null,8,Ee)):e.createCommentVNode("",!0)]))}};const $e={class:"pd-thin"},Pe={class:"o-hidden t-black bg-main pd-big radius-big"},Te=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),Se={class:"z-index-1 mn-big w-100 flex-nowrap flex"},qe=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),Me={__name:"SubscribeNewsletter",setup(i){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",$e,[e.createElementVNode("div",Pe,[Te,e.createElementVNode("div",Se,[e.createVNode(Ce,{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"])]),qe])]))}};const Ie={class:"container container-joinus"},ze={class:"content"},De={class:"h0 mn-big"},Fe=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),Oe=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),je={__name:"JoinUs",setup(i){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",Ie,[e.createElementVNode("div",ze,[e.createElementVNode("span",De,e.toDisplayString(r.value.toLocaleString()),1),Fe,Oe])]))}};const Le=i=>(e.pushScopeId("data-v-18db0d1b"),i=i(),e.popScopeId(),i),Ue={class:"community-feed"},Ae=Le(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),He={class:"grid-container"},Re={__name:"HotPosts",async setup(i){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",Ue,[Ae,e.createElementVNode("div",He,[(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))])]))}},Je=g._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:P,meta:{title:{en:"Community",ru:"Коммьюнити"}},children:[{path:":category?",name:"Blog",component:()=>Promise.resolve().then(()=>de)}]},{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(()=>ue)},{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$1;exports.Activity=Ne;exports.Blog=q;exports.BlogPost=S;exports.Community=P;exports.CreateBlogPost=T;exports.HotPosts=Je;exports.JoinUs=je;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-4e1c14fc.js"),u=require("./Feed-5d8d5c21.js"),g=require("./auth-2bc18d1e.js"),x=require("./Image-30f04604.js"),M=require("./Popup-7c331e1c.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-300fcb55.js"),I=require("./organizations-c455dad7.js"),z=require("./EmptyState-7658d7d6.js"),D=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-51309400.js");require("./ButtonFollow-48043cc7.js");require("./CardHeader-0677d446.js");require("./PlaceholderUserpic-10fd9026.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");const F={class:"min-h-100vh pd-thin"},O={class:"mn-thin flex-v-center t-left flex-nowrap flex"},L={class:"flex-v-center flex-nowrap flex t-left"},j=e.createElementVNode("span",{class:""},"Topics for ",-1),U={class:"bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},A={class:""},P={__name:"Community",setup(c){const s=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("header",O,[e.createElementVNode("h2",L,[j,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",U,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(s).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(s).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(s).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(s).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",A,[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})])])}}},H={class:"pd-thin"},R={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},J={class:"w-full h-full"},G={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},Q={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},W={class:"w-m-66r t-left pd-big bg-white radius-big"},K=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),X=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Y={key:0,class:"mn-thin"},Z={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},T={__name:"CreateBlogPost",setup(c){const s=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(s.params.url){const i=await u.read({user:g.state.user._id,url:s.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 I.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(""),r=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>r.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>r.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",s.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),s.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",H,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",R,[e.createElementVNode("div",J,[e.createVNode(x._sfc_main$3,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=f=>e.unref(t).content=f)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",G,[e.createElementVNode("div",Q,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=f=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=f=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=f=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(M._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",W,[K,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=f=>e.unref(t).tags=f),tags:e.unref(t).tags},null,8,["tags"]),X,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=f=>o.value=f),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",Y,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=f=>e.unref(t).creator.hidden=f),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:T},Symbol.toStringTag,{value:"Module"})),ee={},te={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},oe=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),ne=[oe];function ae(c,s){return e.openBlock(),e.createElementBlock("svg",te,ne)}const se=g._export_sfc(ee,[["render",ae]]),re={class:"pd-thin"},S={__name:"BlogPost",setup(c){const s=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:s.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$2};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",re,[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,r=>e.createVNode(se,{key:r})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(z._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]=r=>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,(r,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[r.type]),e.mergeProps({key:p,index:p,component:r,prop:r,class:r.class,content:"content"},d(r),{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$1,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},le=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),q={__name:"Blog",setup(c){const s=w.useRoute(),n=w.useRouter();return s.params.category||(s.params.category="featured"),e.onMounted(()=>{if(s.query){const t=s.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"year"};u.state.filter=a}}),e.watch(()=>u.state.filter,(t,a)=>{const d={...s.query};Object.keys(a).forEach(m=>{d[m]&&delete d[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([m,r])=>[m,Array.isArray(r)?r.join(","):r]));Object.assign(d,o),n.push({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(s).params.category,user:g.state.user._id,period:e.unref(s).query.period},null,8,["category","user","period"])]))}},ie=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),ce={class:"w-100 cols-4 t-left flex-nowrap flex"},ue={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},de=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),me={class:"t-semi uppercase"},pe=e.createElementVNode("br",null,null,-1),ge={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),_e={class:"t-semi uppercase"},he=e.createElementVNode("br",null,null,-1),ve={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},be=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),ye={class:"t-semi uppercase"},we=e.createElementVNode("br",null,null,-1),ke={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(s,n)=>(e.openBlock(),e.createElementBlock("section",ce,[c.likes?(e.openBlock(),e.createElementBlock("div",ue,[de,e.createElementVNode("span",me,[e.createTextVNode(e.toDisplayString(c.likes),1),pe,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",ge,[fe,e.createElementVNode("span",_e,[e.createTextVNode(e.toDisplayString(c.comments),1),he,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",ve,[be,e.createElementVNode("span",ye,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),we,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},xe={class:"pd-thin radius-extra flex-nowrap flex"},Be=["innerHTML"],Ne={__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:s}){const n=c,{t,locale:a}=D.useI18n();let d=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),r=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){s("action")}function N(h){s("update:input",h),b.value=h}function l(){d.value=(d.value+1)%n.placeholderTexts[a.value].length}function i(){r.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function f(){!b.value&&n.enableTyping&&(r.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],_=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{r.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,_)+(v.value&&_%2?"|":""),_--):(o.value=h.substring(0,_)+(v.value&&_%2?"|":""),_++),_>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,_)},333),_===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][d.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{r.value||(clearInterval(p.value),clearInterval(k))}),(h,_)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[_[0]||(_[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:f,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,Be)):e.createCommentVNode("",!0)]))}};const Ve={class:"pd-thin"},Ee={class:"o-hidden t-black bg-main pd-big radius-big"},Ce=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),$e={class:"z-index-1 mn-big w-100 flex-nowrap flex"},Pe=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),Te={__name:"SubscribeNewsletter",setup(c){let s=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Ve,[e.createElementVNode("div",Ee,[Ce,e.createElementVNode("div",$e,[e.createVNode(Ne,{input:e.unref(s),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(s)?s.value=a:s=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"])]),Pe])]))}};const Se={class:"container container-joinus"},qe={class:"content"},Me={class:"h0 mn-big"},Ie=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),ze=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),De={__name:"JoinUs",setup(c){const s=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(()=>{s.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 r=document.createElement("img");r.src=o,r.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;r.style.left=`${p+b}%`,r.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(r),r.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;r.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",qe,[e.createElementVNode("span",Me,e.toDisplayString(s.value.toLocaleString()),1),Ie,ze])]))}};const Fe=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Oe={class:"community-feed"},Le=Fe(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),je={class:"grid-container"},Ue={__name:"HotPosts",async setup(c){let s,n;const t=e.ref([]),a=async()=>{const o=await u.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[s,n]=e.withAsyncContext(()=>a()),await s,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",Oe,[Le,e.createElementVNode("div",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(r,p)=>(e.openBlock(),e.createBlock(u._sfc_main$1,{blogpost:r,owner:g.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Ae=g._export_sfc(Ue,[["__scopeId","data-v-18db0d1b"]]),He=[{path:"community",component:P,meta:{title:{en:"Community",ru:"Коммьюнити"}},children:[{path:":category?",name:"Blog",component:()=>Promise.resolve().then(()=>ie)}]},{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(()=>le)},{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$1;exports.Activity=ke;exports.Blog=q;exports.BlogPost=S;exports.Community=P;exports.CreateBlogPost=T;exports.HotPosts=Ae;exports.JoinUs=De;exports.SubscribeNewsletter=Te;exports.blogpostsRoutes=He;