@ozdao/martyrs 0.2.492 → 0.2.494

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 (341) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/builder.cjs +53 -90
  6. package/dist/builder.js +54 -91
  7. package/dist/{crud-B-kQw3Z5.cjs → crud-JN_LFj01.cjs} +3 -0
  8. package/dist/{crud-Cwx5VlSm.js → crud-sE7GLPbj.js} +3 -0
  9. package/dist/globals.server.cjs +322 -3
  10. package/dist/globals.server.js +303 -1
  11. package/dist/{globals.verifier-D68mHEBl.cjs → globals.verifier-C0zj_LLo.cjs} +8 -1
  12. package/dist/{globals.verifier-CWFz5Gh2.js → globals.verifier-DFqKQ7hK.js} +8 -1
  13. package/dist/inventory.server.cjs +2 -2
  14. package/dist/inventory.server.js +2 -2
  15. package/dist/{main-SZQ1QjeP.js → main-CJm5myDI.js} +631 -607
  16. package/dist/{main-MzmGbSxs.cjs → main-DTaE01lg.cjs} +6 -6
  17. package/dist/martyrs/src/components/Calendar/Calendar.vue2.cjs +1 -1
  18. package/dist/martyrs/src/components/Calendar/Calendar.vue2.cjs.map +1 -1
  19. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +1 -1
  20. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
  21. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +33 -7
  22. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  23. package/dist/martyrs/src/components/Feed/Feed.vue.js +33 -7
  24. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  25. package/dist/martyrs/src/components/Field/{Field.vue2.cjs → Field.vue.cjs} +2 -2
  26. package/dist/martyrs/src/components/Field/{Field.vue2.js.map → Field.vue.cjs.map} +1 -1
  27. package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
  28. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
  29. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  30. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  31. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  32. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  33. package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
  34. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
  35. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  36. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  37. package/dist/martyrs/src/components/Menu/MenuItem.vue.js +2 -2
  38. package/dist/martyrs/src/components/Menu/MenuItem.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +4 -4
  40. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  47. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  48. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  50. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  55. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  56. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  58. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  59. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  60. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
  61. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
  62. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  63. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  64. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  65. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  66. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  67. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  68. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
  69. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  70. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  71. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  72. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  73. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  74. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  76. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +5 -1
  77. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  78. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +5 -1
  79. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  80. package/dist/martyrs/src/modules/icons/entities/IconTime.vue.cjs +2 -2
  81. package/dist/martyrs/src/modules/icons/entities/IconTime.vue.js +2 -2
  82. package/dist/martyrs/src/modules/icons/navigation/IconChevronLeft.vue.cjs +2 -2
  83. package/dist/martyrs/src/modules/icons/navigation/IconChevronLeft.vue.js +2 -2
  84. package/dist/martyrs/src/modules/icons/navigation/IconChevronRight.vue.cjs +2 -2
  85. package/dist/martyrs/src/modules/icons/navigation/IconChevronRight.vue.js +2 -2
  86. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +6 -6
  87. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  88. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
  89. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  90. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
  91. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  92. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
  93. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +22 -15
  96. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -1
  97. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +23 -16
  98. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  99. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +2 -2
  100. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
  102. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
  103. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +31 -13
  104. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -1
  105. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +33 -15
  106. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
  107. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +39 -22
  108. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs.map +1 -1
  109. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +39 -22
  110. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
  111. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  113. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  115. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +385 -125
  116. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -1
  117. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +391 -131
  118. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
  119. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +24 -7
  120. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +25 -8
  122. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -1
  123. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +99 -87
  124. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs.map +1 -1
  125. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +111 -99
  126. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
  127. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.cjs +21 -0
  128. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.cjs.map +1 -0
  129. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js +21 -0
  130. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js.map +1 -0
  131. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +442 -210
  132. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
  133. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +445 -213
  134. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  135. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +92 -117
  136. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs.map +1 -1
  137. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +93 -118
  138. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
  139. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +72 -113
  140. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -1
  141. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +78 -119
  142. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +15 -12
  144. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -1
  145. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +15 -12
  146. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -1
  147. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +558 -429
  148. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
  149. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +560 -431
  150. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +146 -284
  152. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -1
  153. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +149 -287
  154. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +460 -63
  156. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
  157. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +462 -65
  158. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  159. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +126 -136
  160. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -1
  161. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +129 -139
  162. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
  163. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs +18 -15
  164. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs.map +1 -1
  165. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +18 -15
  166. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
  167. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs +28 -23
  168. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs.map +1 -1
  169. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +29 -24
  170. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -1
  171. package/dist/martyrs/src/modules/music/music.client.cjs +3 -6
  172. package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -1
  173. package/dist/martyrs/src/modules/music/music.client.js +9 -12
  174. package/dist/martyrs/src/modules/music/music.client.js.map +1 -1
  175. package/dist/martyrs/src/modules/music/router/music.cjs +27 -1
  176. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  177. package/dist/martyrs/src/modules/music/router/music.js +27 -1
  178. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  179. package/dist/martyrs/src/modules/music/store/artists.cjs +6 -4
  180. package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -1
  181. package/dist/martyrs/src/modules/music/store/artists.js +6 -4
  182. package/dist/martyrs/src/modules/music/store/artists.js.map +1 -1
  183. package/dist/martyrs/src/modules/music/store/player.cjs +5 -0
  184. package/dist/martyrs/src/modules/music/store/player.cjs.map +1 -1
  185. package/dist/martyrs/src/modules/music/store/player.js +5 -0
  186. package/dist/martyrs/src/modules/music/store/player.js.map +1 -1
  187. package/dist/martyrs/src/modules/music/store/tracks.cjs +22 -0
  188. package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -1
  189. package/dist/martyrs/src/modules/music/store/tracks.js +22 -0
  190. package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
  191. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +2 -2
  192. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  193. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  195. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  197. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  198. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  199. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  200. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  201. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +2 -2
  202. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  203. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  204. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  205. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  206. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  207. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  208. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  209. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  210. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  211. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  212. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  213. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  214. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  215. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  216. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  217. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  218. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  219. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  220. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  221. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  222. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  223. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  224. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  225. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  226. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  227. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  228. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  229. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  230. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  231. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  232. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  233. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  234. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.cjs +4 -3
  235. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.cjs.map +1 -1
  236. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +4 -3
  237. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
  238. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.cjs +37 -70
  239. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.cjs.map +1 -1
  240. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +38 -71
  241. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
  242. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -1
  243. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs.map +1 -1
  244. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +6 -5
  245. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
  246. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +45 -52
  247. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs.map +1 -1
  248. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +46 -53
  249. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
  250. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
  251. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  252. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  253. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  254. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  255. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  256. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  257. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  258. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  259. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  260. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  261. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  262. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  263. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  264. package/dist/martyrs.cjs.js +1 -1
  265. package/dist/martyrs.css +1 -1
  266. package/dist/martyrs.es.js +1 -1
  267. package/dist/music.server.cjs +124 -31
  268. package/dist/music.server.js +124 -31
  269. package/dist/organizations.server.cjs +1 -1
  270. package/dist/organizations.server.js +1 -1
  271. package/dist/products.server.cjs +2 -2
  272. package/dist/products.server.js +2 -2
  273. package/dist/rents.server.cjs +3 -3
  274. package/dist/rents.server.js +3 -3
  275. package/dist/style.css +373 -80
  276. package/dist/{web-D7lZjuC0.js → web-Dkk0_7TA.js} +1 -1
  277. package/dist/{web-D-YZ9KHz.cjs → web-stVkXd0l.cjs} +1 -1
  278. package/package.json +1 -1
  279. package/src/builder/modes/ssr.prod.js +21 -5
  280. package/src/builder/rspack/rspack.config.spa.client.js +0 -44
  281. package/src/builder/rspack/rspack.config.ssr.client.js +40 -40
  282. package/src/components/Calendar/Calendar.vue +378 -377
  283. package/src/components/Feed/Feed.vue +28 -2
  284. package/src/modules/globals/controllers/classes/crud/crud.policies.js +5 -0
  285. package/src/modules/globals/controllers/classes/globals.validator.js +8 -1
  286. package/src/modules/globals/views/components/layouts/Client.vue +7 -0
  287. package/src/modules/music/README.md +8 -0
  288. package/src/modules/music/components/SidebarMusic.vue +6 -9
  289. package/src/modules/music/components/cards/AlbumCard.vue +20 -14
  290. package/src/modules/music/components/cards/ArtistCard.vue +1 -1
  291. package/src/modules/music/components/cards/PlaylistCard.vue +31 -11
  292. package/src/modules/music/components/cards/TrackListCard.vue +24 -13
  293. package/src/modules/music/components/forms/PlaylistForm.vue +417 -107
  294. package/src/modules/music/components/forms/SearchForm.vue +31 -8
  295. package/src/modules/music/components/forms/TrackForm.vue +50 -32
  296. package/src/modules/music/components/layouts/MusicBottomPlayer.vue +17 -0
  297. package/src/modules/music/components/pages/Album.vue +373 -186
  298. package/src/modules/music/components/pages/Artist.vue +54 -94
  299. package/src/modules/music/components/pages/MusicHome.vue +59 -56
  300. package/src/modules/music/components/pages/MusicLibrary.vue +13 -11
  301. package/src/modules/music/components/pages/Playlist.vue +495 -379
  302. package/src/modules/music/components/pages/SearchResults.vue +185 -313
  303. package/src/modules/music/components/pages/Track.vue +363 -69
  304. package/src/modules/music/components/player/MusicPlayer.vue +368 -97
  305. package/src/modules/music/components/player/TrackProgress.vue +76 -22
  306. package/src/modules/music/components/player/VolumeControl.vue +61 -28
  307. package/src/modules/music/controllers/search.controller.js +3 -0
  308. package/src/modules/music/controllers/stream.controller.js +11 -3
  309. package/src/modules/music/middlewares/playlists.verifier.js +1 -1
  310. package/src/modules/music/music.client.js +3 -6
  311. package/src/modules/music/music.server.js +8 -4
  312. package/src/modules/music/router/music.js +8 -1
  313. package/src/modules/music/routes/albums.routes.js +37 -5
  314. package/src/modules/music/routes/artists.routes.js +14 -4
  315. package/src/modules/music/routes/genres.routes.js +5 -1
  316. package/src/modules/music/routes/playlists.routes.js +42 -9
  317. package/src/modules/music/routes/tracks.routes.js +27 -2
  318. package/src/modules/music/store/artists.js +6 -2
  319. package/src/modules/music/store/player.js +6 -0
  320. package/src/modules/music/store/tracks.js +31 -0
  321. package/src/modules/music/websocket/streaming.handler.js +7 -1
  322. package/src/modules/rents/controllers/services/rents.services.js +2 -2
  323. package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +4 -3
  324. package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +42 -40
  325. package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +3 -1
  326. package/src/modules/rents/views/components/pages/Rents.vue +60 -56
  327. package/dist/globals.websocket-DzvdIBf6.js +0 -306
  328. package/dist/globals.websocket-k6_B1T7k.cjs +0 -322
  329. package/dist/martyrs/src/components/Field/Field.vue2.cjs.map +0 -1
  330. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
  331. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  332. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +0 -69
  333. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +0 -1
  334. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +0 -69
  335. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +0 -1
  336. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +0 -104
  337. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +0 -1
  338. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +0 -104
  339. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +0 -1
  340. package/src/modules/music/components/cards/TrackCard.vue +0 -86
  341. package/src/modules/music/components/layouts/MusicLayout.vue +0 -83
