@ozdao/prometheus-framework 0.2.130 → 0.2.133

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. package/dist/auth.server.js +0 -1
  2. package/dist/auth.server.mjs +0 -1
  3. package/dist/community.server.js +172 -31
  4. package/dist/community.server.mjs +172 -31
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/files.server.js +38 -4
  8. package/dist/files.server.mjs +38 -4
  9. package/dist/gallery.server.js +1 -1
  10. package/dist/gallery.server.mjs +1 -1
  11. package/dist/main-CI9l9xMs.js +92 -0
  12. package/dist/main-DPg58GOU.mjs +14509 -0
  13. package/dist/main.css +1 -1
  14. package/dist/orders.server.js +1 -1
  15. package/dist/orders.server.mjs +1 -1
  16. package/dist/organizations.server.js +4 -3
  17. package/dist/organizations.server.mjs +4 -3
  18. package/dist/products.server.js +2 -1
  19. package/dist/products.server.mjs +2 -1
  20. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -0
  21. package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -0
  22. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +22 -23
  24. package/dist/prometheus-framework/src/components/Block/Block.vue.js +13 -13
  25. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
  26. package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
  27. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
  29. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
  30. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
  31. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
  33. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
  34. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
  35. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
  37. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
  38. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
  39. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
  41. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
  42. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
  43. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
  45. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
  47. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
  49. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
  50. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
  51. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
  53. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  54. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
  55. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
  57. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
  59. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
  60. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
  61. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
  62. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
  63. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  64. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
  65. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
  67. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +30 -30
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +30 -30
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +18 -18
  72. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
  74. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
  76. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +54 -71
  78. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
  80. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +86 -76
  82. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
  84. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +71 -80
  86. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
  87. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
  88. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +99 -54
  90. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +27 -28
  92. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
  94. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +31 -29
  96. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +32 -27
  98. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
  99. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
  100. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
  102. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +119 -112
  104. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
  105. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +22 -22
  113. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +27 -27
  115. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
  117. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +16 -16
  118. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
  120. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +9 -9
  125. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +112 -85
  133. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +36 -35
  135. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +8 -8
  136. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
  142. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
  144. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
  146. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
  148. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
  154. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
  156. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +4 -4
  159. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +29 -29
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +53 -35
  164. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  165. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
  166. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
  167. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
  168. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
  169. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
  170. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
  171. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
  172. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
  173. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
  174. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +154 -77
  176. package/dist/prometheus-framework.cjs.js +1 -1
  177. package/dist/prometheus-framework.es.js +14 -14
  178. package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
  179. package/dist/queryProcessor-iewDZq_f.js +178 -0
  180. package/dist/style.css +1 -1
  181. package/dist/wallet.server.js +80 -27
  182. package/dist/wallet.server.mjs +80 -27
  183. package/dist/web-DZUec7pP.js +1 -0
  184. package/dist/web-krQQeSb6.mjs +54 -0
  185. package/package.json +1 -1
  186. package/src/components/Address/Address.vue +1 -1
  187. package/src/components/Chips/Chips.vue +1 -1
  188. package/src/components/Completion/Completion.vue +1 -4
  189. package/src/components/DatePicker/Calendar.vue +1 -1
  190. package/src/components/Draggable/Draggable.vue +113 -0
  191. package/src/components/Dropdown/Dropdown.vue +1 -1
  192. package/src/components/Feed/Feed.vue +18 -12
  193. package/src/components/FieldBig/FieldBig.vue +11 -1
  194. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  195. package/src/components/FieldTags/FieldTags.vue +2 -1
  196. package/src/components/FieldTags/tag-input.vue +1 -1
  197. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  198. package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
  199. package/src/components/Shader/Shader.vue +2 -2
  200. package/src/components/Slider/Slider.vue +1 -5
  201. package/src/components/Spoiler/Spoiler.vue +1 -1
  202. package/src/components/Text/Text.vue +1 -4
  203. package/src/components/Tooltip/Tooltip.vue +1 -1
  204. package/src/components/Upload/Upload.vue +5 -3
  205. package/src/modules/auth/controllers/auth.controller.js +0 -2
  206. package/src/modules/auth/store/auth.js +2 -2
  207. package/src/modules/community/DOCUMENTATION.MD +4 -0
  208. package/src/modules/community/community.client.js +0 -2
  209. package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
  210. package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
  211. package/src/modules/community/components/layouts/Community.vue +15 -11
  212. package/src/modules/community/components/pages/Blog.vue +25 -32
  213. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
  214. package/src/modules/community/components/sections/Comment.vue +123 -0
  215. package/src/modules/community/components/sections/Comments.vue +90 -19
  216. package/src/modules/community/components/sections/HotPosts.vue +3 -6
  217. package/src/modules/community/controllers/blog.controller.js +1 -1
  218. package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
  219. package/src/modules/community/controllers/comments.controller.js +187 -38
  220. package/src/modules/community/controllers/comments.controller.populate.js +180 -0
  221. package/src/modules/community/models/comment.model.js +15 -0
  222. package/src/modules/community/store/blogposts.js +20 -2
  223. package/src/modules/constructor/components/elements/Audio.vue +28 -40
  224. package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
  225. package/src/modules/constructor/components/elements/Video.vue +10 -18
  226. package/src/modules/constructor/components/sections/Constructor.vue +54 -47
  227. package/src/modules/files/controllers/files.controller.js +2 -0
  228. package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
  229. package/src/modules/files/routes/files.routes.js +8 -0
  230. package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
  231. package/src/modules/globals/components/partials/Header.vue +12 -7
  232. package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
  233. package/src/modules/icons/logos/Logotype.vue +8 -6
  234. package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
  235. package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
  236. package/src/modules/marketplace/store/marketplace.js +2 -8
  237. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  238. package/src/modules/organizations/components/pages/Members.vue +1 -1
  239. package/src/modules/organizations/components/pages/Organization.vue +33 -5
  240. package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
  241. package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
  242. package/src/modules/organizations/components/sections/Publics.vue +2 -2
  243. package/src/modules/organizations/controllers/memberships.controller.js +2 -3
  244. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  245. package/src/modules/organizations/store/memberships.js +4 -1
  246. package/src/modules/products/components/blocks/CardProduct.vue +1 -1
  247. package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
  248. package/src/modules/products/models/product.model.js +2 -1
  249. package/src/modules/spots/components/layouts/Spots.vue +0 -3
  250. package/src/modules/spots/components/pages/Map.vue +13 -3
  251. package/src/modules/users/components/blocks/CardUser.vue +2 -2
  252. package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
  253. package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
  254. package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
  255. package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
  256. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
  257. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
  258. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
  259. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
  260. package/src/modules/wallet/localization/Wallet.json +22 -0
  261. package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
  262. package/src/styles/base/all.scss +16 -26
  263. package/src/styles/config.scss +70 -34
  264. package/src/styles/typography.scss +5 -5
  265. package/src/modules/community/components/sections/Feed.vue +0 -148
  266. package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
  267. package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -1,4 +1,4 @@
