@ozdao/martyrs 0.2.486 → 0.2.487

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 (591) hide show
  1. package/dist/Media-B2jWzwLB.cjs +1 -0
  2. package/dist/{Media-CXQSPHt2.js → Media-DZ5_ItXQ.js} +3 -3
  3. package/dist/auth.server.cjs +1 -1
  4. package/dist/auth.server.js +1 -1
  5. package/dist/{authJwt-DBB51Iql.cjs → authJwt-D35KyJlE.cjs} +31 -2
  6. package/dist/{authJwt-DcYNNwcr.js → authJwt-DqxhUym0.js} +31 -2
  7. package/dist/chats.server.cjs +1 -1
  8. package/dist/chats.server.js +1 -1
  9. package/dist/community.server.cjs +1 -1
  10. package/dist/community.server.js +1 -1
  11. package/dist/crud-BDIArc5A.cjs +1096 -0
  12. package/dist/crud-DJvpe0aZ.js +1097 -0
  13. package/dist/events.server.cjs +1 -1
  14. package/dist/events.server.js +1 -1
  15. package/dist/files.server.cjs +1 -1
  16. package/dist/files.server.js +1 -1
  17. package/dist/gallery.server.cjs +1 -1
  18. package/dist/gallery.server.js +1 -1
  19. package/dist/{index-CsJwdsBW.js → index-CVuQC4k1.js} +1 -1
  20. package/dist/{index-YNOkL1mu.cjs → index-DiSKVCaA.cjs} +1 -1
  21. package/dist/main-C6_DPWGX.cjs +11 -0
  22. package/dist/{main-Cfh5138F.js → main-nQmkbWsW.js} +825 -826
  23. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  24. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  25. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  26. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  27. package/dist/martyrs/src/components/Field/{Field.vue.cjs → Field.vue2.cjs} +5 -6
  28. package/dist/martyrs/src/components/Field/Field.vue2.cjs.map +1 -0
  29. package/dist/martyrs/src/components/Field/{Field.vue.js → Field.vue2.js} +5 -6
  30. package/dist/martyrs/src/components/Field/Field.vue2.js.map +1 -0
  31. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +10 -9
  32. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  33. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +13 -12
  34. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  35. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  36. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs.map +1 -1
  37. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  38. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/Media/Media.vue.cjs +2 -2
  40. package/dist/martyrs/src/components/Media/Media.vue.cjs.map +1 -1
  41. package/dist/martyrs/src/components/Media/Media.vue.js +2 -2
  42. package/dist/martyrs/src/components/Media/Media.vue.js.map +1 -1
  43. package/dist/martyrs/src/components/Select/Select.vue.cjs +2 -2
  44. package/dist/martyrs/src/components/Select/Select.vue.cjs.map +1 -1
  45. package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
  46. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -0
  48. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs.map +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -0
  50. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +5 -5
  53. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +5 -5
  55. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -0
  56. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -0
  58. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  59. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +10 -10
  61. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +4 -4
  63. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  64. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +5 -5
  65. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  66. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +4 -4
  67. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  68. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +23 -23
  69. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  70. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  71. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  72. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  73. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +11 -11
  75. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +3 -3
  77. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +2 -2
  79. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  81. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +25 -25
  83. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +15 -15
  85. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +9 -2
  86. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  87. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +9 -2
  88. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  89. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -1
  90. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  91. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -1
  92. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  93. package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs +24 -58
  94. package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
  95. package/dist/martyrs/src/modules/globals/views/classes/globals.store.js +24 -58
  96. package/dist/martyrs/src/modules/globals/views/classes/globals.store.js.map +1 -1
  97. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.js +2 -2
  99. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +1 -0
  100. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +1 -0
  102. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
  103. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.js +2 -2
  105. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.js +3 -3
  107. package/dist/martyrs/src/modules/globals/views/store/globals.cjs +6 -0
  108. package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
  109. package/dist/martyrs/src/modules/globals/views/store/globals.js +6 -0
  110. package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
  111. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.cjs +100 -0
  112. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.cjs.map +1 -0
  113. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.js +100 -0
  114. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.js.map +1 -0
  115. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs +224 -0
  116. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs.map +1 -0
  117. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +224 -0
  118. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -0
  119. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.cjs +40 -0
  120. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.cjs.map +1 -0
  121. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.js +40 -0
  122. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.js.map +1 -0
  123. package/dist/martyrs/src/modules/icons/entities/IconDate.vue.cjs +6 -6
  124. package/dist/martyrs/src/modules/icons/entities/IconDate.vue.js +6 -6
  125. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.cjs +32 -0
  126. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.cjs.map +1 -0
  127. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.js +32 -0
  128. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.js.map +1 -0
  129. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.cjs +10 -12
  130. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.cjs.map +1 -1
  131. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.js +11 -13
  132. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.cjs +32 -0
  134. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.cjs.map +1 -0
  135. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.js +32 -0
  136. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.js.map +1 -0
  137. package/dist/martyrs/src/modules/icons/icons.client.cjs +48 -4
  138. package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
  139. package/dist/martyrs/src/modules/icons/icons.client.js +172 -128
  140. package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
  141. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.cjs +5 -7
  142. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.cjs.map +1 -1
  143. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.js +5 -7
  144. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.js.map +1 -1
  145. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs +6 -11
  146. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs.map +1 -1
  147. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js +6 -11
  148. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js.map +1 -1
  149. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs +6 -11
  150. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs.map +1 -1
  151. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js +6 -11
  152. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js.map +1 -1
  153. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +62 -6
  154. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  155. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +189 -133
  156. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  157. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.cjs +21 -12
  158. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.cjs.map +1 -1
  159. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.js +21 -12
  160. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.js.map +1 -1
  161. package/dist/martyrs/src/modules/icons/socials/facebook.vue.cjs +21 -12
  162. package/dist/martyrs/src/modules/icons/socials/facebook.vue.cjs.map +1 -1
  163. package/dist/martyrs/src/modules/icons/socials/facebook.vue.js +21 -12
  164. package/dist/martyrs/src/modules/icons/socials/facebook.vue.js.map +1 -1
  165. package/dist/martyrs/src/modules/icons/socials/instagram.vue.cjs +25 -17
  166. package/dist/martyrs/src/modules/icons/socials/instagram.vue.cjs.map +1 -1
  167. package/dist/martyrs/src/modules/icons/socials/instagram.vue.js +25 -17
  168. package/dist/martyrs/src/modules/icons/socials/instagram.vue.js.map +1 -1
  169. package/dist/martyrs/src/modules/icons/socials/line.vue.cjs +23 -14
  170. package/dist/martyrs/src/modules/icons/socials/line.vue.cjs.map +1 -1
  171. package/dist/martyrs/src/modules/icons/socials/line.vue.js +23 -14
  172. package/dist/martyrs/src/modules/icons/socials/line.vue.js.map +1 -1
  173. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.cjs +26 -17
  174. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.cjs.map +1 -1
  175. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.js +26 -17
  176. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.js.map +1 -1
  177. package/dist/martyrs/src/modules/icons/socials/reddit.vue.cjs +21 -12
  178. package/dist/martyrs/src/modules/icons/socials/reddit.vue.cjs.map +1 -1
  179. package/dist/martyrs/src/modules/icons/socials/reddit.vue.js +21 -12
  180. package/dist/martyrs/src/modules/icons/socials/reddit.vue.js.map +1 -1
  181. package/dist/martyrs/src/modules/icons/socials/telegram.vue.cjs +29 -20
  182. package/dist/martyrs/src/modules/icons/socials/telegram.vue.cjs.map +1 -1
  183. package/dist/martyrs/src/modules/icons/socials/telegram.vue.js +29 -20
  184. package/dist/martyrs/src/modules/icons/socials/telegram.vue.js.map +1 -1
  185. package/dist/martyrs/src/modules/icons/socials/twitter.vue.cjs +21 -12
  186. package/dist/martyrs/src/modules/icons/socials/twitter.vue.cjs.map +1 -1
  187. package/dist/martyrs/src/modules/icons/socials/twitter.vue.js +21 -12
  188. package/dist/martyrs/src/modules/icons/socials/twitter.vue.js.map +1 -1
  189. package/dist/martyrs/src/modules/icons/socials/vk.vue.cjs +21 -12
  190. package/dist/martyrs/src/modules/icons/socials/vk.vue.cjs.map +1 -1
  191. package/dist/martyrs/src/modules/icons/socials/vk.vue.js +21 -12
  192. package/dist/martyrs/src/modules/icons/socials/vk.vue.js.map +1 -1
  193. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.cjs +32 -0
  194. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.cjs.map +1 -0
  195. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.js +32 -0
  196. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.js.map +1 -0
  197. package/dist/martyrs/src/modules/icons/socials/youtube.vue.cjs +21 -12
  198. package/dist/martyrs/src/modules/icons/socials/youtube.vue.cjs.map +1 -1
  199. package/dist/martyrs/src/modules/icons/socials/youtube.vue.js +21 -12
  200. package/dist/martyrs/src/modules/icons/socials/youtube.vue.js.map +1 -1
  201. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +3 -3
  202. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -1
  203. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +3 -3
  204. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  205. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +3 -3
  206. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -1
  207. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +3 -3
  208. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +3 -3
  210. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -1
  211. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +3 -3
  212. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
  213. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +2 -2
  214. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +1 -1
  215. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +2 -2
  216. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +1 -1
  217. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +162 -0
  218. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs.map +1 -0
  219. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +162 -0
  220. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -0
  221. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +437 -0
  222. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs.map +1 -0
  223. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +437 -0
  224. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -0
  225. package/dist/martyrs/src/modules/music/components/{pages → forms}/ArtistForm.vue.cjs +140 -106
  226. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs.map +1 -0
  227. package/dist/martyrs/src/modules/music/components/{pages → forms}/ArtistForm.vue.js +162 -128
  228. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -0
  229. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +11 -11
  230. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -1
  231. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +23 -23
  232. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
  233. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +2 -2
  234. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -1
  235. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +2 -2
  236. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -1
  237. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +554 -0
  238. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs.map +1 -0
  239. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +554 -0
  240. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -0
  241. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +57 -68
  242. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +1 -1
  243. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +58 -69
  244. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +1 -1
  245. package/dist/martyrs/src/modules/music/components/pages/{AlbumDetail.vue.cjs → Album.vue.cjs} +47 -23
  246. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -0
  247. package/dist/martyrs/src/modules/music/components/pages/{AlbumDetail.vue.js → Album.vue.js} +47 -23
  248. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -0
  249. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.cjs +14 -0
  250. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.cjs.map +1 -0
  251. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.js +14 -0
  252. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.js.map +1 -0
  253. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.cjs +23 -0
  254. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.cjs.map +1 -0
  255. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.js +23 -0
  256. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.js.map +1 -0
  257. package/dist/martyrs/src/modules/music/components/pages/{ArtistDetail.vue.cjs → Artist.vue.cjs} +11 -11
  258. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs.map +1 -0
  259. package/dist/martyrs/src/modules/music/components/pages/{ArtistDetail.vue.js → Artist.vue.js} +11 -11
  260. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -0
  261. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.cjs +14 -0
  262. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.cjs.map +1 -0
  263. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.js +14 -0
  264. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.js.map +1 -0
  265. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.cjs +23 -0
  266. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.cjs.map +1 -0
  267. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.js +23 -0
  268. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.js.map +1 -0
  269. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +94 -59
  270. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -1
  271. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +95 -60
  272. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
  273. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +168 -120
  274. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -1
  275. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +170 -122
  276. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -1
  277. package/dist/martyrs/src/modules/music/components/pages/{PlaylistDetail.vue.cjs → Playlist.vue.cjs} +60 -36
  278. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -0
  279. package/dist/martyrs/src/modules/music/components/pages/{PlaylistDetail.vue.js → Playlist.vue.js} +73 -49
  280. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -0
  281. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.cjs +14 -0
  282. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.cjs.map +1 -0
  283. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.js +14 -0
  284. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.js.map +1 -0
  285. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.cjs +23 -0
  286. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.cjs.map +1 -0
  287. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.js +23 -0
  288. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.js.map +1 -0
  289. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +52 -28
  290. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -1
  291. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +52 -28
  292. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
  293. package/dist/martyrs/src/modules/music/components/pages/{TrackDetail.vue.cjs → Track.vue.cjs} +37 -13
  294. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -0
  295. package/dist/martyrs/src/modules/music/components/pages/{TrackDetail.vue.js → Track.vue.js} +38 -14
  296. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -0
  297. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +28 -0
  298. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs.map +1 -0
  299. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +28 -0
  300. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -0
  301. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.cjs +23 -0
  302. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.cjs.map +1 -0
  303. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.js +23 -0
  304. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.js.map +1 -0
  305. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +3 -3
  306. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -1
  307. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +3 -3
  308. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
  309. package/dist/martyrs/src/modules/music/music.client.cjs +31 -31
  310. package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -1
  311. package/dist/martyrs/src/modules/music/music.client.js +31 -31
  312. package/dist/martyrs/src/modules/music/music.client.js.map +1 -1
  313. package/dist/martyrs/src/modules/music/router/albums.cjs +34 -0
  314. package/dist/martyrs/src/modules/music/router/albums.cjs.map +1 -0
  315. package/dist/martyrs/src/modules/music/router/albums.js +34 -0
  316. package/dist/martyrs/src/modules/music/router/albums.js.map +1 -0
  317. package/dist/martyrs/src/modules/music/router/artists.cjs +34 -0
  318. package/dist/martyrs/src/modules/music/router/artists.cjs.map +1 -0
  319. package/dist/martyrs/src/modules/music/router/artists.js +34 -0
  320. package/dist/martyrs/src/modules/music/router/artists.js.map +1 -0
  321. package/dist/martyrs/src/modules/music/router/music.cjs +12 -64
  322. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  323. package/dist/martyrs/src/modules/music/router/music.js +12 -64
  324. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  325. package/dist/martyrs/src/modules/music/router/playlists.cjs +34 -0
  326. package/dist/martyrs/src/modules/music/router/playlists.cjs.map +1 -0
  327. package/dist/martyrs/src/modules/music/router/playlists.js +34 -0
  328. package/dist/martyrs/src/modules/music/router/playlists.js.map +1 -0
  329. package/dist/martyrs/src/modules/music/router/tracks.cjs +34 -0
  330. package/dist/martyrs/src/modules/music/router/tracks.cjs.map +1 -0
  331. package/dist/martyrs/src/modules/music/router/tracks.js +34 -0
  332. package/dist/martyrs/src/modules/music/router/tracks.js.map +1 -0
  333. package/dist/martyrs/src/modules/music/store/artists.cjs +12 -6
  334. package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -1
  335. package/dist/martyrs/src/modules/music/store/artists.js +12 -6
  336. package/dist/martyrs/src/modules/music/store/artists.js.map +1 -1
  337. package/dist/martyrs/src/modules/music/store/genres.cjs +123 -0
  338. package/dist/martyrs/src/modules/music/store/genres.cjs.map +1 -0
  339. package/dist/martyrs/src/modules/music/store/genres.js +123 -0
  340. package/dist/martyrs/src/modules/music/store/genres.js.map +1 -0
  341. package/dist/martyrs/src/modules/music/store/playlists.cjs +14 -6
  342. package/dist/martyrs/src/modules/music/store/playlists.cjs.map +1 -1
  343. package/dist/martyrs/src/modules/music/store/playlists.js +14 -6
  344. package/dist/martyrs/src/modules/music/store/playlists.js.map +1 -1
  345. package/dist/martyrs/src/modules/music/store/tracks.cjs +6 -2
  346. package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -1
  347. package/dist/martyrs/src/modules/music/store/tracks.js +6 -2
  348. package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
  349. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -0
  350. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  351. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -0
  352. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  353. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
  354. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
  355. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -0
  356. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
  357. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  358. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
  359. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  360. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  361. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  362. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  363. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +16 -16
  364. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  365. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +15 -15
  366. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  367. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +16 -16
  368. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
  369. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
  370. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  371. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  372. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  373. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +8 -8
  374. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -0
  375. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs.map +1 -1
  376. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -0
  377. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  378. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -0
  379. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs.map +1 -1
  380. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -0
  381. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
  382. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -0
  383. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs.map +1 -1
  384. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -0
  385. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js.map +1 -1
  386. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  387. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  388. package/dist/martyrs/src/modules/products/components/forms/ReorderSettingsForm.vue.cjs +1 -1
  389. package/dist/martyrs/src/modules/products/components/forms/ReorderSettingsForm.vue.js +8 -8
  390. package/dist/martyrs/src/modules/products/components/forms/StockAuditForm.vue.cjs +1 -1
  391. package/dist/martyrs/src/modules/products/components/forms/StockAuditForm.vue.js +12 -12
  392. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  393. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +11 -11
  394. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +1 -1
  395. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +10 -10
  396. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  397. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +17 -17
  398. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  399. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +6 -6
  400. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  401. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +12 -12
  402. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  403. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +16 -16
  404. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
  405. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +4 -4
  406. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  407. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  408. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -0
  409. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs.map +1 -1
  410. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -0
  411. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js.map +1 -1
  412. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -0
  413. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
  414. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -0
  415. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
  416. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  417. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +12 -12
  418. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  419. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +7 -7
  420. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  421. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +2 -2
  422. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  423. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  424. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  425. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  426. package/dist/martyrs.cjs.js +1 -1
  427. package/dist/martyrs.css +1 -1
  428. package/dist/martyrs.es.js +1 -1
  429. package/dist/music.server.cjs +1165 -551
  430. package/dist/music.server.js +1161 -547
  431. package/dist/orders.server.cjs +89 -4
  432. package/dist/orders.server.js +88 -3
  433. package/dist/organizations.server.cjs +1 -1
  434. package/dist/organizations.server.js +1 -1
  435. package/dist/products.server.cjs +3 -1093
  436. package/dist/products.server.js +2 -1092
  437. package/dist/rents.server.cjs +1 -1
  438. package/dist/rents.server.js +1 -1
  439. package/dist/style.css +121 -77
  440. package/dist/wallet.server.cjs +1 -1
  441. package/dist/wallet.server.js +1 -1
  442. package/package.json +1 -1
  443. package/src/components/Field/Field.vue +13 -8
  444. package/src/components/FieldBig/FieldBig.vue +3 -5
  445. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  446. package/src/components/Media/Media.vue +1 -1
  447. package/src/components/Select/Select.vue +1 -1
  448. package/src/components/Status/Snack.vue +83 -0
  449. package/src/modules/auth/controllers/middlewares/authJwt.js +59 -6
  450. package/src/modules/globals/views/classes/globals.store.js +31 -66
  451. package/src/modules/globals/views/components/partials/FooterAlt.vue +363 -0
  452. package/src/modules/globals/views/store/globals.js +42 -0
  453. package/src/modules/globals/views/utils/query-serializer.js +182 -0
  454. package/src/modules/icons/components/IconSearchPopup.vue +254 -0
  455. package/src/modules/icons/entities/IconAddress.vue +17 -0
  456. package/src/modules/icons/entities/IconDate.vue +3 -3
  457. package/src/modules/icons/entities/IconEmail.vue +14 -0
  458. package/src/modules/icons/entities/IconMusic.vue +3 -3
  459. package/src/modules/icons/entities/IconPhone.vue +14 -0
  460. package/src/modules/icons/icons.client.js +85 -31
  461. package/src/modules/icons/icons.server.js +292 -0
  462. package/src/modules/icons/navigation/IconCross.vue +4 -16
  463. package/src/modules/icons/navigation/IconPause.vue +9 -24
  464. package/src/modules/icons/navigation/IconRefresh.vue +9 -24
  465. package/src/modules/icons/pages/IconsPage.vue +78 -2
  466. package/src/modules/icons/routes/icons.routes.js +81 -0
  467. package/src/modules/icons/socials/dribbble.vue +11 -2
  468. package/src/modules/icons/socials/facebook.vue +11 -2
  469. package/src/modules/icons/socials/instagram.vue +11 -4
  470. package/src/modules/icons/socials/line.vue +11 -2
  471. package/src/modules/icons/socials/linkedin.vue +11 -2
  472. package/src/modules/icons/socials/reddit.vue +10 -1
  473. package/src/modules/icons/socials/telegram.vue +11 -2
  474. package/src/modules/icons/socials/twitter.vue +11 -2
  475. package/src/modules/icons/socials/vk.vue +11 -2
  476. package/src/modules/icons/socials/whatsapp.vue +12 -0
  477. package/src/modules/icons/socials/youtube.vue +11 -2
  478. package/src/modules/music/.claude/settings.local.json +8 -0
  479. package/src/modules/music/CLAUDE.md +312 -0
  480. package/src/modules/music/components/SidebarMusic.vue +8 -8
  481. package/src/modules/music/components/cards/AlbumCard.vue +2 -2
  482. package/src/modules/music/components/cards/ArtistCard.vue +2 -2
  483. package/src/modules/music/components/cards/PlaylistCard.vue +2 -2
  484. package/src/modules/music/components/cards/TrackCard.vue +1 -1
  485. package/src/modules/music/components/cards/TrackListCard.vue +135 -0
  486. package/src/modules/music/components/forms/AlbumForm.vue +463 -0
  487. package/src/modules/music/components/{pages → forms}/ArtistForm.vue +127 -96
  488. package/src/modules/music/components/forms/PlaylistForm.vue +10 -10
  489. package/src/modules/music/components/forms/SearchForm.vue +1 -1
  490. package/src/modules/music/components/forms/TrackForm.vue +577 -0
  491. package/src/modules/music/components/layouts/MusicLayout.vue +35 -41
  492. package/src/modules/music/components/pages/{AlbumDetail.vue → Album.vue} +42 -20
  493. package/src/modules/music/components/pages/AlbumCreate.vue +7 -0
  494. package/src/modules/music/components/pages/AlbumEdit.vue +14 -0
  495. package/src/modules/music/components/pages/{ArtistDetail.vue → Artist.vue} +9 -9
  496. package/src/modules/music/components/pages/ArtistCreate.vue +7 -0
  497. package/src/modules/music/components/pages/ArtistEdit.vue +14 -0
  498. package/src/modules/music/components/pages/MusicHome.vue +86 -67
  499. package/src/modules/music/components/pages/MusicLibrary.vue +136 -105
  500. package/src/modules/music/components/pages/{PlaylistDetail.vue → Playlist.vue} +56 -34
  501. package/src/modules/music/components/pages/PlaylistCreate.vue +7 -0
  502. package/src/modules/music/components/pages/PlaylistEdit.vue +14 -0
  503. package/src/modules/music/components/pages/SearchResults.vue +49 -27
  504. package/src/modules/music/components/pages/{TrackDetail.vue → Track.vue} +36 -14
  505. package/src/modules/music/components/pages/TrackCreate.vue +23 -0
  506. package/src/modules/music/components/pages/TrackEdit.vue +14 -0
  507. package/src/modules/music/components/player/MusicPlayer.vue +2 -2
  508. package/src/modules/music/middlewares/albums.verifier.js +234 -0
  509. package/src/modules/music/middlewares/artists.verifier.js +213 -0
  510. package/src/modules/music/middlewares/genres.verifier.js +148 -0
  511. package/src/modules/music/middlewares/playlists.verifier.js +219 -0
  512. package/src/modules/music/middlewares/tracks.verifier.js +263 -0
  513. package/src/modules/music/music.client.js +31 -33
  514. package/src/modules/music/music.server.js +33 -26
  515. package/src/modules/music/router/albums.js +31 -0
  516. package/src/modules/music/router/artists.js +31 -0
  517. package/src/modules/music/router/music.js +14 -65
  518. package/src/modules/music/router/playlists.js +31 -0
  519. package/src/modules/music/router/tracks.js +31 -0
  520. package/src/modules/music/routes/albums.routes.js +126 -0
  521. package/src/modules/music/routes/artists.routes.js +171 -0
  522. package/src/modules/music/routes/genres.routes.js +118 -0
  523. package/src/modules/music/routes/playlists.routes.js +239 -0
  524. package/src/modules/music/routes/tracks.routes.js +149 -0
  525. package/src/modules/music/store/artists.js +17 -7
  526. package/src/modules/music/store/genres.js +150 -0
  527. package/src/modules/music/store/playlists.js +19 -6
  528. package/src/modules/music/store/tracks.js +9 -2
  529. package/dist/Media-DhpD64nT.cjs +0 -1
  530. package/dist/globals.crud-BQG1Lm0A.js +0 -90
  531. package/dist/globals.crud-Dv7UXbRM.cjs +0 -89
  532. package/dist/main-DKJqboZy.cjs +0 -11
  533. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  534. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  535. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +0 -1
  536. package/dist/martyrs/src/components/Field/Field.vue.js.map +0 -1
  537. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.cjs +0 -328
  538. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.cjs.map +0 -1
  539. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.js +0 -328
  540. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.js.map +0 -1
  541. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.cjs +0 -44
  542. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.cjs.map +0 -1
  543. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.js +0 -44
  544. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.js.map +0 -1
  545. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.cjs +0 -305
  546. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.cjs.map +0 -1
  547. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.js +0 -305
  548. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.js.map +0 -1
  549. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.cjs +0 -44
  550. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.cjs.map +0 -1
  551. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.js +0 -44
  552. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.js.map +0 -1
  553. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.cjs +0 -199
  554. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.cjs.map +0 -1
  555. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.js +0 -199
  556. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.js.map +0 -1
  557. package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.cjs.map +0 -1
  558. package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.js.map +0 -1
  559. package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.cjs.map +0 -1
  560. package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.js.map +0 -1
  561. package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.cjs.map +0 -1
  562. package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.js.map +0 -1
  563. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.cjs +0 -303
  564. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.cjs.map +0 -1
  565. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.js +0 -303
  566. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.js.map +0 -1
  567. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.cjs +0 -50
  568. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.cjs.map +0 -1
  569. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.js +0 -50
  570. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.js.map +0 -1
  571. package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.cjs.map +0 -1
  572. package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.js.map +0 -1
  573. package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.cjs.map +0 -1
  574. package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.js.map +0 -1
  575. package/src/modules/music/components/forms/UploadForm.vue +0 -313
  576. package/src/modules/music/components/lists/AlbumList.vue +0 -25
  577. package/src/modules/music/components/lists/ArtistList.vue +0 -280
  578. package/src/modules/music/components/lists/PlaylistList.vue +0 -25
  579. package/src/modules/music/components/lists/TrackList.vue +0 -175
  580. package/src/modules/music/components/pages/ArtistManager.vue +0 -277
  581. package/src/modules/music/components/pages/MusicUpload.vue +0 -44
  582. package/src/modules/music/controllers/album.controller.js +0 -82
  583. package/src/modules/music/controllers/artist.controller.js +0 -99
  584. package/src/modules/music/controllers/genre.controller.js +0 -63
  585. package/src/modules/music/controllers/music.controller.js +0 -145
  586. package/src/modules/music/controllers/playlist.controller.js +0 -146
  587. package/src/modules/music/routes/album.routes.js +0 -28
  588. package/src/modules/music/routes/artist.routes.js +0 -30
  589. package/src/modules/music/routes/genre.routes.js +0 -28
  590. package/src/modules/music/routes/music.routes.js +0 -106
  591. package/src/modules/music/routes/playlist.routes.js +0 -47