@@ -1,306 +0,0 @@
1
- import * as cookie from "cookie";
2
- import jwt from "jsonwebtoken";
3
- import uWS from "uWebSockets.js";
4
- class WebSocketManager {
5
- constructor() {
6
- this.app = uWS.App();
7
- this.modules = /* @__PURE__ */ new Map();
8
- this.userConnections = /* @__PURE__ */ new Map();
9
- this.rpcMethods = /* @__PURE__ */ new Map();
10
- this.app.ws("/api/ws", {
11
- maxPayloadLength: 16 * 1024 * 1024,
12
- idleTimeout: 120,
13
- compression: uWS.SHARED_COMPRESSOR,
14
- maxBackpressure: 1024 * 1024,
15
- // Обработчик аутентификации и апгрейда соединения
16
- upgrade: (res, req, context) => {
17
- let userId = null;
18
- const headers = {};
19
- req.forEach((key, value) => {
20
- headers[key.toLowerCase()] = value;
21
- });
22
- const secWebSocketKey = headers["sec-websocket-key"] || "";
23
- const secWebSocketProtocol = headers["sec-websocket-protocol"] || "";
24
- const secWebSocketExtensions = headers["sec-websocket-extensions"] || "";
25
- try {
26
- if (headers.cookie) {
27
- const cookies = cookie.parse(headers.cookie);
28
- if (cookies.user) {
29
- const token = JSON.parse(decodeURIComponent(cookies.user));
30
- const decoded = jwt.verify(token.accessToken, process.env.SECRET_KEY);
31
- userId = decoded._id;
32
- }
33
- }
34
- } catch (err) {
35
- console.error("Invalid token:", err);
36
- }
37
- if (process.env.REQUIRE_AUTH === "true" && !userId) {
38
- res.writeStatus("401 Unauthorized").end("Authentication required");
39
- return;
40
- }
41
- const userData = { userId };
42
- res.upgrade(userData, secWebSocketKey, secWebSocketProtocol, secWebSocketExtensions, context);
43
- },
44
- // Обработчик открытия соединения
45
- open: (ws) => {
46
- ws.userId = ws.getUserData().userId;
47
- ws.subscriptions = /* @__PURE__ */ new Set();
48
- if (ws.userId) {
49
- this._trackUserConnection(ws.userId, ws);
50
- }
51
- },
52
- // Обработчик входящих сообщений
53
- message: async (ws, message, isBinary) => {
54
- if (!isBinary) {
55
- try {
56
- const msgStr = new TextDecoder().decode(message);
57
- const msg = JSON.parse(msgStr);
58
- if (msg.type === "subscribe" && msg.module && this.modules.has(msg.module)) {
59
- ws.subscriptions.add(msg.module);
60
- return;
61
- } else if (msg.type === "unsubscribe" && msg.module) {
62
- ws.subscriptions.delete(msg.module);
63
- return;
64
- }
65
- if (msg.type === "rpc") {
66
- await this._handleRpcCall(ws, msg);
67
- return;
68
- }
69
- const moduleName = msg.module;
70
- if (moduleName && this.modules.has(moduleName)) {
71
- const handler = this.modules.get(moduleName);
72
- Promise.resolve(handler(ws, msg)).catch((err) => {
73
- console.error(`Error in handler for module ${moduleName}:`, err);
74
- });
75
- }
76
- } catch (err) {
77
- console.error("Invalid message or handler error:", err);
78
- if (err instanceof Error) {
79
- try {
80
- ws.send(
81
- JSON.stringify({
82
- type: "error",
83
- error: {
84
- message: err.message,
85
- code: err.code || "INTERNAL_ERROR"
86
- }
87
- }),
88
- false
89
- );
90
- } catch (sendErr) {
91
- console.error("Error sending error response:", sendErr);
92
- }
93
- }
94
- }
95
- }
96
- },
97
- // Обработчик закрытия соединения
98
- close: (ws, code, message) => {
99
- const userId = ws.userId;
100
- if (userId && this.userConnections.has(userId)) {
101
- this.userConnections.get(userId).delete(ws);
102
- if (this.userConnections.get(userId).size === 0) {
103
- this.userConnections.delete(userId);
104
- }
105
- }
106
- if (ws.subscriptions && typeof ws.subscriptions.clear === "function") {
107
- ws.subscriptions.clear();
108
- }
109
- }
110
- });
111
- this.listenSocket = null;
112
- }
113
- // Метод для запуска сервера
114
- listen(port, callback) {
115
- this.app.listen(port, (listenSocket) => {
116
- if (listenSocket) {
117
- this.listenSocket = listenSocket;
118
- if (callback) callback(null, this.app);
119
- } else {
120
- if (callback) callback(new Error("Failed to listen"), null);
121
- }
122
- });
123
- return this;
124
- }
125
- _trackUserConnection(userId, ws) {
126
- if (!this.userConnections.has(userId)) {
127
- this.userConnections.set(userId, /* @__PURE__ */ new Set());
128
- }
129
- this.userConnections.get(userId).add(ws);
130
- }
131
- registerModule(moduleName, handler) {
132
- this.modules.set(moduleName, handler);
133
- }
134
- // Добавляем методы для регистрации RPC
135
- registerRpcMethod(moduleName, methodName, handler, options = {}) {
136
- const fullMethodName = `${moduleName}.${methodName}`;
137
- if (!this.rpcMethods.has(moduleName)) {
138
- this.rpcMethods.set(moduleName, /* @__PURE__ */ new Map());
139
- }
140
- this.rpcMethods.get(moduleName).set(methodName, {
141
- handler,
142
- options: {
143
- requireAuth: options.requireAuth !== false,
144
- // По умолчанию true
145
- validateParams: options.validateParams || null,
146
- rateLimit: options.rateLimit || null,
147
- ...options
148
- }
149
- });
150
- console.log(`RPC method registered: ${fullMethodName}`);
151
- return this;
152
- }
153
- // Метод для регистрации группы RPC методов из модуля
154
- registerRpcMethods(moduleName, methodsMap) {
155
- for (const [methodName, config] of Object.entries(methodsMap)) {
156
- const handler = typeof config === "function" ? config : config.handler;
157
- const options = typeof config === "function" ? {} : config.options || {};
158
- this.registerRpcMethod(moduleName, methodName, handler, options);
159
- }
160
- return this;
161
- }
162
- // Обработчик RPC вызовов
163
- async _handleRpcCall(ws, message) {
164
- const { module, method, params, id } = message;
165
- if (!this.rpcMethods.has(module) || !this.rpcMethods.get(module).has(method)) {
166
- this._sendRpcResponse(ws, id, null, {
167
- code: -32601,
168
- message: `Method ${module}.${method} not found`
169
- });
170
- return;
171
- }
172
- const { handler, options } = this.rpcMethods.get(module).get(method);
173
- if (options.requireAuth && !ws.userId) {
174
- this._sendRpcResponse(ws, id, null, {
175
- code: -32e3,
176
- message: "Authentication required"
177
- });
178
- return;
179
- }
180
- if (options.validateParams && !options.validateParams(params)) {
181
- this._sendRpcResponse(ws, id, null, {
182
- code: -32602,
183
- message: "Invalid params"
184
- });
185
- return;
186
- }
187
- try {
188
- const context = {
189
- userId: ws.userId,
190
- ws,
191
- sendResponse: (result2) => this._sendRpcResponse(ws, id, result2),
192
- sendError: (error) => this._sendRpcResponse(ws, id, null, error)
193
- };
194
- const result = await handler.call(context, params, context);
195
- if (!context.responseSent) {
196
- this._sendRpcResponse(ws, id, result);
197
- }
198
- } catch (error) {
199
- console.error(`Error executing RPC method ${module}.${method}:`, error);
200
- this._sendRpcResponse(ws, id, null, {
201
- code: -32603,
202
- message: error.message || "Internal error"
203
- });
204
- }
205
- }
206
- // Отправка ответа на RPC запрос
207
- _sendRpcResponse(ws, id, result, error = null) {
208
- if (ws.context?.responseSent) return;
209
- if (ws.context) ws.context.responseSent = true;
210
- const response = {
211
- type: "rpc_response",
212
- id
213
- };
214
- if (error) {
215
- response.error = {
216
- code: error.code || -32603,
217
- message: error.message || "Internal error",
218
- data: error.data
219
- };
220
- } else {
221
- response.result = result;
222
- }
223
- try {
224
- ws.send(JSON.stringify(response), false);
225
- } catch (err) {
226
- console.error("Error sending RPC response:", err);
227
- }
228
- }
229
- sendToUserInModule(moduleName, userId, data) {
230
- const userIdStr = userId.toString();
231
- const sockets = this.userConnections.get(userIdStr);
232
- if (!sockets) {
233
- console.log(`No sockets found for user ${userIdStr}`);
234
- return false;
235
- }
236
- let sent = false;
237
- const message = JSON.stringify(data);
238
- for (const ws of sockets) {
239
- if (ws.subscriptions.has(moduleName)) {
240
- try {
241
- const ok = ws.send(message, false);
242
- if (!ok) {
243
- console.warn("WebSocket backpressure exceeded for user:", userIdStr);
244
- } else {
245
- sent = true;
246
- }
247
- } catch (err) {
248
- console.warn("Failed to send message to user:", userIdStr, err);
249
- }
250
- }
251
- }
252
- return sent;
253
- }
254
- broadcastToModule(moduleName, data) {
255
- const message = JSON.stringify(data);
256
- let failedSends = 0;
257
- for (const sockets of this.userConnections.values()) {
258
- for (const ws of sockets) {
259
- if (ws.subscriptions.has(moduleName)) {
260
- try {
261
- const ok = ws.send(message, false);
262
- if (!ok) {
263
- failedSends++;
264
- }
265
- } catch (err) {
266
- failedSends++;
267
- console.warn("Failed to broadcast message:", err);
268
- }
269
- }
270
- }
271
- }
272
- if (failedSends > 0) {
273
- console.warn(`Failed to send broadcast to ${failedSends} connections due to backpressure or closed sockets`);
274
- }
275
- return true;
276
- }
277
- broadcastToModuleWithFilter(moduleName, filterFn, data) {
278
- const message = JSON.stringify(data);
279
- let failedSends = 0;
280
- for (const sockets of this.userConnections.values()) {
281
- for (const ws of sockets) {
282
- if (!ws.subscriptions.has(moduleName)) continue;
283
- if (!filterFn(ws)) continue;
284
- try {
285
- const ok = ws.send(message, false);
286
- if (!ok) {
287
- failedSends++;
288
- }
289
- } catch (err) {
290
- failedSends++;
291
- console.warn("Failed to send filtered broadcast:", err);
292
- }
293
- }
294
- }
295
- if (failedSends > 0) {
296
- console.warn(`Failed to send filtered broadcast to ${failedSends} connections due to backpressure or closed sockets`);
297
- }
298
- return true;
299
- }
300
- getServer() {
301
- return this.app;
302
- }
303
- }
304
- export {
305
- WebSocketManager as W
306
- };
@@ -1,322 +0,0 @@
1
- "use strict";
2
- const cookie = require("cookie");
3
- const jwt = require("jsonwebtoken");
4
- const uWS = require("uWebSockets.js");
5
- function _interopNamespaceDefault(e) {
6
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
- if (e) {
8
- for (const k in e) {
9
- if (k !== "default") {
10
- const d = Object.getOwnPropertyDescriptor(e, k);
11
- Object.defineProperty(n, k, d.get ? d : {
12
- enumerable: true,
13
- get: () => e[k]
14
- });
15
- }
16
- }
17
- }
18
- n.default = e;
19
- return Object.freeze(n);
20
- }
21
- const cookie__namespace = /* @__PURE__ */ _interopNamespaceDefault(cookie);
22
- class WebSocketManager {
23
- constructor() {
24
- this.app = uWS.App();
25
- this.modules = /* @__PURE__ */ new Map();
26
- this.userConnections = /* @__PURE__ */ new Map();
27
- this.rpcMethods = /* @__PURE__ */ new Map();
28
- this.app.ws("/api/ws", {
29
- maxPayloadLength: 16 * 1024 * 1024,
30
- idleTimeout: 120,
31
- compression: uWS.SHARED_COMPRESSOR,
32
- maxBackpressure: 1024 * 1024,
33
- // Обработчик аутентификации и апгрейда соединения
34
- upgrade: (res, req, context) => {
35
- let userId = null;
36
- const headers = {};
37
- req.forEach((key, value) => {
38
- headers[key.toLowerCase()] = value;
39
- });
40
- const secWebSocketKey = headers["sec-websocket-key"] || "";
41
- const secWebSocketProtocol = headers["sec-websocket-protocol"] || "";
42
- const secWebSocketExtensions = headers["sec-websocket-extensions"] || "";
43
- try {
44
- if (headers.cookie) {
45
- const cookies = cookie__namespace.parse(headers.cookie);
46
- if (cookies.user) {
47
- const token = JSON.parse(decodeURIComponent(cookies.user));
48
- const decoded = jwt.verify(token.accessToken, process.env.SECRET_KEY);
49
- userId = decoded._id;
50
- }
51
- }
52
- } catch (err) {
53
- console.error("Invalid token:", err);
54
- }
55
- if (process.env.REQUIRE_AUTH === "true" && !userId) {
56
- res.writeStatus("401 Unauthorized").end("Authentication required");
57
- return;
58
- }
59
- const userData = { userId };
60
- res.upgrade(userData, secWebSocketKey, secWebSocketProtocol, secWebSocketExtensions, context);
61
- },
62
- // Обработчик открытия соединения
63
- open: (ws) => {
64
- ws.userId = ws.getUserData().userId;
65
- ws.subscriptions = /* @__PURE__ */ new Set();
66
- if (ws.userId) {
67
- this._trackUserConnection(ws.userId, ws);
68
- }
69
- },
70
- // Обработчик входящих сообщений
71
- message: async (ws, message, isBinary) => {
72
- if (!isBinary) {
73
- try {
74
- const msgStr = new TextDecoder().decode(message);
75
- const msg = JSON.parse(msgStr);
76
- if (msg.type === "subscribe" && msg.module && this.modules.has(msg.module)) {
77
- ws.subscriptions.add(msg.module);
78
- return;
79
- } else if (msg.type === "unsubscribe" && msg.module) {
80
- ws.subscriptions.delete(msg.module);
81
- return;
82
- }
83
- if (msg.type === "rpc") {
84
- await this._handleRpcCall(ws, msg);
85
- return;
86
- }
87
- const moduleName = msg.module;
88
- if (moduleName && this.modules.has(moduleName)) {
89
- const handler = this.modules.get(moduleName);
90
- Promise.resolve(handler(ws, msg)).catch((err) => {
91
- console.error(`Error in handler for module ${moduleName}:`, err);
92
- });
93
- }
94
- } catch (err) {
95
- console.error("Invalid message or handler error:", err);
96
- if (err instanceof Error) {
97
- try {
98
- ws.send(
99
- JSON.stringify({
100
- type: "error",
101
- error: {
102
- message: err.message,
103
- code: err.code || "INTERNAL_ERROR"
104
- }
105
- }),
106
- false
107
- );
108
- } catch (sendErr) {
109
- console.error("Error sending error response:", sendErr);
110
- }
111
- }
112
- }
113
- }
114
- },
115
- // Обработчик закрытия соединения
116
- close: (ws, code, message) => {
117
- const userId = ws.userId;
118
- if (userId && this.userConnections.has(userId)) {
119
- this.userConnections.get(userId).delete(ws);
120
- if (this.userConnections.get(userId).size === 0) {
121
- this.userConnections.delete(userId);
122
- }
123
- }
124
- if (ws.subscriptions && typeof ws.subscriptions.clear === "function") {
125
- ws.subscriptions.clear();
126
- }
127
- }
128
- });
129
- this.listenSocket = null;
130
- }
131
- // Метод для запуска сервера
132
- listen(port, callback) {
133
- this.app.listen(port, (listenSocket) => {
134
- if (listenSocket) {
135
- this.listenSocket = listenSocket;
136
- if (callback) callback(null, this.app);
137
- } else {
138
- if (callback) callback(new Error("Failed to listen"), null);
139
- }
140
- });
141
- return this;
142
- }
143
- _trackUserConnection(userId, ws) {
144
- if (!this.userConnections.has(userId)) {
145
- this.userConnections.set(userId, /* @__PURE__ */ new Set());
146
- }
147
- this.userConnections.get(userId).add(ws);
148
- }
149
- registerModule(moduleName, handler) {
150
- this.modules.set(moduleName, handler);
151
- }
152
- // Добавляем методы для регистрации RPC
153
- registerRpcMethod(moduleName, methodName, handler, options = {}) {
154
- const fullMethodName = `${moduleName}.${methodName}`;
155
- if (!this.rpcMethods.has(moduleName)) {
156
- this.rpcMethods.set(moduleName, /* @__PURE__ */ new Map());
157
- }
158
- this.rpcMethods.get(moduleName).set(methodName, {
159
- handler,
160
- options: {
161
- requireAuth: options.requireAuth !== false,
162
- // По умолчанию true
163
- validateParams: options.validateParams || null,
164
- rateLimit: options.rateLimit || null,
165
- ...options
166
- }
167
- });
168
- console.log(`RPC method registered: ${fullMethodName}`);
169
- return this;
170
- }
171
- // Метод для регистрации группы RPC методов из модуля
172
- registerRpcMethods(moduleName, methodsMap) {
173
- for (const [methodName, config] of Object.entries(methodsMap)) {
174
- const handler = typeof config === "function" ? config : config.handler;
175
- const options = typeof config === "function" ? {} : config.options || {};
176
- this.registerRpcMethod(moduleName, methodName, handler, options);
177
- }
178
- return this;
179
- }
180
- // Обработчик RPC вызовов
181
- async _handleRpcCall(ws, message) {
182
- const { module: module2, method, params, id } = message;
183
- if (!this.rpcMethods.has(module2) || !this.rpcMethods.get(module2).has(method)) {
184
- this._sendRpcResponse(ws, id, null, {
185
- code: -32601,
186
- message: `Method ${module2}.${method} not found`
187
- });
188
- return;
189
- }
190
- const { handler, options } = this.rpcMethods.get(module2).get(method);
191
- if (options.requireAuth && !ws.userId) {
192
- this._sendRpcResponse(ws, id, null, {
193
- code: -32e3,
194
- message: "Authentication required"
195
- });
196
- return;
197
- }
198
- if (options.validateParams && !options.validateParams(params)) {
199
- this._sendRpcResponse(ws, id, null, {
200
- code: -32602,
201
- message: "Invalid params"
202
- });
203
- return;
204
- }
205
- try {
206
- const context = {
207
- userId: ws.userId,
208
- ws,
209
- sendResponse: (result2) => this._sendRpcResponse(ws, id, result2),
210
- sendError: (error) => this._sendRpcResponse(ws, id, null, error)
211
- };
212
- const result = await handler.call(context, params, context);
213
- if (!context.responseSent) {
214
- this._sendRpcResponse(ws, id, result);
215
- }
216
- } catch (error) {
217
- console.error(`Error executing RPC method ${module2}.${method}:`, error);
218
- this._sendRpcResponse(ws, id, null, {
219
- code: -32603,
220
- message: error.message || "Internal error"
221
- });
222
- }
223
- }
224
- // Отправка ответа на RPC запрос
225
- _sendRpcResponse(ws, id, result, error = null) {
226
- if (ws.context?.responseSent) return;
227
- if (ws.context) ws.context.responseSent = true;
228
- const response = {
229
- type: "rpc_response",
230
- id
231
- };
232
- if (error) {
233
- response.error = {
234
- code: error.code || -32603,
235
- message: error.message || "Internal error",
236
- data: error.data
237
- };
238
- } else {
239
- response.result = result;
240
- }
241
- try {
242
- ws.send(JSON.stringify(response), false);
243
- } catch (err) {
244
- console.error("Error sending RPC response:", err);
245
- }
246
- }
247
- sendToUserInModule(moduleName, userId, data) {
248
- const userIdStr = userId.toString();
249
- const sockets = this.userConnections.get(userIdStr);
250
- if (!sockets) {
251
- console.log(`No sockets found for user ${userIdStr}`);
252
- return false;
253
- }
254
- let sent = false;
255
- const message = JSON.stringify(data);
256
- for (const ws of sockets) {
257
- if (ws.subscriptions.has(moduleName)) {
258
- try {
259
- const ok = ws.send(message, false);
260
- if (!ok) {
261
- console.warn("WebSocket backpressure exceeded for user:", userIdStr);
262
- } else {
263
- sent = true;
264
- }
265
- } catch (err) {
266
- console.warn("Failed to send message to user:", userIdStr, err);
267
- }
268
- }
269
- }
270
- return sent;
271
- }
272
- broadcastToModule(moduleName, data) {
273
- const message = JSON.stringify(data);
274
- let failedSends = 0;
275
- for (const sockets of this.userConnections.values()) {
276
- for (const ws of sockets) {
277
- if (ws.subscriptions.has(moduleName)) {
278
- try {
279
- const ok = ws.send(message, false);
280
- if (!ok) {
281
- failedSends++;
282
- }
283
- } catch (err) {
284
- failedSends++;
285
- console.warn("Failed to broadcast message:", err);
286
- }
287
- }
288
- }
289
- }
290
- if (failedSends > 0) {
291
- console.warn(`Failed to send broadcast to ${failedSends} connections due to backpressure or closed sockets`);
292
- }
293
- return true;
294
- }
295
- broadcastToModuleWithFilter(moduleName, filterFn, data) {
296
- const message = JSON.stringify(data);
297
- let failedSends = 0;
298
- for (const sockets of this.userConnections.values()) {
299
- for (const ws of sockets) {
300
- if (!ws.subscriptions.has(moduleName)) continue;
301
- if (!filterFn(ws)) continue;
302
- try {
303
- const ok = ws.send(message, false);
304
- if (!ok) {
305
- failedSends++;
306
- }
307
- } catch (err) {
308
- failedSends++;
309
- console.warn("Failed to send filtered broadcast:", err);
310
- }
311
- }
312
- }
313
- if (failedSends > 0) {
314
- console.warn(`Failed to send filtered broadcast to ${failedSends} connections due to backpressure or closed sockets`);
315
- }
316
- return true;
317
- }
318
- getServer() {
319
- return this.app;
320
- }
321
- }
322
- exports.WebSocketManager = WebSocketManager;
@@ -1 +0,0 @@
1
- {"version":3,"file":"Field.vue2.cjs","sources":["../../../../../src/components/Field/Field.vue"],"sourcesContent":["<script setup>\nimport { ref, onMounted, nextTick, watch } from 'vue'\nimport IconShow from '@martyrs/src/modules/icons/actions/IconShow.vue';\nconst emit = defineEmits(['update:field', 'focus', 'blur']);\nconst props = defineProps({\n label: null,\n symbol: null,\n type: 'text',\n placeholder: 'Enter something here',\n field: null,\n value: null,\n validation: false,\n disabled: null,\n tabindex: -1,\n autofocus: false,\n icon: null // Добавлен пропс для иконки\n});\nif (props.value) {\n emit('update:field', props.value)\n}\nconst textarea = ref(null);\nconst input = ref(null);\nconst showPassword = ref(false);\n\nfunction resize() {\n if (!textarea.value) {\n return;\n }\n const el = textarea.value;\n el.style.height = '';\n const scrollHeight = el.scrollHeight;\n if (scrollHeight > 33) {\n el.style.height = scrollHeight + 'px';\n } else {\n el.style.height = '';\n }\n}\nfunction focus() {\n if (props.autofocus) {\n if (props.type === 'textarea' && textarea.value) {\n textarea.value.focus();\n } else if (input.value) {\n input.value.focus();\n }\n }\n}\nwatch(() => props.field, () => {\n if (props.type === 'textarea') {\n nextTick(resize);\n }\n});\nwatch(() => props.autofocus, (newVal) => {\n if (newVal) {\n nextTick(focus);\n }\n});\nonMounted(() => {\n nextTick(focus);\n nextTick(resize);\n});\nconst text = ref(props.field);\n</script>\n<template>\n <div\n :class=\"[\n $attrs.class,\n { 'bg-fourth-nano': validation }\n ]\"\n class=\"field-wrapper flex-center flex-nowrap flex\"\n >\n <!-- Слот для иконки -->\n <slot name=\"icon\" v-if=\"$slots.icon\" />\n <!-- Или компонент иконки через пропс -->\n <component :is=\"icon\" v-else-if=\"icon\" class=\"i-medium t-transp mn-r-thin\" />\n \n <div\n v-if=\"label\"\n class=\"t-transp mn-r-small\"\n >\n <span class=\"t-nowrap\">\n {{label}}\n </span>\n </div>\n <div class=\"w-100 pos-relative\">\n <input\n v-if=\"type !== 'textarea'\"\n ref=\"input\"\n @input=\"event => text = emit('update:field', event.target.value)\"\n @focus=\"event => emit('focus', event)\"\n @blur=\"event => emit('blur', event)\"\n :type=\"type === 'password' && !showPassword ? 'password' : type === 'password' ? 'text' : type\"\n class=\"w-100\"\n :value=\"field\"\n :placeholder=\"placeholder\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n :autofocus=\"autofocus\"\n />\n <textarea\n v-else\n ref=\"textarea\"\n @input=\"event => text = emit('update:field', event.target.value)\"\n @focus=\"event => emit('focus', event)\"\n @blur=\"event => emit('blur', event)\"\n class=\"w-100\"\n :value=\"field\"\n :placeholder=\"placeholder\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n />\n </div>\n <IconShow\n v-if=\"type === 'password'\"\n :show=\"!showPassword\"\n @click=\"showPassword = !showPassword\"\n class=\"i-medium cursor-pointer\"\n />\n <slot></slot>\n <div\n v-if=\"symbol\"\n class=\"t-transp mn-l-small\"\n >\n <span>\n {{symbol}}\n </span>\n </div>\n </div>\n <!-- Validation -->\n <transition name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin mn-b-thin mn-b-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n<style scoped>\ninput,\ntextarea,\nspan {\n color: inherit;\n line-height: 1;\n}\ntextarea {\n resize: none;\n overflow: hidden; \n height: 1rem;\n}\ninput[type=\"date\"]::-webkit-calendar-picker-indicator,\ninput[type=\"time\"]::-webkit-calendar-picker-indicator {\n filter: invert(1);\n opacity: 1;\n color: inherit;\n}\n</style>"],"names":["ref","watch","nextTick","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,UAAM,OAAO;AACb,UAAM,QAAQ;AAad,QAAI,MAAM,OAAO;AACf,WAAK,gBAAgB,MAAM,KAAK;AAAA,IAClC;AACA,UAAM,WAAWA,IAAAA,IAAI,IAAI;AACzB,UAAM,QAAQA,IAAAA,IAAI,IAAI;AACtB,UAAM,eAAeA,IAAAA,IAAI,KAAK;AAE9B,aAAS,SAAS;AAChB,UAAI,CAAC,SAAS,OAAO;AACnB;AAAA,MACF;AACA,YAAM,KAAK,SAAS;AACpB,SAAG,MAAM,SAAS;AAClB,YAAM,eAAe,GAAG;AACxB,UAAI,eAAe,IAAI;AACrB,WAAG,MAAM,SAAS,eAAe;AAAA,MACnC,OAAO;AACL,WAAG,MAAM,SAAS;AAAA,MACpB;AAAA,IACF;AACA,aAAS,QAAQ;AACf,UAAI,MAAM,WAAW;AACnB,YAAI,MAAM,SAAS,cAAc,SAAS,OAAO;AAC/C,mBAAS,MAAM,MAAK;AAAA,QACtB,WAAW,MAAM,OAAO;AACtB,gBAAM,MAAM,MAAK;AAAA,QACnB;AAAA,MACF;AAAA,IACF;AACAC,QAAAA,MAAM,MAAM,MAAM,OAAO,MAAM;AAC7B,UAAI,MAAM,SAAS,YAAY;AAC7BC,YAAAA,SAAS,MAAM;AAAA,MACjB;AAAA,IACF,CAAC;AACDD,QAAAA,MAAM,MAAM,MAAM,WAAW,CAAC,WAAW;AACvC,UAAI,QAAQ;AACVC,YAAAA,SAAS,KAAK;AAAA,MAChB;AAAA,IACF,CAAC;AACDC,QAAAA,UAAU,MAAM;AACdD,UAAAA,SAAS,KAAK;AACdA,UAAAA,SAAS,MAAM;AAAA,IACjB,CAAC;AACD,UAAM,OAAOF,IAAAA,IAAI,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}