@ozdao/prometheus-framework 0.2.188 → 0.2.190

Sign up to get free protection for your applications and to get access to all the features.
Files changed (367) hide show
  1. package/dist/builder.js +6 -3
  2. package/dist/builder.mjs +6 -3
  3. package/dist/node_modules/@unhead/vue/dist/shared/vue.cf295fb1.cjs +1 -0
  4. package/dist/node_modules/@unhead/vue/dist/shared/vue.cf295fb1.js +26 -0
  5. package/dist/node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs +1 -0
  6. package/dist/node_modules/@unhead/vue/dist/shared/vue.f36acd1f.js +26 -0
  7. package/dist/node_modules/unhead/dist/index.cjs +1 -0
  8. package/dist/node_modules/unhead/dist/index.js +7 -0
  9. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +6 -6
  11. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.cjs +1 -0
  12. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.js +96 -0
  13. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.cjs +1 -0
  14. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.js +74 -0
  15. package/dist/prometheus-framework/src/components/Status/Status.vue.cjs +1 -0
  16. package/dist/prometheus-framework/src/components/Status/Status.vue.js +29 -0
  17. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +73 -42
  29. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  39. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +2 -2
  43. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
  51. package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
  53. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  57. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
  59. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/globals/globals.client.js +37 -10
  61. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +72 -0
  63. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +57 -0
  65. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -0
  66. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +35 -0
  67. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.js +75 -0
  69. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -0
  70. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +194 -0
  71. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.cjs +1 -0
  72. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.js +38 -0
  73. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.cjs +1 -0
  74. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.js +31 -0
  75. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  76. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +92 -0
  77. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -0
  78. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +197 -0
  79. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.cjs +1 -0
  80. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.js +16 -0
  81. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.cjs +1 -0
  82. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.js +10 -0
  83. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.cjs +1 -0
  84. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.js +10 -0
  85. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.cjs +1 -0
  86. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.js +157 -0
  87. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -0
  88. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.js +95 -0
  89. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -0
  90. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +54 -0
  91. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -0
  92. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.js +126 -0
  93. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.cjs +1 -0
  94. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.js +7 -0
  95. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.cjs +1 -0
  96. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.js +47 -0
  97. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.cjs +1 -0
  98. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.js +18 -0
  99. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +1 -0
  100. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +83 -0
  101. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -11
  103. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +3 -3
  105. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +4 -4
  107. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  115. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  119. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  123. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +1 -1
  125. package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/orders/store/applications.js +1 -1
  127. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +1 -1
  129. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
  131. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  137. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  141. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  143. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  147. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  149. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
  161. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
  162. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
  163. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  164. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  165. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
  166. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +2 -2
  167. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  168. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  169. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  171. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.cjs +1 -1
  172. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.js +1 -1
  173. package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/pages/views/store/pages.js +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +3 -3
  177. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  181. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  185. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  187. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  189. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  190. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  191. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  192. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
  193. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  194. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
  195. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  196. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
  197. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  199. package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
  200. package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
  201. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  202. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  203. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  204. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  205. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  206. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  207. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  208. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +3 -3
  209. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  211. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  213. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
  215. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  218. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  219. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  221. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  222. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
  223. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.cjs +1 -1
  224. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.js +1 -1
  225. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  226. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +1 -1
  227. package/dist/style.css +1 -1
  228. package/package.json +1 -1
  229. package/src/builder/modes/ssr.dev.js +4 -1
  230. package/src/builder/templates/page.js +1 -1
  231. package/src/builder/webpack/webpack.config.base.js +2 -1
  232. package/src/builder/webpack/webpack.config.spa.js +0 -1
  233. package/src/components/Feed/Feed.vue +5 -5
  234. package/src/components/LocationSelection/LocationSelection.vue +5 -6
  235. package/src/components/Sidebar/Sidebar.vue +1 -1
  236. package/src/modules/auth/controllers/services/twofa.service.js +1 -1
  237. package/src/modules/auth/views/components/pages/EnterCode.vue +1 -1
  238. package/src/modules/auth/views/store/auth.js +1 -1
  239. package/src/modules/auth/views/store/twofa.js +1 -1
  240. package/src/modules/auth/views/validations/inputs.validation.js +1 -1
  241. package/src/modules/backoffice/router/backoffice.js +1 -1
  242. package/src/modules/chats/controllers/chats.controller.js +1 -1
  243. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  244. package/src/modules/community/components/pages/BlogPost.vue +63 -2
  245. package/src/modules/community/components/sections/Comment.vue +1 -1
  246. package/src/modules/community/models/blogpost.model.js +4 -4
  247. package/src/modules/community/store/blogposts.js +1 -1
  248. package/src/modules/community/store/reactions.js +1 -1
  249. package/src/modules/events/components/blocks/CardEvent.vue +2 -2
  250. package/src/modules/events/controllers/events.controller.js +1 -1
  251. package/src/modules/events/controllers/tickets.controller.js +1 -1
  252. package/src/modules/events/models/event.model.js +4 -4
  253. package/src/modules/events/store/events.js +1 -1
  254. package/src/modules/events/store/tickets.js +1 -1
  255. package/src/modules/gallery/components/pages/Gallery.vue +2 -2
  256. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -2
  257. package/src/modules/gallery/models/photo.model.js +3 -3
  258. package/src/modules/gallery/store/gallery.js +1 -1
  259. package/src/modules/globals/{services → controllers/classes}/globals.crud.js +2 -2
  260. package/src/modules/globals/globals.client.js +83 -8
  261. package/src/modules/globals/globals.server.js +3 -3
  262. package/src/modules/globals/models/{metadata.schema.js → schemas/metadata.schema.js} +1 -1
  263. package/src/modules/globals/{services → views/classes}/globals.store.js +1 -1
  264. package/src/modules/globals/{components → views/components}/blocks/BlockSorting.vue +1 -1
  265. package/src/modules/globals/views/components/layouts/App.vue +104 -0
  266. package/src/modules/globals/{components → views/components}/layouts/Client.vue +31 -53
  267. package/src/modules/globals/{components → views/components}/partials/BottomNavigation.vue +0 -2
  268. package/src/modules/globals/{components → views/components}/partials/Header.vue +15 -11
  269. package/src/modules/globals/{components → views/components}/partials/Navigation.vue +4 -4
  270. package/src/modules/globals/{components → views/components}/sections/Walkthrough.vue +1 -1
  271. package/src/modules/globals/views/middlewares/localization.js +16 -0
  272. package/src/modules/integrations/stripe/controllers/webhooks/stripe.webhook.js +2 -2
  273. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  274. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
  275. package/src/modules/marketplace/router/marketplace.js +1 -1
  276. package/src/modules/orders/components/pages/Order.vue +1 -1
  277. package/src/modules/orders/components/pages/OrderBackoffice.vue +2 -2
  278. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  279. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
  280. package/src/modules/orders/components/pages/Orders.vue +2 -2
  281. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  282. package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
  283. package/src/modules/orders/controllers/applications.controller.js +1 -1
  284. package/src/modules/orders/controllers/orders.controller.js +1 -1
  285. package/src/modules/orders/models/customer.model.js +3 -3
  286. package/src/modules/orders/models/order.model.js +1 -1
  287. package/src/modules/orders/orders.server.js +1 -1
  288. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  289. package/src/modules/orders/router/orders.router.js +1 -1
  290. package/src/modules/orders/store/applications.js +1 -1
  291. package/src/modules/orders/store/customers.store.js +1 -1
  292. package/src/modules/orders/store/orders.js +1 -1
  293. package/src/modules/orders/store/shopcart.js +1 -1
  294. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  295. package/src/modules/organizations/components/pages/Members.vue +2 -2
  296. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  297. package/src/modules/organizations/controllers/invites.controller.js +1 -1
  298. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  299. package/src/modules/organizations/models/invite.model.js +2 -2
  300. package/src/modules/organizations/models/organization.model.js +1 -1
  301. package/src/modules/organizations/router/backoffice.router.js +1 -1
  302. package/src/modules/organizations/router/organizations.js +1 -1
  303. package/src/modules/organizations/store/departments.js +1 -1
  304. package/src/modules/organizations/store/invites.js +1 -1
  305. package/src/modules/organizations/store/memberships.js +1 -1
  306. package/src/modules/organizations/store/organizations.js +1 -1
  307. package/src/modules/pages/pages.server.js +1 -1
  308. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  309. package/src/modules/pages/views/components/pages/PageEdit.vue +1 -1
  310. package/src/modules/pages/views/components/pages/Pages.vue +2 -2
  311. package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
  312. package/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  313. package/src/modules/pages/views/router/pages.router.js +1 -1
  314. package/src/modules/pages/views/store/pages.js +1 -1
  315. package/src/modules/pages/views/store/pages.store.js +1 -1
  316. package/src/modules/products/components/blocks/CardLeftover.vue +1 -1
  317. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  318. package/src/modules/products/components/pages/ProductEdit.vue +1 -1
  319. package/src/modules/products/components/pages/Products.vue +1 -1
  320. package/src/modules/products/models/leftover.model.js +1 -1
  321. package/src/modules/products/store/categories.js +1 -1
  322. package/src/modules/products/store/leftovers.js +1 -1
  323. package/src/modules/products/store/products.js +1 -1
  324. package/src/modules/projects/store/projects.js +1 -1
  325. package/src/modules/reports/store/reports.js +1 -1
  326. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  327. package/src/modules/spots/components/pages/Map.vue +1 -1
  328. package/src/modules/spots/router/spots.js +1 -1
  329. package/src/modules/spots/spots.server.js +1 -1
  330. package/src/modules/spots/store/spots.js +1 -1
  331. package/src/modules/users/models/user.model.js +3 -3
  332. package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
  333. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  334. package/src/modules/wallet/views/store/payments.store.js +1 -1
  335. package/src/modules/wallet/views/store/wallet.store.js +1 -1
  336. package/src/modules/globals/router/routerGuards.js +0 -29
  337. /package/src/modules/globals/{services → controllers/classes}/globals.cache.js +0 -0
  338. /package/src/modules/globals/{services → controllers/classes}/globals.logger.js +0 -0
  339. /package/src/modules/globals/{services → controllers/classes}/globals.observer.js +0 -0
  340. /package/src/modules/globals/{services → controllers/classes}/globals.webhook.js +0 -0
  341. /package/src/modules/globals/{utils → controllers/utils}/mailing.js +0 -0
  342. /package/src/modules/globals/{utils → controllers/utils}/parseCookie.js +0 -0
  343. /package/src/modules/globals/{utils → controllers/utils}/seo-friendly-url.js +0 -0
  344. /package/src/modules/globals/{utils → controllers/utils}/sitemap.js +0 -0
  345. /package/src/modules/globals/models/{common.schema.js → schemas/common.schema.js} +0 -0
  346. /package/src/modules/globals/models/{credentials.schema.js → schemas/credentials.schema.js} +0 -0
  347. /package/src/modules/globals/models/{engagement.schema.js → schemas/engagement.schema.js} +0 -0
  348. /package/src/modules/globals/models/{ownership.schema.js → schemas/ownership.schema.js} +0 -0
  349. /package/src/modules/globals/models/{profile.schema.js → schemas/profile.schema.js} +0 -0
  350. /package/src/modules/globals/models/{socials.schema.js → schemas/socials.schema.js} +0 -0
  351. /package/src/modules/globals/{components → views/components}/blocks/BlockFilter.vue +0 -0
  352. /package/src/modules/globals/{components → views/components}/blocks/BlockSearch.vue +0 -0
  353. /package/src/modules/globals/{components → views/components}/blocks/CardFooter.vue +0 -0
  354. /package/src/modules/globals/{components → views/components}/blocks/CardHeader.vue +0 -0
  355. /package/src/modules/globals/{components → views/components}/elements/ButtonDate.vue +0 -0
  356. /package/src/modules/globals/{components → views/components}/elements/ButtonSort.vue +0 -0
  357. /package/src/modules/globals/{components → views/components}/layouts/Empty.vue +0 -0
  358. /package/src/modules/globals/{components → views/components}/pages/401.vue +0 -0
  359. /package/src/modules/globals/{components → views/components}/pages/404.vue +0 -0
  360. /package/src/modules/globals/{components → views/components}/partials/Footer.vue +0 -0
  361. /package/src/modules/globals/{components → views/components}/partials/NavigationBar.vue +0 -0
  362. /package/src/modules/globals/{components → views/components}/sections/SectionPageTitle.vue +0 -0
  363. /package/src/modules/globals/{components → views/components}/sections/Title.vue +0 -0
  364. /package/src/modules/globals/{localization → views/localization}/get-browser-locale.js +0 -0
  365. /package/src/modules/globals/{mixins → views/mixins}/mixins.js +0 -0
  366. /package/src/modules/globals/{router → views/router}/scrollBehavior.js +0 -0
  367. /package/src/modules/globals/{store → views/store}/globals.js +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const s=require("../../../../components/EmptyState/EmptyState.vue.cjs"),c=require("../blocks/CardBlogpost.vue.cjs"),i=require("../../../icons/skeletons/SkeletonBlogpost.vue.cjs"),d=require("../../../organizations/components/sections/Publics.vue.cjs"),m=require("../sections/Comments.vue.cjs"),p=require("../../../constructor/components/sections/Viewer.vue.cjs"),g=require("../../store/blogposts.cjs"),r=require("../../../auth/views/store/auth.cjs"),k=require("vue-router"),b={class:"pd-thin"},v=["href"],h=e.createElementVNode("h3",{class:"mn-b-small"},"Recommended Communities",-1),_={__name:"BlogPost",setup(f){const n=k.useRoute(),t=e.ref(null),o=e.ref(!0);return e.onMounted(async()=>{o.value=!0;const a=await g.read({user:r.state.user._id,url:n.params.url});t.value=a[0],o.value=!1}),(a,l)=>(e.openBlock(),e.createElementBlock("section",b,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-light radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,u=>e.createVNode(i.default,{key:u})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&!t.value?(e.openBlock(),e.createBlock(s.default,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-b-thin bg-light radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!o.value&&t.value?(e.openBlock(),e.createBlock(c.default,{key:0,onClick:l[0]||(l[0]=u=>a.$router.push({name:"Blogpost",params:{url:t.value.url}})),blogpost:t.value,user:r.state.user._id,type:"blogpostPage",hideTitle:!0,class:"mn-b-medium"},{default:e.withCtx(()=>[t.value&&t.value.content?(e.openBlock(),e.createBlock(p.default,{key:0,content:t.value.content},null,8,["content"])):e.createCommentVNode("",!0),t.value.source?(e.openBlock(),e.createElementBlock("a",{key:1,href:t.value.source,target:"_blank",class:"mn-b-semi d-block w-max radius-big pd-thin bg-black t-white"}," Check Source 🔗 ",8,v)):e.createCommentVNode("",!0)]),_:1},8,["blogpost","user"])):e.createCommentVNode("",!0),h,e.createVNode(d.default,{class:"mn-b-small"}),!o.value&&t.value?(e.openBlock(),e.createBlock(m.default,{key:1,type:"blogpost",target:t.value._id,owner:r.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs");;/* empty css */const f=require("../../../../components/EmptyState/EmptyState.vue.cjs"),_=require("../blocks/CardBlogpost.vue.cjs"),b=require("../../../icons/skeletons/SkeletonBlogpost.vue.cjs"),B=require("../../../organizations/components/sections/Publics.vue.cjs"),y=require("../sections/Comments.vue.cjs"),C=require("../../../constructor/components/sections/Viewer.vue.cjs"),w=require("../../store/blogposts.cjs"),c=require("../../../auth/views/store/auth.cjs"),V=require("vue-router"),N={class:"pd-thin"},q=["href"],x=e.createElementVNode("h3",{class:"mn-b-small"},"Recommended Communities",-1),S={__name:"BlogPost",async setup(T){let l,s;const p=V.useRoute(),t=e.ref(null),n=e.ref(!0),v=e.ref(!1);e.onMounted(()=>{v.value=!!navigator.share}),n.value=!0;const g=([l,s]=e.withAsyncContext(()=>w.read({user:c.state.user._id,url:p.params.url})),l=await l,s(),l);t.value=g[0],n.value=!1,e.computed(()=>{var o;return(o=t.value)==null?void 0:o.content.find(a=>a.type==="ImageUpload")}),e.computed(()=>{var o;return(o=t.value)==null?void 0:o.content.find(a=>a.type==="Video")});const u=e.computed(()=>{var o;return(o=t.value)==null?void 0:o.content[2]}),h=e.computed(()=>{var o,a,r,i,d,m;return{title:(o=t.value)==null?void 0:o.name,description:(a=u.value)==null?void 0:a.content.slice(0,120),meta:[{hid:"description",name:"description",content:(r=u.value)==null?void 0:r.content.slice(0,120)},{hid:"og:title",property:"og:title",content:(i=t.value)==null?void 0:i.name},{hid:"og:description",property:"og:description",content:(d=u.value)==null?void 0:d.content.slice(0,120)},{hid:"twitter:title",name:"twitter:title",content:(m=t.value)==null?void 0:m.name},{hid:"twitter:description",name:"twitter:description",content:u.value}]}});return k.u(h.value),(o,a)=>(e.openBlock(),e.createElementBlock("section",N,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-light radius-big"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,r=>e.createVNode(b.default,{key:r})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!n.value&&!t.value?(e.openBlock(),e.createBlock(f.default,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-b-thin bg-light radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!n.value&&t.value?(e.openBlock(),e.createBlock(_.default,{key:0,onClick:a[0]||(a[0]=r=>o.$router.push({name:"Blogpost",params:{url:t.value.url}})),blogpost:t.value,user:c.state.user._id,type:"blogpostPage",hideTitle:!0,class:"mn-b-medium"},{default:e.withCtx(()=>[t.value&&t.value.content?(e.openBlock(),e.createBlock(C.default,{key:0,content:t.value.content},null,8,["content"])):e.createCommentVNode("",!0),t.value.source?(e.openBlock(),e.createElementBlock("a",{key:1,href:t.value.source,target:"_blank",class:"mn-b-semi d-block w-max radius-big pd-thin bg-black t-white"}," Check Source 🔗 ",8,q)):e.createCommentVNode("",!0)]),_:1},8,["blogpost","user"])):e.createCommentVNode("",!0),x,e.createVNode(B.default,{class:"mn-b-small"}),!n.value&&t.value?(e.openBlock(),e.createBlock(y.default,{key:1,type:"blogpost",target:t.value._id,owner:c.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=S;
@@ -1,81 +1,112 @@
1
- import { ref as d, onMounted as f, openBlock as t, createElementBlock as u, createVNode as r, TransitionGroup as p, withCtx as l, Fragment as g, renderList as b, createCommentVNode as a, Transition as v, createBlock as s, createElementVNode as h } from "vue";
1
+ import { ref as p, onMounted as $, withAsyncContext as x, computed as c, openBlock as a, createElementBlock as _, createVNode as i, TransitionGroup as k, withCtx as m, Fragment as N, renderList as T, createCommentVNode as r, Transition as V, createBlock as d, createElementVNode as P } from "vue";
2
+ import { u as S } from "../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.js";
2
3
  /* empty css */
3
- import k from "../../../../components/EmptyState/EmptyState.vue.js";
4
- import y from "../blocks/CardBlogpost.vue.js";
5
- import B from "../../../icons/skeletons/SkeletonBlogpost.vue.js";
6
- import $ from "../../../organizations/components/sections/Publics.vue.js";
7
- import w from "../sections/Comments.vue.js";
8
- import C from "../../../constructor/components/sections/Viewer.vue.js";
9
- import { read as N } from "../../store/blogposts.js";
10
- import { state as i } from "../../../auth/views/store/auth.js";
11
- import { useRoute as x } from "vue-router";
12
- const P = { class: "pd-thin" }, T = ["href"], V = /* @__PURE__ */ h("h3", { class: "mn-b-small" }, "Recommended Communities", -1), H = {
4
+ import E from "../../../../components/EmptyState/EmptyState.vue.js";
5
+ import F from "../blocks/CardBlogpost.vue.js";
6
+ import L from "../../../icons/skeletons/SkeletonBlogpost.vue.js";
7
+ import R from "../../../organizations/components/sections/Publics.vue.js";
8
+ import A from "../sections/Comments.vue.js";
9
+ import G from "../../../constructor/components/sections/Viewer.vue.js";
10
+ import { read as H } from "../../store/blogposts.js";
11
+ import { state as f } from "../../../auth/views/store/auth.js";
12
+ import { useRoute as I } from "vue-router";
13
+ const M = { class: "pd-thin" }, U = ["href"], j = /* @__PURE__ */ P("h3", { class: "mn-b-small" }, "Recommended Communities", -1), oe = {
13
14
  __name: "BlogPost",
14
- setup(E) {
15
- const _ = x(), e = d(null), o = d(!0);
16
- return f(async () => {
17
- o.value = !0;
18
- const n = await N({ user: i.user._id, url: _.params.url });
19
- e.value = n[0], o.value = !1;
20
- }), (n, m) => (t(), u("section", P, [
21
- r(p, {
15
+ async setup(q) {
16
+ let s, v;
17
+ const y = I(), e = p(null), n = p(!0), w = p(!1);
18
+ $(() => {
19
+ w.value = !!navigator.share;
20
+ }), n.value = !0;
21
+ const B = ([s, v] = x(() => H({ user: f.user._id, url: y.params.url })), s = await s, v(), s);
22
+ e.value = B[0], n.value = !1, c(() => {
23
+ var t;
24
+ return (t = e.value) == null ? void 0 : t.content.find((o) => o.type === "ImageUpload");
25
+ }), c(() => {
26
+ var t;
27
+ return (t = e.value) == null ? void 0 : t.content.find((o) => o.type === "Video");
28
+ });
29
+ const u = c(() => {
30
+ var t;
31
+ return (t = e.value) == null ? void 0 : t.content[2];
32
+ }), C = c(() => {
33
+ var t, o, l, g, h, b;
34
+ return {
35
+ title: (t = e.value) == null ? void 0 : t.name,
36
+ description: (o = u.value) == null ? void 0 : o.content.slice(0, 120),
37
+ meta: [
38
+ { hid: "description", name: "description", content: (l = u.value) == null ? void 0 : l.content.slice(0, 120) },
39
+ // { hid: 'keywords', name: 'keywords', content: t('meta.keywords') },
40
+ { hid: "og:title", property: "og:title", content: (g = e.value) == null ? void 0 : g.name },
41
+ { hid: "og:description", property: "og:description", content: (h = u.value) == null ? void 0 : h.content.slice(0, 120) },
42
+ // { hid: 'og:image', property: 'og:image', content: base_url + '/favicon/cover.jpg' },
43
+ // { hid: 'og:url', property: 'og:url', content: current_url.value },
44
+ { hid: "twitter:title", name: "twitter:title", content: (b = e.value) == null ? void 0 : b.name },
45
+ { hid: "twitter:description", name: "twitter:description", content: u.value }
46
+ // { hid: 'twitter:image', name: 'twitter:image', content: base_url + '/favicon/cover.jpg' },
47
+ // { hid: 'twitter:card', name: 'twitter:card', content: t('meta.twitter.card') },
48
+ ]
49
+ };
50
+ });
51
+ return S(C.value), (t, o) => (a(), _("section", M, [
52
+ i(k, {
22
53
  tag: "ul",
23
54
  name: "fade",
24
55
  class: "o-hidden bg-light radius-big"
25
56
  }, {
26
- default: l(() => [
27
- o.value ? (t(), u(g, { key: 0 }, b(3, (c) => r(B, { key: c })), 64)) : a("", !0)
57
+ default: m(() => [
58
+ n.value ? (a(), _(N, { key: 0 }, T(3, (l) => i(L, { key: l })), 64)) : r("", !0)
28
59
  ]),
29
60
  _: 1
30
61
  }),
31
- r(v, { name: "fade" }, {
32
- default: l(() => [
33
- !o.value && !e.value ? (t(), s(k, {
62
+ i(V, { name: "fade" }, {
63
+ default: m(() => [
64
+ !n.value && !e.value ? (a(), d(E, {
34
65
  key: 0,
35
66
  title: "No Blogpost Found",
36
67
  description: "Currently, there are no blogposts available. Please check back later.",
37
68
  class: "pd-medium mn-b-thin bg-light radius-big"
38
- })) : a("", !0)
69
+ })) : r("", !0)
39
70
  ]),
40
71
  _: 1
41
72
  }),
42
- r(p, {
73
+ i(k, {
43
74
  tag: "ul",
44
75
  name: "fade",
45
76
  class: "container"
46
77
  }, {
47
- default: l(() => [
48
- !o.value && e.value ? (t(), s(y, {
78
+ default: m(() => [
79
+ !n.value && e.value ? (a(), d(F, {
49
80
  key: 0,
50
- onClick: m[0] || (m[0] = (c) => n.$router.push({ name: "Blogpost", params: { url: e.value.url } })),
81
+ onClick: o[0] || (o[0] = (l) => t.$router.push({ name: "Blogpost", params: { url: e.value.url } })),
51
82
  blogpost: e.value,
52
- user: i.user._id,
83
+ user: f.user._id,
53
84
  type: "blogpostPage",
54
85
  hideTitle: !0,
55
86
  class: "mn-b-medium"
56
87
  }, {
57
- default: l(() => [
58
- e.value && e.value.content ? (t(), s(C, {
88
+ default: m(() => [
89
+ e.value && e.value.content ? (a(), d(G, {
59
90
  key: 0,
60
91
  content: e.value.content
61
- }, null, 8, ["content"])) : a("", !0),
62
- e.value.source ? (t(), u("a", {
92
+ }, null, 8, ["content"])) : r("", !0),
93
+ e.value.source ? (a(), _("a", {
63
94
  key: 1,
64
95
  href: e.value.source,
65
96
  target: "_blank",
66
97
  class: "mn-b-semi d-block w-max radius-big pd-thin bg-black t-white"
67
- }, " Check Source 🔗 ", 8, T)) : a("", !0)
98
+ }, " Check Source 🔗 ", 8, U)) : r("", !0)
68
99
  ]),
69
100
  _: 1
70
- }, 8, ["blogpost", "user"])) : a("", !0),
71
- V,
72
- r($, { class: "mn-b-small" }),
73
- !o.value && e.value ? (t(), s(w, {
101
+ }, 8, ["blogpost", "user"])) : r("", !0),
102
+ j,
103
+ i(R, { class: "mn-b-small" }),
104
+ !n.value && e.value ? (a(), d(A, {
74
105
  key: 1,
75
106
  type: "blogpost",
76
107
  target: e.value._id,
77
- owner: i.user._id
78
- }, null, 8, ["target", "owner"])) : a("", !0)
108
+ owner: f.user._id
109
+ }, null, 8, ["target", "owner"])) : r("", !0)
79
110
  ]),
80
111
  _: 1
81
112
  })
@@ -83,5 +114,5 @@ const P = { class: "pd-thin" }, T = ["href"], V = /* @__PURE__ */ h("h3", { clas
83
114
  }
84
115
  };
85
116
  export {
86
- H as default
117
+ oe as default
87
118
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-2fc13a78"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-2fc13a78"]]);exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { withAsyncContext as b, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
2
  /* empty css */
3
3
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- /* empty css */
4
+ /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  import "axios";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
@@ -2,7 +2,7 @@ import { ref as n, onMounted as V, computed as w, openBlock as u, createElementB
2
2
  import "isomorphic-dompurify";
3
3
  /* empty css */
4
4
  import D from "../../../constructor/components/sections/Constructor.vue.js";
5
- import N from "../../../../components/Popup/Popup.vue2.js";
5
+ import N from "../../../../components/Popup/Popup.vue.js";
6
6
  /* empty css */
7
7
  /* empty css */
8
8
  import O from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../globals/components/blocks/CardHeader.vue.cjs"),b={class:"pd-t-zero"},w={class:"p-big"},B={class:"mn-t-thin flex-v-center flex-nowrap flex gap-small"},E={key:0,class:"mn-l-medium mn-t-small bg-white w-100 radius-small pd-small reply-form"},V={key:1,class:"br-solid br-l br-grey-transp-25"},i={__name:"Comment",props:{comment:{type:Object,required:!0},target:{type:String,required:!0},owner:{type:String,required:!0}},emits:["reply","load-more"],setup(t,{emit:y}){const a=t,m=y,s=e.ref(!1),r=e.ref(""),c=e.ref(p(a.comment.depth));function p(l){return l%3<2}const d=e.computed(()=>{function l(n){return!n.children||n.children.length===0?0:n.children.length+n.children.reduce((o,h)=>o+l(h),0)}return l(a.comment)}),v=()=>{c.value=!c.value},u=()=>{m("reply",a.comment._id,r.value),r.value="",s.value=!1},g=(l,n)=>{m("reply",l,n)},k=(l,n)=>{m("load-more",l,n)};return(l,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(f.default,{class:"mn-b-thin",entity:t.comment,entityType:"comment",user:t.owner,owner:{target:t.comment.user},creator:{target:t.comment.user},date:t.comment.createdAt},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",b,[e.createElementVNode("p",w,e.toDisplayString(t.comment.content),1)]),e.createElementVNode("div",B,[d.value>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:v,class:"t-second cursor-pointer t-medium font-second"},e.toDisplayString(c.value?"Hide":d.value+(d.value===1?" reply":" replies")),1)):e.createCommentVNode("",!0),t.owner?(e.openBlock(),e.createElementBlock("button",{key:1,class:"font-second cursor-pointer t-transp t-medium",onClick:n[0]||(n[0]=o=>s.value=!0)}," Reply ")):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createElementBlock("div",E,[e.withDirectives(e.createElementVNode("textarea",{class:"w-100","onUpdate:modelValue":n[1]||(n[1]=o=>r.value=o)},null,512),[[e.vModelText,r.value]]),e.createElementVNode("div",{class:"mn-l-auto gap-thin flex-nowrap flex"},[e.createElementVNode("button",{class:"bg-grey-transp-25 button",onClick:u},"Cancel"),e.createElementVNode("button",{class:"bg-main button",onClick:u},"Send")])])):e.createCommentVNode("",!0),c.value&&t.comment.children&&t.comment.children.length?(e.openBlock(),e.createElementBlock("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.comment.children,o=>(e.openBlock(),e.createBlock(i,{key:o._id,comment:o,target:t.target,owner:t.owner,onReply:g,onLoadMore:k,class:"mn-l-medium mn-t-small"},null,8,["comment","target","owner"]))),128))])):e.createCommentVNode("",!0)]))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),b={class:"pd-t-zero"},w={class:"p-big"},B={class:"mn-t-thin flex-v-center flex-nowrap flex gap-small"},E={key:0,class:"mn-l-medium mn-t-small bg-white w-100 radius-small pd-small reply-form"},V={key:1,class:"br-solid br-l br-grey-transp-25"},i={__name:"Comment",props:{comment:{type:Object,required:!0},target:{type:String,required:!0},owner:{type:String,required:!0}},emits:["reply","load-more"],setup(t,{emit:y}){const a=t,m=y,s=e.ref(!1),r=e.ref(""),c=e.ref(p(a.comment.depth));function p(l){return l%3<2}const d=e.computed(()=>{function l(n){return!n.children||n.children.length===0?0:n.children.length+n.children.reduce((o,h)=>o+l(h),0)}return l(a.comment)}),v=()=>{c.value=!c.value},u=()=>{m("reply",a.comment._id,r.value),r.value="",s.value=!1},g=(l,n)=>{m("reply",l,n)},k=(l,n)=>{m("load-more",l,n)};return(l,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(f.default,{class:"mn-b-thin",entity:t.comment,entityType:"comment",user:t.owner,owner:{target:t.comment.user},creator:{target:t.comment.user},date:t.comment.createdAt},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",b,[e.createElementVNode("p",w,e.toDisplayString(t.comment.content),1)]),e.createElementVNode("div",B,[d.value>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:v,class:"t-second cursor-pointer t-medium font-second"},e.toDisplayString(c.value?"Hide":d.value+(d.value===1?" reply":" replies")),1)):e.createCommentVNode("",!0),t.owner?(e.openBlock(),e.createElementBlock("button",{key:1,class:"font-second cursor-pointer t-transp t-medium",onClick:n[0]||(n[0]=o=>s.value=!0)}," Reply ")):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createElementBlock("div",E,[e.withDirectives(e.createElementVNode("textarea",{class:"w-100","onUpdate:modelValue":n[1]||(n[1]=o=>r.value=o)},null,512),[[e.vModelText,r.value]]),e.createElementVNode("div",{class:"mn-l-auto gap-thin flex-nowrap flex"},[e.createElementVNode("button",{class:"bg-grey-transp-25 button",onClick:u},"Cancel"),e.createElementVNode("button",{class:"bg-main button",onClick:u},"Send")])])):e.createCommentVNode("",!0),c.value&&t.comment.children&&t.comment.children.length?(e.openBlock(),e.createElementBlock("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.comment.children,o=>(e.openBlock(),e.createBlock(i,{key:o._id,comment:o,target:t.target,owner:t.owner,onReply:g,onLoadMore:k,class:"mn-l-medium mn-t-small"},null,8,["comment","target","owner"]))),128))])):e.createCommentVNode("",!0)]))}};exports.default=i;
@@ -1,5 +1,5 @@
1
1
  import { ref as v, computed as C, openBlock as r, createElementBlock as a, createVNode as R, createElementVNode as o, toDisplayString as h, createCommentVNode as i, withDirectives as B, vModelText as E, Fragment as S, renderList as V, createBlock as q } from "vue";
2
- import L from "../../../globals/components/blocks/CardHeader.vue.js";
2
+ import L from "../../../globals/views/components/blocks/CardHeader.vue.js";
3
3
  const M = { class: "pd-t-zero" }, N = { class: "p-big" }, D = { class: "mn-t-thin flex-v-center flex-nowrap flex gap-small" }, F = {
4
4
  key: 0,
5
5
  class: "mn-l-medium mn-t-small bg-white w-100 radius-small pd-small reply-form"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/views/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/views/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as n, openBlock as o, createElementBlock as a, createElementVNode as t, createTextVNode as c, createVNode as r, withCtx as s, createBlock as p } from "vue";
2
2
  /* empty css */
3
- /* empty css */
3
+ /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("axios"),u=require("vue"),c=require("../../globals/store/globals.cjs"),l=m.create({baseURL:process.env.API_URL,withCredentials:!0}),a=u.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{param:"createdAt",order:"desc",hideButton:!0,options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},source:null,date:"",views:0,content:[]}});async function n(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.sortParam&&(e.params.sortParam=e.sortParam),e.sortOrder&&(e.params.sortOrder=e.sortOrder),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{const r=await l.get("/api/blog/read",{params:e.params});return e.url?t(r.data,"current"):t(r.data,"all"),Promise.resolve(r.data)}catch(r){return c.setError(r),Promise.reject(r)}}async function i(e){return l.post("/api/blog/create",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function f(e){return l.post("/api/blog/update",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function g(e){return await l.delete(`/api/blog/delete/${e}`).then(r=>{const s=a.all.findIndex(d=>d._id===e);return s!==-1&&a.all.splice(s,1),Promise.resolve(r.data)},r=>(c.setError(r),Promise.reject(r)))}function t(e,r){a[r]=e}function w(){a.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function v(e){const r={order:a.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};a.project.content.push(r)}u.watch(a,(e,r)=>{});exports.blockAdd=v;exports.clean=w;exports.create=i;exports.read=n;exports.remove=g;exports.set=t;exports.state=a;exports.update=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("axios"),u=require("vue"),c=require("../../globals/views/store/globals.cjs"),l=m.create({baseURL:process.env.API_URL,withCredentials:!0}),a=u.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{param:"createdAt",order:"desc",hideButton:!0,options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},source:null,date:"",views:0,content:[]}});async function n(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.sortParam&&(e.params.sortParam=e.sortParam),e.sortOrder&&(e.params.sortOrder=e.sortOrder),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{const r=await l.get("/api/blog/read",{params:e.params});return e.url?t(r.data,"current"):t(r.data,"all"),Promise.resolve(r.data)}catch(r){return c.setError(r),Promise.reject(r)}}async function i(e){return l.post("/api/blog/create",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function f(e){return l.post("/api/blog/update",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function g(e){return await l.delete(`/api/blog/delete/${e}`).then(r=>{const s=a.all.findIndex(d=>d._id===e);return s!==-1&&a.all.splice(s,1),Promise.resolve(r.data)},r=>(c.setError(r),Promise.reject(r)))}function t(e,r){a[r]=e}function w(){a.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function v(e){const r={order:a.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};a.project.content.push(r)}u.watch(a,(e,r)=>{});exports.blockAdd=v;exports.clean=w;exports.create=i;exports.read=n;exports.remove=g;exports.set=t;exports.state=a;exports.update=f;
@@ -1,6 +1,6 @@
1
1
  import m from "axios";
2
2
  import { reactive as d, watch as n } from "vue";
3
- import { setError as c } from "../../globals/store/globals.js";
3
+ import { setError as c } from "../../globals/views/store/globals.js";
4
4
  const l = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = d({
5
5
  all: [],
6
6
  filter: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),c=require("vue"),o=require("../../globals/store/globals.cjs"),i=l.create({baseURL:process.env.API_URL,withCredentials:!0}),s=c.reactive({reactions:[],error:null}),d={async read(r){try{const e={};r.user&&(e.user=r.user),r.type&&(e.type=r.type),r.target&&(e.target=r.target),r.targetString&&(e.targetString=r.targetString);const a=await i.get("/api/reactions/read",{params:e});return s.error=null,s.reactions=a.data,Promise.resolve(a.data)}catch(e){return o.setError(e),Promise.reject(e)}},async create(r){try{const e=await i.post("/api/reactions/create",r);return s.error=null,Promise.resolve(e.data)}catch(e){return console.log(e),o.setError(e),Promise.reject(e)}},async update(r){try{const e=await i.post("/api/reactions/update",r);return s.error=null,Promise.resolve(e.data)}catch(e){return o.setError(e),Promise.reject(e)}},async delete(r){try{const e=await i.post("/api/reactions/delete",r);return s.error=null,Promise.resolve(e.data)}catch(e){return o.setError(e),Promise.reject(e)}}},y={handleReactionUpdate(r,e,a){let t;if(Array.isArray(r)?t=r.find(n=>n._id===e.target):typeof r=="object"&&r._id===e.target&&(t=r),t)if(t.hasReaction=a,a)t.reactions.push(e),t.numberOfReactions+=1;else{const n=t.reactions.findIndex(u=>u._id===e._id);n!==-1&&(t.reactions.splice(n,1),t.numberOfReactions-=1)}}};c.watch(s,r=>{});exports.actions=d;exports.mutations=y;exports.state=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),c=require("vue"),o=require("../../globals/views/store/globals.cjs"),i=l.create({baseURL:process.env.API_URL,withCredentials:!0}),s=c.reactive({reactions:[],error:null}),d={async read(r){try{const e={};r.user&&(e.user=r.user),r.type&&(e.type=r.type),r.target&&(e.target=r.target),r.targetString&&(e.targetString=r.targetString);const a=await i.get("/api/reactions/read",{params:e});return s.error=null,s.reactions=a.data,Promise.resolve(a.data)}catch(e){return o.setError(e),Promise.reject(e)}},async create(r){try{const e=await i.post("/api/reactions/create",r);return s.error=null,Promise.resolve(e.data)}catch(e){return console.log(e),o.setError(e),Promise.reject(e)}},async update(r){try{const e=await i.post("/api/reactions/update",r);return s.error=null,Promise.resolve(e.data)}catch(e){return o.setError(e),Promise.reject(e)}},async delete(r){try{const e=await i.post("/api/reactions/delete",r);return s.error=null,Promise.resolve(e.data)}catch(e){return o.setError(e),Promise.reject(e)}}},y={handleReactionUpdate(r,e,a){let t;if(Array.isArray(r)?t=r.find(n=>n._id===e.target):typeof r=="object"&&r._id===e.target&&(t=r),t)if(t.hasReaction=a,a)t.reactions.push(e),t.numberOfReactions+=1;else{const n=t.reactions.findIndex(u=>u._id===e._id);n!==-1&&(t.reactions.splice(n,1),t.numberOfReactions-=1)}}};c.watch(s,r=>{});exports.actions=d;exports.mutations=y;exports.state=s;
@@ -1,6 +1,6 @@
1
1
  import l from "axios";
2
2
  import { reactive as u, watch as p } from "vue";
3
- import { setError as i } from "../../globals/store/globals.js";
3
+ import { setError as i } from "../../globals/views/store/globals.js";
4
4
  const n = l.create({
5
5
  baseURL: process.env.API_URL,
6
6
  withCredentials: !0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-light mn-b-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},b={class:"t-semi"},B={key:0,class:"t-semi"},D={key:0,class:"t-semi uppercase"},U={key:1,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},N={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-b-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){e.ref(new Date),k.useRouter();const o=t;e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),i=Math.floor(l/60),m=Math.floor(i/24);return m>0?`${m} days until event`:i>0?`${i} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),v=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),c=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${c}`}),f=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:u.value},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-b-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[e.createElementVNode("span",b,e.toDisplayString(v.value),1),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B," | "+e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",D,e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",U,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",N,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue2.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/views/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-light mn-b-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},b={class:"t-semi"},B={key:0,class:"t-semi"},D={key:0,class:"t-semi uppercase"},U={key:1,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},N={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-b-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){e.ref(new Date),k.useRouter();const o=t;e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),i=Math.floor(l/60),m=Math.floor(i/24);return m>0?`${m} days until event`:i>0?`${i} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),v=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),c=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${c}`}),f=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:u.value},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-b-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[e.createElementVNode("span",b,e.toDisplayString(v.value),1),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B," | "+e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",D,e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",U,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",N,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;
@@ -1,7 +1,7 @@
1
1
  import { ref as k, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as x, createElementVNode as c, createCommentVNode as a, createBlock as w, withModifiers as D, toDisplayString as d, renderSlot as E } from "vue";
2
- import p from "../../../../components/Chips/Chips.vue.js";
2
+ import p from "../../../../components/Chips/Chips.vue2.js";
3
3
  import $ from "../../../icons/navigation/IconEdit.vue.js";
4
- import I from "../../../globals/components/blocks/CardHeader.vue.js";
4
+ import I from "../../../globals/views/components/blocks/CardHeader.vue.js";
5
5
  import "../../../community/store/reactions.js";
6
6
  import { useRouter as M } from "vue-router";
7
7
  const F = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue2.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { ref as s, openBlock as w, createElementBlock as E, createVNode as n, withCtx as l, createTextVNode as S, createElementVNode as u, unref as g, pushScopeId as T, popScopeId as C } from "vue";
2
2
  import { QrcodeStream as y } from "../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js";
3
- import N from "../../../../components/Popup/Popup.vue2.js";
3
+ import N from "../../../../components/Popup/Popup.vue.js";
4
4
  import B from "../../../../components/Button/Button.vue2.js";
5
5
  import { actions as I } from "../../store/tickets.js";
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.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 s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){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",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.default,{submit:x,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=be;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.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 s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){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",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.default,{submit:x,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=be;
@@ -5,7 +5,7 @@ import A from "../../../constructor/components/sections/Constructor.vue.js";
5
5
  import B from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
6
6
  /* empty css */
7
7
  import E from "../../../../components/Block/Block.vue.js";
8
- import I from "../../../../components/Popup/Popup.vue2.js";
8
+ import I from "../../../../components/Popup/Popup.vue.js";
9
9
  import n from "../../../../components/Field/Field.vue2.js";
10
10
  import z from "../../../../components/FieldTags/BlockTags.vue.js";
11
11
  import P from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;