@ozdao/martyrs 0.2.499 → 0.2.501

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
  2. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  3. package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
  4. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
  5. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
  6. package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
  7. package/dist/martyrs/src/components/Chips/{Chips.vue.cjs → Chips.vue2.cjs} +2 -2
  8. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -0
  9. package/dist/martyrs/src/components/Chips/{Chips.vue.js → Chips.vue2.js} +2 -2
  10. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -0
  11. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
  12. package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
  13. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
  14. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
  15. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -2
  16. package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
  17. package/dist/martyrs/src/components/Menu/{Menu.vue2.cjs → Menu.vue.cjs} +2 -2
  18. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +1 -0
  19. package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
  20. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
  21. package/dist/martyrs/src/components/Select/{Select.vue2.cjs → Select.vue.cjs} +2 -2
  22. package/dist/martyrs/src/components/Select/{Select.vue2.js.map → Select.vue.cjs.map} +1 -1
  23. package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
  24. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
  25. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs → Tooltip.vue2.cjs} +2 -2
  26. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +1 -0
  27. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.js → Tooltip.vue2.js} +2 -2
  28. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs.map → Tooltip.vue2.js.map} +1 -1
  29. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  30. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  31. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  32. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  33. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
  34. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
  35. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
  36. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  47. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  48. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  49. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  51. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
  52. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  53. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  55. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  56. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  57. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  59. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  61. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  63. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  64. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  65. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +3 -3
  66. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
  67. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
  68. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  69. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +2 -2
  70. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
  71. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +2 -2
  72. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
  73. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
  74. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
  75. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
  77. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  79. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  81. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  82. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  83. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
  85. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  87. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
  88. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  89. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
  90. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  91. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +2 -2
  92. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +1 -1
  93. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +3 -3
  94. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +3 -3
  95. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  97. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  99. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
  100. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  101. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  103. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +2 -2
  104. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  105. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +2 -2
  106. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
  107. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
  108. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  109. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  111. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +2 -2
  112. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
  113. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
  114. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
  115. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  117. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  119. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
  120. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
  121. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  122. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  123. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
  124. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
  125. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  127. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
  128. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  129. package/dist/martyrs/src/modules/music/music.client.cjs +1 -1
  130. package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -1
  131. package/dist/martyrs/src/modules/music/music.client.js +1 -1
  132. package/dist/martyrs/src/modules/music/music.client.js.map +1 -1
  133. package/dist/martyrs/src/modules/music/router/music.cjs +4 -4
  134. package/dist/martyrs/src/modules/music/router/music.js +4 -4
  135. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +3 -4
  136. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  137. package/dist/martyrs/src/modules/notifications/notifications.client.js +3 -4
  138. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  139. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
  140. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
  141. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +3 -3
  142. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +3 -3
  143. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  144. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  145. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  146. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  147. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  148. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  149. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  150. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  151. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -2
  152. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  153. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  154. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  155. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  156. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  157. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  159. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  160. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  161. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
  162. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
  163. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  164. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  165. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  166. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  167. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  168. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  169. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  170. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  171. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  172. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  173. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  174. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  175. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  176. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  177. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  178. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  179. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  180. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  181. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  182. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  183. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  184. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  185. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +2 -2
  186. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +2 -2
  187. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  188. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  189. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
  190. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  191. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  192. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  193. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  194. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  195. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  197. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
  198. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  199. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
  200. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  201. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  202. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  203. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
  204. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  205. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  206. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  207. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -2
  208. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
  209. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
  210. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  211. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  212. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  213. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  214. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  215. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  216. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  217. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  218. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  219. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  220. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  221. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
  222. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  223. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  224. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  225. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +5 -5
  226. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  227. package/dist/orders.server.cjs +7 -3
  228. package/dist/orders.server.js +7 -3
  229. package/package.json +1 -1
  230. package/src/modules/globals/views/classes/globals.websocket.js +2 -2
  231. package/src/modules/music/music.client.js +1 -1
  232. package/src/modules/notifications/notifications.client.js +0 -1
  233. package/src/modules/orders/controllers/orders.controller.js +7 -2
  234. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  235. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +0 -1
  236. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +0 -1
  237. package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
  238. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +0 -1
  239. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
  240. package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +0 -1
  241. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"music.client.cjs","sources":["../../../../../src/modules/music/music.client.js"],"sourcesContent":["// Store modules\nimport * as storeAlbums from './store/albums.js';\nimport * as storeArtists from './store/artists.js';\nimport * as storeGenres from './store/genres.js';\nimport * as storePlayer from './store/player.js';\nimport * as storePlaylists from './store/playlists.js';\nimport * as storeSearch from './store/search.js';\nimport * as storeTracks from './store/tracks.js';\n\n// Router\nimport routerMusic from './router/music.js';\n\n// Layouts\nimport MusicBottomPlayer from './components/layouts/MusicBottomPlayer.vue';\n\n// Pages\nimport Album from './components/pages/Album.vue';\nimport Artist from './components/pages/Artist.vue';\nimport MusicHome from './components/pages/MusicHome.vue';\nimport MusicLibrary from './components/pages/MusicLibrary.vue';\nimport TrackCreate from './components/pages/TrackCreate.vue';\nimport Playlist from './components/pages/Playlist.vue';\nimport SearchResults from './components/pages/SearchResults.vue';\nimport Track from './components/pages/Track.vue';\n\n// Components - Player\nimport MusicPlayer from './components/player/MusicPlayer.vue';\nimport TrackProgress from './components/player/TrackProgress.vue';\nimport VolumeControl from './components/player/VolumeControl.vue';\n\n// Components - Cards\nimport AlbumCard from './components/cards/AlbumCard.vue';\nimport ArtistCard from './components/cards/ArtistCard.vue';\nimport PlaylistCard from './components/cards/PlaylistCard.vue';\nimport TrackListCard from './components/cards/TrackListCard.vue';\n\n\n// Components - Forms\nimport ArtistForm from './components/forms/ArtistForm.vue';\nimport AlbumForm from './components/forms/AlbumForm.vue';\nimport PlaylistForm from './components/forms/PlaylistForm.vue';\nimport SearchForm from './components/forms/SearchForm.vue';\nimport TrackForm from './components/forms/TrackForm.vue';\n\n// WebSocket integration for streaming\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n\n/**\n * Initialize Music module on client-side\n * @param {Object} app - Vue app instance\n * @param {Object} store - Global store instance\n * @param {Object} router - Vue router instance\n * @param {Object} config - Configuration options\n * @param {Object} options - Additional options\n */\nfunction initializeMusic(app, store, router, config, options = {}) {\n const route = options.route || 'Home';\n\n // Register routes\n router.addRoute(route, routerMusic);\n\n // Register store modules\n store.addStore('tracks', storeTracks);\n store.addStore('playlists', storePlaylists);\n store.addStore('albums', storeAlbums);\n store.addStore('artists', storeArtists);\n store.addStore('genres', storeGenres);\n store.addStore('player', storePlayer);\n store.addStore('search', storeSearch);\n\n // Set up WebSocket subscription for music streaming\n if (options.enableStreaming !== false && app.config.globalProperties.WSS_URL) {\n globalWebSocket.initialize({\n wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n // Subscribe to music streaming module when authenticated\n if (options.userId) {\n globalWebSocket\n .connect(options.userId)\n .then(() => {\n globalWebSocket.subscribeModule('music-streaming');\n })\n .catch(err => {\n console.error('Failed to connect to WebSocket for music streaming:', err);\n });\n }\n }\n\n // Register global components if needed\n app.component('MusicPlayer', MusicPlayer);\n}\n\n// Module export\nconst ModuleMusic = {\n initialize: initializeMusic,\n views: {\n store: {\n storeTracks,\n storePlaylists,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storeSearch,\n },\n router: {\n routerMusic,\n },\n components: {\n // Layouts\n MusicBottomPlayer,\n // Pages\n MusicHome,\n SearchResults,\n Artist,\n Album,\n Playlist,\n Track,\n MusicLibrary,\n TrackCreate,\n // Player Components\n MusicPlayer,\n TrackProgress,\n VolumeControl,\n // Cards\n TrackListCard,\n AlbumCard,\n PlaylistCard,\n ArtistCard,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n TrackForm,\n },\n },\n};\n\n// Named exports for direct component imports\nexport {\n AlbumCard,\n Album,\n ArtistCard,\n Artist,\n // Pages\n MusicHome,\n // Layout\n MusicBottomPlayer,\n MusicLibrary,\n // Player Components\n MusicPlayer,\n TrackCreate,\n PlaylistCard,\n Playlist,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n SearchResults,\n // Cards\n TrackListCard,\n Track,\n TrackForm,\n TrackProgress,\n VolumeControl,\n // Router\n routerMusic,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storePlaylists,\n storeSearch,\n // Store modules\n storeTracks,\n};\n\n// Default export\nexport default ModuleMusic;\n"],"names":["routerMusic","storeTracks","storePlaylists","storeAlbums","storeArtists","storeGenres","storePlayer","storeSearch","globalWebSocket","MusicPlayer","MusicBottomPlayer","MusicHome","SearchResults","Artist","Album","Playlist","Track","MusicLibrary","TrackCreate","TrackProgress","VolumeControl","TrackListCard","AlbumCard","PlaylistCard","ArtistCard","ArtistForm","AlbumForm","PlaylistForm","SearchForm","TrackForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,SAAS,gBAAgB,KAAK,OAAO,QAAQ,QAAQ,UAAU,IAAI;AACjE,QAAM,QAAQ,QAAQ,SAAS;AAG/B,SAAO,SAAS,OAAOA,aAAW;AAGlC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,aAAaC,SAAc;AAC1C,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,WAAWC,OAAY;AACtC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AAGpC,MAAI,QAAQ,oBAAoB,SAAS,IAAI,OAAO,iBAAiB,SAAS;AAC5EC,sBAAAA,QAAgB,WAAW;AAAA,MACzB,OAAS,IAAI,OAAO,iBAAiB;A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N;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"music.client.cjs","sources":["../../../../../src/modules/music/music.client.js"],"sourcesContent":["// Store modules\nimport * as storeAlbums from './store/albums.js';\nimport * as storeArtists from './store/artists.js';\nimport * as storeGenres from './store/genres.js';\nimport * as storePlayer from './store/player.js';\nimport * as storePlaylists from './store/playlists.js';\nimport * as storeSearch from './store/search.js';\nimport * as storeTracks from './store/tracks.js';\n\n// Router\nimport routerMusic from './router/music.js';\n\n// Layouts\nimport MusicBottomPlayer from './components/layouts/MusicBottomPlayer.vue';\n\n// Pages\nimport Album from './components/pages/Album.vue';\nimport Artist from './components/pages/Artist.vue';\nimport MusicHome from './components/pages/MusicHome.vue';\nimport MusicLibrary from './components/pages/MusicLibrary.vue';\nimport TrackCreate from './components/pages/TrackCreate.vue';\nimport Playlist from './components/pages/Playlist.vue';\nimport SearchResults from './components/pages/SearchResults.vue';\nimport Track from './components/pages/Track.vue';\n\n// Components - Player\nimport MusicPlayer from './components/player/MusicPlayer.vue';\nimport TrackProgress from './components/player/TrackProgress.vue';\nimport VolumeControl from './components/player/VolumeControl.vue';\n\n// Components - Cards\nimport AlbumCard from './components/cards/AlbumCard.vue';\nimport ArtistCard from './components/cards/ArtistCard.vue';\nimport PlaylistCard from './components/cards/PlaylistCard.vue';\nimport TrackListCard from './components/cards/TrackListCard.vue';\n\n\n// Components - Forms\nimport ArtistForm from './components/forms/ArtistForm.vue';\nimport AlbumForm from './components/forms/AlbumForm.vue';\nimport PlaylistForm from './components/forms/PlaylistForm.vue';\nimport SearchForm from './components/forms/SearchForm.vue';\nimport TrackForm from './components/forms/TrackForm.vue';\n\n// WebSocket integration for streaming\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n\n/**\n * Initialize Music module on client-side\n * @param {Object} app - Vue app instance\n * @param {Object} store - Global store instance\n * @param {Object} router - Vue router instance\n * @param {Object} config - Configuration options\n * @param {Object} options - Additional options\n */\nfunction initializeMusic(app, store, router, config, options = {}) {\n const route = options.route || 'Home';\n\n // Register routes\n router.addRoute(route, routerMusic);\n\n // Register store modules\n store.addStore('tracks', storeTracks);\n store.addStore('playlists', storePlaylists);\n store.addStore('albums', storeAlbums);\n store.addStore('artists', storeArtists);\n store.addStore('genres', storeGenres);\n store.addStore('player', storePlayer);\n store.addStore('search', storeSearch);\n\n // Set up WebSocket subscription for music streaming\n if (options.enableStreaming !== false && app.config.globalProperties.WSS_URL) {\n globalWebSocket.initialize({\n // wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n // Subscribe to music streaming module when authenticated\n if (options.userId) {\n globalWebSocket\n .connect(options.userId)\n .then(() => {\n globalWebSocket.subscribeModule('music-streaming');\n })\n .catch(err => {\n console.error('Failed to connect to WebSocket for music streaming:', err);\n });\n }\n }\n\n // Register global components if needed\n app.component('MusicPlayer', MusicPlayer);\n}\n\n// Module export\nconst ModuleMusic = {\n initialize: initializeMusic,\n views: {\n store: {\n storeTracks,\n storePlaylists,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storeSearch,\n },\n router: {\n routerMusic,\n },\n components: {\n // Layouts\n MusicBottomPlayer,\n // Pages\n MusicHome,\n SearchResults,\n Artist,\n Album,\n Playlist,\n Track,\n MusicLibrary,\n TrackCreate,\n // Player Components\n MusicPlayer,\n TrackProgress,\n VolumeControl,\n // Cards\n TrackListCard,\n AlbumCard,\n PlaylistCard,\n ArtistCard,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n TrackForm,\n },\n },\n};\n\n// Named exports for direct component imports\nexport {\n AlbumCard,\n Album,\n ArtistCard,\n Artist,\n // Pages\n MusicHome,\n // Layout\n MusicBottomPlayer,\n MusicLibrary,\n // Player Components\n MusicPlayer,\n TrackCreate,\n PlaylistCard,\n Playlist,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n SearchResults,\n // Cards\n TrackListCard,\n Track,\n TrackForm,\n TrackProgress,\n VolumeControl,\n // Router\n routerMusic,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storePlaylists,\n storeSearch,\n // Store modules\n storeTracks,\n};\n\n// Default export\nexport default ModuleMusic;\n"],"names":["routerMusic","storeTracks","storePlaylists","storeAlbums","storeArtists","storeGenres","storePlayer","storeSearch","globalWebSocket","MusicPlayer","MusicBottomPlayer","MusicHome","SearchResults","Artist","Album","Playlist","Track","MusicLibrary","TrackCreate","TrackProgress","VolumeControl","TrackListCard","AlbumCard","PlaylistCard","ArtistCard","ArtistForm","AlbumForm","PlaylistForm","SearchForm","TrackForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,SAAS,gBAAgB,KAAK,OAAO,QAAQ,QAAQ,UAAU,IAAI;AACjE,QAAM,QAAQ,QAAQ,SAAS;AAG/B,SAAO,SAAS,OAAOA,aAAW;AAGlC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,aAAaC,SAAc;AAC1C,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,WAAWC,OAAY;AACtC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AAGpC,MAAI,QAAQ,oBAAoB,SAAS,IAAI,OAAO,iBAAiB,SAAS;AAC5EC,sBAAAA,QAAgB,WAAW;AAAA;AAAA,MAEzB,sBAAsB;AAAA,MACtB,gBAAgB;AAAA,IACtB,CAAK;AAGD,QAAI,QAAQ,QAAQ;AAClBA,wBAAAA,QACG,QAAQ,QAAQ,MAAM,EACtB,KAAK,MAAM;AACVA,0BAAAA,QAAgB,gBAAgB,iBAAiB;AAAA,MACnD,CAAC,EACA,MAAM,SAAO;AACZ,gBAAQ,MAAM,uDAAuD,GAAG;AAAA,MAC1E,CAAC;AAAA,IACL;AAAA,EACF;AAGA,MAAI,UAAU,eAAeC,mBAAW;AAC1C;AAGK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMR;AAAAA,MACN,gBAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,aAAMC;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,aAAMP,MAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMU,kBAAAA;AAAAA;AAAAA,MAEN,WAAMC,UAAAA;AAAAA,MACN,eAAMC,cAAAA;AAAAA,MACN,QAAMC,OAAAA;AAAAA,MACN,OAAMC,MAAAA;AAAAA,MACN,UAAMC,SAAAA;AAAAA,MACN,OAAMC,MAAAA;AAAAA,MACN,cAAMC,aAAAA;AAAAA,MACN,aAAMC,YAAAA;AAAAA;AAAAA,MAEN,aAAMT,YAAAA;AAAAA,MACN,eAAMU,cAAAA;AAAAA,MACN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA,MACN,WAAMC,UAAAA;AAAAA,MACN,cAAMC,aAAAA;AAAAA,MACN,YAAMC,WAAAA;AAAAA;AAAAA,MAEN,YAAMC,WAAAA;AAAAA,MACN,WAAMC,UAAAA;AAAAA,MACN,cAAMC,aAAAA;AAAAA,MACN,YAAMC,WAAAA;AAAAA,MACN,WAAMC,UAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -40,7 +40,7 @@ function initializeMusic(app, store, router, config, options = {}) {
40
40
  store.addStore("search", search);
41
41
  if (options.enableStreaming !== false && app.config.globalProperties.WSS_URL) {
42
42
  globalWebSocket.initialize({
43
- wsUrl: app.config.globalProperties.WSS_URL,
43
+ // wsUrl: app.config.globalProperties.WSS_URL,
44
44
  maxReconnectAttempts: 10,
45
45
  reconnectDelay: 2e3
46
46
  });
@@ -1 +1 @@
1
- {"version":3,"file":"music.client.js","sources":["../../../../../src/modules/music/music.client.js"],"sourcesContent":["// Store modules\nimport * as storeAlbums from './store/albums.js';\nimport * as storeArtists from './store/artists.js';\nimport * as storeGenres from './store/genres.js';\nimport * as storePlayer from './store/player.js';\nimport * as storePlaylists from './store/playlists.js';\nimport * as storeSearch from './store/search.js';\nimport * as storeTracks from './store/tracks.js';\n\n// Router\nimport routerMusic from './router/music.js';\n\n// Layouts\nimport MusicBottomPlayer from './components/layouts/MusicBottomPlayer.vue';\n\n// Pages\nimport Album from './components/pages/Album.vue';\nimport Artist from './components/pages/Artist.vue';\nimport MusicHome from './components/pages/MusicHome.vue';\nimport MusicLibrary from './components/pages/MusicLibrary.vue';\nimport TrackCreate from './components/pages/TrackCreate.vue';\nimport Playlist from './components/pages/Playlist.vue';\nimport SearchResults from './components/pages/SearchResults.vue';\nimport Track from './components/pages/Track.vue';\n\n// Components - Player\nimport MusicPlayer from './components/player/MusicPlayer.vue';\nimport TrackProgress from './components/player/TrackProgress.vue';\nimport VolumeControl from './components/player/VolumeControl.vue';\n\n// Components - Cards\nimport AlbumCard from './components/cards/AlbumCard.vue';\nimport ArtistCard from './components/cards/ArtistCard.vue';\nimport PlaylistCard from './components/cards/PlaylistCard.vue';\nimport TrackListCard from './components/cards/TrackListCard.vue';\n\n\n// Components - Forms\nimport ArtistForm from './components/forms/ArtistForm.vue';\nimport AlbumForm from './components/forms/AlbumForm.vue';\nimport PlaylistForm from './components/forms/PlaylistForm.vue';\nimport SearchForm from './components/forms/SearchForm.vue';\nimport TrackForm from './components/forms/TrackForm.vue';\n\n// WebSocket integration for streaming\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n\n/**\n * Initialize Music module on client-side\n * @param {Object} app - Vue app instance\n * @param {Object} store - Global store instance\n * @param {Object} router - Vue router instance\n * @param {Object} config - Configuration options\n * @param {Object} options - Additional options\n */\nfunction initializeMusic(app, store, router, config, options = {}) {\n const route = options.route || 'Home';\n\n // Register routes\n router.addRoute(route, routerMusic);\n\n // Register store modules\n store.addStore('tracks', storeTracks);\n store.addStore('playlists', storePlaylists);\n store.addStore('albums', storeAlbums);\n store.addStore('artists', storeArtists);\n store.addStore('genres', storeGenres);\n store.addStore('player', storePlayer);\n store.addStore('search', storeSearch);\n\n // Set up WebSocket subscription for music streaming\n if (options.enableStreaming !== false && app.config.globalProperties.WSS_URL) {\n globalWebSocket.initialize({\n wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n // Subscribe to music streaming module when authenticated\n if (options.userId) {\n globalWebSocket\n .connect(options.userId)\n .then(() => {\n globalWebSocket.subscribeModule('music-streaming');\n })\n .catch(err => {\n console.error('Failed to connect to WebSocket for music streaming:', err);\n });\n }\n }\n\n // Register global components if needed\n app.component('MusicPlayer', MusicPlayer);\n}\n\n// Module export\nconst ModuleMusic = {\n initialize: initializeMusic,\n views: {\n store: {\n storeTracks,\n storePlaylists,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storeSearch,\n },\n router: {\n routerMusic,\n },\n components: {\n // Layouts\n MusicBottomPlayer,\n // Pages\n MusicHome,\n SearchResults,\n Artist,\n Album,\n Playlist,\n Track,\n MusicLibrary,\n TrackCreate,\n // Player Components\n MusicPlayer,\n TrackProgress,\n VolumeControl,\n // Cards\n TrackListCard,\n AlbumCard,\n PlaylistCard,\n ArtistCard,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n TrackForm,\n },\n },\n};\n\n// Named exports for direct component imports\nexport {\n AlbumCard,\n Album,\n ArtistCard,\n Artist,\n // Pages\n MusicHome,\n // Layout\n MusicBottomPlayer,\n MusicLibrary,\n // Player Components\n MusicPlayer,\n TrackCreate,\n PlaylistCard,\n Playlist,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n SearchResults,\n // Cards\n TrackListCard,\n Track,\n TrackForm,\n TrackProgress,\n VolumeControl,\n // Router\n routerMusic,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storePlaylists,\n storeSearch,\n // Store modules\n storeTracks,\n};\n\n// Default export\nexport default ModuleMusic;\n"],"names":["storeTracks","storePlaylists","storeAlbums","storeArtists","storeGenres","storePlayer","storeSearch","MusicBottomPlayer","Artist","Album","Playlist","Track","MusicLibrary","TrackCreate","TrackListCard","ArtistForm","AlbumForm","PlaylistForm","TrackForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,SAAS,gBAAgB,KAAK,OAAO,QAAQ,QAAQ,UAAU,IAAI;AACjE,QAAM,QAAQ,QAAQ,SAAS;AAG/B,SAAO,SAAS,OAAO,WAAW;AAGlC,QAAM,SAAS,UAAUA,MAAW;AACpC,QAAM,SAAS,aAAaC,SAAc;AAC1C,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,WAAWC,OAAY;AACtC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AAGpC,MAAI,QAAQ,oBAAoB,SAAS,IAAI,OAAO,iBAAiB,SAAS;AAC5E,oBAAgB,WAAW;AAAA,MACzB,OAAS,IAAI,OAAO,iBAAiB;AAAA,MACrC,sBAAsB;AAAA,MACtB,gBAAgB;AAAA,IACtB,CAAK;AAGD,QAAI,QAAQ,QAAQ;AAClB,sBACG,QAAQ,QAAQ,MAAM,EACtB,KAAK,MAAM;AACV,wBAAgB,gBAAgB,iBAAiB;AAAA,MACnD,CAAC,EACA,MAAM,SAAO;AACZ,gBAAQ,MAAM,uDAAuD,GAAG;AAAA,MAC1E,CAAC;AAAA,IACL;AAAA,EACF;AAGA,MAAI,UAAU,eAAe,WAAW;AAC1C;AAGK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMN;AAAAA,MACN,gBAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,aAAMC;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACN;AAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMC;AAAAA;AAAAA,MAEA;AAAA,MACA;AAAA,MACN,QAAMC;AAAAA,MACN,OAAMC;AAAAA,MACN,UAAMC;AAAAA,MACN,OAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,aAAMC;AAAAA;AAAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEN,eAAMC;AAAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEN,YAAMC;AAAAA,MACN,WAAMC;AAAAA,MACN,cAAMC;AAAAA,MACA;AAAA,MACN,WAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
1
+ {"version":3,"file":"music.client.js","sources":["../../../../../src/modules/music/music.client.js"],"sourcesContent":["// Store modules\nimport * as storeAlbums from './store/albums.js';\nimport * as storeArtists from './store/artists.js';\nimport * as storeGenres from './store/genres.js';\nimport * as storePlayer from './store/player.js';\nimport * as storePlaylists from './store/playlists.js';\nimport * as storeSearch from './store/search.js';\nimport * as storeTracks from './store/tracks.js';\n\n// Router\nimport routerMusic from './router/music.js';\n\n// Layouts\nimport MusicBottomPlayer from './components/layouts/MusicBottomPlayer.vue';\n\n// Pages\nimport Album from './components/pages/Album.vue';\nimport Artist from './components/pages/Artist.vue';\nimport MusicHome from './components/pages/MusicHome.vue';\nimport MusicLibrary from './components/pages/MusicLibrary.vue';\nimport TrackCreate from './components/pages/TrackCreate.vue';\nimport Playlist from './components/pages/Playlist.vue';\nimport SearchResults from './components/pages/SearchResults.vue';\nimport Track from './components/pages/Track.vue';\n\n// Components - Player\nimport MusicPlayer from './components/player/MusicPlayer.vue';\nimport TrackProgress from './components/player/TrackProgress.vue';\nimport VolumeControl from './components/player/VolumeControl.vue';\n\n// Components - Cards\nimport AlbumCard from './components/cards/AlbumCard.vue';\nimport ArtistCard from './components/cards/ArtistCard.vue';\nimport PlaylistCard from './components/cards/PlaylistCard.vue';\nimport TrackListCard from './components/cards/TrackListCard.vue';\n\n\n// Components - Forms\nimport ArtistForm from './components/forms/ArtistForm.vue';\nimport AlbumForm from './components/forms/AlbumForm.vue';\nimport PlaylistForm from './components/forms/PlaylistForm.vue';\nimport SearchForm from './components/forms/SearchForm.vue';\nimport TrackForm from './components/forms/TrackForm.vue';\n\n// WebSocket integration for streaming\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n\n/**\n * Initialize Music module on client-side\n * @param {Object} app - Vue app instance\n * @param {Object} store - Global store instance\n * @param {Object} router - Vue router instance\n * @param {Object} config - Configuration options\n * @param {Object} options - Additional options\n */\nfunction initializeMusic(app, store, router, config, options = {}) {\n const route = options.route || 'Home';\n\n // Register routes\n router.addRoute(route, routerMusic);\n\n // Register store modules\n store.addStore('tracks', storeTracks);\n store.addStore('playlists', storePlaylists);\n store.addStore('albums', storeAlbums);\n store.addStore('artists', storeArtists);\n store.addStore('genres', storeGenres);\n store.addStore('player', storePlayer);\n store.addStore('search', storeSearch);\n\n // Set up WebSocket subscription for music streaming\n if (options.enableStreaming !== false && app.config.globalProperties.WSS_URL) {\n globalWebSocket.initialize({\n // wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n // Subscribe to music streaming module when authenticated\n if (options.userId) {\n globalWebSocket\n .connect(options.userId)\n .then(() => {\n globalWebSocket.subscribeModule('music-streaming');\n })\n .catch(err => {\n console.error('Failed to connect to WebSocket for music streaming:', err);\n });\n }\n }\n\n // Register global components if needed\n app.component('MusicPlayer', MusicPlayer);\n}\n\n// Module export\nconst ModuleMusic = {\n initialize: initializeMusic,\n views: {\n store: {\n storeTracks,\n storePlaylists,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storeSearch,\n },\n router: {\n routerMusic,\n },\n components: {\n // Layouts\n MusicBottomPlayer,\n // Pages\n MusicHome,\n SearchResults,\n Artist,\n Album,\n Playlist,\n Track,\n MusicLibrary,\n TrackCreate,\n // Player Components\n MusicPlayer,\n TrackProgress,\n VolumeControl,\n // Cards\n TrackListCard,\n AlbumCard,\n PlaylistCard,\n ArtistCard,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n TrackForm,\n },\n },\n};\n\n// Named exports for direct component imports\nexport {\n AlbumCard,\n Album,\n ArtistCard,\n Artist,\n // Pages\n MusicHome,\n // Layout\n MusicBottomPlayer,\n MusicLibrary,\n // Player Components\n MusicPlayer,\n TrackCreate,\n PlaylistCard,\n Playlist,\n // Forms\n ArtistForm,\n AlbumForm,\n PlaylistForm,\n SearchForm,\n SearchResults,\n // Cards\n TrackListCard,\n Track,\n TrackForm,\n TrackProgress,\n VolumeControl,\n // Router\n routerMusic,\n storeAlbums,\n storeArtists,\n storeGenres,\n storePlayer,\n storePlaylists,\n storeSearch,\n // Store modules\n storeTracks,\n};\n\n// Default export\nexport default ModuleMusic;\n"],"names":["storeTracks","storePlaylists","storeAlbums","storeArtists","storeGenres","storePlayer","storeSearch","MusicBottomPlayer","Artist","Album","Playlist","Track","MusicLibrary","TrackCreate","TrackListCard","ArtistForm","AlbumForm","PlaylistForm","TrackForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,SAAS,gBAAgB,KAAK,OAAO,QAAQ,QAAQ,UAAU,IAAI;AACjE,QAAM,QAAQ,QAAQ,SAAS;AAG/B,SAAO,SAAS,OAAO,WAAW;AAGlC,QAAM,SAAS,UAAUA,MAAW;AACpC,QAAM,SAAS,aAAaC,SAAc;AAC1C,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,WAAWC,OAAY;AACtC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,UAAUC,MAAW;AAGpC,MAAI,QAAQ,oBAAoB,SAAS,IAAI,OAAO,iBAAiB,SAAS;AAC5E,oBAAgB,WAAW;AAAA;AAAA,MAEzB,sBAAsB;AAAA,MACtB,gBAAgB;AAAA,IACtB,CAAK;AAGD,QAAI,QAAQ,QAAQ;AAClB,sBACG,QAAQ,QAAQ,MAAM,EACtB,KAAK,MAAM;AACV,wBAAgB,gBAAgB,iBAAiB;AAAA,MACnD,CAAC,EACA,MAAM,SAAO;AACZ,gBAAQ,MAAM,uDAAuD,GAAG;AAAA,MAC1E,CAAC;AAAA,IACL;AAAA,EACF;AAGA,MAAI,UAAU,eAAe,WAAW;AAC1C;AAGK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMN;AAAAA,MACN,gBAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,aAAMC;AAAAA,MACN,aAAMC;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACN;AAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMC;AAAAA;AAAAA,MAEA;AAAA,MACA;AAAA,MACN,QAAMC;AAAAA,MACN,OAAMC;AAAAA,MACN,UAAMC;AAAAA,MACN,OAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,aAAMC;AAAAA;AAAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEN,eAAMC;AAAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEN,YAAMC;AAAAA,MACN,WAAMC;AAAAA,MACN,cAAMC;AAAAA,MACA;AAAA,MACN,WAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
@@ -5,18 +5,18 @@ require("vue-router");
5
5
  require("../../globals/views/store/globals.cjs");
6
6
  ;/* empty css */
7
7
  ;/* empty css */
8
- ;/* empty css */
8
+ ;/* empty css */
9
9
  ;/* empty css */
10
10
  ;/* empty css */
11
- ;/* empty css */
11
+ ;/* empty css */
12
12
  ;/* empty css */
13
13
  ;/* empty css */
14
14
  ;/* empty css */
15
- ;/* empty css */
15
+ ;/* empty css */
16
16
  ;/* empty css */
17
17
  ;/* empty css */
18
18
  ;/* empty css */
19
- ;/* empty css */
19
+ ;/* empty css */
20
20
  require("axios");
21
21
  ;/* empty css */
22
22
  require("../store/playlists.cjs");
@@ -3,18 +3,18 @@ import "vue-router";
3
3
  import "../../globals/views/store/globals.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- /* empty css */
6
+ /* empty css */
7
7
  /* empty css */
8
8
  /* empty css */
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
- /* empty css */
17
+ /* empty css */
18
18
  import "axios";
19
19
  /* empty css */
20
20
  import "../store/playlists.js";
@@ -159,7 +159,6 @@ class NotificationManager {
159
159
  }
160
160
  console.log("Connecting to websockets via notifications");
161
161
  globals_websocket.default.initialize({
162
- wsUrl: app.config.globalProperties.WSS_URL,
163
162
  maxReconnectAttempts: 10,
164
163
  reconnectDelay: 2e3
165
164
  });
@@ -204,12 +203,12 @@ const SSRUtils = {
204
203
  }
205
204
  }
206
205
  };
207
- function initializeNotifications(app2, store, router, options = {}) {
206
+ function initializeNotifications(app, store, router, options = {}) {
208
207
  const route = options.route || "User Profile Root";
209
208
  router.addRoute(route, notifications_router.default);
210
209
  store.addStore("notifications", notifications_store);
211
210
  if (options.wsUrl) {
212
- globals_websocket.default.initialize({ wsUrl: app2.config.globalProperties.WSS_URL });
211
+ globals_websocket.default.initialize({ wsUrl: app.config.globalProperties.WSS_URL });
213
212
  }
214
213
  const notificationManager = new NotificationManager(store, {
215
214
  enablePush: options.enablePush !== false,
@@ -238,7 +237,7 @@ function initializeNotifications(app2, store, router, options = {}) {
238
237
  }
239
238
  );
240
239
  }
241
- app2.provide("useNotifications", () => {
240
+ app.provide("useNotifications", () => {
242
241
  return {
243
242
  ...vue.toRefs(store.notifications.state),
244
243
  ...store.notifications.actions,
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n \n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","app","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,+FAAiB,CAAA;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,wJAA+B,CAAA;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,gIAAmB,CAAA;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACT;AAEA,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,MAAM,sCAAsC,KAAK;AACzD,aAAO;AAAA,IACT;AAAA,EACF;AAAA;AAAA;AA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W,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD,qBAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAAA;AAAAA;AAAAA,MAEN,kBAAMC,iBAAAA;AAAAA;AAAAA,MAEN,mBAAMC,kBAAAA;AAAAA,MACN,yBAAMC,wBAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,qBAAMC,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n \n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,+FAAiB,CAAA;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA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ChC,OAAO;AACL,8BAAoB,WAAU;AAC9B,gBAAM,cAAc,UAAU,mBAAkB;AAAA,QAClD;AAAA,MACF;AAAA,IACN;AAAA,EACE;AAGA,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGC,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD,qBAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAAA;AAAAA;AAAAA,MAEN,kBAAMC,iBAAAA;AAAAA;AAAAA,MAEN,mBAAMC,kBAAAA;AAAAA,MACN,yBAAMC,wBAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,qBAAMC,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
@@ -157,7 +157,6 @@ class NotificationManager {
157
157
  }
158
158
  console.log("Connecting to websockets via notifications");
159
159
  globalWebSocket.initialize({
160
- wsUrl: app.config.globalProperties.WSS_URL,
161
160
  maxReconnectAttempts: 10,
162
161
  reconnectDelay: 2e3
163
162
  });
@@ -202,12 +201,12 @@ const SSRUtils = {
202
201
  }
203
202
  }
204
203
  };
205
- function initializeNotifications(app2, store, router, options = {}) {
204
+ function initializeNotifications(app, store, router, options = {}) {
206
205
  const route = options.route || "User Profile Root";
207
206
  router.addRoute(route, nofitications);
208
207
  store.addStore("notifications", notifications_store);
209
208
  if (options.wsUrl) {
210
- globalWebSocket.initialize({ wsUrl: app2.config.globalProperties.WSS_URL });
209
+ globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });
211
210
  }
212
211
  const notificationManager = new NotificationManager(store, {
213
212
  enablePush: options.enablePush !== false,
@@ -236,7 +235,7 @@ function initializeNotifications(app2, store, router, options = {}) {
236
235
  }
237
236
  );
238
237
  }
239
- app2.provide("useNotifications", () => {
238
+ app.provide("useNotifications", () => {
240
239
  return {
241
240
  ...toRefs(store.notifications.state),
242
241
  ...store.notifications.actions,
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n \n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["app","routerNotifications","storeNotifications","isAuthenticated","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,8FAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,OAAO,+HAAmB;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACT;AAEA,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACT,SAAS,O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,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAME;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEN,eAAMG;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
1
+ {"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n \n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","isAuthenticated","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,8FAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,OAAO,+HAAmB;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACT;AAEA,WAAK,gBAAgB;A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AK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMD;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEN,eAAMG;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,IACN;AAAA,EACA;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 Tooltip = require("../../../../components/Tooltip/Tooltip.vue.cjs");
4
+ const Tooltip = require("../../../../components/Tooltip/Tooltip.vue2.cjs");
5
5
  const IconStatusCreated = require("../icons/IconStatusCreated.vue.cjs");
6
6
  const IconStatusConfirmed = require("../icons/IconStatusConfirmed.vue.cjs");
7
7
  const IconStatusInUse = require("../icons/IconStatusInUse.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, Fragment, renderList, toDisplayString, createVNode, withCtx, createBlock, resolveDynamicComponent } from "vue";
2
- import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue.js";
2
+ import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue2.js";
3
3
  import _sfc_main$6 from "../icons/IconStatusCreated.vue.js";
4
4
  import _sfc_main$5 from "../icons/IconStatusConfirmed.vue.js";
5
5
  import _sfc_main$2 from "../icons/IconStatusInUse.vue.js";
@@ -2,15 +2,15 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
- const Button = require("../../../../components/Button/Button.vue.cjs");
6
- const Select = require("../../../../components/Select/Select.vue2.cjs");
5
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
6
+ const Select = require("../../../../components/Select/Select.vue.cjs");
7
7
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
8
8
  const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
9
9
  const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
10
10
  const CardOrganization = require("../../../organizations/components/blocks/CardOrganization.vue.cjs");
11
11
  const ChatPage = require("../../../chats/components/pages/ChatPage.vue.cjs");
12
12
  const PriceTotal = require("../elements/PriceTotal.vue.cjs");
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  const globals = require("../../../globals/views/store/globals.cjs");
15
15
  const auth = require("../../../auth/views/store/auth.cjs");
16
16
  const orders = require("../../store/orders.cjs");
@@ -1,14 +1,14 @@
1
1
  import { ref, onMounted, computed, createElementBlock, createCommentVNode, openBlock, createVNode, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass, withCtx, createBlock, unref } from "vue";
2
2
  import { useRouter, useRoute } from "vue-router";
3
- import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
4
- import Select from "../../../../components/Select/Select.vue2.js";
3
+ import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
4
+ import Select from "../../../../components/Select/Select.vue.js";
5
5
  import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
6
6
  import IconClock from "../../../icons/entities/IconTime.vue.js";
7
7
  import _sfc_main$3 from "../blocks/CardOrderItem.vue.js";
8
8
  import _sfc_main$5 from "../../../organizations/components/blocks/CardOrganization.vue.js";
9
9
  import _sfc_main$6 from "../../../chats/components/pages/ChatPage.vue.js";
10
10
  import _sfc_main$4 from "../elements/PriceTotal.vue.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  import { state } from "../../../globals/views/store/globals.js";
13
13
  import { state as state$1 } from "../../../auth/views/store/auth.js";
14
14
  import { actions, state as state$2, getters, mutations } from "../../store/orders.js";
@@ -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 Button = require("../../../../components/Button/Button.vue.cjs");
4
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
5
5
  const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
6
6
  const AskToLogin = require("../sections/AskToLogin.vue.cjs");
7
7
  const Succes = require("../sections/Succes.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onMounted, watch, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, unref, toDisplayString, createVNode, Fragment, renderList, withCtx, createTextVNode } from "vue";
2
- import _sfc_main$9 from "../../../../components/Button/Button.vue.js";
2
+ import _sfc_main$9 from "../../../../components/Button/Button.vue2.js";
3
3
  import _sfc_main$7 from "../blocks/CardOrderItem.vue.js";
4
4
  import _sfc_main$1 from "../sections/AskToLogin.vue.js";
5
5
  import _sfc_main$3 from "../sections/Succes.vue.js";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  ;/* empty css */
6
- const Button = require("../../../../components/Button/Button.vue.cjs");
6
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
7
7
  const Tab = require("../../../../components/Tab/Tab.vue2.cjs");
8
8
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
9
9
  const Block = require("../../../../components/Block/Block.vue.cjs");
@@ -1,7 +1,7 @@
1
1
  import { getCurrentInstance, computed, ref, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, toDisplayString, normalizeClass } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  /* empty css */
4
- import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
4
+ import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
5
5
  import _sfc_main$3 from "../../../../components/Tab/Tab.vue2.js";
6
6
  import _sfc_main$4 from "../../../../components/Popup/Popup.vue.js";
7
7
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
@@ -5,9 +5,9 @@ const vueRouter = require("vue-router");
5
5
  const Block = require("../../../../components/Block/Block.vue.cjs");
6
6
  ;/* empty css */
7
7
  const clickOutside = require("../../../../components/FieldPhone/click-outside.cjs");
8
- ;/* empty css */
8
+ ;/* empty css */
9
9
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
10
- const Button = require("../../../../components/Button/Button.vue.cjs");
10
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
11
11
  const BlockSearch = require("../../../globals/views/components/blocks/BlockSearch.vue.cjs");
12
12
  const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
13
13
  const FormCustomerDetails = require("./FormCustomerDetails.vue.cjs");
@@ -3,9 +3,9 @@ import { useRoute } from "vue-router";
3
3
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
4
4
  /* empty css */
5
5
  import clickOutside from "../../../../components/FieldPhone/click-outside.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
8
- import _sfc_main$6 from "../../../../components/Button/Button.vue.js";
8
+ import _sfc_main$6 from "../../../../components/Button/Button.vue2.js";
9
9
  import _sfc_main$2 from "../../../globals/views/components/blocks/BlockSearch.vue.js";
10
10
  import _sfc_main$3 from "../../../auth/views/components/blocks/CardUser.vue.js";
11
11
  import _sfc_main$5 from "./FormCustomerDetails.vue.js";
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const Block = require("../../../../components/Block/Block.vue.cjs");
5
5
  const Field = require("../../../../components/Field/Field.vue.cjs");
6
6
  const FieldPhone = require("../../../../components/FieldPhone/FieldPhone.vue.cjs");
7
- const Select = require("../../../../components/Select/Select.vue2.cjs");
7
+ const Select = require("../../../../components/Select/Select.vue.cjs");
8
8
  const _hoisted_1 = { class: "gap-thin flex-justify-between flex-nowrap flex" };
9
9
  const _sfc_main = {
10
10
  __name: "FormCustomerDetails",
@@ -2,7 +2,7 @@ import { ref, createBlock, openBlock, withCtx, createVNode, createElementVNode,
2
2
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
3
3
  import Field from "../../../../components/Field/Field.vue.js";
4
4
  import _sfc_main$2 from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import Select from "../../../../components/Select/Select.vue2.js";
5
+ import Select from "../../../../components/Select/Select.vue.js";
6
6
  const _hoisted_1 = { class: "gap-thin flex-justify-between flex-nowrap flex" };
7
7
  const _sfc_main = {
8
8
  __name: "FormCustomerDetails",
@@ -4,13 +4,13 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
- ;/* empty css */
7
+ ;/* empty css */
8
8
  ;/* empty css */
9
9
  const Field = require("../../../../components/Field/Field.vue.cjs");
10
10
  const Radio = require("../../../../components/Radio/Radio.vue.cjs");
11
11
  ;/* empty css */
12
12
  ;/* empty css */
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  ;/* empty css */
15
15
  ;/* empty css */
16
16
  ;/* empty css */
@@ -2,13 +2,13 @@ import { watch, onMounted, computed, createBlock, openBlock, withCtx, createElem
2
2
  import { useRoute } from "vue-router";
3
3
  /* empty css */
4
4
  /* empty css */
5
- /* empty css */
5
+ /* empty css */
6
6
  /* empty css */
7
7
  import Field from "../../../../components/Field/Field.vue.js";
8
8
  import _sfc_main$2 from "../../../../components/Radio/Radio.vue.js";
9
9
  /* empty css */
10
10
  /* empty css */
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Block = require("../../../../components/Block/Block.vue.cjs");
5
- const Select = require("../../../../components/Select/Select.vue2.cjs");
5
+ const Select = require("../../../../components/Select/Select.vue.cjs");
6
6
  const _hoisted_1 = { class: "mn-b-small flex-nowrap flex" };
7
7
  const _sfc_main = {
8
8
  __name: "FormPayment",
@@ -1,6 +1,6 @@
1
1
  import { computed, createBlock, openBlock, withCtx, createElementVNode, createVNode } from "vue";
2
2
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
3
- import Select from "../../../../components/Select/Select.vue2.js";
3
+ import Select from "../../../../components/Select/Select.vue.js";
4
4
  const _hoisted_1 = { class: "mn-b-small flex-nowrap flex" };
5
5
  const _sfc_main = {
6
6
  __name: "FormPayment",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const CardOrderItem = require("../../../orders/components/blocks/CardOrderItem.vue.cjs");
6
- const Chips = require("../../../../components/Chips/Chips.vue.cjs");
6
+ const Chips = require("../../../../components/Chips/Chips.vue2.cjs");
7
7
  const PlaceholderOrganizationPic = require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs");
8
8
  const IconShopcart = require("../../../icons/entities/IconShopcart.vue.cjs");
9
9
  const IconTime = require("../../../icons/entities/IconTime.vue.cjs");