@ozdao/prometheus-framework 0.2.221 → 0.2.223

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/dist/auth.server.js +4 -4
  2. package/dist/auth.server.mjs +4 -4
  3. package/dist/builder.js +72 -60
  4. package/dist/builder.mjs +72 -60
  5. package/dist/community.server.js +9 -4
  6. package/dist/community.server.mjs +9 -4
  7. package/dist/events.server.js +14 -24
  8. package/dist/events.server.mjs +14 -24
  9. package/dist/files.server.js +1 -1
  10. package/dist/files.server.mjs +1 -1
  11. package/dist/gallery.server.js +42 -76
  12. package/dist/gallery.server.mjs +41 -75
  13. package/dist/index-CsS7qx1d.js +243 -0
  14. package/dist/index-UIHE6Rk3.mjs +244 -0
  15. package/dist/main.css +1 -1
  16. package/dist/node_modules/@capacitor/core/dist/index.cjs +529 -0
  17. package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
  18. package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
  19. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
  20. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
  21. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
  22. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
  23. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
  24. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
  25. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
  26. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
  27. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
  28. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
  29. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
  30. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
  31. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
  32. package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
  33. package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
  34. package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
  35. package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
  36. package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
  37. package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
  38. package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
  39. package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
  40. package/dist/orders.server.js +2 -2
  41. package/dist/orders.server.mjs +2 -2
  42. package/dist/organizations.server.js +174 -95
  43. package/dist/organizations.server.mjs +174 -95
  44. package/dist/pages.server.js +1 -1
  45. package/dist/pages.server.mjs +1 -1
  46. package/dist/products.server.js +119 -266
  47. package/dist/products.server.mjs +119 -266
  48. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
  49. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
  50. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
  51. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
  52. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
  53. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
  54. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
  55. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
  56. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
  57. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
  58. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
  59. package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
  60. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +26 -41
  61. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
  62. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -42
  63. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
  64. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  66. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
  67. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
  68. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
  69. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
  70. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  72. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
  73. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
  74. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
  75. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
  76. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
  79. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
  80. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -1
  89. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
  90. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -1
  91. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  92. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
  95. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
  96. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
  97. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
  98. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +44 -0
  99. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
  100. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +44 -0
  101. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
  102. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
  103. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
  104. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
  105. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
  106. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
  107. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
  108. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
  109. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
  110. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
  111. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
  112. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
  113. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
  114. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +4 -2
  115. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
  116. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +4 -2
  117. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
  118. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +13 -9
  119. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
  120. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -10
  121. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  122. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +53 -40
  123. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
  124. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +58 -45
  125. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
  126. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
  127. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
  130. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
  132. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
  133. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
  134. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
  135. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
  136. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +4 -4
  137. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +4 -4
  138. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +47 -43
  139. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
  140. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +47 -43
  141. package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
  142. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
  143. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
  144. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
  145. package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
  146. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
  147. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
  148. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
  149. package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
  150. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +29 -54
  155. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
  156. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +30 -55
  157. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
  158. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +163 -134
  159. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
  160. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +165 -136
  161. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
  162. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +124 -135
  165. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  166. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
  167. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
  168. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  169. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
  170. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
  171. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
  172. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
  173. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
  174. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
  177. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
  178. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
  179. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
  180. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  182. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
  183. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
  184. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
  185. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
  186. package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
  187. package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
  188. package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
  189. package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
  190. package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
  191. package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
  192. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
  193. package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
  194. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +20 -11
  195. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  196. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +20 -11
  197. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  198. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
  199. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
  200. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
  201. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
  202. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
  203. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
  204. package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
  205. package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
  206. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
  207. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
  208. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
  209. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
  210. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  214. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
  215. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
  216. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
  217. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
  218. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
  219. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
  220. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
  221. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
  222. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  223. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
  224. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
  225. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
  226. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
  227. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  228. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
  229. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  230. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
  231. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
  232. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
  233. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
  234. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
  235. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
  236. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
  237. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
  238. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
  239. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
  240. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
  241. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
  242. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
  243. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
  244. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
  245. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  246. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
  247. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  248. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  249. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  250. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  252. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  253. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  254. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
  255. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  256. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
  257. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
  258. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
  259. package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +1 -1
  260. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  261. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  262. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  263. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  264. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  265. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  266. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +60 -23
  267. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
  268. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
  269. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
  270. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
  271. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
  272. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
  273. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
  274. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  275. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  276. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  277. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  278. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  279. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  280. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  281. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  282. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  283. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  284. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
  285. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  286. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
  287. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
  288. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
  289. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
  290. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
  291. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
  292. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
  293. package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
  294. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
  295. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
  296. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
  297. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
  298. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +807 -801
  299. package/dist/prometheus-framework/src/modules/pages/pages.client.js +807 -801
  300. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  301. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  302. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  303. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  304. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +5 -10
  305. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
  306. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
  307. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
  308. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  309. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  310. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +12 -7
  311. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
  312. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
  313. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  314. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  315. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  316. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  317. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  318. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  319. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  320. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  321. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  322. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  323. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  324. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  325. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  326. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
  327. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js.map +1 -1
  328. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  329. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  330. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  331. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  332. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
  333. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
  334. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  335. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  336. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
  337. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  338. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  339. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  340. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  341. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  342. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
  343. package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
  344. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
  345. package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
  346. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
  347. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
  348. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
  349. package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
  350. package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
  351. package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
  352. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
  353. package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
  354. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
  355. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
  356. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  357. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  358. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  359. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  360. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +3 -3
  361. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
  362. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
  363. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
  364. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  365. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  366. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
  367. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
  368. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
  369. package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
  370. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
  371. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
  372. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
  373. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +1 -1
  374. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  375. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  376. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  377. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  378. package/dist/prometheus-framework/src/modules/users/router/users.cjs +2 -2
  379. package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
  380. package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
  381. package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
  382. package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
  383. package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
  384. package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
  385. package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
  386. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  387. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  388. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  389. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  390. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
  391. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  392. package/dist/prometheus-framework.cjs.js +17 -17
  393. package/dist/prometheus-framework.es.js +1790 -1790
  394. package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
  395. package/dist/queryProcessor-CcsJEUBr.js +196 -0
  396. package/dist/spots.server.js +1 -1
  397. package/dist/spots.server.mjs +1 -1
  398. package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
  399. package/dist/verifyAccesses-BvLnOtBN.js +89 -0
  400. package/dist/wallet.server.js +2 -2
  401. package/dist/wallet.server.mjs +2 -2
  402. package/package.json +1 -1
  403. package/src/builder/modes/ssr.dev.js +2 -2
  404. package/src/builder/modes/ssr.prod.js +4 -4
  405. package/src/builder/ssr/ssr-render-html.js +11 -13
  406. package/src/builder/templates/page.html +37 -0
  407. package/src/builder/templates/page.js +4 -0
  408. package/src/builder/webpack/webpack.config.client.js +9 -6
  409. package/src/builder/webpack/webpack.config.ssr.js +1 -1
  410. package/src/components/Button/Button.vue +0 -1
  411. package/src/components/Feed/Feed.vue +34 -55
  412. package/src/components/FieldTags/BlockTags.vue +0 -1
  413. package/src/components/UploadImage/UploadImage.vue +2 -1
  414. package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
  415. package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
  416. package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
  417. package/src/modules/auth/controllers/services/auth.service.js +1 -0
  418. package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
  419. package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
  420. package/src/modules/auth/views/middlewares/ownership.validation.js +60 -0
  421. package/src/modules/auth/views/store/auth.js +43 -39
  422. package/src/modules/auth/views/store/twofa.js +2 -5
  423. package/src/modules/auth/views/validations/inputs.validation.js +12 -6
  424. package/src/modules/community/components/blocks/CardBlogpost.vue +3 -1
  425. package/src/modules/community/components/layouts/Community.vue +7 -9
  426. package/src/modules/community/components/pages/BlogPost.vue +122 -123
  427. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
  428. package/src/modules/community/components/sections/Comments.vue +5 -5
  429. package/src/modules/community/controllers/blog.controller.js +1 -1
  430. package/src/modules/community/models/blogpost.model.js +1 -1
  431. package/src/modules/community/router/blogposts.js +40 -33
  432. package/src/modules/community/routes/blog.routes.js +4 -0
  433. package/src/modules/community/store/blogposts.js +11 -19
  434. package/src/modules/community/store/reactions.js +1 -7
  435. package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
  436. package/src/modules/events/components/pages/EditEvent.vue +76 -59
  437. package/src/modules/events/components/pages/Event.vue +2 -15
  438. package/src/modules/events/components/pages/Events.vue +2 -1
  439. package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
  440. package/src/modules/events/components/sections/HeroEvent.vue +15 -17
  441. package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
  442. package/src/modules/events/router/events.js +11 -4
  443. package/src/modules/events/store/events.js +2 -4
  444. package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
  445. package/src/modules/gallery/controllers/gallery.controller.js +30 -31
  446. package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
  447. package/src/modules/gallery/routes/gallery.routes.js +22 -4
  448. package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
  449. package/src/modules/globals/globals.client.js +2 -0
  450. package/src/modules/globals/views/classes/globals.store.js +4 -3
  451. package/src/modules/globals/views/components/blocks/Card.vue +56 -0
  452. package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
  453. package/src/modules/globals/views/components/layouts/App.vue +1 -0
  454. package/src/modules/globals/views/components/layouts/Client.vue +0 -30
  455. package/src/modules/globals/views/store/globals.js +4 -2
  456. package/src/modules/globals/views/utils/axios-instance.js +18 -0
  457. package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
  458. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
  459. package/src/modules/landing/components/pages/Governance.vue +4 -2
  460. package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
  461. package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
  462. package/src/modules/landing/router/landing.js +2 -1
  463. package/src/modules/orders/store/orders.js +1 -3
  464. package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
  465. package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
  466. package/src/modules/organizations/controllers/organizations.controller.js +28 -35
  467. package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
  468. package/src/modules/organizations/models/department.model.js +3 -86
  469. package/src/modules/organizations/models/organization.model.js +6 -4
  470. package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
  471. package/src/modules/organizations/router/organizations.js +2 -0
  472. package/src/modules/organizations/store/departments.js +6 -6
  473. package/src/modules/organizations/store/organizations.js +2 -16
  474. package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
  475. package/src/modules/products/components/blocks/CardProduct.vue +2 -0
  476. package/src/modules/products/components/pages/Product.vue +1 -1
  477. package/src/modules/products/components/sections/MenuSection.vue +2 -2
  478. package/src/modules/products/controllers/products.controller.js +201 -367
  479. package/src/modules/products/routes/products.routes.js +0 -5
  480. package/src/modules/products/store/categories.js +1 -2
  481. package/src/modules/products/store/leftovers.js +1 -2
  482. package/src/modules/products/store/products.js +1 -13
  483. package/src/modules/reports/components/sections/FormReport.vue +20 -20
  484. package/src/modules/spots/store/spots.js +1 -6
  485. package/src/modules/users/components/pages/Profile.vue +1 -1
  486. package/src/modules/users/router/users.js +2 -2
  487. package/src/modules/users/store/users.js +1 -3
  488. package/src/styles/base/all.scss +0 -2
  489. package/src/styles/config.scss +6 -0
  490. package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
  491. package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -1 +1 @@