1
- import { ref as m, watch as y, openBlock as t, createElementBlock as o, Fragment as _, createElementVNode as n, normalizeClass as w, toDisplayString as r, createCommentVNode as p, createVNode as h, Transition as b, withCtx as k } from "vue";
1
+ import { ref as u, watch as y, openBlock as a, createElementBlock as o, Fragment as _, createElementVNode as i, normalizeClass as w, toDisplayString as s, createCommentVNode as m, createVNode as p, Transition as b, withCtx as k } from "vue";
2
2
  import C from "axios";
3
3
  import U from "../../modules/icons/navigation/IconCross.vue.js";
4
4
  /* empty css */
@@ -9,18 +9,21 @@ const F = {
9
9
  }, N = {
10
10
  key: 1,
11
11
  class: "flex-nowrap flex w-100 flex-v-center"
12
- }, R = ["href"], B = {
12
+ }, R = ["href"], S = {
13
13
  key: 2,
14
14
  class: "w-100"
15
- }, D = ["placeholder", "multiple"], I = {
15
+ }, B = ["placeholder", "multiple"], D = {
16
16
  key: 0,
17
17
  class: "mn-t-thin mn-b-thin invalid-feedback"
18
- }, L = {
18
+ }, I = {
19
19
  __name: "Upload",
20
20
  props: {
21
21
  field: String,
22
22
  label: null,
23
- type: "file",
23
+ type: {
24
+ type: String,
25
+ default: "file"
26
+ },
24
27
  placeholder: "Upload a file",
25
28
  validation: !1,
26
29
  uploadPath: {
@@ -33,69 +36,69 @@ const F = {
33
36
  }
34
37
  },
35
38
  emits: ["update:field", "focus", "blur", "file-change"],
36
- setup(e, { emit: v }) {
37
- const i = v, s = e, l = m(s.field);
38
- m(null), y(() => s.field, (a) => {
39
- l.value = a;
39
+ setup(e, { emit: h }) {
40
+ const r = h, n = e, t = u(n.field);
41
+ u(null), y(() => n.field, (l) => {
42
+ t.value = l;
40
43
  });
41
- async function g(a) {
42
- let c = a.target.files[0], d = new FormData();
44
+ async function v(l) {
45
+ let c = l.target.files[0], d = new FormData();
43
46
  d.append("file", c);
44
47
  try {
45
- let u = await C.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(s.uploadPath)}`, d, {
48
+ let x = await C.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/${n.type}?folderName=${encodeURIComponent(n.uploadPath)}`, d, {
46
49
  headers: {
47
50
  "Content-Type": "multipart/form-data"
48
51
  }
49
52
  });
50
- console.log(u.data), l.value = u.data[0].filepath, i("file-change", l.value);
53
+ t.value = x.data[0].filepath, r("file-change", t.value);
51
54
  } catch (f) {
52
55
  console.error(f);
53
56
  }
54
57
  }
55
- const x = () => {
56
- l.value = null, i("update:field", null), i("file-change", null);
58
+ const g = () => {
59
+ t.value = null, r("update:field", null), r("file-change", null);
57
60
  };
58
- return (a, c) => (t(), o(_, null, [
59
- n("div", {
60
- class: w([[a.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
61
+ return (l, c) => (a(), o(_, null, [
62
+ i("div", {
63
+ class: w([[l.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
61
64
  }, [
62
- e.label ? (t(), o("div", F, [
63
- n("span", null, r(e.label), 1)
64
- ])) : p("", !0),
65
- l.value ? (t(), o("div", N, [
66
- n("a", {
67
- href: l.value,
65
+ e.label ? (a(), o("div", F, [
66
+ i("span", null, s(e.label), 1)
67
+ ])) : m("", !0),
68
+ t.value ? (a(), o("div", N, [
69
+ i("a", {
70
+ href: t.value,
68
71
  class: "w-100",
69
72
  target: "_blank"
70
- }, r(l.value), 9, R),
71
- h(U, {
72
- onClick: x,
73
+ }, s(t.value), 9, R),
74
+ p(U, {
75
+ onClick: g,
73
76
  class: "cursor-pointer t-center flex-center flex radius-extra i-medium bg-red pd-micro"
74
77
  })
75
- ])) : (t(), o("div", B, [
76
- n("input", {
77
- onChange: g,
78
+ ])) : (a(), o("div", S, [
79
+ i("input", {
80
+ onChange: v,
78
81
  type: "file",
79
82
  class: "w-100",
80
83
  placeholder: e.placeholder,
81
84
  multiple: e.multiple,
82
85
  id: "photo",
83
86
  name: "photo"
84
- }, null, 40, D)
87
+ }, null, 40, B)
85
88
  ]))
86
89
  ], 2),
87
- h(b, {
90
+ p(b, {
88
91
  mode: "out-in",
89
92
  name: "fade"
90
93
  }, {
91
94
  default: k(() => [
92
- e.validation ? (t(), o("div", I, " * " + r(e.validation.message), 1)) : p("", !0)
95
+ e.validation ? (a(), o("div", D, " * " + s(e.validation.message), 1)) : m("", !0)
93
96
  ]),
94
97
  _: 1
95
98
  })
96
99
  ], 64));
97
100
  }
98
- }, z = /* @__PURE__ */ $(L, [["__scopeId", "data-v-d8ca273c"]]);
101
+ }, z = /* @__PURE__ */ $(I, [["__scopeId", "data-v-516f3e07"]]);
99
102
  export {
100
103
  z as default
101
104
  };
@@ -1,40 +1,40 @@
1
- import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
2
- import P from "../../../../components/Tab/Tab.vue2.js";
3
- import E from "../../../../components/Field/Field.vue2.js";
4
- import I from "../../../../components/FieldPhone/FieldPhone.vue.js";
1
+ import { ref as d, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
2
+ import E from "../../../../components/Tab/Tab.vue2.js";
3
+ import I from "../../../../components/Field/Field.vue2.js";
4
+ import P from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
5
  import V from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import S from "../../localization/ResetPassword.json.js";
9
9
  import { state as i, actions as T } from "../../store/auth.js";
10
10
  import "../../store/twofa.js";
11
- import { validateInputs as b, validatePhone as D, validateEmail as F } from "../../../middlewares/client/inputs.validation.js";
11
+ import { validateInputs as b, validatePhone as D, validateEmail as O } from "../../../middlewares/client/inputs.validation.js";
12
12
  /* empty css */
13
- const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { class: "mn-b-small t-transp" }, U = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, $ = { class: "pos-relative" }, q = {
13
+ const R = { class: "t-left pd-medium" }, $ = { class: "mn-b-small" }, B = { class: "mn-b-small t-transp" }, F = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, U = { class: "pos-relative" }, q = {
14
14
  key: 0,
15
15
  class: "mn-b-semi radius-small o-hidden"
16
16
  }, A = { class: "mn-b-small t-transp" }, L = {
17
17
  key: 0,
18
18
  class: "mn-b-semi radius-small o-hidden"
19
- }, j = { class: "mn-b-small t-transp" }, oe = {
19
+ }, j = { class: "mn-b-small t-transp" }, se = {
20
20
  __name: "ResetPassword",
21
21
  setup(z) {
22
22
  const { t: e } = N({
23
23
  useScope: "global",
24
24
  ...S
25
- }), h = m(null), f = m(null);
25
+ }), h = d(null), f = d(null);
26
26
  k();
27
- const w = x(), o = m("phone");
27
+ const w = x(), s = d("phone");
28
28
  async function g() {
29
29
  try {
30
- o.value === "phone" && await b(
30
+ s.value === "phone" && await b(
31
31
  h,
32
32
  D,
33
33
  i.user.phone,
34
34
  "Некорректный телефон"
35
- ), o.value === "email" && await b(
35
+ ), s.value === "email" && await b(
36
36
  f,
37
- F,
37
+ O,
38
38
  i.user.email,
39
39
  "Некорректный email"
40
40
  );
@@ -42,34 +42,34 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { clas
42
42
  throw new Error();
43
43
  }
44
44
  try {
45
- await T.resetPassword(i.user, o.value, "reset-password");
46
- } catch (d) {
47
- throw console.log(d), new Error();
45
+ await T.resetPassword(i.user, s.value, "reset-password");
46
+ } catch (m) {
47
+ throw console.log(m), new Error();
48
48
  }
49
49
  }
50
50
  function y() {
51
- w.push({ name: "Enter Code", query: { type: o.value, method: "reset-password" } });
51
+ w.push({ name: "Enter Code", query: { type: s.value, method: "reset-password" } });
52
52
  }
53
- return (d, s) => (u(), p("section", O, [
54
- a("h3", R, r(t(e)("forgotPasswordTitle")), 1),
53
+ return (m, o) => (u(), p("section", R, [
54
+ a("h3", $, r(t(e)("forgotPasswordTitle")), 1),
55
55
  a("p", B, r(t(e)("instructions")), 1),
56
- a("div", U, [
57
- l(P, {
58
- selected: o.value,
59
- "onUpdate:selected": s[0] || (s[0] = (n) => o.value = n),
56
+ a("div", F, [
57
+ l(E, {
58
+ selected: s.value,
59
+ "onUpdate:selected": o[0] || (o[0] = (n) => s.value = n),
60
60
  tabs: [
61
61
  { name: t(e)("phone"), value: "phone" },
62
62
  { name: t(e)("email"), value: "email" }
63
63
  ]
64
64
  }, null, 8, ["selected", "tabs"])
65
65
  ]),
66
- a("div", $, [
66
+ a("div", U, [
67
67
  l(_, { name: "slide-fade" }, {
68
68
  default: c(() => [
69
- o.value === "phone" ? (u(), p("div", q, [
69
+ s.value === "phone" ? (u(), p("div", q, [
70
70
  a("p", A, r(t(e)("smsInfo")), 1),
71
- l(I, {
72
- onChange: s[1] || (s[1] = (n) => i.user.phone = n),
71
+ l(P, {
72
+ onChange: o[1] || (o[1] = (n) => i.user.phone = n),
73
73
  dropdownOptions: {
74
74
  showDialCodeInSelection: !0,
75
75
  showFlags: !0,
@@ -86,11 +86,11 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { clas
86
86
  }),
87
87
  l(_, { name: "slide-fade" }, {
88
88
  default: c(() => [
89
- o.value === "email" ? (u(), p("div", L, [
89
+ s.value === "email" ? (u(), p("div", L, [
90
90
  a("p", j, r(t(e)("emailInfo")), 1),
91
- l(E, {
91
+ l(I, {
92
92
  field: i.user.email,
93
- "onUpdate:field": s[2] || (s[2] = (n) => i.user.email = n),
93
+ "onUpdate:field": o[2] || (o[2] = (n) => i.user.email = n),
94
94
  placeholder: t(e)("emailPlaceholder"),
95
95
  validation: f.value,
96
96
  class: "bg-light pd-medium radius-small"
@@ -114,5 +114,5 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { clas
114
114
  }
115
115
  };
116
116
  export {
117
- oe as default
117
+ se as default
118
118
  };
@@ -1,31 +1,31 @@
1
- import { ref as m, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as s, createTextVNode as c, toDisplayString as r, unref as a, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
1
+ import { ref as p, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as s, createTextVNode as c, toDisplayString as r, unref as l, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
2
2
  import q from "../../../../components/Tab/Tab.vue2.js";
3
3
  import y from "../../../../components/Field/Field.vue2.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
5
  import O from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as j, useRouter as A } from "vue-router";
7
- import { useI18n as F } from "vue-i18n";
8
- import N from "../../localization/SignIn.json.js";
9
- import { state as i, actions as T } from "../../store/auth.js";
10
- import { validateInputs as S, validatePhone as B, validateEmail as R } from "../../../middlewares/client/inputs.validation.js";
7
+ import { useI18n as N } from "vue-i18n";
8
+ import T from "../../localization/SignIn.json.js";
9
+ import { state as i, actions as $ } from "../../store/auth.js";
10
+ import { validateInputs as S, validatePhone as B, validateEmail as F } from "../../../middlewares/client/inputs.validation.js";
11
11
  /* empty css */
12
- const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
12
+ const R = { class: "" }, L = /* @__PURE__ */ s("img", {
13
13
  src: "/logo/logo.svg",
14
14
  class: "i-extra radius-small mn-b-small"
15
15
  }, null, -1), M = { class: "mn-b-medium" }, z = /* @__PURE__ */ s("br", null, null, -1), G = { class: "t-semi" }, H = { class: "mn-b-big" }, J = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, K = { class: "pos-relative" }, Q = { class: "mn-b-thin radius-small" }, W = { class: "mn-b-thin radius-small o-hidden" }, X = { class: "w-100 mn-b-big" }, ue = {
16
16
  __name: "SignIn",
17
17
  setup(Y) {
18
- const h = m(null), x = m(null), f = m(null), _ = j(), v = A(), { t: l } = F({
18
+ const h = p(null), x = p(null), f = p(null), _ = j(), v = A(), { t: a } = N({
19
19
  useScope: "global",
20
- ...N
21
- }), n = m("phone"), C = (u) => new Promise((t, p) => {
20
+ ...T
21
+ }), n = p("phone"), C = (u) => new Promise((t, m) => {
22
22
  const e = document.createElement("script");
23
- e.type = "text/javascript", e.src = u, e.onload = t, e.onerror = p, document.head.appendChild(e);
23
+ e.type = "text/javascript", e.src = u, e.onload = t, e.onerror = m, document.head.appendChild(e);
24
24
  });
25
25
  k(async () => {
26
26
  await C("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
27
27
  });
28
- async function P() {
28
+ async function U() {
29
29
  try {
30
30
  n.value === "phone" && await S(
31
31
  h,
@@ -34,7 +34,7 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
34
34
  "Некорректный телефон"
35
35
  ), n.value === "email" && await S(
36
36
  f,
37
- R,
37
+ F,
38
38
  i.user.email,
39
39
  "Некорректный email"
40
40
  );
@@ -42,9 +42,9 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
42
42
  throw new Error();
43
43
  }
44
44
  const u = { ...i.user };
45
- await T.login(u, n.value);
45
+ await $.login(u, n.value);
46
46
  }
47
- function U() {
47
+ function P() {
48
48
  _.query.returnUrl ? v.push({
49
49
  path: _.query.returnUrl,
50
50
  query: {
@@ -61,21 +61,21 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
61
61
  });
62
62
  }
63
63
  return (u, t) => {
64
- const p = E("router-link");
65
- return V(), I("section", $, [
64
+ const m = E("router-link");
65
+ return V(), I("section", R, [
66
66
  L,
67
67
  s("h3", M, [
68
- c(r(a(l)("title")) + " ", 1),
68
+ c(r(l(a)("title")) + " ", 1),
69
69
  z,
70
- s("span", G, r(a(l)("subtitle")), 1)
70
+ s("span", G, r(l(a)("subtitle")), 1)
71
71
  ]),
72
72
  s("p", H, [
73
- o(p, {
73
+ o(m, {
74
74
  to: { name: "Sign Up" },
75
75
  class: "underline t-second"
76
76
  }, {
77
77
  default: d(() => [
78
- c(r(a(l)("signup")), 1)
78
+ c(r(l(a)("signup")), 1)
79
79
  ]),
80
80
  _: 1
81
81
  })
@@ -85,8 +85,8 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
85
85
  selected: n.value,
86
86
  "onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
87
87
  tabs: [
88
- { name: a(l)("phone"), value: "phone" },
89
- { name: a(l)("email"), value: "email" }
88
+ { name: l(a)("phone"), value: "phone" },
89
+ { name: l(a)("email"), value: "email" }
90
90
  ]
91
91
  }, null, 8, ["selected", "tabs"])
92
92
  ]),
@@ -104,7 +104,7 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
104
104
  validCharactersOnly: !0,
105
105
  validation: h.value,
106
106
  mode: "national",
107
- inputOptions: { placeholder: a(l)("phonePlaceholder"), type: "tel" },
107
+ inputOptions: { placeholder: l(a)("phonePlaceholder"), type: "tel" },
108
108
  class: "bg-light pd-small radius-small mn-b-thin"
109
109
  }, null, 8, ["validation", "inputOptions"])
110
110
  ], 512), [
@@ -119,7 +119,7 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
119
119
  o(y, {
120
120
  field: i.user.email,
121
121
  "onUpdate:field": t[2] || (t[2] = (e) => i.user.email = e),
122
- placeholder: a(l)("emailPlaceholder"),
122
+ placeholder: l(a)("emailPlaceholder"),
123
123
  validation: f.value,
124
124
  class: "bg-light pd-medium radius-small"
125
125
  }, null, 8, ["field", "placeholder", "validation"])
@@ -135,27 +135,27 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
135
135
  "onUpdate:field": t[3] || (t[3] = (e) => i.user.password = e),
136
136
  type: "password",
137
137
  validation: x.value,
138
- placeholder: a(l)("passwordPlaceholder"),
138
+ placeholder: l(a)("passwordPlaceholder"),
139
139
  class: "bg-light pd-medium radius-small mn-b-semi"
140
140
  }, null, 8, ["field", "validation", "placeholder"]),
141
141
  s("div", X, [
142
- o(p, {
142
+ o(m, {
143
143
  to: "/auth/reset-password",
144
144
  class: "underline d-block t-blue"
145
145
  }, {
146
146
  default: d(() => [
147
- c(r(a(l)("forgotPassword")), 1)
147
+ c(r(l(a)("forgotPassword")), 1)
148
148
  ]),
149
149
  _: 1
150
150
  })
151
151
  ]),
152
152
  o(O, {
153
- submit: P,
154
- callback: U,
153
+ submit: U,
154
+ callback: P,
155
155
  class: "w-100 bg-main mn-b-thin"
156
156
  }, {
157
157
  default: d(() => [
158
- c(r(a(l)("signin")), 1)
158
+ c(r(l(a)("signin")), 1)
159
159
  ]),
160
160
  _: 1
161
161
  })
@@ -1,29 +1,29 @@
1
- import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as f, vShow as _, createTextVNode as v } from "vue";
1
+ import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
2
2
  import N from "../../../../components/Tab/Tab.vue2.js";
3
3
  import V from "../../../../components/Field/Field.vue2.js";
4
4
  import y from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
5
  import D from "../../../../components/Button/Button.vue2.js";
6
- import { useRoute as I, useRouter as P } from "vue-router";
7
- import { useI18n as F } from "vue-i18n";
8
- import O from "../../localization/SignUp.json.js";
6
+ import { useRoute as I, useRouter as O } from "vue-router";
7
+ import { useI18n as P } from "vue-i18n";
8
+ import T from "../../localization/SignUp.json.js";
9
9
  import { state as s } from "../../store/auth.js";
10
- import { sendCode as T } from "../../store/twofa.js";
11
- import { validateInputs as b, validatePhone as U, validateEmail as A } from "../../../middlewares/client/inputs.validation.js";
10
+ import { sendCode as U } from "../../store/twofa.js";
11
+ import { validateInputs as b, validatePhone as $, validateEmail as A } from "../../../middlewares/client/inputs.validation.js";
12
12
  /* empty css */
13
- const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, L = { class: "pos-relative" }, j = { class: "mn-b-semi radius-small" }, q = { class: "mn-b-small t-transp" }, z = { class: "mn-b-semi radius-small o-hidden" }, G = { class: "mn-b-small t-transp" }, H = { class: "w-100" }, ie = {
13
+ const B = { class: "t-left pd-medium" }, F = { class: "mn-b-small" }, R = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, L = { class: "pos-relative" }, j = { class: "mn-b-semi radius-small" }, q = { class: "mn-b-small t-transp" }, z = { class: "mn-b-semi radius-small o-hidden" }, G = { class: "mn-b-small t-transp" }, H = { class: "w-100" }, ie = {
14
14
  __name: "SignUp",
15
15
  setup(J) {
16
- const { t: e } = F({
16
+ const { t: e } = P({
17
17
  useScope: "global",
18
- ...O
18
+ ...T
19
19
  }), u = d(null), c = d(null);
20
20
  I();
21
- const g = P(), l = d("phone");
21
+ const g = O(), l = d("phone");
22
22
  async function w() {
23
23
  try {
24
24
  l.value === "phone" && await b(
25
25
  u,
26
- U,
26
+ $,
27
27
  s.user.phone,
28
28
  "Некорректный телефон"
29
29
  ), l.value === "email" && await b(
@@ -36,7 +36,7 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
36
36
  throw new Error();
37
37
  }
38
38
  try {
39
- await T(s.user, "signup", l.value);
39
+ await U(s.user, "signup", l.value);
40
40
  } catch {
41
41
  throw new Error();
42
42
  }
@@ -47,8 +47,8 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
47
47
  return (p, i) => {
48
48
  const k = E("router-link");
49
49
  return S(), x("section", B, [
50
- o("h3", R, r(t(e)("title")), 1),
51
- o("div", $, [
50
+ o("h3", F, r(t(e)("title")), 1),
51
+ o("div", R, [
52
52
  a(N, {
53
53
  selected: l.value,
54
54
  "onUpdate:selected": i[0] || (i[0] = (n) => l.value = n),
@@ -61,7 +61,7 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
61
61
  o("div", L, [
62
62
  a(h, { name: "slide-fade" }, {
63
63
  default: m(() => [
64
- f(o("div", j, [
64
+ _(o("div", j, [
65
65
  o("p", q, r(t(e)("smsNotice")), 1),
66
66
  a(y, {
67
67
  onChange: i[1] || (i[1] = (n) => s.user.phone = n),
@@ -76,14 +76,14 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
76
76
  class: "bg-light pd-small radius-small mn-b-thin"
77
77
  }, null, 8, ["validation", "inputOptions"])
78
78
  ], 512), [
79
- [_, l.value === "phone"]
79
+ [f, l.value === "phone"]
80
80
  ])
81
81
  ]),
82
82
  _: 1
83
83
  }),
84
84
  a(h, { name: "slide-fade" }, {
85
85
  default: m(() => [
86
- f(o("div", z, [
86
+ _(o("div", z, [
87
87
  o("p", G, r(t(e)("emailNotice")), 1),
88
88
  a(V, {
89
89
  field: s.user.email,
@@ -93,7 +93,7 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
93
93
  class: "bg-light pd-medium radius-small"
94
94
  }, null, 8, ["field", "placeholder", "validation"])
95
95
  ], 512), [
96
- [_, l.value === "email"]
96
+ [f, l.value === "email"]
97
97
  ])
98
98
  ]),
99
99
  _: 1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),d=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),g=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),w=require("vue"),c=require("../../globals/store/globals.cjs"),k=require("./twofa.cjs"),u=l.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1},accesses:[]});async function f(){try{const e=await m("user");if(e){const{_id:t,email:s,phone:n,roles:o,accessToken:r}=e;l.interceptors.request.use(i=>(i.headers["x-access-token"]=r,i),i=>Promise.reject(i));const h=(await l.get("/api/auth/check-accesses")).data;Object.assign(a.user,{_id:t,email:s,phone:n}),Object.assign(a.access,{token:r,roles:o,status:!!r}),a.accesses=h}}catch(e){console.error("Error initializing app:",e),O("user"),a.accesses=[]}}f();const P={async login(e,t){try{const s=await u.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),console.log(s),c.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:n,passwordRepeat:o}=a.user;if(console.log(n),console.log(o),n!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(r),new Error(r.response.status)}try{const r=await u.post("/api/auth/signup",{...e,type:t,inviteCode:s});return console.log(r),r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw c.setError(r),console.log("Sign up falied"),r}},logout(){O("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await u.post("/api/auth/reset-password",{email:e.email,phone:e.phone,type:t});return Object.assign(k.state.code,{...s.data,isSended:!0}),s.data}catch(s){return c.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:n}=a.user;if(s!==n){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(o),new Error(o.response.status)}try{const o=await u.post("/api/auth/update-password",{email:e.email,phone:e.phone,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return c.setError(o),Promise.reject(o)}}},j={development:{secure:!1,expires:7,sameSite:"Lax"},production:{expires:7,path:"/",domain:process.env.API_URL,sameSite:"none",secure:!0}};async function m(e){if(process.env.MOBILE_APP){const{value:t}=await g.Preferences.get({key:e});return t?JSON.parse(t):null}else{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.DOMAIN_URL){process.env.MOBILE_APP?g.Preferences.set({key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),j[s])}function O(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)g.Preferences.remove({key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=P;exports.initialize=f;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),d=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),g=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),w=require("vue"),c=require("../../globals/store/globals.cjs"),k=require("./twofa.cjs"),u=l.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1},accesses:[]});async function O(){try{const e=await m("user");if(e){const{_id:t,email:s,phone:n,roles:o,accessToken:r}=e;l.interceptors.request.use(i=>(i.headers["x-access-token"]=r,i),i=>Promise.reject(i));const h=(await l.get("/api/auth/check-accesses")).data;Object.assign(a.user,{_id:t,email:s,phone:n}),Object.assign(a.access,{token:r,roles:o,status:!!r}),a.accesses=h}}catch(e){console.error("Error initializing app:",e),f("user"),a.accesses=[]}}O();const P={async login(e,t){try{const s=await u.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),console.log(s),c.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:n,passwordRepeat:o}=a.user;if(console.log(n),console.log(o),n!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(r),new Error(r.response.status)}try{const r=await u.post("/api/auth/signup",{...e,type:t,inviteCode:s});return console.log(r),r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw c.setError(r),console.log("Sign up falied"),r}},logout(){f("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await u.post("/api/auth/reset-password",{email:e.email,phone:e.phone,type:t});return Object.assign(k.state.code,{...s.data,isSended:!0}),s.data}catch(s){return c.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:n}=a.user;if(s!==n){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(o),new Error(o.response.status)}try{const o=await u.post("/api/auth/update-password",{email:e.email,phone:e.phone,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return c.setError(o),Promise.reject(o)}}},j={development:{secure:!1,expires:7,sameSite:"Lax"},production:{expires:7,path:"/",domain:process.env.DOMAIN_URL,sameSite:"none",secure:!0}};async function m(e){if(process.env.MOBILE_APP){const{value:t}=await g.Preferences.get({key:e});return t?JSON.parse(t):null}else{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.DOMAIN_URL){process.env.MOBILE_APP?g.Preferences.set({key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),j[s])}function f(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)g.Preferences.remove({key:e});else{const s=t==="production"?{domain:process.env.DOMAIN_URL}:{};d.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=P;exports.initialize=O;exports.state=a;
@@ -1,10 +1,10 @@
1
1
  import d from "axios";
2
2
  import l from "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import { Preferences as w } from "../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
4
- import { reactive as f, watch as O } from "vue";
4
+ import { reactive as O, watch as f } from "vue";
5
5
  import { setError as c } from "../../globals/store/globals.js";
6
6
  import { state as h } from "./twofa.js";
7
- const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = f({
7
+ const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = O({
8
8
  user: {
9
9
  _id: void 0,
10
10
  username: "",
@@ -22,7 +22,7 @@ const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = f
22
22
  });
23
23
  async function k() {
24
24
  try {
25
- const e = await j("user");
25
+ const e = await v("user");
26
26
  if (e) {
27
27
  const { _id: t, email: s, phone: n, roles: r, accessToken: a } = e;
28
28
  d.interceptors.request.use((i) => (i.headers["x-access-token"] = a, i), (i) => Promise.reject(i));
@@ -34,7 +34,7 @@ async function k() {
34
34
  }
35
35
  }
36
36
  k();
37
- const C = {
37
+ const N = {
38
38
  async login(e, t) {
39
39
  try {
40
40
  const s = await p.post("/api/auth/signin", {
@@ -137,11 +137,11 @@ const C = {
137
137
  return c(r), Promise.reject(r);
138
138
  }
139
139
  }
140
- }, P = {
140
+ }, j = {
141
141
  development: { secure: !1, expires: 7, sameSite: "Lax" },
142
- production: { expires: 7, path: "/", domain: process.env.API_URL, sameSite: "none", secure: !0 }
142
+ production: { expires: 7, path: "/", domain: process.env.DOMAIN_URL, sameSite: "none", secure: !0 }
143
143
  };
144
- async function j(e) {
144
+ async function v(e) {
145
145
  if (process.env.MOBILE_APP) {
146
146
  const { value: t } = await w.get({ key: e });
147
147
  return t ? JSON.parse(t) : null;
@@ -154,20 +154,20 @@ function u(e, t, s = process.env.DOMAIN_URL) {
154
154
  process.env.MOBILE_APP ? w.set({
155
155
  key: e,
156
156
  value: JSON.stringify(t)
157
- }) : l.set(e, JSON.stringify(t), P[s]);
157
+ }) : l.set(e, JSON.stringify(t), j[s]);
158
158
  }
159
159
  function g(e, t = process.env.NODE_ENV) {
160
160
  if (process.env.MOBILE_APP)
161
161
  w.remove({ key: e });
162
162
  else {
163
- const s = t === "production" ? { domain: process.env.API_URL } : {};
163
+ const s = t === "production" ? { domain: process.env.DOMAIN_URL } : {};
164
164
  l.remove(e, s);
165
165
  }
166
166
  }
167
- O(o, (e, t) => {
167
+ f(o, (e, t) => {
168
168
  });
169
169
  export {
170
- C as actions,
170
+ N as actions,
171
171
  k as initialize,
172
172
  o as state
173
173
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/layouts/Community.vue.cjs"),e=require("./components/pages/CreateBlogPost.vue.cjs"),o=require("./components/pages/BlogPost.vue.cjs"),s=require("./components/pages/Blog.vue.cjs"),r=require("./components/blocks/FooterBlogpost.vue.cjs"),u=require("./components/blocks/Activity.vue.cjs"),l=require("./components/blocks/CardBlogpost.vue.cjs"),i=require("./components/sections/Feed.vue.cjs"),n=require("./components/sections/JoinUs.vue.cjs"),a=require("./components/sections/Comments.vue.cjs"),c=require("./components/sections/HotPosts.vue.cjs"),d=require("./store/blogposts.cjs"),g=require("./store/reactions.cjs"),q=require("./router/blogposts.cjs");exports.Community=t.default;exports.CreateBlogPost=e.default;exports.BlogPost=o.default;exports.Blog=s.default;exports.FooterBlogpost=r.default;exports.Activity=u.default;exports.CardBlogpost=l.default;exports.Feed=i.default;exports.JoinUs=n.default;exports.Comments=a.default;exports.HotPosts=c.default;exports.blogpostsStore=d;exports.reactionsStore=g;exports.blogpostsRoutes=q.default;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/layouts/Community.vue.cjs"),o=require("./components/pages/CreateBlogPost.vue.cjs"),e=require("./components/pages/BlogPost.vue.cjs"),s=require("./components/pages/Blog.vue.cjs"),r=require("./components/blocks/FooterBlogpost.vue.cjs"),u=require("./components/blocks/Activity.vue.cjs"),l=require("./components/blocks/CardBlogpost.vue.cjs"),i=require("./components/sections/JoinUs.vue.cjs"),n=require("./components/sections/Comments.vue.cjs"),a=require("./components/sections/HotPosts.vue.cjs"),c=require("./store/blogposts.cjs"),g=require("./store/reactions.cjs"),d=require("./router/blogposts.cjs");exports.Community=t.default;exports.CreateBlogPost=o.default;exports.BlogPost=e.default;exports.Blog=s.default;exports.FooterBlogpost=r.default;exports.Activity=u.default;exports.CardBlogpost=l.default;exports.JoinUs=i.default;exports.Comments=n.default;exports.HotPosts=a.default;exports.blogpostsStore=c;exports.reactionsStore=g;exports.blogpostsRoutes=d.default;