@@ -0,0 +1,1097 @@
1
+ import { m as middlewareFactory } from "./authJwt-DqxhUym0.js";
2
+ import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
3
+ import { O as Observer } from "./globals.observer-CDqUjVU5.js";
4
+ import { L as Logger, C as Cache } from "./globals.logger-Bf6rRU7j.js";
5
+ class CRUDCore {
6
+ constructor(crud) {
7
+ this.crud = crud;
8
+ this.verifiers = {};
9
+ this.hooks = {};
10
+ this.aggregateExtensions = {};
11
+ this.cacheOptions = {
12
+ ttl: 300,
13
+ // 5 минут по умолчанию
14
+ tags: [crud.modelName],
15
+ enabled: true
16
+ };
17
+ this.auth = {
18
+ read: false,
19
+ // Публичный доступ к чтению
20
+ create: true,
21
+ // Требует авторизацию
22
+ update: true,
23
+ // Требует авторизацию
24
+ delete: true
25
+ // Требует авторизацию
26
+ };
27
+ this.options = {
28
+ enableEvents: true,
29
+ enableAudit: false,
30
+ enableMetrics: false,
31
+ strictMode: false,
32
+ serviceKey: process.env.SERVICE_KEY
33
+ };
34
+ }
35
+ // Инициализация с опциями
36
+ init(options = {}) {
37
+ if (options.auth !== void 0) {
38
+ if (options.auth === false) {
39
+ this.auth = false;
40
+ } else if (options.auth === true) {
41
+ this.auth = {
42
+ read: false,
43
+ create: true,
44
+ update: true,
45
+ delete: true
46
+ };
47
+ } else if (typeof options.auth === "object") {
48
+ this.auth = {
49
+ read: false,
50
+ create: true,
51
+ update: true,
52
+ delete: true,
53
+ ...options.auth
54
+ };
55
+ }
56
+ }
57
+ if (options.cache !== void 0) {
58
+ if (options.cache === false) {
59
+ this.cacheOptions.enabled = false;
60
+ } else if (typeof options.cache === "object") {
61
+ this.setCacheOptions(options.cache);
62
+ }
63
+ }
64
+ if (options.events !== void 0) {
65
+ if (options.events === false) {
66
+ this.options.enableEvents = false;
67
+ } else if (typeof options.events === "object") {
68
+ Object.assign(this.options, options.events);
69
+ }
70
+ }
71
+ if (options.verifiers) this.initVerifiers(options.verifiers);
72
+ if (options.hooks) this.initHooks(options.hooks);
73
+ if (options.middlewares) this.initMiddlewares(options.middlewares);
74
+ if (options.aggregateExtensions) this.initAggregateExtensions(options.aggregateExtensions);
75
+ if (options.abac) this.initABAC(options.abac, options.policies, options.fieldsPolicies);
76
+ if (options.serviceKey !== void 0) {
77
+ this.options.serviceKey = options.serviceKey;
78
+ }
79
+ this.crud.events.init(this.options);
80
+ if (options.abac) {
81
+ this.crud.policies.init(options.abac, options.policies, options.fieldsPolicies);
82
+ }
83
+ }
84
+ // Управление auth
85
+ setAuth(action, required) {
86
+ if (this.auth === false) {
87
+ this.auth = {};
88
+ }
89
+ this.auth[action] = required;
90
+ }
91
+ getAuth(action) {
92
+ if (this.auth === false) return false;
93
+ return this.auth[action] ?? true;
94
+ }
95
+ isAuthEnabled() {
96
+ return this.auth !== false;
97
+ }
98
+ // Управление верификаторами
99
+ setVerifier(action, verifier) {
100
+ this.verifiers[action] = verifier;
101
+ }
102
+ getVerifier(action) {
103
+ return this.verifiers[action];
104
+ }
105
+ initVerifiers(verifiers) {
106
+ Object.entries(verifiers).forEach(([action, verifier]) => {
107
+ this.setVerifier(action, verifier);
108
+ });
109
+ }
110
+ // Управление хуками
111
+ addHook(name, handler) {
112
+ this.hooks[name] = handler;
113
+ }
114
+ getHook(name) {
115
+ return this.hooks[name];
116
+ }
117
+ async executeHook(name, ...args) {
118
+ const hook = this.getHook(name);
119
+ if (hook) {
120
+ return await hook(...args);
121
+ }
122
+ }
123
+ initHooks(hooks) {
124
+ Object.entries(hooks).forEach(([name, handler]) => {
125
+ this.addHook(name, handler);
126
+ });
127
+ }
128
+ // Управление расширениями агрегации
129
+ addAggregateExtension(phase, extension) {
130
+ this.aggregateExtensions[phase] = extension;
131
+ }
132
+ getAggregateExtensions() {
133
+ return this.aggregateExtensions;
134
+ }
135
+ initAggregateExtensions(extensions) {
136
+ Object.entries(extensions).forEach(([phase, extension]) => {
137
+ this.addAggregateExtension(phase, extension);
138
+ });
139
+ }
140
+ // Управление middleware (делегирует в controller)
141
+ initMiddlewares(middlewares) {
142
+ Object.entries(middlewares).forEach(([phase, actions]) => {
143
+ if (typeof actions === "object") {
144
+ Object.entries(actions).forEach(([action, mws]) => {
145
+ const middlewareArray = Array.isArray(mws) ? mws : [mws];
146
+ middlewareArray.forEach((mw) => {
147
+ this.crud.controller.addMiddleware(phase, action, mw);
148
+ });
149
+ });
150
+ }
151
+ });
152
+ }
153
+ // Управление ABAC (делегирует в policies)
154
+ initABAC(abac, policies = {}, fieldsPolicies = null) {
155
+ if (fieldsPolicies && typeof fieldsPolicies === "function" && abac) {
156
+ abac.registerFieldsPolicy(this.crud.modelName, fieldsPolicies);
157
+ }
158
+ }
159
+ // Управление кешем
160
+ getCacheOptions() {
161
+ return { ...this.cacheOptions };
162
+ }
163
+ setCacheOptions(options) {
164
+ Object.assign(this.cacheOptions, options);
165
+ if (!this.cacheOptions.tags.includes(this.crud.modelName)) {
166
+ this.cacheOptions.tags.unshift(this.crud.modelName);
167
+ }
168
+ }
169
+ // Получение опций
170
+ getOptions() {
171
+ return { ...this.options };
172
+ }
173
+ setOption(key, value) {
174
+ this.options[key] = value;
175
+ }
176
+ // Проверка включенности функций
177
+ isEventsEnabled() {
178
+ return this.options.enableEvents;
179
+ }
180
+ isCacheEnabled() {
181
+ return this.cacheOptions.enabled && this.crud.cache !== null;
182
+ }
183
+ isAuditEnabled() {
184
+ return this.options.enableAudit;
185
+ }
186
+ isMetricsEnabled() {
187
+ return this.options.enableMetrics;
188
+ }
189
+ }
190
+ class CRUDController {
191
+ constructor(crud) {
192
+ this.crud = crud;
193
+ this.routes = /* @__PURE__ */ new Map();
194
+ this.middlewares = {
195
+ before: {},
196
+ after: {}
197
+ };
198
+ this.jwt = middlewareFactory(crud.db);
199
+ }
200
+ // Добавление middleware
201
+ addMiddleware(phase, action, middleware) {
202
+ if (!["before", "after"].includes(phase)) {
203
+ throw new Error(`Invalid middleware phase: ${phase}`);
204
+ }
205
+ if (!this.middlewares[phase][action]) {
206
+ this.middlewares[phase][action] = [];
207
+ }
208
+ this.middlewares[phase][action].push(middleware);
209
+ }
210
+ // Получение middleware для действия
211
+ getMiddlewares(phase, action) {
212
+ return this.middlewares[phase][action] || [];
213
+ }
214
+ // Регистрация роута
215
+ registerRoute(method, path, actionName) {
216
+ const fullPath = `${this.crud.basePath}${path}`;
217
+ const middlewareStack = [];
218
+ if (this.crud.core.isAuthEnabled()) {
219
+ const authRequired = this.crud.core.getAuth(actionName);
220
+ middlewareStack.push(this.jwt.verifyToken(!authRequired));
221
+ }
222
+ const verifierMiddleware = this._createVerifierMiddleware(method, actionName);
223
+ if (verifierMiddleware) {
224
+ middlewareStack.push(verifierMiddleware);
225
+ }
226
+ middlewareStack.push(...this.getMiddlewares("before", actionName));
227
+ const abacMiddleware = this.crud.policies.getPoliciesMiddleware(actionName);
228
+ if (abacMiddleware) {
229
+ middlewareStack.push(abacMiddleware);
230
+ }
231
+ if (["create", "update"].includes(actionName)) {
232
+ const fieldsMiddleware = this.crud.policies.getFieldsMiddleware(actionName);
233
+ if (fieldsMiddleware) {
234
+ middlewareStack.push(fieldsMiddleware);
235
+ }
236
+ }
237
+ const handler = this._createHandler(actionName);
238
+ const wrappedHandler = this._wrapHandler(handler, actionName);
239
+ this.crud.app[method](fullPath, ...middlewareStack, wrappedHandler);
240
+ this.routes.set(`${method.toUpperCase()} ${fullPath}`, {
241
+ method,
242
+ path: fullPath,
243
+ actionName,
244
+ middlewareStack
245
+ });
246
+ return this;
247
+ }
248
+ // Регистрация кастомного роута
249
+ registerCustomRoute(method, path, actionName, handler) {
250
+ this.crud.service.registerCustomHandler(actionName, handler);
251
+ return this.registerRoute(method, path, actionName);
252
+ }
253
+ // Создание handler для стандартных CRUD операций
254
+ _createHandler(actionName) {
255
+ switch (actionName) {
256
+ case "create":
257
+ return async (req, res) => {
258
+ try {
259
+ const data = req.verified || req.body;
260
+ const context = this._buildContext(req);
261
+ const created = await this.crud.service.create(data, context);
262
+ res.status(201).json(created);
263
+ } catch (error) {
264
+ this._handleError(error, res);
265
+ }
266
+ };
267
+ case "read":
268
+ return async (req, res) => {
269
+ try {
270
+ const query = req.verified || req.query;
271
+ const context = this._buildContext(req);
272
+ let data = await this.crud.service.read(query, context);
273
+ if (this.crud.policies.hasAbac()) {
274
+ data = await this.crud.policies.filterFieldsForRead(req, data);
275
+ }
276
+ res.json(data);
277
+ } catch (error) {
278
+ this._handleError(error, res);
279
+ }
280
+ };
281
+ case "update":
282
+ return async (req, res) => {
283
+ try {
284
+ const data = req.verified || req.body;
285
+ const { _id, ...updateData } = data;
286
+ if (!_id) {
287
+ return res.status(400).json({ error: "ID_REQUIRED" });
288
+ }
289
+ const context = this._buildContext(req);
290
+ const updated = await this.crud.service.update(_id, updateData, context);
291
+ res.json(updated);
292
+ } catch (error) {
293
+ this._handleError(error, res);
294
+ }
295
+ };
296
+ case "delete":
297
+ return async (req, res) => {
298
+ try {
299
+ const data = req.verified || req.query || req.body;
300
+ const { _id } = data;
301
+ if (!_id) {
302
+ return res.status(400).json({ error: "ID_REQUIRED" });
303
+ }
304
+ const context = this._buildContext(req);
305
+ await this.crud.service.delete(_id, context);
306
+ res.status(204).send();
307
+ } catch (error) {
308
+ this._handleError(error, res);
309
+ }
310
+ };
311
+ default:
312
+ return async (req, res) => {
313
+ try {
314
+ const customHandler = this.crud.service.getCustomHandler(actionName);
315
+ if (!customHandler) {
316
+ return res.status(404).json({ error: "ACTION_NOT_FOUND" });
317
+ }
318
+ await customHandler.call(this.crud, req, res);
319
+ } catch (error) {
320
+ this._handleError(error, res);
321
+ }
322
+ };
323
+ }
324
+ }
325
+ // Создание контекста из request
326
+ _buildContext(req) {
327
+ return {
328
+ userId: req.userId,
329
+ user: req.user,
330
+ organizationId: req.organizationId,
331
+ roles: req.roles || [],
332
+ permissions: req.permissions || [],
333
+ abacContext: req.abacContext || {},
334
+ ip: req.ip,
335
+ userAgent: req.get("user-agent"),
336
+ isServiceRequest: req.isServiceRequest || false,
337
+ ...req.context
338
+ // Дополнительный контекст
339
+ };
340
+ }
341
+ // Обработка ошибок
342
+ _handleError(error, res) {
343
+ if (res.headersSent) return;
344
+ const statusCode = error.statusCode || error.code === "NOT_FOUND" ? 404 : 500;
345
+ const message = error.message || "Internal Server Error";
346
+ res.status(statusCode).json({
347
+ error: message,
348
+ code: error.code
349
+ });
350
+ }
351
+ // Создание middleware для верификации
352
+ _createVerifierMiddleware(method, actionName) {
353
+ const verifier = this.crud.core.getVerifier(actionName);
354
+ if (!verifier) return null;
355
+ const verifyTarget = this._getVerificationTarget(method, actionName);
356
+ if (!verifyTarget) return null;
357
+ return (req, res, next) => {
358
+ const data = verifyTarget === "query" ? req.query : req.body;
359
+ const result = verifier.verify ? verifier.verify(data) : verifier.validate(data);
360
+ if (!result.isValid) {
361
+ return res.status(400).json({
362
+ error: "VALIDATION_ERROR",
363
+ field: verifyTarget,
364
+ errors: result.verificationErrors || result.errors
365
+ });
366
+ }
367
+ console.log("verified result", result);
368
+ req.verified = result.verifiedData || data;
369
+ next();
370
+ };
371
+ }
372
+ // Определение цели верификации
373
+ _getVerificationTarget(method, actionName) {
374
+ if (["create", "update"].includes(actionName)) {
375
+ return "body";
376
+ }
377
+ if (["read", "delete"].includes(actionName)) {
378
+ return "query";
379
+ }
380
+ if (["post", "put", "patch"].includes(method)) {
381
+ return "body";
382
+ }
383
+ if (["get", "delete"].includes(method)) {
384
+ return "query";
385
+ }
386
+ return null;
387
+ }
388
+ // Обертка handler для after middleware
389
+ _wrapHandler(handler, actionName) {
390
+ return async (req, res, next) => {
391
+ try {
392
+ await handler(req, res, next);
393
+ if (!res.headersSent) {
394
+ const afterMiddlewares = this.getMiddlewares("after", actionName);
395
+ for (const mw of afterMiddlewares) {
396
+ await new Promise((resolve, reject) => {
397
+ mw(req, res, (err) => err ? reject(err) : resolve());
398
+ });
399
+ }
400
+ }
401
+ } catch (error) {
402
+ next(error);
403
+ }
404
+ };
405
+ }
406
+ // Получение информации о роутах
407
+ getRoutes() {
408
+ return Array.from(this.routes.entries()).map(([key, value]) => ({
409
+ key,
410
+ ...value
411
+ }));
412
+ }
413
+ // Удаление роута
414
+ removeRoute(method, path) {
415
+ const key = `${method.toUpperCase()} ${this.crud.basePath}${path}`;
416
+ return this.routes.delete(key);
417
+ }
418
+ // Проверка существования роута
419
+ hasRoute(method, path) {
420
+ const key = `${method.toUpperCase()} ${this.crud.basePath}${path}`;
421
+ return this.routes.has(key);
422
+ }
423
+ }
424
+ class CRUDService {
425
+ constructor(crud) {
426
+ this.crud = crud;
427
+ this.customHandlers = /* @__PURE__ */ new Map();
428
+ }
429
+ // Регистрация кастомного handler
430
+ registerCustomHandler(name, handler) {
431
+ this.customHandlers.set(name, handler);
432
+ }
433
+ // CREATE операция
434
+ async create(data, context = {}) {
435
+ try {
436
+ const hookData = await this.crud.core.executeHook("beforeCreate", data, context);
437
+ const finalData = hookData || data;
438
+ const created = await this.crud.model.create(finalData);
439
+ if (this.crud.core.isCacheEnabled()) {
440
+ await this.invalidateCache("create", created);
441
+ }
442
+ if (this.crud.core.isEventsEnabled()) {
443
+ await this.crud.events.emit("created", {
444
+ document: created,
445
+ user: context.userId
446
+ });
447
+ }
448
+ await this.crud.core.executeHook("afterCreate", created, context);
449
+ return created;
450
+ } catch (error) {
451
+ console.log(error);
452
+ await this.crud.events.logError("create", error);
453
+ throw error;
454
+ }
455
+ }
456
+ // READ операция
457
+ async read(query = {}, context = {}) {
458
+ try {
459
+ await this.crud.core.executeHook("beforeRead", query, context);
460
+ let data = null;
461
+ let cacheKey = null;
462
+ if (this.crud.core.isCacheEnabled()) {
463
+ cacheKey = this.generateCacheKey("read", query);
464
+ data = await this.crud.cache.get(cacheKey);
465
+ }
466
+ if (!data) {
467
+ const pipeline = await this.buildAggregationPipeline(query, context);
468
+ data = await this.crud.model.aggregate(pipeline).exec();
469
+ if (this.crud.core.isCacheEnabled() && cacheKey) {
470
+ const cacheOptions = this.crud.core.getCacheOptions();
471
+ await this.crud.cache.setWithTags(
472
+ cacheKey,
473
+ data,
474
+ [...cacheOptions.tags, `${this.crud.modelName}_list`],
475
+ cacheOptions.ttl
476
+ );
477
+ }
478
+ }
479
+ if (this.crud.core.isEventsEnabled()) {
480
+ await this.crud.events.emitRead(query, data, context.userId);
481
+ }
482
+ const hookResult = await this.crud.core.executeHook("afterRead", data, context);
483
+ return hookResult || data;
484
+ } catch (error) {
485
+ console.log(error);
486
+ await this.crud.events.logError("read", error);
487
+ throw error;
488
+ }
489
+ }
490
+ // UPDATE операция
491
+ async update(id, updateData, context = {}) {
492
+ try {
493
+ const current = await this.crud.model.findById(id);
494
+ if (!current) {
495
+ const error = new Error("NOT_FOUND");
496
+ error.code = "NOT_FOUND";
497
+ error.statusCode = 404;
498
+ throw error;
499
+ }
500
+ const hookData = await this.crud.core.executeHook("beforeUpdate", updateData, context, current);
501
+ const finalData = hookData || updateData;
502
+ const updated = await this.crud.model.findByIdAndUpdate(
503
+ id,
504
+ finalData,
505
+ { new: true, runValidators: true }
506
+ );
507
+ if (this.crud.core.isCacheEnabled()) {
508
+ await this.invalidateCache("update", updated);
509
+ }
510
+ if (this.crud.core.isEventsEnabled()) {
511
+ await this.crud.events.emit("updated", {
512
+ document: updated,
513
+ previousDocument: current,
514
+ user: context.userId
515
+ });
516
+ }
517
+ await this.crud.core.executeHook("afterUpdate", updated, context, current);
518
+ return updated;
519
+ } catch (error) {
520
+ await this.crud.events.logError("update", error);
521
+ throw error;
522
+ }
523
+ }
524
+ // DELETE операция
525
+ async delete(id, context = {}) {
526
+ try {
527
+ const document = await this.crud.model.findById(id);
528
+ if (!document) {
529
+ const error = new Error("NOT_FOUND");
530
+ error.code = "NOT_FOUND";
531
+ error.statusCode = 404;
532
+ throw error;
533
+ }
534
+ await this.crud.core.executeHook("beforeDelete", document, context);
535
+ await this.crud.model.findByIdAndDelete(id);
536
+ if (this.crud.core.isCacheEnabled()) {
537
+ await this.invalidateCache("delete", document);
538
+ }
539
+ if (this.crud.core.isEventsEnabled()) {
540
+ await this.crud.events.emit("deleted", {
541
+ document,
542
+ user: context.userId
543
+ });
544
+ }
545
+ await this.crud.core.executeHook("afterDelete", document, context);
546
+ return document;
547
+ } catch (error) {
548
+ await this.crud.events.logError("delete", error);
549
+ throw error;
550
+ }
551
+ }
552
+ // Получение кастомного handler
553
+ getCustomHandler(name) {
554
+ return this.customHandlers.get(name);
555
+ }
556
+ // Построение aggregation pipeline
557
+ async buildAggregationPipeline(query, context) {
558
+ const stages = [];
559
+ const extensions = this.crud.core.getAggregateExtensions();
560
+ if (extensions.before) {
561
+ stages.push(...await extensions.before(query, context));
562
+ }
563
+ stages.push(...queryProcessorGlobals.getBasicOptions(query));
564
+ if (extensions.middle) {
565
+ stages.push(...await extensions.middle(query, context));
566
+ }
567
+ stages.push(
568
+ queryProcessorGlobals.getCreatorUserLookupStage(),
569
+ queryProcessorGlobals.getCreatorOrganizationLookupStage(),
570
+ queryProcessorGlobals.getOwnerUserLookupStage(),
571
+ queryProcessorGlobals.getOwnerOrganizationLookupStage(),
572
+ queryProcessorGlobals.getAddFieldsCreatorOwnerStage()
573
+ );
574
+ if (extensions.beforePagination) {
575
+ stages.push(...await extensions.beforePagination(query, context));
576
+ }
577
+ stages.push(
578
+ ...queryProcessorGlobals.getSortingOptions(query.sortParam, query.sortOrder),
579
+ ...queryProcessorGlobals.getPaginationOptions(query.skip, query.limit),
580
+ queryProcessorGlobals.removeTempPropeties()
581
+ );
582
+ if (extensions.after) {
583
+ stages.push(...await extensions.after(query, context));
584
+ }
585
+ return stages;
586
+ }
587
+ // Управление кешем
588
+ generateCacheKey(operation, data) {
589
+ const prefix = `${this.crud.modelName}:${operation}`;
590
+ if (operation === "read") {
591
+ return `${prefix}:${JSON.stringify(this._normalizeQuery(data))}`;
592
+ }
593
+ return `${prefix}:${Date.now()}`;
594
+ }
595
+ _normalizeQuery(query) {
596
+ const normalized = {};
597
+ const keys = Object.keys(query).sort();
598
+ for (const key of keys) {
599
+ if (query[key] !== void 0 && query[key] !== null && query[key] !== "") {
600
+ normalized[key] = query[key];
601
+ }
602
+ }
603
+ return normalized;
604
+ }
605
+ async invalidateCache(operation, document) {
606
+ const cacheOptions = this.crud.core.getCacheOptions();
607
+ const tags = [...cacheOptions.tags];
608
+ if (["create", "update", "delete"].includes(operation)) {
609
+ tags.push(`${this.crud.modelName}_list`);
610
+ if (document && document._id) {
611
+ tags.push(`${this.crud.modelName}_${document._id}`);
612
+ }
613
+ }
614
+ for (const tag of tags) {
615
+ await this.crud.cache.delByTags([tag]);
616
+ }
617
+ }
618
+ }
619
+ class CRUDPolicies {
620
+ constructor(crud) {
621
+ this.crud = crud;
622
+ this.abac = null;
623
+ this.policyOptions = {};
624
+ this.defaultPolicies = {};
625
+ }
626
+ // Инициализация с ABAC
627
+ init(abac, policies = {}, fieldPolicies = null) {
628
+ this.abac = abac;
629
+ this.defaultPolicies = policies;
630
+ }
631
+ // Установка опций для конкретного действия
632
+ setOptions(action, options) {
633
+ this.policyOptions[action] = {
634
+ enabled: options.enabled !== false,
635
+ policies: options.policies || [],
636
+ customPolicies: options.customPolicies || {},
637
+ skipDefaultPolicies: options.skipDefaultPolicies || false,
638
+ ...options
639
+ };
640
+ }
641
+ // Получение опций для действия
642
+ getOptions(action) {
643
+ return this.policyOptions[action] || this.defaultPolicies[action] || {};
644
+ }
645
+ // Получение ABAC middleware для действия
646
+ getPoliciesMiddleware(action) {
647
+ if (!this.abac) return null;
648
+ const options = this.getOptions(action);
649
+ if (options.enabled === false) {
650
+ return null;
651
+ }
652
+ if (options.policies && options.policies.length > 0) {
653
+ return this.abac.policyMiddleware(
654
+ options.policies,
655
+ options.customPolicies || {},
656
+ {
657
+ resource: this.crud.modelName,
658
+ action,
659
+ skipDefaultPolicies: options.skipDefaultPolicies
660
+ }
661
+ );
662
+ }
663
+ return this.abac.middleware(this.crud.modelName, action, options);
664
+ }
665
+ // Получение middleware для проверки доступа к полям
666
+ getFieldsMiddleware(action) {
667
+ if (!this.abac) return null;
668
+ return async (req, res, next) => {
669
+ try {
670
+ const data = req.verified || req.body;
671
+ const context = {
672
+ user: req.userId,
673
+ resource: this.crud.modelName,
674
+ action,
675
+ req,
676
+ data: {
677
+ ...req.body,
678
+ ...req.query,
679
+ params: req.params
680
+ },
681
+ params: req.params
682
+ };
683
+ if (req.skipFieldPolicies) {
684
+ console.log("Skipping field policies for admin/moderator");
685
+ req.verified = data;
686
+ return next();
687
+ }
688
+ if (action === "update" && data._id) {
689
+ try {
690
+ const current = await this.crud.model.findById(data._id);
691
+ if (current) {
692
+ context.currentResource = current;
693
+ }
694
+ } catch (err) {
695
+ }
696
+ }
697
+ const fieldsResult = await this.abac.checkFields(
698
+ context,
699
+ data,
700
+ action
701
+ );
702
+ if (fieldsResult.denied && fieldsResult.denied.length > 0) {
703
+ return res.status(403).json({
704
+ error: "FIELD_ACCESS_DENIED",
705
+ deniedFields: fieldsResult.denied.map((d) => d.path)
706
+ });
707
+ }
708
+ if (fieldsResult.errors && fieldsResult.errors.length > 0) {
709
+ return res.status(400).json({
710
+ error: "FIELD_VALIDATION_ERROR",
711
+ fields: fieldsResult.errors
712
+ });
713
+ }
714
+ req.verified = fieldsResult.transformed || fieldsResult.allowed;
715
+ next();
716
+ } catch (error) {
717
+ next(error);
718
+ }
719
+ };
720
+ }
721
+ // Фильтрация полей для чтения (вызывается из controller после получения данных)
722
+ async filterFieldsForRead(req, data) {
723
+ if (!this.abac) {
724
+ return data;
725
+ }
726
+ const context = {
727
+ user: req.userId,
728
+ resource: this.crud.modelName,
729
+ action: "read",
730
+ req,
731
+ data: {
732
+ ...req.query,
733
+ params: req.params
734
+ },
735
+ params: req.params
736
+ };
737
+ if (Array.isArray(data)) {
738
+ const results = [];
739
+ for (const doc of data) {
740
+ const fieldsResult2 = await this.abac.checkFields(
741
+ { ...context, currentResource: doc },
742
+ doc,
743
+ "read"
744
+ );
745
+ results.push(fieldsResult2.transformed || fieldsResult2.allowed);
746
+ }
747
+ return results;
748
+ }
749
+ const fieldsResult = await this.abac.checkFields(
750
+ { ...context, currentResource: data },
751
+ data,
752
+ "read"
753
+ );
754
+ return fieldsResult.transformed || fieldsResult.allowed;
755
+ }
756
+ // Добавление кастомной политики
757
+ addPolicy(action, policyName, policyFn = null) {
758
+ if (!this.policyOptions[action]) {
759
+ this.policyOptions[action] = {
760
+ enabled: true,
761
+ policies: [],
762
+ customPolicies: {}
763
+ };
764
+ }
765
+ if (policyFn) {
766
+ this.policyOptions[action].customPolicies[policyName] = policyFn;
767
+ }
768
+ if (!this.policyOptions[action].policies.includes(policyName)) {
769
+ this.policyOptions[action].policies.push(policyName);
770
+ }
771
+ }
772
+ // Удаление политики
773
+ removePolicy(action, policyName) {
774
+ if (!this.policyOptions[action]) return;
775
+ const policies = this.policyOptions[action].policies;
776
+ const index = policies.indexOf(policyName);
777
+ if (index > -1) {
778
+ policies.splice(index, 1);
779
+ }
780
+ delete this.policyOptions[action].customPolicies[policyName];
781
+ }
782
+ // Проверка наличия ABAC
783
+ hasAbac() {
784
+ return !!this.abac;
785
+ }
786
+ // Получение всех политик для действия
787
+ getPolicies(action) {
788
+ const options = this.getOptions(action);
789
+ return {
790
+ enabled: options.enabled !== false,
791
+ policies: options.policies || [],
792
+ customPolicies: options.customPolicies || {},
793
+ defaultPolicies: this.defaultPolicies[action] || {}
794
+ };
795
+ }
796
+ // Временное отключение ABAC для действия
797
+ disableForAction(action) {
798
+ if (!this.policyOptions[action]) {
799
+ this.policyOptions[action] = {};
800
+ }
801
+ this.policyOptions[action].enabled = false;
802
+ }
803
+ // Включение ABAC для действия
804
+ enableForAction(action) {
805
+ if (!this.policyOptions[action]) {
806
+ this.policyOptions[action] = {};
807
+ }
808
+ this.policyOptions[action].enabled = true;
809
+ }
810
+ // Установка политик по умолчанию для всех действий
811
+ setDefaultPolicies(policies) {
812
+ ["create", "read", "update", "delete"].forEach((action) => {
813
+ if (!this.policyOptions[action]) {
814
+ this.policyOptions[action] = {};
815
+ }
816
+ this.policyOptions[action].policies = [...policies];
817
+ });
818
+ }
819
+ }
820
+ class CRUDEvents {
821
+ constructor(crud) {
822
+ this.crud = crud;
823
+ this.observer = null;
824
+ this.logger = null;
825
+ this.enabled = false;
826
+ this.options = {};
827
+ }
828
+ init(options = {}) {
829
+ this.enabled = options.enabled !== false;
830
+ this.options = options;
831
+ if (this.enabled) {
832
+ this.observer = options.observer || new Observer();
833
+ this.logger = options.logger || new Logger(this.crud.db);
834
+ }
835
+ }
836
+ // Отправка события
837
+ async emit(eventName, data) {
838
+ if (!this.enabled || !this.observer) return;
839
+ const fullEventName = `${this.crud.modelName}:${eventName}`;
840
+ try {
841
+ await this.observer.notify(fullEventName, {
842
+ ...data,
843
+ timestamp: /* @__PURE__ */ new Date(),
844
+ model: this.crud.modelName
845
+ });
846
+ await this.log("info", `Event emitted: ${fullEventName}`, data);
847
+ } catch (error) {
848
+ console.error(`Error emitting event ${fullEventName}:`, error);
849
+ }
850
+ }
851
+ // Подписка на событие
852
+ subscribe(eventName, handler) {
853
+ if (!this.observer) return null;
854
+ const fullEventName = `${this.crud.modelName}:${eventName}`;
855
+ return this.observer.subscribe(fullEventName, handler);
856
+ }
857
+ // Отписка от события
858
+ unsubscribe(eventName, handler) {
859
+ if (!this.observer) return;
860
+ const fullEventName = `${this.crud.modelName}:${eventName}`;
861
+ this.observer.unsubscribe(fullEventName, handler);
862
+ }
863
+ // Логирование
864
+ async log(level, message, data = {}) {
865
+ if (!this.enabled || !this.logger) return;
866
+ try {
867
+ const logData = {
868
+ model: this.crud.modelName,
869
+ ...data
870
+ };
871
+ switch (level) {
872
+ case "info":
873
+ await this.logger.info(message, logData);
874
+ break;
875
+ case "warning":
876
+ await this.logger.warning(message, logData);
877
+ break;
878
+ case "error":
879
+ await this.logger.error(message, logData);
880
+ break;
881
+ default:
882
+ await this.logger.info(message, logData);
883
+ }
884
+ } catch (error) {
885
+ console.error("Logging error:", error);
886
+ }
887
+ }
888
+ // Логирование ошибок
889
+ async logError(operation, error) {
890
+ await this.log("error", `Error in ${operation} operation`, {
891
+ operation,
892
+ error: error.message,
893
+ stack: error.stack
894
+ });
895
+ }
896
+ // Специализированные методы событий
897
+ async emitCreate(document, userId) {
898
+ await this.emit("created", {
899
+ document,
900
+ user: userId,
901
+ action: "create"
902
+ });
903
+ }
904
+ async emitUpdate(document, previousDocument, userId) {
905
+ await this.emit("updated", {
906
+ document,
907
+ previousDocument,
908
+ user: userId,
909
+ action: "update",
910
+ changes: this._getChanges(previousDocument, document)
911
+ });
912
+ }
913
+ async emitDelete(document, userId) {
914
+ await this.emit("deleted", {
915
+ document,
916
+ user: userId,
917
+ action: "delete"
918
+ });
919
+ }
920
+ async emitRead(query, results, userId) {
921
+ if (this.options.logReads !== false) {
922
+ await this.emit("read", {
923
+ query,
924
+ resultCount: Array.isArray(results) ? results.length : 1,
925
+ user: userId,
926
+ action: "read"
927
+ });
928
+ }
929
+ }
930
+ // Вспомогательные методы
931
+ _getChanges(oldDoc, newDoc) {
932
+ const changes = {};
933
+ if (!oldDoc || !newDoc) return changes;
934
+ for (const key in newDoc) {
935
+ if (newDoc.hasOwnProperty(key)) {
936
+ const oldVal = oldDoc[key];
937
+ const newVal = newDoc[key];
938
+ if (["_id", "__v", "updatedAt"].includes(key)) continue;
939
+ if (JSON.stringify(oldVal) !== JSON.stringify(newVal)) {
940
+ changes[key] = {
941
+ old: oldVal,
942
+ new: newVal
943
+ };
944
+ }
945
+ }
946
+ }
947
+ return changes;
948
+ }
949
+ // Аудит действий
950
+ async audit(action, data) {
951
+ if (!this.options.enableAudit) return;
952
+ const auditData = {
953
+ action,
954
+ model: this.crud.modelName,
955
+ timestamp: /* @__PURE__ */ new Date(),
956
+ ...data
957
+ };
958
+ await this.emit("audit", auditData);
959
+ await this.log("info", `Audit: ${action}`, auditData);
960
+ }
961
+ // Метрики
962
+ async recordMetric(metric, value = 1) {
963
+ if (!this.options.enableMetrics) return;
964
+ await this.emit("metric", {
965
+ metric,
966
+ value,
967
+ model: this.crud.modelName,
968
+ timestamp: /* @__PURE__ */ new Date()
969
+ });
970
+ }
971
+ // Проверка включены ли события
972
+ isEnabled() {
973
+ return this.enabled;
974
+ }
975
+ // Временное отключение событий
976
+ disable() {
977
+ this.enabled = false;
978
+ }
979
+ // Включение событий
980
+ enable() {
981
+ if (this.observer && this.logger) {
982
+ this.enabled = true;
983
+ }
984
+ }
985
+ }
986
+ class CRUD {
987
+ constructor(options = {}) {
988
+ const {
989
+ app,
990
+ db,
991
+ model,
992
+ basePath,
993
+ modelName = model?.modelName || "resource",
994
+ cache,
995
+ logger,
996
+ ...otherOptions
997
+ } = options;
998
+ this.app = app;
999
+ this.db = db;
1000
+ this.model = model;
1001
+ this.basePath = basePath;
1002
+ this.modelName = modelName;
1003
+ this.cache = cache !== false ? cache instanceof Cache ? cache : new Cache() : null;
1004
+ this.logger = logger || new Logger(db);
1005
+ this.initModules(otherOptions);
1006
+ this.core.init(otherOptions);
1007
+ if (!otherOptions.disableDefaultRoutes) {
1008
+ this.registerDefaultRoutes();
1009
+ }
1010
+ }
1011
+ initModules(options) {
1012
+ this.core = new CRUDCore(this);
1013
+ this.service = new CRUDService(this);
1014
+ this.controller = new CRUDController(this);
1015
+ this.policies = new CRUDPolicies(this);
1016
+ this.events = new CRUDEvents(this);
1017
+ }
1018
+ // Регистрация дефолтных CRUD роутов
1019
+ registerDefaultRoutes() {
1020
+ this.controller.registerRoute("post", "/create", "create");
1021
+ this.controller.registerRoute("get", "/read", "read");
1022
+ this.controller.registerRoute("put", "/update", "update");
1023
+ this.controller.registerRoute("delete", "/delete", "delete");
1024
+ }
1025
+ // API методы для конфигурации
1026
+ setVerifier(action, verifier) {
1027
+ this.core.setVerifier(action, verifier);
1028
+ return this;
1029
+ }
1030
+ addHook(name, handler) {
1031
+ this.core.addHook(name, handler);
1032
+ return this;
1033
+ }
1034
+ addMiddleware(phase, action, middleware) {
1035
+ this.controller.addMiddleware(phase, action, middleware);
1036
+ return this;
1037
+ }
1038
+ addAbac(action, options = {}) {
1039
+ this.policies.setOptions(action, options);
1040
+ return this;
1041
+ }
1042
+ addAggregateExtension(phase, extension) {
1043
+ this.core.addAggregateExtension(phase, extension);
1044
+ return this;
1045
+ }
1046
+ // Управление авторизацией
1047
+ setAuth(action, required) {
1048
+ this.core.setAuth(action, required);
1049
+ return this;
1050
+ }
1051
+ // Добавление кастомного действия
1052
+ addAction(name, config) {
1053
+ const {
1054
+ method = "post",
1055
+ path = `/${name}`,
1056
+ handler,
1057
+ verifier,
1058
+ middlewares = { before: [], after: [] },
1059
+ abac = {},
1060
+ hooks = {},
1061
+ auth = true
1062
+ // По умолчанию требует авторизацию
1063
+ } = config;
1064
+ if (verifier) this.setVerifier(name, verifier);
1065
+ if (abac) this.addAbac(name, abac);
1066
+ if (auth !== void 0) this.setAuth(name, auth);
1067
+ if (middlewares.before) {
1068
+ const beforeMiddlewares = Array.isArray(middlewares.before) ? middlewares.before : [middlewares.before];
1069
+ beforeMiddlewares.forEach((mw) => this.addMiddleware("before", name, mw));
1070
+ }
1071
+ if (middlewares.after) {
1072
+ const afterMiddlewares = Array.isArray(middlewares.after) ? middlewares.after : [middlewares.after];
1073
+ afterMiddlewares.forEach((mw) => this.addMiddleware("after", name, mw));
1074
+ }
1075
+ Object.entries(hooks).forEach(([hookName, hookFn]) => {
1076
+ this.addHook(hookName, hookFn);
1077
+ });
1078
+ if (handler) {
1079
+ this.controller.registerCustomRoute(method, path, name, handler);
1080
+ } else {
1081
+ this.controller.registerRoute(method, path, name);
1082
+ }
1083
+ return this;
1084
+ }
1085
+ // Получение конфигурации кеша
1086
+ getCacheOptions() {
1087
+ return this.core.getCacheOptions();
1088
+ }
1089
+ // Установка опций кеша
1090
+ setCacheOptions(options) {
1091
+ this.core.setCacheOptions(options);
1092
+ return this;
1093
+ }
1094
+ }
1095
+ export {
1096
+ CRUD as C
1097
+ };