1
- {"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<header \n\t\t\tv-if=\"!MOBILE_APP && route.meta.header.component\"\n\t\t\tid=\"header\" \n\t\t\tclass=\"\n\t\t\t\tpd-thin \n\t\t\t\tgap-micro\n\t\t\t\tflex-justify-between\n\t\t\t\tflex-nowrap\n\t\t\t\tflex\n\t\t\t\th-4r\n\t\t\t\tw-100\n\t\t\t\tz-index-2 \n\t\t\t\tpos-relative pos-t-0\n\t\t\t\"\n\t\t\t:class=\"{\n\t \t\t't-black bg-white': headerTheme === 'light',\n\t \t\t't-white bg-black': headerTheme === 'dark' \n\t \t}\"\n\t\t>\n <component\n ref=\"header\" \n :is=\"route.meta.header.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.header.logotype\"\n :location=\"route.meta.header.location\"\n >\n <component\n v-if=\"route.meta.navigation\"\n :is=\"route.meta.navigation\"\n class=\"mn-l-auto desktop-only\"\n />\n </component>\n\t </header>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.header.logotype\"\n\t\t />\n\t\t</transition>\n\n\t <Popup \n\t \tv-if=\"route.meta.header.location\"\n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-y-scroll o-x-hidden\"\n\t\t>\n\t\t\t<ShopCart />\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n\n\t\t\t<router-view \n\t\t\t\tname=\"defaultBottom\"\n\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t>\n\t\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t\t</router-view>\n\n\t\t\t<component\n\t\t \tv-if=\"route.meta.radio?.page\"\n :is=\"route.meta.radio.page\"\n />\n \n\t\t</section>\n\n\t\t<component\n\t \tv-if=\"route.meta.radio?.player\"\n :is=\"route.meta.radio.player\"\n />\n\n <BottomNavigationBar \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\n\t if (scrollOffset.value > 50 && !isScrolled) {\n\t isScrolled = true;\n\n\t // header.value.$el.classList.add('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = -firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t // headerTheme.value - light\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t } else if (scrollOffset.value <= 75 && isScrolled) {\n\t isScrolled = false;\n\t // header.value.$el.classList.remove('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t }\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('serviceWorker' in navigator) {\n\t \twindow.addEventListener('load', () => {\n\t \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t \tconsole.log('SW registered: ', registration);\n\t \t}).catch(registrationError => {\n\t \tconsole.log('SW registration failed: ', registrationError);\n\t \t});\n\t });\n\t \t}\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsJE,QAAI,OAAOA,IAAG,IAAC,KAAK;AAEpB,UAAM,OAAOA,IAAG,IAAC,IAAI;AAItB,UAAM,QAAQC,UAAAA,SAAU;AAGxB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACrC;AACD,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAc;AAAA,IAC7C;AAED,UAAM,eAAeF,IAAG,IAAC,CAAC;AAC1B,QAAI,aAAa;AACjB,UAAM,SAASA,IAAG,IAAC,IAA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,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<header \n\t\t\tv-if=\"!MOBILE_APP && route.meta.header.component\"\n\t\t\tid=\"header\" \n\t\t\tclass=\"\n\t\t\t\tpd-thin \n\t\t\t\tgap-micro\n\t\t\t\tflex-justify-between\n\t\t\t\tflex-nowrap\n\t\t\t\tflex\n\t\t\t\th-4r\n\t\t\t\tw-100\n\t\t\t\tz-index-2 \n\t\t\t\tpos-relative pos-t-0\n\t\t\t\"\n\t\t\t:class=\"{\n\t \t\t't-black bg-white': headerTheme === 'light',\n\t \t\t't-white bg-black': headerTheme === 'dark' \n\t \t}\"\n\t\t>\n <component\n ref=\"header\" \n :is=\"route.meta.header.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.header.logotype\"\n :location=\"route.meta.header.location\"\n >\n <component\n v-if=\"route.meta.navigation\"\n :is=\"route.meta.navigation\"\n class=\"mn-l-auto desktop-only\"\n />\n </component>\n\t </header>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.header.logotype\"\n\t\t />\n\t\t</transition>\n\n\t <Popup \n\t \tv-if=\"route.meta.header.location\"\n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-y-scroll o-x-hidden\"\n\t\t>\n\t\t\t<ShopCart />\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n\n\t\t\t<router-view \n\t\t\t\tname=\"defaultBottom\"\n\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t>\n\t\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t\t</router-view>\n\n\t\t\t<component\n\t\t \tv-if=\"route.meta.radio?.page\"\n :is=\"route.meta.radio.page\"\n />\n \n\t\t</section>\n\n\t\t<component\n\t \tv-if=\"route.meta.radio?.player\"\n :is=\"route.meta.radio.player\"\n />\n\n <BottomNavigationBar \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('serviceWorker' in navigator) {\n\t \twindow.addEventListener('load', () => {\n\t \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t \tconsole.log('SW registered: ', registration);\n\t \t}).catch(registrationError => {\n\t \tconsole.log('SW registration failed: ', registrationError);\n\t \t});\n\t });\n\t \t}\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n > section,div { transform: translateZ(-30px); transition: all 0.5s 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KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ import { useRoute } from "vue-router";
3
3
  import { state } from "../../store/globals.js";
4
4
  import _sfc_main$5 from "../../../../../components/Status/Status.vue.js";
5
5
  import _sfc_main$2 from "../../../../../components/Popup/Popup.vue.js";
6
- import Loader from "../../../../../components/Loader/Loader.vue.js";
6
+ import Loader from "../../../../../components/Loader/Loader.vue2.js";
7
7
  import _sfc_main$6 from "../partials/BottomNavigationBar.vue.js";
8
8
  import _sfc_main$1 from "../partials/NavigationBar.vue.js";
9
9
  import _sfc_main$3 from "../partials/LocationSelection.vue.js";
@@ -27,7 +27,6 @@ const _sfc_main = {
27
27
  document.getElementById("app").scrollIntoView();
28
28
  }
29
29
  const scrollOffset = ref(0);
30
- let isScrolled = false;
31
30
  const header = ref(null);
32
31
  const headerTheme = computed(() => {
33
32
  if (scrollOffset.value > 50) {
@@ -38,23 +37,6 @@ const _sfc_main = {
38
37
  });
39
38
  const handleScroll = () => {
40
39
  scrollOffset.value = event.target.scrollTop;
41
- if (scrollOffset.value > 50 && !isScrolled) {
42
- isScrolled = true;
43
- const firstRect = header.value.$el.getBoundingClientRect();
44
- const invert = -firstRect.top;
45
- header.value.$el.style.transform = `translateY(${invert}px)`;
46
- setTimeout(() => {
47
- header.value.$el.style.transform = "translateY(0)";
48
- }, 0);
49
- } else if (scrollOffset.value <= 75 && isScrolled) {
50
- isScrolled = false;
51
- const firstRect = header.value.$el.getBoundingClientRect();
52
- const invert = firstRect.top;
53
- header.value.$el.style.transform = `translateY(${invert}px)`;
54
- setTimeout(() => {
55
- header.value.$el.style.transform = "translateY(0)";
56
- }, 0);
57
- }
58
40
  };
59
41
  onMounted(async () => {
60
42
  if ("serviceWorker" in navigator) {
@@ -1 +1 @@
1
- {"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<header \n\t\t\tv-if=\"!MOBILE_APP && route.meta.header.component\"\n\t\t\tid=\"header\" \n\t\t\tclass=\"\n\t\t\t\tpd-thin \n\t\t\t\tgap-micro\n\t\t\t\tflex-justify-between\n\t\t\t\tflex-nowrap\n\t\t\t\tflex\n\t\t\t\th-4r\n\t\t\t\tw-100\n\t\t\t\tz-index-2 \n\t\t\t\tpos-relative pos-t-0\n\t\t\t\"\n\t\t\t:class=\"{\n\t \t\t't-black bg-white': headerTheme === 'light',\n\t \t\t't-white bg-black': headerTheme === 'dark' \n\t \t}\"\n\t\t>\n <component\n ref=\"header\" \n :is=\"route.meta.header.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.header.logotype\"\n :location=\"route.meta.header.location\"\n >\n <component\n v-if=\"route.meta.navigation\"\n :is=\"route.meta.navigation\"\n class=\"mn-l-auto desktop-only\"\n />\n </component>\n\t </header>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.header.logotype\"\n\t\t />\n\t\t</transition>\n\n\t <Popup \n\t \tv-if=\"route.meta.header.location\"\n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-y-scroll o-x-hidden\"\n\t\t>\n\t\t\t<ShopCart />\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n\n\t\t\t<router-view \n\t\t\t\tname=\"defaultBottom\"\n\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t>\n\t\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t\t</router-view>\n\n\t\t\t<component\n\t\t \tv-if=\"route.meta.radio?.page\"\n :is=\"route.meta.radio.page\"\n />\n \n\t\t</section>\n\n\t\t<component\n\t \tv-if=\"route.meta.radio?.player\"\n :is=\"route.meta.radio.player\"\n />\n\n <BottomNavigationBar \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\n\t if (scrollOffset.value > 50 && !isScrolled) {\n\t isScrolled = true;\n\n\t // header.value.$el.classList.add('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = -firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t // headerTheme.value - light\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t } else if (scrollOffset.value <= 75 && isScrolled) {\n\t isScrolled = false;\n\t // header.value.$el.classList.remove('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t }\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('serviceWorker' in navigator) {\n\t \twindow.addEventListener('load', () => {\n\t \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t \tconsole.log('SW registered: ', registration);\n\t \t}).catch(registrationError => {\n\t \tconsole.log('SW registration failed: ', registrationError);\n\t \t});\n\t });\n\t \t}\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;AAsJE,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAItB,UAAM,QAAQ,SAAU;AAGxB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACrC;AACD,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAc;AAAA,IAC7C;AAED,UAAM,eAAe,IAAI,CAAC;AAC1B,QAAI,aAAa;AACjB,UAAM,SAAS,IAAI,IAAI;AAEvB,UAAM,cAAc,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO;AAAA,MACV,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MAClC;AAAA,IACH,CAAE;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAElC,UAAI,aAAa,QAAQ,MAAM,CAAC,YAAY;AAC1C,qBAAa;AAIb,cAAM,YAAY,OAAO,MAAM,IAAI,sBAAqB;AACxD,cAAM,SAAS,CAAC,UAAU;AAE1B,eAAO,MAAM,IAAI,MAAM,YAAY,cAAc,MAAM;AAIvD,mBAAW,MAAM;AACf,iBAAO,MAAM,IAAI,MAAM,YAAY;AAAA,QACpC,GAAE,CAAC;AAAA,MACL,WAAU,aAAa,SAAS,MAAM,YAAY;AACjD,qBAAa;AAGb,cAAM,YAAY,OAAO,MAAM,IAAI,sBAAqB;AACxD,cAAM,SAAS,UAAU;AAEzB,eAAO,MAAM,IAAI,MAAM,YAAY,cAAc,MAAM;AAEvD,mBAAW,MAAM;AACf,iBAAO,MAAM,IAAI,MAAM,YAAY;AAAA,QACpC,GAAE,CAAC;AAAA,MACL;AAAA,IACJ;AAEC,cAAU,YAAY;AAErB,UAAI,mBAAmB,WAAW;AAC/B,eAAO,iBAAiB,QAAQ,MAAM;AACpC,oBAAU,cAAc,SAAS,oBAAoB,EAAE,KAAK,kBAAgB;AAC1E,oBAAQ,IAAI,mBAAmB,YAAY;AAAA,UACpD,CAAQ,EAAE,MAAM,uBAAqB;AAC5B,oBAAQ,IAAI,4BAA4B,iBAAiB;AAAA,UAClE,CAAQ;AAAA,QACR,CAAK;AAAA,MACD;AAEF,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACpC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<header \n\t\t\tv-if=\"!MOBILE_APP && route.meta.header.component\"\n\t\t\tid=\"header\" \n\t\t\tclass=\"\n\t\t\t\tpd-thin \n\t\t\t\tgap-micro\n\t\t\t\tflex-justify-between\n\t\t\t\tflex-nowrap\n\t\t\t\tflex\n\t\t\t\th-4r\n\t\t\t\tw-100\n\t\t\t\tz-index-2 \n\t\t\t\tpos-relative pos-t-0\n\t\t\t\"\n\t\t\t:class=\"{\n\t \t\t't-black bg-white': headerTheme === 'light',\n\t \t\t't-white bg-black': headerTheme === 'dark' \n\t \t}\"\n\t\t>\n <component\n ref=\"header\" \n :is=\"route.meta.header.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.header.logotype\"\n :location=\"route.meta.header.location\"\n >\n <component\n v-if=\"route.meta.navigation\"\n :is=\"route.meta.navigation\"\n class=\"mn-l-auto desktop-only\"\n />\n </component>\n\t </header>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.header.logotype\"\n\t\t />\n\t\t</transition>\n\n\t <Popup \n\t \tv-if=\"route.meta.header.location\"\n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-y-scroll o-x-hidden\"\n\t\t>\n\t\t\t<ShopCart />\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n\n\t\t\t<router-view \n\t\t\t\tname=\"defaultBottom\"\n\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t>\n\t\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t\t</router-view>\n\n\t\t\t<component\n\t\t \tv-if=\"route.meta.radio?.page\"\n :is=\"route.meta.radio.page\"\n />\n \n\t\t</section>\n\n\t\t<component\n\t \tv-if=\"route.meta.radio?.player\"\n :is=\"route.meta.radio.player\"\n />\n\n <BottomNavigationBar \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('serviceWorker' in navigator) {\n\t \twindow.addEventListener('load', () => {\n\t \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t \tconsole.log('SW registered: ', registration);\n\t \t}).catch(registrationError => {\n\t \tconsole.log('SW registration failed: ', registrationError);\n\t \t});\n\t });\n\t \t}\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(-30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;AAqJE,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAItB,UAAM,QAAQ,SAAU;AAGxB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACrC;AACD,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAc;AAAA,IAC7C;AAED,UAAM,eAAe,IAAI,CAAC;AAE1B,UAAM,SAAS,IAAI,IAAI;AAEvB,UAAM,cAAc,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO;AAAA,MACV,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MAClC;AAAA,IACH,CAAE;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACrC;AAEC,cAAU,YAAY;AAErB,UAAI,mBAAmB,WAAW;AAC/B,eAAO,iBAAiB,QAAQ,MAAM;AACpC,oBAAU,cAAc,SAAS,oBAAoB,EAAE,KAAK,kBAAgB;AAC1E,oBAAQ,IAAI,mBAAmB,YAAY;AAAA,UACpD,CAAQ,EAAE,MAAM,uBAAqB;AAC5B,oBAAQ,IAAI,4BAA4B,iBAAiB;AAAA,UAClE,CAAQ;AAAA,QACR,CAAK;AAAA,MACD;AAEF,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACpC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Address = require("../../../../../components/Address/Address.vue2.cjs");
5
- const LocationMarker = require("../../../../../components/LocationMarker/LocationMarker.vue2.cjs");
4
+ const Address = require("../../../../../components/Address/Address.vue.cjs");
5
+ const LocationMarker = require("../../../../../components/LocationMarker/LocationMarker.vue.cjs");
6
6
  const vueRouter = require("vue-router");
7
7
  const vueI18n = require("vue-i18n");
8
8
  const globals = require("../../store/globals.cjs");
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createBlock } from "vue";
2
- import _sfc_main$1 from "../../../../../components/Address/Address.vue2.js";
3
- import _sfc_main$2 from "../../../../../components/LocationMarker/LocationMarker.vue2.js";
2
+ import _sfc_main$1 from "../../../../../components/Address/Address.vue.js";
3
+ import _sfc_main$2 from "../../../../../components/LocationMarker/LocationMarker.vue.js";
4
4
  import { useRoute, useRouter } from "vue-router";
5
5
  import { useI18n } from "vue-i18n";
6
6
  import { state } from "../../store/globals.js";
@@ -15,7 +15,7 @@ const state = vue.reactive({
15
15
  status: "",
16
16
  headers: "",
17
17
  data: "",
18
- show: "",
18
+ show: false,
19
19
  name: "",
20
20
  message: ""
21
21
  }
@@ -143,11 +143,12 @@ const actions = {
143
143
  };
144
144
  function setError(error) {
145
145
  var _a;
146
+ state.error.show = true;
146
147
  let errorData;
147
148
  errorData = error;
148
149
  if ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) errorData = error.response.data;
149
150
  if (error && errorData.errorCode) {
150
- state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);
151
+ state.error.message = errorData.errorCode;
151
152
  } else {
152
153
  state.error.message = errorData.message || "Unknown error";
153
154
  }
@@ -1 +1 @@
1
- {"version":3,"file":"globals.cjs","sources":["../../../../../../../src/modules/globals/views/store/globals.js"],"sourcesContent":["// Vue modules\nimport { reactive, computed } from \"vue\";\nimport { Preferences } from '@capacitor/preferences';\n\n// import i18n from \"@/localization\";\n\n// State\nconst state = reactive({\n loading: false,\n\n isOpenLocationPopup: false,\n isOpenSidebar: false,\n\n position: null,\n search: null,\n\n theme: {\n darkmode: false\n },\n\n error: {\n status: \"\",\n headers: \"\",\n data: \"\",\n show: \"\",\n name: \"\",\n message: \"\"\n }\n});\n\n// Actions\nconst actions = {\n setLoading(status) {\n state.loading = status\n },\n\n // Black/White Theme\n async setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n \n state.theme.darkmode = isDarkMode;\n await Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Восстанавливаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n state.theme.darkmode = isDarkMode;\n \n Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Возвращаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n toggleTheme() {\n this.setTheme(!state.theme.darkmode);\n },\n\n add(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n\n if (existingItemIndex === -1) {\n array.push(item);\n } else {\n array[existingItemIndex] = item\n }\n },\n\n update(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n if (existingItemIndex === -1) {\n // If the item doesn't exist, push it to the array\n array.push(item);\n } else {\n // Update the item in the array without creating a new array\n Object.assign(array[existingItemIndex], item);\n }\n },\n\n delete(array, item) {\n const existingItemIndex = array.findIndex(c => c._id === item._id);\n\n if (existingItemIndex !== -1) {\n array.splice(existingItemIndex, 1);\n }\n }, \n\n increment(array, item) {\n console.log(array)\n console.log(item)\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n if (arrayItem) {\n arrayItem.quantity++;\n }\n },\n\n decrement(array, item) {\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n const arrayItemIndex = array.indexOf(arrayItem);\n \n if (arrayItemIndex > -1) {\n arrayItem.quantity--;\n \n if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);\n }\n },\n\n reset(array) {\n array = [];\n },\n}\n\nconst errorMessages = {\n ru: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Такой пользователь уже зарегистрирован!\",\n \"USER_NOT_REGISTERED_YET\": \"Такой пользователь еще не зарегистрирован!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"Пользователь с таким телефоном или паролем не найден!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"Вы ввели неверный пароль!\",\n \"INVALID_INVITATION_CODE\": \"Неверный код приглашения\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Отсутствуют необходимые параметры.\",\n \"ERROR_UPDATING_USER\": \"Произошла ошибка при обновлении пользователя.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.\",\n \"CODE_NOT_SENT\": \"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.\",\n \"INPUT_ERROR\": \"Вставьте только четырехзначный код.\",\n \"WRONG_CODE\": \"Вы ввели неверный код. Попробуйте еще раз.\",\n \"POST_URL_ALREADY_IN_USE\": \"Ошибка! Публикация с этим URL уже используется!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Ошибка: Название не может быть пустым. Пожалуйста, введите название.\"\n }\n },\n en: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Such user is already registered!\",\n \"USER_NOT_REGISTERED_YET\": \"This user has not been registered yet!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"User with such phone or password not found!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"You entered an incorrect password!\",\n \"INVALID_INVITATION_CODE\": \"Incorrect invitation code.\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Missing required parameters.\",\n \"ERROR_UPDATING_USER\": \"Something wrong when updating user.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"The passwords you entered do not match. Please correct the errors and try again.\",\n \"CODE_NOT_SENT\": \"Something went wrong and the code was not sent. Please try again.\",\n \"INPUT_ERROR\": \"Please enter only a four-digit code.\",\n \"WRONG_CODE\": \"You entered an incorrect code. Please try again.\",\n \"POST_URL_ALREADY_IN_USE\": \"Failed! Blogpost with this URL is already in use!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Error: Name cannot be empty. Please enter a name.\"\n }\n }\n};\n\n// i18n.global.mergeLocaleMessage('ru', errorMessages.ru);\n// i18n.global.mergeLocaleMessage('en', errorMessages.en);\n\n// Mutations\nfunction setError(error) {\n let errorData \n\n errorData = error\n\n if (error?.response?.data) errorData = error.response.data\n\n if (error && errorData.errorCode) {\n state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);\n } else {\n state.error.message = errorData.message || \"Unknown error\";\n }\n\n state.error.show = true;\n\n setTimeout(() => state.error.show = false, 3000);\n}\n\nfunction invertColors(variableNames, originalColors) {\n variableNames.forEach(variableName => {\n const baseColor = originalColors[variableName];\n const colorArray = baseColor.split(',').map(Number);\n\n let invertedColor;\n\n if (variableName === '--white') {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n } else if (variableName === '--black') {\n invertedColor = colorArray.map(value => 255 - value); \n } else if (variableName === '--grey') {\n invertedColor = colorArray.map(value => 255 - value * 2);\n } else {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n }\n // Устанавливаем новые значения переменных CSS\n document.documentElement.style.setProperty(variableName, state.theme.darkmode ? invertedColor.join(', ') : baseColor );\n });\n}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gBAAgB;AACnD,gBAAc,QAAQ,kBAAgB;AACpC,UAAM,YAAY,eAAe,YAAY;AAC7C,UAAM,aAAa,UAAU,MAAM,GAAG,EAAE,IAAI,MAAM;AAElD,QAAI;AAEJ,QAAI,iBAAiB,WAAW;AAC9B,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IACjE,WAAe,iBAAiB,WAAW;AACrC,sBAAgB,WAAW,IAAI,WAAS,MAAM,KAAK;AAAA,IACzD,WAAe,iBAAiB,UAAU;AACpC,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,CAAC;AAAA,IAC7D,OAAW;AACL,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IAC5D;AAED,aAAS,gBAAgB,MAAM,YAAY,cAAc,MAAM,MAAM,WAAW,cAAc,KAAK,IAAI,IAAI,SAAS;AAAA,EACxH,CAAG;AACH;;;;"}
1
+ {"version":3,"file":"globals.cjs","sources":["../../../../../../../src/modules/globals/views/store/globals.js"],"sourcesContent":["// Vue modules\nimport { reactive, computed } from \"vue\";\nimport { Preferences } from '@capacitor/preferences';\n\n// import i18n from \"@/localization\";\n\n// State\nconst state = reactive({\n loading: false,\n\n isOpenLocationPopup: false,\n isOpenSidebar: false,\n\n position: null,\n search: null,\n\n theme: {\n darkmode: false\n },\n\n error: {\n status: \"\",\n headers: \"\",\n data: \"\",\n show: false,\n name: \"\",\n message: \"\"\n }\n});\n\n// Actions\nconst actions = {\n setLoading(status) {\n state.loading = status\n },\n\n // Black/White Theme\n async setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n \n state.theme.darkmode = isDarkMode;\n await Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Восстанавливаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n state.theme.darkmode = isDarkMode;\n \n Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Возвращаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n toggleTheme() {\n this.setTheme(!state.theme.darkmode);\n },\n\n add(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n\n if (existingItemIndex === -1) {\n array.push(item);\n } else {\n array[existingItemIndex] = item\n }\n },\n\n update(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n if (existingItemIndex === -1) {\n // If the item doesn't exist, push it to the array\n array.push(item);\n } else {\n // Update the item in the array without creating a new array\n Object.assign(array[existingItemIndex], item);\n }\n },\n\n delete(array, item) {\n const existingItemIndex = array.findIndex(c => c._id === item._id);\n\n if (existingItemIndex !== -1) {\n array.splice(existingItemIndex, 1);\n }\n }, \n\n increment(array, item) {\n console.log(array)\n console.log(item)\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n if (arrayItem) {\n arrayItem.quantity++;\n }\n },\n\n decrement(array, item) {\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n const arrayItemIndex = array.indexOf(arrayItem);\n \n if (arrayItemIndex > -1) {\n arrayItem.quantity--;\n \n if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);\n }\n },\n\n reset(array) {\n array = [];\n },\n}\n\nconst errorMessages = {\n ru: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Такой пользователь уже зарегистрирован!\",\n \"USER_NOT_REGISTERED_YET\": \"Такой пользователь еще не зарегистрирован!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"Пользователь с таким телефоном или паролем не найден!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"Вы ввели неверный пароль!\",\n \"INVALID_INVITATION_CODE\": \"Неверный код приглашения\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Отсутствуют необходимые параметры.\",\n \"ERROR_UPDATING_USER\": \"Произошла ошибка при обновлении пользователя.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.\",\n \"CODE_NOT_SENT\": \"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.\",\n \"INPUT_ERROR\": \"Вставьте только четырехзначный код.\",\n \"WRONG_CODE\": \"Вы ввели неверный код. Попробуйте еще раз.\",\n \"POST_URL_ALREADY_IN_USE\": \"Ошибка! Публикация с этим URL уже используется!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Ошибка: Название не может быть пустым. Пожалуйста, введите название.\"\n }\n },\n en: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Such user is already registered!\",\n \"USER_NOT_REGISTERED_YET\": \"This user has not been registered yet!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"User with such phone or password not found!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"You entered an incorrect password!\",\n \"INVALID_INVITATION_CODE\": \"Incorrect invitation code.\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Missing required parameters.\",\n \"ERROR_UPDATING_USER\": \"Something wrong when updating user.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"The passwords you entered do not match. Please correct the errors and try again.\",\n \"CODE_NOT_SENT\": \"Something went wrong and the code was not sent. Please try again.\",\n \"INPUT_ERROR\": \"Please enter only a four-digit code.\",\n \"WRONG_CODE\": \"You entered an incorrect code. Please try again.\",\n \"POST_URL_ALREADY_IN_USE\": \"Failed! Blogpost with this URL is already in use!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Error: Name cannot be empty. Please enter a name.\"\n }\n }\n};\n\n// i18n.global.mergeLocaleMessage('ru', errorMessages.ru);\n// i18n.global.mergeLocaleMessage('en', errorMessages.en);\n\n// Mutations\nfunction setError(error) {\n state.error.show = true\n let errorData \n\n errorData = error\n\n if (error?.response?.data) errorData = error.response.data\n\n if (error && errorData.errorCode) {\n // state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);\n state.error.message = errorData.errorCode;\n } else {\n state.error.message = errorData.message || \"Unknown error\";\n }\n\n state.error.show = true;\n\n setTimeout(() => state.error.show = false, 3000);\n}\n\nfunction invertColors(variableNames, originalColors) {\n variableNames.forEach(variableName => {\n const baseColor = originalColors[variableName];\n const colorArray = baseColor.split(',').map(Number);\n\n let invertedColor;\n\n if (variableName === '--white') {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n } else if (variableName === '--black') {\n invertedColor = colorArray.map(value => 255 - value); \n } else if (variableName === '--grey') {\n invertedColor = colorArray.map(value => 255 - value * 2);\n } else {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n }\n // Устанавливаем новые значения переменных CSS\n document.documentElement.style.setProperty(variableName, state.theme.darkmode ? invertedColor.join(', ') : baseColor );\n });\n}\n\nexport {\n state,\n actions,\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AAgB;AACpC,UAAM,YAAY,eAAe,YAAY;AAC7C,UAAM,aAAa,UAAU,MAAM,GAAG,EAAE,IAAI,MAAM;AAElD,QAAI;AAEJ,QAAI,iBAAiB,WAAW;AAC9B,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IACjE,WAAe,iBAAiB,WAAW;AACrC,sBAAgB,WAAW,IAAI,WAAS,MAAM,KAAK;AAAA,IACzD,WAAe,iBAAiB,UAAU;AACpC,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,CAAC;AAAA,IAC7D,OAAW;AACL,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IAC5D;AAED,aAAS,gBAAgB,MAAM,YAAY,cAAc,MAAM,MAAM,WAAW,cAAc,KAAK,IAAI,IAAI,SAAS;AAAA,EACxH,CAAG;AACH;;;;"}
@@ -13,7 +13,7 @@ const state = reactive({
13
13
  status: "",
14
14
  headers: "",
15
15
  data: "",
16
- show: "",
16
+ show: false,
17
17
  name: "",
18
18
  message: ""
19
19
  }
@@ -141,11 +141,12 @@ const actions = {
141
141
  };
142
142
  function setError(error) {
143
143
  var _a;
144
+ state.error.show = true;
144
145
  let errorData;
145
146
  errorData = error;
146
147
  if ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) errorData = error.response.data;
147
148
  if (error && errorData.errorCode) {
148
- state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);
149
+ state.error.message = errorData.errorCode;
149
150
  } else {
150
151
  state.error.message = errorData.message || "Unknown error";
151
152
  }
@@ -1 +1 @@
1
- {"version":3,"file":"globals.js","sources":["../../../../../../../src/modules/globals/views/store/globals.js"],"sourcesContent":["// Vue modules\nimport { reactive, computed } from \"vue\";\nimport { Preferences } from '@capacitor/preferences';\n\n// import i18n from \"@/localization\";\n\n// State\nconst state = reactive({\n loading: false,\n\n isOpenLocationPopup: false,\n isOpenSidebar: false,\n\n position: null,\n search: null,\n\n theme: {\n darkmode: false\n },\n\n error: {\n status: \"\",\n headers: \"\",\n data: \"\",\n show: \"\",\n name: \"\",\n message: \"\"\n }\n});\n\n// Actions\nconst actions = {\n setLoading(status) {\n state.loading = status\n },\n\n // Black/White Theme\n async setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n \n state.theme.darkmode = isDarkMode;\n await Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Восстанавливаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n state.theme.darkmode = isDarkMode;\n \n Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Возвращаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n toggleTheme() {\n this.setTheme(!state.theme.darkmode);\n },\n\n add(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n\n if (existingItemIndex === -1) {\n array.push(item);\n } else {\n array[existingItemIndex] = item\n }\n },\n\n update(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n if (existingItemIndex === -1) {\n // If the item doesn't exist, push it to the array\n array.push(item);\n } else {\n // Update the item in the array without creating a new array\n Object.assign(array[existingItemIndex], item);\n }\n },\n\n delete(array, item) {\n const existingItemIndex = array.findIndex(c => c._id === item._id);\n\n if (existingItemIndex !== -1) {\n array.splice(existingItemIndex, 1);\n }\n }, \n\n increment(array, item) {\n console.log(array)\n console.log(item)\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n if (arrayItem) {\n arrayItem.quantity++;\n }\n },\n\n decrement(array, item) {\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n const arrayItemIndex = array.indexOf(arrayItem);\n \n if (arrayItemIndex > -1) {\n arrayItem.quantity--;\n \n if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);\n }\n },\n\n reset(array) {\n array = [];\n },\n}\n\nconst errorMessages = {\n ru: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Такой пользователь уже зарегистрирован!\",\n \"USER_NOT_REGISTERED_YET\": \"Такой пользователь еще не зарегистрирован!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"Пользователь с таким телефоном или паролем не найден!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"Вы ввели неверный пароль!\",\n \"INVALID_INVITATION_CODE\": \"Неверный код приглашения\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Отсутствуют необходимые параметры.\",\n \"ERROR_UPDATING_USER\": \"Произошла ошибка при обновлении пользователя.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.\",\n \"CODE_NOT_SENT\": \"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.\",\n \"INPUT_ERROR\": \"Вставьте только четырехзначный код.\",\n \"WRONG_CODE\": \"Вы ввели неверный код. Попробуйте еще раз.\",\n \"POST_URL_ALREADY_IN_USE\": \"Ошибка! Публикация с этим URL уже используется!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Ошибка: Название не может быть пустым. Пожалуйста, введите название.\"\n }\n },\n en: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Such user is already registered!\",\n \"USER_NOT_REGISTERED_YET\": \"This user has not been registered yet!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"User with such phone or password not found!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"You entered an incorrect password!\",\n \"INVALID_INVITATION_CODE\": \"Incorrect invitation code.\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Missing required parameters.\",\n \"ERROR_UPDATING_USER\": \"Something wrong when updating user.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"The passwords you entered do not match. Please correct the errors and try again.\",\n \"CODE_NOT_SENT\": \"Something went wrong and the code was not sent. Please try again.\",\n \"INPUT_ERROR\": \"Please enter only a four-digit code.\",\n \"WRONG_CODE\": \"You entered an incorrect code. Please try again.\",\n \"POST_URL_ALREADY_IN_USE\": \"Failed! Blogpost with this URL is already in use!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Error: Name cannot be empty. Please enter a name.\"\n }\n }\n};\n\n// i18n.global.mergeLocaleMessage('ru', errorMessages.ru);\n// i18n.global.mergeLocaleMessage('en', errorMessages.en);\n\n// Mutations\nfunction setError(error) {\n let errorData \n\n errorData = error\n\n if (error?.response?.data) errorData = error.response.data\n\n if (error && errorData.errorCode) {\n state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);\n } else {\n state.error.message = errorData.message || \"Unknown error\";\n }\n\n state.error.show = true;\n\n setTimeout(() => state.error.show = false, 3000);\n}\n\nfunction invertColors(variableNames, originalColors) {\n variableNames.forEach(variableName => {\n const baseColor = originalColors[variableName];\n const colorArray = baseColor.split(',').map(Number);\n\n let invertedColor;\n\n if (variableName === '--white') {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n } else if (variableName === '--black') {\n invertedColor = colorArray.map(value => 255 - value); \n } else if (variableName === '--grey') {\n invertedColor = colorArray.map(value => 255 - value * 2);\n } else {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n }\n // Устанавливаем новые значения переменных CSS\n document.documentElement.style.setProperty(variableName, state.theme.darkmode ? invertedColor.join(', ') : baseColor );\n });\n}\n\nexport {\n state,\n actions,\n setError,\n}"],"names":[],"mappings":";;AAOK,MAAC,QAAQ,SAAS;AAAA,EACrB,SAAS;AAAA,EAET,qBAAqB;AAAA,EACrB,eAAe;AAAA,EAEf,UAAU;AAAA,EACV,QAAQ;AAAA,EAER,OAAO;AAAA,IACL,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AACH,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,WAAW,QAAQ;AACjB,UAAM,UAAU;AAAA,EACjB;AAAA;AAAA,EAGD,MAAM,SAAS,YAAY;AACzB,QAAI,OAAO,SAAS,cAAc,OAAO;AAEzC,UAAM,MAAM,WAAW;AACvB,UAAM,YAAY,IAAI;AAAA,MACpB,KAAK;AAAA,MACL,OAAO,KAAK,UAAU,MAAM,MAAM,QAAQ;AAAA,IAChD,CAAK;AAED,QAAI,YAAY;AACd,WAAK,UAAU,IAAI,YAAY;AAAA,IACrC,OAAW;AACL,WAAK,UAAU,OAAO,YAAY;AAAA,IACnC;AAED,UAAM,gBAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACN;AAGI,QAAI,CAAC,MAAM,MAAM,gBAAgB;AAE/B,YAAM,MAAM,iBAAi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AAI,oCAAO,aAAP,mBAAiB,KAAM,aAAY,MAAM,SAAS;AAEtD,MAAI,SAAS,UAAU,WAAW;AAChC,UAAM,MAAM,UAAU,KAAK,OAAO,EAAE,UAAU,UAAU,SAAS,EAAE;AAAA,EACvE,OAAS;AACL,UAAM,MAAM,UAAU,UAAU,WAAW;AAAA,EAC5C;AAED,QAAM,MAAM,OAAO;AAEnB,aAAW,MAAM,MAAM,MAAM,OAAO,OAAO,GAAI;AACjD;AAEA,SAAS,aAAa,eAAe,gBAAgB;AACnD,gBAAc,QAAQ,kBAAgB;AACpC,UAAM,YAAY,eAAe,YAAY;AAC7C,UAAM,aAAa,UAAU,MAAM,GAAG,EAAE,IAAI,MAAM;AAElD,QAAI;AAEJ,QAAI,iBAAiB,WAAW;AAC9B,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IACjE,WAAe,iBAAiB,WAAW;AACrC,sBAAgB,WAAW,IAAI,WAAS,MAAM,KAAK;AAAA,IACzD,WAAe,iBAAiB,UAAU;AACpC,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,CAAC;AAAA,IAC7D,OAAW;AACL,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IAC5D;AAED,aAAS,gBAAgB,MAAM,YAAY,cAAc,MAAM,MAAM,WAAW,cAAc,KAAK,IAAI,IAAI,SAAS;AAAA,EACxH,CAAG;AACH;"}
1
+ {"version":3,"file":"globals.js","sources":["../../../../../../../src/modules/globals/views/store/globals.js"],"sourcesContent":["// Vue modules\nimport { reactive, computed } from \"vue\";\nimport { Preferences } from '@capacitor/preferences';\n\n// import i18n from \"@/localization\";\n\n// State\nconst state = reactive({\n loading: false,\n\n isOpenLocationPopup: false,\n isOpenSidebar: false,\n\n position: null,\n search: null,\n\n theme: {\n darkmode: false\n },\n\n error: {\n status: \"\",\n headers: \"\",\n data: \"\",\n show: false,\n name: \"\",\n message: \"\"\n }\n});\n\n// Actions\nconst actions = {\n setLoading(status) {\n state.loading = status\n },\n\n // Black/White Theme\n async setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n \n state.theme.darkmode = isDarkMode;\n await Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Восстанавливаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n state.theme.darkmode = isDarkMode;\n \n Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Возвращаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n toggleTheme() {\n this.setTheme(!state.theme.darkmode);\n },\n\n add(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n\n if (existingItemIndex === -1) {\n array.push(item);\n } else {\n array[existingItemIndex] = item\n }\n },\n\n update(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n if (existingItemIndex === -1) {\n // If the item doesn't exist, push it to the array\n array.push(item);\n } else {\n // Update the item in the array without creating a new array\n Object.assign(array[existingItemIndex], item);\n }\n },\n\n delete(array, item) {\n const existingItemIndex = array.findIndex(c => c._id === item._id);\n\n if (existingItemIndex !== -1) {\n array.splice(existingItemIndex, 1);\n }\n }, \n\n increment(array, item) {\n console.log(array)\n console.log(item)\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n if (arrayItem) {\n arrayItem.quantity++;\n }\n },\n\n decrement(array, item) {\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n const arrayItemIndex = array.indexOf(arrayItem);\n \n if (arrayItemIndex > -1) {\n arrayItem.quantity--;\n \n if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);\n }\n },\n\n reset(array) {\n array = [];\n },\n}\n\nconst errorMessages = {\n ru: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Такой пользователь уже зарегистрирован!\",\n \"USER_NOT_REGISTERED_YET\": \"Такой пользователь еще не зарегистрирован!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"Пользователь с таким телефоном или паролем не найден!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"Вы ввели неверный пароль!\",\n \"INVALID_INVITATION_CODE\": \"Неверный код приглашения\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Отсутствуют необходимые параметры.\",\n \"ERROR_UPDATING_USER\": \"Произошла ошибка при обновлении пользователя.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.\",\n \"CODE_NOT_SENT\": \"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.\",\n \"INPUT_ERROR\": \"Вставьте только четырехзначный код.\",\n \"WRONG_CODE\": \"Вы ввели неверный код. Попробуйте еще раз.\",\n \"POST_URL_ALREADY_IN_USE\": \"Ошибка! Публикация с этим URL уже используется!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Ошибка: Название не может быть пустым. Пожалуйста, введите название.\"\n }\n },\n en: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Such user is already registered!\",\n \"USER_NOT_REGISTERED_YET\": \"This user has not been registered yet!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"User with such phone or password not found!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"You entered an incorrect password!\",\n \"INVALID_INVITATION_CODE\": \"Incorrect invitation code.\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Missing required parameters.\",\n \"ERROR_UPDATING_USER\": \"Something wrong when updating user.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"The passwords you entered do not match. Please correct the errors and try again.\",\n \"CODE_NOT_SENT\": \"Something went wrong and the code was not sent. Please try again.\",\n \"INPUT_ERROR\": \"Please enter only a four-digit code.\",\n \"WRONG_CODE\": \"You entered an incorrect code. Please try again.\",\n \"POST_URL_ALREADY_IN_USE\": \"Failed! Blogpost with this URL is already in use!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Error: Name cannot be empty. Please enter a name.\"\n }\n }\n};\n\n// i18n.global.mergeLocaleMessage('ru', errorMessages.ru);\n// i18n.global.mergeLocaleMessage('en', errorMessages.en);\n\n// Mutations\nfunction setError(error) {\n state.error.show = true\n let errorData \n\n errorData = error\n\n if (error?.response?.data) errorData = error.response.data\n\n if (error && errorData.errorCode) {\n // state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);\n state.error.message = errorData.errorCode;\n } else {\n state.error.message = errorData.message || \"Unknown error\";\n }\n\n state.error.show = true;\n\n setTimeout(() => state.error.show = false, 3000);\n}\n\nfunction invertColors(variableNames, originalColors) {\n variableNames.forEach(variableName => {\n const baseColor = originalColors[variableName];\n const colorArray = baseColor.split(',').map(Number);\n\n let invertedColor;\n\n if (variableName === '--white') {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n } else if (variableName === '--black') {\n invertedColor = colorArray.map(value => 255 - value); \n } else if (variableName === '--grey') {\n invertedColor = colorArray.map(value => 255 - value * 2);\n } else {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n }\n // Устанавливаем новые значения переменных CSS\n document.documentElement.style.setProperty(variableName, state.theme.darkmode ? invertedColor.join(', ') : baseColor );\n });\n}\n\nexport {\n state,\n actions,\n setError,\n}"],"names":[],"mappings":";;AAOK,MAAC,QAAQ,SAAS;AAAA,EACrB,SAAS;AAAA,EAET,qBAAqB;AAAA,EACrB,eAAe;AAAA,EAEf,UAAU;AAAA,EACV,QAAQ;AAAA,EAER,OAAO;AAAA,IACL,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AACH,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,WAAW,QAAQ;AACjB,UAAM,UAAU;AAAA,EACjB;AAAA;AAAA,EAGD,MAAM,SAAS,YAAY;AACzB,QAAI,OAAO,SAAS,cAAc,OAAO;AAEzC,UAAM,MAAM,WAAW;AACvB,UAAM,YAAY,IAAI;AAAA,MACpB,KAAK;AAAA,MACL,OAAO,KAAK,UAAU,MAAM,MAAM,QAAQ;AAAA,IAChD,CAAK;AAED,QAAI,YAAY;AACd,WAAK,UAAU,IAAI,YAAY;AAAA,IACrC,OAAW;AACL,WAAK,UAAU,OAAO,YAAY;AAAA,IACnC;AAED,UAAM,gBAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACN;AAGI,QAAI,CAAC,MAAM,MAAM,gBAAgB;AAE/B,YAAM,MAAM,iBAAiB;AAC7B,oBAAc,QAAQ,kBAAgB;AACpC,cAAM,eAAe,iBAAiB,SAA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MAAM,SAAS;AAEtD,MAAI,SAAS,UAAU,WAAW;AAEhC,UAAM,MAAM,UAAU,UAAU;AAAA,EACpC,OAAS;AACL,UAAM,MAAM,UAAU,UAAU,WAAW;AAAA,EAC5C;AAED,QAAM,MAAM,OAAO;AAEnB,aAAW,MAAM,MAAM,MAAM,OAAO,OAAO,GAAI;AACjD;AAEA,SAAS,aAAa,eAAe,gBAAgB;AACnD,gBAAc,QAAQ,kBAAgB;AACpC,UAAM,YAAY,eAAe,YAAY;AAC7C,UAAM,aAAa,UAAU,MAAM,GAAG,EAAE,IAAI,MAAM;AAElD,QAAI;AAEJ,QAAI,iBAAiB,WAAW;AAC9B,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IACjE,WAAe,iBAAiB,WAAW;AACrC,sBAAgB,WAAW,IAAI,WAAS,MAAM,KAAK;AAAA,IACzD,WAAe,iBAAiB,UAAU;AACpC,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,CAAC;AAAA,IAC7D,OAAW;AACL,sBAAgB,WAAW,IAAI,WAAS,MAAM,QAAQ,KAAK;AAAA,IAC5D;AAED,aAAS,gBAAgB,MAAM,YAAY,cAAc,MAAM,MAAM,WAAW,cAAc,KAAK,IAAI,IAAI,SAAS;AAAA,EACxH,CAAG;AACH;"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const axios = require("axios");
4
+ const $axios = axios.create({
5
+ baseURL: process.env.API_URL,
6
+ withCredentials: true
7
+ });
8
+ function setAuthToken(token) {
9
+ if (token) {
10
+ $axios.defaults.headers.common["x-access-token"] = token;
11
+ } else {
12
+ delete $axios.defaults.headers.common["x-access-token"];
13
+ }
14
+ }
15
+ exports.default = $axios;
16
+ exports.setAuthToken = setAuthToken;
17
+ //# sourceMappingURL=axios-instance.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axios-instance.cjs","sources":["../../../../../../../src/modules/globals/views/utils/axios-instance.js"],"sourcesContent":["// axiosInstance.js\nimport axios from 'axios';\n// Создаем один экземпляр axios\nconst $axios = axios.create({\n baseURL: process.env.API_URL,\n withCredentials: true\n});\n\n// Функция для установки токена в заголовки\nexport function setAuthToken(token) {\n if (token) {\n $axios.defaults.headers.common['x-access-token'] = token; // Устанавливаем токен в заголовок\n } else {\n delete $axios.defaults.headers.common['x-access-token']; // Удаляем токен из заголовка\n }\n}\n\nexport default $axios;\n"],"names":[],"mappings":";;;AAGK,MAAC,SAAS,MAAM,OAAO;AAAA,EAC1B,SAAS,QAAQ,IAAI;AAAA,EACrB,iBAAiB;AACnB,CAAC;AAGM,SAAS,aAAa,OAAO;AAClC,MAAI,OAAO;AACT,WAAO,SAAS,QAAQ,OAAO,gBAAgB,IAAI;AAAA,EACvD,OAAS;AACL,WAAO,OAAO,SAAS,QAAQ,OAAO,gBAAgB;AAAA,EACvD;AACH;;;"}
@@ -0,0 +1,17 @@
1
+ import axios from "axios";
2
+ const $axios = axios.create({
3
+ baseURL: process.env.API_URL,
4
+ withCredentials: true
5
+ });
6
+ function setAuthToken(token) {
7
+ if (token) {
8
+ $axios.defaults.headers.common["x-access-token"] = token;
9
+ } else {
10
+ delete $axios.defaults.headers.common["x-access-token"];
11
+ }
12
+ }
13
+ export {
14
+ $axios as default,
15
+ setAuthToken
16
+ };
17
+ //# sourceMappingURL=axios-instance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axios-instance.js","sources":["../../../../../../../src/modules/globals/views/utils/axios-instance.js"],"sourcesContent":["// axiosInstance.js\nimport axios from 'axios';\n// Создаем один экземпляр axios\nconst $axios = axios.create({\n baseURL: process.env.API_URL,\n withCredentials: true\n});\n\n// Функция для установки токена в заголовки\nexport function setAuthToken(token) {\n if (token) {\n $axios.defaults.headers.common['x-access-token'] = token; // Устанавливаем токен в заголовок\n } else {\n delete $axios.defaults.headers.common['x-access-token']; // Удаляем токен из заголовка\n }\n}\n\nexport default $axios;\n"],"names":[],"mappings":";AAGK,MAAC,SAAS,MAAM,OAAO;AAAA,EAC1B,SAAS,QAAQ,IAAI;AAAA,EACrB,iBAAiB;AACnB,CAAC;AAGM,SAAS,aAAa,OAAO;AAClC,MAAI,OAAO;AACT,WAAO,SAAS,QAAQ,OAAO,gBAAgB,IAAI;AAAA,EACvD,OAAS;AACL,WAAO,OAAO,SAAS,QAAQ,OAAO,gBAAgB;AAAA,EACvD;AACH;"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const serverRenderer_esmBundler = require("../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs");
4
+ const index = require("../../../../../../node_modules/@unhead/ssr/dist/index.cjs");
5
+ const axiosInstance = require("./axios-instance.cjs");
6
+ function renderAndMountApp({ createApp }) {
7
+ const start = async () => {
8
+ const { app, router, store } = createApp();
9
+ let initialState;
10
+ try {
11
+ const initialStateElement = document.querySelector("[data-state]");
12
+ if (initialStateElement && initialStateElement.innerHTML.trim() !== "") {
13
+ initialState = JSON.parse(initialStateElement.innerHTML.trim());
14
+ }
15
+ } catch (error) {
16
+ console.error("Failed to parse user state", error);
17
+ }
18
+ if (initialState) {
19
+ store.setInitialState(initialState);
20
+ }
21
+ if (initialState && initialState.auth && initialState.auth.user) {
22
+ axiosInstance.setAuthToken(initialState.auth.user.accessToken);
23
+ }
24
+ await router.isReady();
25
+ app.mount("#app");
26
+ };
27
+ start();
28
+ }
29
+ async function render({ url, cookies, createApp }) {
30
+ var _a, _b, _c, _d;
31
+ const { app, router, store, meta } = createApp();
32
+ await router.push(url);
33
+ await router.isReady();
34
+ const sharedContext = {};
35
+ if (((_a = router.currentRoute.value.name) == null ? void 0 : _a.toLowerCase()) === "notfound") {
36
+ sharedContext.notFound = true;
37
+ }
38
+ let user = null;
39
+ if (cookies.user) {
40
+ user = JSON.parse(cookies.user);
41
+ }
42
+ if (user) {
43
+ await store.auth.actions.initialize(user);
44
+ }
45
+ const html = await serverRenderer_esmBundler.renderToString(app, sharedContext);
46
+ const payload = await index.renderSSRHead(meta, {});
47
+ const initialState = await store.getInitialState();
48
+ return {
49
+ html,
50
+ meta: payload,
51
+ state: initialState,
52
+ statusCode: ((_d = (_c = (_b = router.currentRoute) == null ? void 0 : _b.value) == null ? void 0 : _c.name) == null ? void 0 : _d.toLowerCase()) === "notfound" ? 404 : 200
53
+ };
54
+ }
55
+ exports.render = render;
56
+ exports.renderAndMountApp = renderAndMountApp;
57
+ //# sourceMappingURL=vue-app-renderer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue-app-renderer.cjs","sources":["../../../../../../../src/modules/globals/views/utils/vue-app-renderer.js"],"sourcesContent":["import { renderToString } from \"@vue/server-renderer\";\nimport { renderSSRHead } from '@unhead/ssr'\nimport { setAuthToken } from '@pf/src/modules/globals/views/utils/axios-instance.js';\n\nimport getBrowserLocale from \"@pf/src/modules/globals/views/localization/get-browser-locale.js\"\n\nexport function renderAndMountApp({ createApp }) {\n const start = async () => {\n const { app, router, store } = createApp();\n\n let initialState;\n\n try {\n const initialStateElement = document.querySelector(\"[data-state]\");\n\n if (initialStateElement && initialStateElement.innerHTML.trim() !== \"\") {\n initialState = JSON.parse(initialStateElement.innerHTML.trim());\n }\n } catch (error) {\n console.error(\"Failed to parse user state\", error);\n }\n \n if (initialState) {\n // Применяем начальное состояние ко всем модулям\n store.setInitialState(initialState);\n }\n\n if (initialState && initialState.auth && initialState.auth.user) {\n setAuthToken(initialState.auth.user.accessToken);\n }\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // If user browser locae supported then change locale\n // if (i18n.global.availableLocales.includes(browserLocale)) {\n // app.config.globalProperties.$i18n.locale = browserLocale;\n // }\n\n await router.isReady();\n app.mount(\"#app\");\n };\n start();\n}\n\nexport async function render({ url, cookies, createApp }) {\n const { app, router, store, meta } = createApp();\n\n await router.push(url);\n await router.isReady();\n\n \n // If user's language is supported, change the locale\n // if (language === 'en' || language === 'ru') {\n // app.config.globalProperties.$i18n.locale = language\n // }\n\n // console.log(router.currentRoute.value.params.locale)\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n \n const sharedContext = {};\n\n if (router.currentRoute.value.name?.toLowerCase() === 'notfound') {\n sharedContext.notFound = true;\n }\n \n let user = null;\n\n if (cookies.user) { \n user = JSON.parse(cookies.user)\n }\n \n let auth = null\n\n if (user) {\n await store.auth.actions.initialize(user)\n }\n\n const html = await renderToString(app, sharedContext);\n const payload = await renderSSRHead(meta, {})\n const initialState = await store.getInitialState();\n\n return { \n html, \n meta: payload, \n state: initialState, \n statusCode: router.currentRoute?.value?.name?.toLowerCase() === 'notfound' ? 404 : 200 \n };\n}"],"names":["setAuthToken","renderToString","renderSSRHead"],"mappings":";;;;;AAMO,SAAS,kBAAkB,EAAE,aAAa;AAC/C,QAAM,QAAQ,YAAY;AACxB,UAAM,EAAE,KAAK,QAAQ,MAAO,IAAG,UAAS;AAExC,QAAI;AAEJ,QAAI;AACF,YAAM,sBAAsB,SAAS,cAAc,cAAc;AAEjE,UAAI,uBAAuB,oBAAoB,UAAU,KAAI,MAAO,IAAI;AACtE,uBAAe,KAAK,MAAM,oBAAoB,UAAU,KAAI,CAAE;AAAA,MAC/D;AAAA,IACF,SAAQ,OAAO;AACd,cAAQ,MAAM,8BAA8B,KAAK;AAAA,IAClD;AAED,QAAI,cAAc;AAEhB,YAAM,gBAAgB,YAAY;AAAA,IACnC;AAED,QAAI,gBAAgB,aAAa,QAAQ,aAAa,KAAK,MAAM;AAC/DA,oBAAAA,aAAa,aAAa,KAAK,KAAK,WAAW;AAAA,IAChD;AAQD,UAAM,OAAO;AACb,QAAI,MAAM,MAAM;AAAA,EACpB;AACE;AACF;AAEO,eAAe,OAAO,EAAE,KAAK,SAAS,UAAS,GAAI;;AACxD,QAAM,EAAE,KAAK,QAAQ,OAAO,KAAI,IAAK;AAErC,QAAM,OAAO,KAAK,GAAG;AACrB,QAAM,OAAO;AAWb,QAAM,gBAAgB,CAAA;AAEtB,QAAI,YAAO,aAAa,MAAM,SAA1B,mBAAgC,mBAAkB,YAAY;AAChE,kBAAc,WAAW;AAAA,EAC1B;AAED,MAAI,OAAO;AAEX,MAAI,QAAQ,MAAM;AAChB,WAAO,KAAK,MAAM,QAAQ,IAAI;AAAA,EAC/B;AAID,MAAI,MAAM;AACR,UAAM,MAAM,KAAK,QAAQ,WAAW,IAAI;AAAA,EACzC;AAED,QAAM,OAAO,MAAMC,0BAAAA,eAAe,KAAK,aAAa;AACpD,QAAM,UAAU,MAAMC,oBAAc,MAAM,CAAA,CAAE;AAC5C,QAAM,eAAe,MAAM,MAAM;AAEjC,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAY,wBAAO,iBAAP,mBAAqB,UAArB,mBAA4B,SAA5B,mBAAkC,mBAAkB,aAAa,MAAM;AAAA,EACvF;AACA;;;"}
@@ -0,0 +1,57 @@
1
+ import { renderToString } from "../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js";
2
+ import { renderSSRHead } from "../../../../../../node_modules/@unhead/ssr/dist/index.js";
3
+ import { setAuthToken } from "./axios-instance.js";
4
+ function renderAndMountApp({ createApp }) {
5
+ const start = async () => {
6
+ const { app, router, store } = createApp();
7
+ let initialState;
8
+ try {
9
+ const initialStateElement = document.querySelector("[data-state]");
10
+ if (initialStateElement && initialStateElement.innerHTML.trim() !== "") {
11
+ initialState = JSON.parse(initialStateElement.innerHTML.trim());
12
+ }
13
+ } catch (error) {
14
+ console.error("Failed to parse user state", error);
15
+ }
16
+ if (initialState) {
17
+ store.setInitialState(initialState);
18
+ }
19
+ if (initialState && initialState.auth && initialState.auth.user) {
20
+ setAuthToken(initialState.auth.user.accessToken);
21
+ }
22
+ await router.isReady();
23
+ app.mount("#app");
24
+ };
25
+ start();
26
+ }
27
+ async function render({ url, cookies, createApp }) {
28
+ var _a, _b, _c, _d;
29
+ const { app, router, store, meta } = createApp();
30
+ await router.push(url);
31
+ await router.isReady();
32
+ const sharedContext = {};
33
+ if (((_a = router.currentRoute.value.name) == null ? void 0 : _a.toLowerCase()) === "notfound") {
34
+ sharedContext.notFound = true;
35
+ }
36
+ let user = null;
37
+ if (cookies.user) {
38
+ user = JSON.parse(cookies.user);
39
+ }
40
+ if (user) {
41
+ await store.auth.actions.initialize(user);
42
+ }
43
+ const html = await renderToString(app, sharedContext);
44
+ const payload = await renderSSRHead(meta, {});
45
+ const initialState = await store.getInitialState();
46
+ return {
47
+ html,
48
+ meta: payload,
49
+ state: initialState,
50
+ statusCode: ((_d = (_c = (_b = router.currentRoute) == null ? void 0 : _b.value) == null ? void 0 : _c.name) == null ? void 0 : _d.toLowerCase()) === "notfound" ? 404 : 200
51
+ };
52
+ }
53
+ export {
54
+ render,
55
+ renderAndMountApp
56
+ };
57
+ //# sourceMappingURL=vue-app-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue-app-renderer.js","sources":["../../../../../../../src/modules/globals/views/utils/vue-app-renderer.js"],"sourcesContent":["import { renderToString } from \"@vue/server-renderer\";\nimport { renderSSRHead } from '@unhead/ssr'\nimport { setAuthToken } from '@pf/src/modules/globals/views/utils/axios-instance.js';\n\nimport getBrowserLocale from \"@pf/src/modules/globals/views/localization/get-browser-locale.js\"\n\nexport function renderAndMountApp({ createApp }) {\n const start = async () => {\n const { app, router, store } = createApp();\n\n let initialState;\n\n try {\n const initialStateElement = document.querySelector(\"[data-state]\");\n\n if (initialStateElement && initialStateElement.innerHTML.trim() !== \"\") {\n initialState = JSON.parse(initialStateElement.innerHTML.trim());\n }\n } catch (error) {\n console.error(\"Failed to parse user state\", error);\n }\n \n if (initialState) {\n // Применяем начальное состояние ко всем модулям\n store.setInitialState(initialState);\n }\n\n if (initialState && initialState.auth && initialState.auth.user) {\n setAuthToken(initialState.auth.user.accessToken);\n }\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n // If user browser locae supported then change locale\n // if (i18n.global.availableLocales.includes(browserLocale)) {\n // app.config.globalProperties.$i18n.locale = browserLocale;\n // }\n\n await router.isReady();\n app.mount(\"#app\");\n };\n start();\n}\n\nexport async function render({ url, cookies, createApp }) {\n const { app, router, store, meta } = createApp();\n\n await router.push(url);\n await router.isReady();\n\n \n // If user's language is supported, change the locale\n // if (language === 'en' || language === 'ru') {\n // app.config.globalProperties.$i18n.locale = language\n // }\n\n // console.log(router.currentRoute.value.params.locale)\n // app.config.globalProperties.$i18n.locale = router.currentRoute.value.params.locale\n \n const sharedContext = {};\n\n if (router.currentRoute.value.name?.toLowerCase() === 'notfound') {\n sharedContext.notFound = true;\n }\n \n let user = null;\n\n if (cookies.user) { \n user = JSON.parse(cookies.user)\n }\n \n let auth = null\n\n if (user) {\n await store.auth.actions.initialize(user)\n }\n\n const html = await renderToString(app, sharedContext);\n const payload = await renderSSRHead(meta, {})\n const initialState = await store.getInitialState();\n\n return { \n html, \n meta: payload, \n state: initialState, \n statusCode: router.currentRoute?.value?.name?.toLowerCase() === 'notfound' ? 404 : 200 \n };\n}"],"names":[],"mappings":";;;AAMO,SAAS,kBAAkB,EAAE,aAAa;AAC/C,QAAM,QAAQ,YAAY;AACxB,UAAM,EAAE,KAAK,QAAQ,MAAO,IAAG,UAAS;AAExC,QAAI;AAEJ,QAAI;AACF,YAAM,sBAAsB,SAAS,cAAc,cAAc;AAEjE,UAAI,uBAAuB,oBAAoB,UAAU,KAAI,MAAO,IAAI;AACtE,uBAAe,KAAK,MAAM,oBAAoB,UAAU,KAAI,CAAE;AAAA,MAC/D;AAAA,IACF,SAAQ,OAAO;AACd,cAAQ,MAAM,8BAA8B,KAAK;AAAA,IAClD;AAED,QAAI,cAAc;AAEhB,YAAM,gBAAgB,YAAY;AAAA,IACnC;AAED,QAAI,gBAAgB,aAAa,QAAQ,aAAa,KAAK,MAAM;AAC/D,mBAAa,aAAa,KAAK,KAAK,WAAW;AAAA,IAChD;AAQD,UAAM,OAAO;AACb,QAAI,MAAM,MAAM;AAAA,EACpB;AACE;AACF;AAEO,eAAe,OAAO,EAAE,KAAK,SAAS,UAAS,GAAI;;AACxD,QAAM,EAAE,KAAK,QAAQ,OAAO,KAAI,IAAK;AAErC,QAAM,OAAO,KAAK,GAAG;AACrB,QAAM,OAAO;AAWb,QAAM,gBAAgB,CAAA;AAEtB,QAAI,YAAO,aAAa,MAAM,SAA1B,mBAAgC,mBAAkB,YAAY;AAChE,kBAAc,WAAW;AAAA,EAC1B;AAED,MAAI,OAAO;AAEX,MAAI,QAAQ,MAAM;AAChB,WAAO,KAAK,MAAM,QAAQ,IAAI;AAAA,EAC/B;AAID,MAAI,MAAM;AACR,UAAM,MAAM,KAAK,QAAQ,WAAW,IAAI;AAAA,EACzC;AAED,QAAM,OAAO,MAAM,eAAe,KAAK,aAAa;AACpD,QAAM,UAAU,MAAM,cAAc,MAAM,CAAA,CAAE;AAC5C,QAAM,eAAe,MAAM,MAAM;AAEjC,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAY,wBAAO,iBAAP,mBAAqB,UAArB,mBAA4B,SAA5B,mBAAkC,mBAAkB,aAAa,MAAM;AAAA,EACvF;AACA;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Spoiler = require("../../../../components/Spoiler/Spoiler.vue.cjs");
4
+ const Spoiler = require("../../../../components/Spoiler/Spoiler.vue2.cjs");
5
5
  const vueI18n = require("vue-i18n");
6
6
  const IconChevronBottom = require("../../../icons/navigation/IconChevronBottom.vue.cjs");
7
7
  const _hoisted_1 = { class: "bg-black t-white radius-big pd-big" };
@@ -1,5 +1,5 @@
1
1
  import { openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createCommentVNode, Fragment, renderList, createBlock, withCtx, createVNode, normalizeClass } from "vue";
2
- import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue.js";
2
+ import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue2.js";
3
3
  import { useI18n } from "vue-i18n";
4
4
  import IconChevronBottom from "../../../icons/navigation/IconChevronBottom.vue.js";
5
5
  const _hoisted_1 = { class: "bg-black t-white radius-big pd-big" };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- ;/* empty css */
5
- ;/* empty css */
4
+ ;/* empty css */
5
+ ;/* empty css */
6
6
  ;/* empty css */
7
7
  const Menu = require("../../../../components/Menu/Menu.vue.cjs");
8
8
  const MenuItem = require("../../../../components/Menu/MenuItem.vue.cjs");
@@ -1,6 +1,6 @@
1
1
  import { ref, openBlock, createElementBlock, createVNode, withCtx, unref, createStaticVNode, createElementVNode } from "vue";
2
- /* empty css */
3
- /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
4
  /* empty css */
5
5
  import _sfc_main$1 from "../../../../components/Menu/Menu.vue.js";
6
6
  import _sfc_main$2 from "../../../../components/Menu/MenuItem.vue.js";