@ozdao/martyrs 0.2.485 → 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 (698) hide show
  1. package/dist/Media-B2jWzwLB.cjs +1 -0
  2. package/dist/{Media-DlUBwVWs.js → Media-DZ5_ItXQ.js} +3 -3
  3. package/dist/_virtual/index.cjs +4 -4
  4. package/dist/_virtual/index.js +4 -4
  5. package/dist/_virtual/index2.cjs +4 -4
  6. package/dist/_virtual/index2.js +4 -4
  7. package/dist/auth.server.cjs +3 -24
  8. package/dist/auth.server.js +2 -23
  9. package/dist/{authJwt-DBB51Iql.cjs → authJwt-D35KyJlE.cjs} +31 -2
  10. package/dist/{authJwt-DcYNNwcr.js → authJwt-DqxhUym0.js} +31 -2
  11. package/dist/chats.server.cjs +1 -1
  12. package/dist/chats.server.js +1 -1
  13. package/dist/community.server.cjs +1 -1
  14. package/dist/community.server.js +1 -1
  15. package/dist/crud-BDIArc5A.cjs +1096 -0
  16. package/dist/crud-DJvpe0aZ.js +1097 -0
  17. package/dist/events.server.cjs +1 -1
  18. package/dist/events.server.js +1 -1
  19. package/dist/files.server.cjs +1 -1
  20. package/dist/files.server.js +1 -1
  21. package/dist/gallery.server.cjs +1 -1
  22. package/dist/gallery.server.js +1 -1
  23. package/dist/globals.server.cjs +3 -322
  24. package/dist/globals.server.js +1 -303
  25. package/dist/globals.websocket-DzvdIBf6.js +306 -0
  26. package/dist/globals.websocket-k6_B1T7k.cjs +322 -0
  27. package/dist/{index-CsJwdsBW.js → index-CVuQC4k1.js} +1 -1
  28. package/dist/{index-YNOkL1mu.cjs → index-DiSKVCaA.cjs} +1 -1
  29. package/dist/main-C6_DPWGX.cjs +11 -0
  30. package/dist/{main-CK6rC5Sz.js → main-nQmkbWsW.js} +2291 -2224
  31. package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +2 -2
  32. package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
  33. package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
  34. package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
  35. package/dist/martyrs/src/components/{DatePicker → Calendar}/Calendar.vue.cjs +1 -1
  36. package/dist/martyrs/src/components/Calendar/Calendar.vue.cjs.map +1 -0
  37. package/dist/martyrs/src/components/{DatePicker → Calendar}/Calendar.vue.js +1 -1
  38. package/dist/martyrs/src/components/Calendar/Calendar.vue.js.map +1 -0
  39. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  40. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  41. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  42. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  43. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  44. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  45. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  46. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  47. package/dist/martyrs/src/components/Field/{Field.vue.cjs → Field.vue2.cjs} +5 -6
  48. package/dist/martyrs/src/components/Field/Field.vue2.cjs.map +1 -0
  49. package/dist/martyrs/src/components/Field/{Field.vue.js → Field.vue2.js} +5 -6
  50. package/dist/martyrs/src/components/Field/Field.vue2.js.map +1 -0
  51. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +10 -9
  52. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  53. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +13 -12
  54. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  55. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  56. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  58. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
  59. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  60. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  61. package/dist/martyrs/src/components/Media/Media.vue.cjs +2 -2
  62. package/dist/martyrs/src/components/Media/Media.vue.cjs.map +1 -1
  63. package/dist/martyrs/src/components/Media/Media.vue.js +2 -2
  64. package/dist/martyrs/src/components/Media/Media.vue.js.map +1 -1
  65. package/dist/martyrs/src/components/Menu/{Menu.vue2.cjs → Menu.vue.cjs} +2 -2
  66. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +1 -0
  67. package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
  68. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
  69. package/dist/martyrs/src/components/Popup/{Popup.vue2.cjs → Popup.vue.cjs} +2 -2
  70. package/dist/martyrs/src/components/Popup/{Popup.vue2.js.map → Popup.vue.cjs.map} +1 -1
  71. package/dist/martyrs/src/components/Popup/{Popup.vue2.js → Popup.vue.js} +2 -2
  72. package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -0
  73. package/dist/martyrs/src/components/Select/Select.vue.cjs +2 -2
  74. package/dist/martyrs/src/components/Select/Select.vue.cjs.map +1 -1
  75. package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
  76. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
  77. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -0
  78. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs.map +1 -1
  79. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -0
  80. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +1 -1
  81. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  82. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +5 -5
  83. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  84. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +5 -5
  85. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -2
  86. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  87. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -2
  88. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  89. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
  90. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  91. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  93. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +2 -2
  94. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +10 -10
  95. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  96. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +4 -4
  97. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  98. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +5 -5
  99. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  100. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +4 -4
  101. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +2 -2
  102. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +23 -23
  103. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  105. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +3 -3
  106. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +3 -3
  107. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +4 -4
  108. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +13 -13
  109. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +3 -3
  111. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +2 -2
  113. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  115. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  117. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  119. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
  120. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +25 -25
  122. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
  123. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +3 -3
  124. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +16 -16
  125. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +9 -2
  126. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  127. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +9 -2
  128. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  129. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
  130. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
  131. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  133. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +4 -3
  134. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  135. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -3
  136. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  137. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  138. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  139. package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs +24 -58
  140. package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
  141. package/dist/martyrs/src/modules/globals/views/classes/globals.store.js +24 -58
  142. package/dist/martyrs/src/modules/globals/views/classes/globals.store.js.map +1 -1
  143. package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.cjs +1 -1
  144. package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.js +1 -1
  145. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  146. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.js +2 -2
  147. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  148. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  149. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +2 -2
  150. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +2 -2
  151. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +3 -3
  152. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs.map +1 -1
  153. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +3 -3
  154. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
  156. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
  157. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  159. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  161. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +2 -1
  162. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
  163. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +2 -1
  164. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
  165. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.cjs +1 -1
  166. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.js +2 -2
  167. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.cjs +1 -1
  168. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.js +3 -3
  169. package/dist/martyrs/src/modules/globals/views/store/globals.cjs +6 -0
  170. package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
  171. package/dist/martyrs/src/modules/globals/views/store/globals.js +6 -0
  172. package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
  173. package/dist/martyrs/src/modules/globals/views/utils/axios-instance.cjs.map +1 -1
  174. package/dist/martyrs/src/modules/globals/views/utils/axios-instance.js.map +1 -1
  175. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.cjs +100 -0
  176. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.cjs.map +1 -0
  177. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.js +100 -0
  178. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.js.map +1 -0
  179. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs +224 -0
  180. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs.map +1 -0
  181. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +224 -0
  182. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -0
  183. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.cjs +40 -0
  184. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.cjs.map +1 -0
  185. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.js +40 -0
  186. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.js.map +1 -0
  187. package/dist/martyrs/src/modules/icons/entities/IconDate.vue.cjs +6 -6
  188. package/dist/martyrs/src/modules/icons/entities/IconDate.vue.js +6 -6
  189. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.cjs +32 -0
  190. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.cjs.map +1 -0
  191. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.js +32 -0
  192. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.js.map +1 -0
  193. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.cjs +10 -12
  194. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.cjs.map +1 -1
  195. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.js +11 -13
  196. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.js.map +1 -1
  197. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.cjs +32 -0
  198. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.cjs.map +1 -0
  199. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.js +32 -0
  200. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.js.map +1 -0
  201. package/dist/martyrs/src/modules/icons/icons.client.cjs +48 -4
  202. package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
  203. package/dist/martyrs/src/modules/icons/icons.client.js +172 -128
  204. package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
  205. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.cjs +5 -7
  206. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.cjs.map +1 -1
  207. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.js +5 -7
  208. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs +6 -11
  210. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs.map +1 -1
  211. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js +6 -11
  212. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js.map +1 -1
  213. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs +6 -11
  214. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs.map +1 -1
  215. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js +6 -11
  216. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js.map +1 -1
  217. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +62 -6
  218. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  219. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +189 -133
  220. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  221. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.cjs +21 -12
  222. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.cjs.map +1 -1
  223. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.js +21 -12
  224. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.js.map +1 -1
  225. package/dist/martyrs/src/modules/icons/socials/facebook.vue.cjs +21 -12
  226. package/dist/martyrs/src/modules/icons/socials/facebook.vue.cjs.map +1 -1
  227. package/dist/martyrs/src/modules/icons/socials/facebook.vue.js +21 -12
  228. package/dist/martyrs/src/modules/icons/socials/facebook.vue.js.map +1 -1
  229. package/dist/martyrs/src/modules/icons/socials/instagram.vue.cjs +25 -17
  230. package/dist/martyrs/src/modules/icons/socials/instagram.vue.cjs.map +1 -1
  231. package/dist/martyrs/src/modules/icons/socials/instagram.vue.js +25 -17
  232. package/dist/martyrs/src/modules/icons/socials/instagram.vue.js.map +1 -1
  233. package/dist/martyrs/src/modules/icons/socials/line.vue.cjs +23 -14
  234. package/dist/martyrs/src/modules/icons/socials/line.vue.cjs.map +1 -1
  235. package/dist/martyrs/src/modules/icons/socials/line.vue.js +23 -14
  236. package/dist/martyrs/src/modules/icons/socials/line.vue.js.map +1 -1
  237. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.cjs +26 -17
  238. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.cjs.map +1 -1
  239. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.js +26 -17
  240. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.js.map +1 -1
  241. package/dist/martyrs/src/modules/icons/socials/reddit.vue.cjs +21 -12
  242. package/dist/martyrs/src/modules/icons/socials/reddit.vue.cjs.map +1 -1
  243. package/dist/martyrs/src/modules/icons/socials/reddit.vue.js +21 -12
  244. package/dist/martyrs/src/modules/icons/socials/reddit.vue.js.map +1 -1
  245. package/dist/martyrs/src/modules/icons/socials/telegram.vue.cjs +29 -20
  246. package/dist/martyrs/src/modules/icons/socials/telegram.vue.cjs.map +1 -1
  247. package/dist/martyrs/src/modules/icons/socials/telegram.vue.js +29 -20
  248. package/dist/martyrs/src/modules/icons/socials/telegram.vue.js.map +1 -1
  249. package/dist/martyrs/src/modules/icons/socials/twitter.vue.cjs +21 -12
  250. package/dist/martyrs/src/modules/icons/socials/twitter.vue.cjs.map +1 -1
  251. package/dist/martyrs/src/modules/icons/socials/twitter.vue.js +21 -12
  252. package/dist/martyrs/src/modules/icons/socials/twitter.vue.js.map +1 -1
  253. package/dist/martyrs/src/modules/icons/socials/vk.vue.cjs +21 -12
  254. package/dist/martyrs/src/modules/icons/socials/vk.vue.cjs.map +1 -1
  255. package/dist/martyrs/src/modules/icons/socials/vk.vue.js +21 -12
  256. package/dist/martyrs/src/modules/icons/socials/vk.vue.js.map +1 -1
  257. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.cjs +32 -0
  258. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.cjs.map +1 -0
  259. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.js +32 -0
  260. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.js.map +1 -0
  261. package/dist/martyrs/src/modules/icons/socials/youtube.vue.cjs +21 -12
  262. package/dist/martyrs/src/modules/icons/socials/youtube.vue.cjs.map +1 -1
  263. package/dist/martyrs/src/modules/icons/socials/youtube.vue.js +21 -12
  264. package/dist/martyrs/src/modules/icons/socials/youtube.vue.js.map +1 -1
  265. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +87 -0
  266. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -0
  267. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +87 -0
  268. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -0
  269. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +83 -0
  270. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -0
  271. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +83 -0
  272. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -0
  273. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +83 -0
  274. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -0
  275. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +83 -0
  276. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -0
  277. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +68 -0
  278. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +1 -0
  279. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +68 -0
  280. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +1 -0
  281. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +162 -0
  282. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs.map +1 -0
  283. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +162 -0
  284. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -0
  285. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +437 -0
  286. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs.map +1 -0
  287. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +437 -0
  288. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -0
  289. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +416 -0
  290. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs.map +1 -0
  291. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +416 -0
  292. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -0
  293. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +174 -0
  294. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -0
  295. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +174 -0
  296. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -0
  297. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +80 -0
  298. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -0
  299. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +80 -0
  300. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -0
  301. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +554 -0
  302. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs.map +1 -0
  303. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +554 -0
  304. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -0
  305. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +104 -0
  306. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +1 -0
  307. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +104 -0
  308. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +1 -0
  309. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +314 -0
  310. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -0
  311. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +314 -0
  312. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -0
  313. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.cjs +14 -0
  314. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.cjs.map +1 -0
  315. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.js +14 -0
  316. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.js.map +1 -0
  317. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.cjs +23 -0
  318. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.cjs.map +1 -0
  319. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.js +23 -0
  320. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.js.map +1 -0
  321. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +467 -0
  322. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs.map +1 -0
  323. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +467 -0
  324. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -0
  325. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.cjs +14 -0
  326. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.cjs.map +1 -0
  327. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.js +14 -0
  328. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.js.map +1 -0
  329. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.cjs +23 -0
  330. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.cjs.map +1 -0
  331. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.js +23 -0
  332. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.js.map +1 -0
  333. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +256 -0
  334. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -0
  335. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +256 -0
  336. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -0
  337. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +248 -0
  338. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -0
  339. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +248 -0
  340. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -0
  341. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +580 -0
  342. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -0
  343. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +580 -0
  344. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -0
  345. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.cjs +14 -0
  346. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.cjs.map +1 -0
  347. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.js +14 -0
  348. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.js.map +1 -0
  349. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.cjs +23 -0
  350. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.cjs.map +1 -0
  351. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.js +23 -0
  352. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.js.map +1 -0
  353. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +473 -0
  354. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -0
  355. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +473 -0
  356. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -0
  357. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +111 -0
  358. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -0
  359. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +111 -0
  360. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -0
  361. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +28 -0
  362. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs.map +1 -0
  363. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +28 -0
  364. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -0
  365. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.cjs +23 -0
  366. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.cjs.map +1 -0
  367. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.js +23 -0
  368. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.js.map +1 -0
  369. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +227 -0
  370. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -0
  371. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +227 -0
  372. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -0
  373. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs +85 -0
  374. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs.map +1 -0
  375. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +85 -0
  376. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -0
  377. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs +71 -0
  378. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs.map +1 -0
  379. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +71 -0
  380. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -0
  381. package/dist/martyrs/src/modules/music/music.client.cjs +137 -0
  382. package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -0
  383. package/dist/martyrs/src/modules/music/music.client.js +137 -0
  384. package/dist/martyrs/src/modules/music/music.client.js.map +1 -0
  385. package/dist/martyrs/src/modules/music/router/albums.cjs +34 -0
  386. package/dist/martyrs/src/modules/music/router/albums.cjs.map +1 -0
  387. package/dist/martyrs/src/modules/music/router/albums.js +34 -0
  388. package/dist/martyrs/src/modules/music/router/albums.js.map +1 -0
  389. package/dist/martyrs/src/modules/music/router/artists.cjs +34 -0
  390. package/dist/martyrs/src/modules/music/router/artists.cjs.map +1 -0
  391. package/dist/martyrs/src/modules/music/router/artists.js +34 -0
  392. package/dist/martyrs/src/modules/music/router/artists.js.map +1 -0
  393. package/dist/martyrs/src/modules/music/router/music.cjs +47 -0
  394. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -0
  395. package/dist/martyrs/src/modules/music/router/music.js +47 -0
  396. package/dist/martyrs/src/modules/music/router/music.js.map +1 -0
  397. package/dist/martyrs/src/modules/music/router/playlists.cjs +34 -0
  398. package/dist/martyrs/src/modules/music/router/playlists.cjs.map +1 -0
  399. package/dist/martyrs/src/modules/music/router/playlists.js +34 -0
  400. package/dist/martyrs/src/modules/music/router/playlists.js.map +1 -0
  401. package/dist/martyrs/src/modules/music/router/tracks.cjs +34 -0
  402. package/dist/martyrs/src/modules/music/router/tracks.cjs.map +1 -0
  403. package/dist/martyrs/src/modules/music/router/tracks.js +34 -0
  404. package/dist/martyrs/src/modules/music/router/tracks.js.map +1 -0
  405. package/dist/martyrs/src/modules/music/store/albums.cjs +167 -0
  406. package/dist/martyrs/src/modules/music/store/albums.cjs.map +1 -0
  407. package/dist/martyrs/src/modules/music/store/albums.js +167 -0
  408. package/dist/martyrs/src/modules/music/store/albums.js.map +1 -0
  409. package/dist/martyrs/src/modules/music/store/artists.cjs +160 -0
  410. package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -0
  411. package/dist/martyrs/src/modules/music/store/artists.js +160 -0
  412. package/dist/martyrs/src/modules/music/store/artists.js.map +1 -0
  413. package/dist/martyrs/src/modules/music/store/genres.cjs +123 -0
  414. package/dist/martyrs/src/modules/music/store/genres.cjs.map +1 -0
  415. package/dist/martyrs/src/modules/music/store/genres.js +123 -0
  416. package/dist/martyrs/src/modules/music/store/genres.js.map +1 -0
  417. package/dist/martyrs/src/modules/music/store/player.cjs +297 -0
  418. package/dist/martyrs/src/modules/music/store/player.cjs.map +1 -0
  419. package/dist/martyrs/src/modules/music/store/player.js +297 -0
  420. package/dist/martyrs/src/modules/music/store/player.js.map +1 -0
  421. package/dist/martyrs/src/modules/music/store/playlists.cjs +182 -0
  422. package/dist/martyrs/src/modules/music/store/playlists.cjs.map +1 -0
  423. package/dist/martyrs/src/modules/music/store/playlists.js +182 -0
  424. package/dist/martyrs/src/modules/music/store/playlists.js.map +1 -0
  425. package/dist/martyrs/src/modules/music/store/search.cjs +109 -0
  426. package/dist/martyrs/src/modules/music/store/search.cjs.map +1 -0
  427. package/dist/martyrs/src/modules/music/store/search.js +109 -0
  428. package/dist/martyrs/src/modules/music/store/search.js.map +1 -0
  429. package/dist/martyrs/src/modules/music/store/tracks.cjs +184 -0
  430. package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -0
  431. package/dist/martyrs/src/modules/music/store/tracks.js +184 -0
  432. package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -0
  433. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +1 -1
  434. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +1 -1
  435. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
  436. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  437. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  438. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  439. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -2
  440. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  441. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -2
  442. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  443. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -1
  444. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
  445. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -1
  446. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
  447. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  448. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
  449. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -2
  450. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  451. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  452. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  453. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +16 -16
  454. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  455. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  456. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +3 -3
  457. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +16 -16
  458. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
  459. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
  460. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  461. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  462. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  463. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  464. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
  465. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +17 -17
  466. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
  467. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
  468. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
  469. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +4 -4
  470. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  471. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +8 -8
  472. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -1
  473. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs.map +1 -1
  474. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -1
  475. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  476. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  477. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  478. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -1
  479. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs.map +1 -1
  480. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -1
  481. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
  482. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -1
  483. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs.map +1 -1
  484. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -1
  485. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js.map +1 -1
  486. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
  487. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  488. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  489. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  490. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +1 -1
  491. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +1 -1
  492. package/dist/martyrs/src/modules/products/components/forms/ReorderSettingsForm.vue.cjs +1 -1
  493. package/dist/martyrs/src/modules/products/components/forms/ReorderSettingsForm.vue.js +8 -8
  494. package/dist/martyrs/src/modules/products/components/forms/StockAuditForm.vue.cjs +1 -1
  495. package/dist/martyrs/src/modules/products/components/forms/StockAuditForm.vue.js +12 -12
  496. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  497. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  498. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
  499. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +13 -13
  500. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +3 -3
  501. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +11 -11
  502. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +2 -2
  503. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  504. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +2 -2
  505. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  506. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
  507. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  508. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  509. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +18 -18
  510. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +3 -3
  511. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +7 -7
  512. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +3 -3
  513. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +13 -13
  514. package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.cjs +1 -1
  515. package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.js +1 -1
  516. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +1 -1
  517. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +1 -1
  518. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +3 -3
  519. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +17 -17
  520. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  521. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  522. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
  523. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  524. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  525. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  526. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +2 -2
  527. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +5 -5
  528. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
  529. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  530. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  531. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  532. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -0
  533. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs.map +1 -1
  534. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -0
  535. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js.map +1 -1
  536. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -0
  537. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
  538. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -0
  539. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
  540. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  541. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  542. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  543. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +14 -14
  544. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +3 -3
  545. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +9 -9
  546. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  547. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +2 -2
  548. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  549. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  550. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  551. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  552. package/dist/martyrs.cjs.js +1 -1
  553. package/dist/martyrs.css +1 -1
  554. package/dist/martyrs.es.js +38 -36
  555. package/dist/music.server.cjs +2021 -0
  556. package/dist/music.server.js +2021 -0
  557. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
  558. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  559. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
  560. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  561. package/dist/orders.server.cjs +1 -1
  562. package/dist/orders.server.js +1 -1
  563. package/dist/organizations.server.cjs +1 -1
  564. package/dist/organizations.server.js +1 -1
  565. package/dist/products.server.cjs +3 -1093
  566. package/dist/products.server.js +2 -1092
  567. package/dist/rents.server.cjs +1 -1
  568. package/dist/rents.server.js +1 -1
  569. package/dist/socials.schema-BOZV82Mp.js +25 -0
  570. package/dist/socials.schema-CtpSF9dE.cjs +24 -0
  571. package/dist/style.css +230 -46
  572. package/dist/wallet.server.cjs +1 -1
  573. package/dist/wallet.server.js +1 -1
  574. package/package.json +1 -1
  575. package/src/.martyrs/filemap.json +2 -2
  576. package/src/components/Feed/Feed.vue +1 -1
  577. package/src/components/Field/Field.vue +13 -8
  578. package/src/components/FieldBig/FieldBig.vue +3 -5
  579. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  580. package/src/components/Media/Media.vue +1 -1
  581. package/src/components/Select/Select.vue +1 -1
  582. package/src/components/Status/Snack.vue +83 -0
  583. package/src/components/index.js +2 -0
  584. package/src/main.js +6 -0
  585. package/src/modules/auth/controllers/middlewares/authJwt.js +59 -6
  586. package/src/modules/events/components/pages/EditEvent.vue +1 -1
  587. package/src/modules/globals/views/classes/globals.store.js +31 -66
  588. package/src/modules/globals/views/components/blocks/PopupDateSelector.vue +1 -1
  589. package/src/modules/globals/views/components/partials/FooterAlt.vue +363 -0
  590. package/src/modules/globals/views/store/globals.js +42 -0
  591. package/src/modules/globals/views/utils/axios-instance.js +15 -1
  592. package/src/modules/globals/views/utils/query-serializer.js +182 -0
  593. package/src/modules/icons/components/IconSearchPopup.vue +254 -0
  594. package/src/modules/icons/entities/IconAddress.vue +17 -0
  595. package/src/modules/icons/entities/IconDate.vue +3 -3
  596. package/src/modules/icons/entities/IconEmail.vue +14 -0
  597. package/src/modules/icons/entities/IconMusic.vue +3 -3
  598. package/src/modules/icons/entities/IconPhone.vue +14 -0
  599. package/src/modules/icons/icons.client.js +85 -31
  600. package/src/modules/icons/icons.server.js +292 -0
  601. package/src/modules/icons/navigation/IconCross.vue +4 -16
  602. package/src/modules/icons/navigation/IconPause.vue +9 -24
  603. package/src/modules/icons/navigation/IconRefresh.vue +9 -24
  604. package/src/modules/icons/pages/IconsPage.vue +78 -2
  605. package/src/modules/icons/routes/icons.routes.js +81 -0
  606. package/src/modules/icons/socials/dribbble.vue +11 -2
  607. package/src/modules/icons/socials/facebook.vue +11 -2
  608. package/src/modules/icons/socials/instagram.vue +11 -4
  609. package/src/modules/icons/socials/line.vue +11 -2
  610. package/src/modules/icons/socials/linkedin.vue +11 -2
  611. package/src/modules/icons/socials/reddit.vue +10 -1
  612. package/src/modules/icons/socials/telegram.vue +11 -2
  613. package/src/modules/icons/socials/twitter.vue +11 -2
  614. package/src/modules/icons/socials/vk.vue +11 -2
  615. package/src/modules/icons/socials/whatsapp.vue +12 -0
  616. package/src/modules/icons/socials/youtube.vue +11 -2
  617. package/src/modules/music/.claude/settings.local.json +8 -0
  618. package/src/modules/music/CLAUDE.md +312 -0
  619. package/src/modules/music/components/SidebarMusic.vue +8 -8
  620. package/src/modules/music/components/cards/AlbumCard.vue +2 -2
  621. package/src/modules/music/components/cards/ArtistCard.vue +2 -2
  622. package/src/modules/music/components/cards/PlaylistCard.vue +2 -2
  623. package/src/modules/music/components/cards/TrackCard.vue +1 -1
  624. package/src/modules/music/components/cards/TrackListCard.vue +135 -0
  625. package/src/modules/music/components/forms/AlbumForm.vue +463 -0
  626. package/src/modules/music/components/{pages → forms}/ArtistForm.vue +127 -96
  627. package/src/modules/music/components/forms/PlaylistForm.vue +10 -10
  628. package/src/modules/music/components/forms/SearchForm.vue +1 -1
  629. package/src/modules/music/components/forms/TrackForm.vue +577 -0
  630. package/src/modules/music/components/layouts/MusicLayout.vue +35 -41
  631. package/src/modules/music/components/pages/{AlbumDetail.vue → Album.vue} +42 -20
  632. package/src/modules/music/components/pages/AlbumCreate.vue +7 -0
  633. package/src/modules/music/components/pages/AlbumEdit.vue +14 -0
  634. package/src/modules/music/components/pages/{ArtistDetail.vue → Artist.vue} +9 -9
  635. package/src/modules/music/components/pages/ArtistCreate.vue +7 -0
  636. package/src/modules/music/components/pages/ArtistEdit.vue +14 -0
  637. package/src/modules/music/components/pages/MusicHome.vue +86 -67
  638. package/src/modules/music/components/pages/MusicLibrary.vue +136 -105
  639. package/src/modules/music/components/pages/{PlaylistDetail.vue → Playlist.vue} +56 -34
  640. package/src/modules/music/components/pages/PlaylistCreate.vue +7 -0
  641. package/src/modules/music/components/pages/PlaylistEdit.vue +14 -0
  642. package/src/modules/music/components/pages/SearchResults.vue +49 -27
  643. package/src/modules/music/components/pages/{TrackDetail.vue → Track.vue} +36 -14
  644. package/src/modules/music/components/pages/TrackCreate.vue +23 -0
  645. package/src/modules/music/components/pages/TrackEdit.vue +14 -0
  646. package/src/modules/music/components/player/MusicPlayer.vue +2 -2
  647. package/src/modules/music/middlewares/albums.verifier.js +234 -0
  648. package/src/modules/music/middlewares/artists.verifier.js +213 -0
  649. package/src/modules/music/middlewares/genres.verifier.js +148 -0
  650. package/src/modules/music/middlewares/playlists.verifier.js +219 -0
  651. package/src/modules/music/middlewares/tracks.verifier.js +263 -0
  652. package/src/modules/music/music.client.js +31 -33
  653. package/src/modules/music/music.server.js +33 -26
  654. package/src/modules/music/router/albums.js +31 -0
  655. package/src/modules/music/router/artists.js +31 -0
  656. package/src/modules/music/router/music.js +14 -65
  657. package/src/modules/music/router/playlists.js +31 -0
  658. package/src/modules/music/router/tracks.js +31 -0
  659. package/src/modules/music/routes/albums.routes.js +126 -0
  660. package/src/modules/music/routes/artists.routes.js +171 -0
  661. package/src/modules/music/routes/genres.routes.js +118 -0
  662. package/src/modules/music/routes/playlists.routes.js +239 -0
  663. package/src/modules/music/routes/tracks.routes.js +149 -0
  664. package/src/modules/music/store/artists.js +17 -7
  665. package/src/modules/music/store/genres.js +150 -0
  666. package/src/modules/music/store/playlists.js +19 -6
  667. package/src/modules/music/store/tracks.js +9 -2
  668. package/src/modules/products/components/pages/Product.vue +1 -1
  669. package/dist/Media-ByPHBvAU.cjs +0 -1
  670. package/dist/main-137vO86w.cjs +0 -11
  671. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +0 -1
  672. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  673. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  674. package/dist/martyrs/src/components/DatePicker/Calendar.vue.cjs.map +0 -1
  675. package/dist/martyrs/src/components/DatePicker/Calendar.vue.js.map +0 -1
  676. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +0 -1
  677. package/dist/martyrs/src/components/Field/Field.vue.js.map +0 -1
  678. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +0 -1
  679. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
  680. package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +0 -1
  681. package/src/modules/music/components/forms/UploadForm.vue +0 -313
  682. package/src/modules/music/components/lists/AlbumList.vue +0 -25
  683. package/src/modules/music/components/lists/ArtistList.vue +0 -280
  684. package/src/modules/music/components/lists/PlaylistList.vue +0 -25
  685. package/src/modules/music/components/lists/TrackList.vue +0 -175
  686. package/src/modules/music/components/pages/ArtistManager.vue +0 -277
  687. package/src/modules/music/components/pages/MusicUpload.vue +0 -44
  688. package/src/modules/music/controllers/album.controller.js +0 -82
  689. package/src/modules/music/controllers/artist.controller.js +0 -99
  690. package/src/modules/music/controllers/genre.controller.js +0 -63
  691. package/src/modules/music/controllers/music.controller.js +0 -145
  692. package/src/modules/music/controllers/playlist.controller.js +0 -146
  693. package/src/modules/music/routes/album.routes.js +0 -28
  694. package/src/modules/music/routes/artist.routes.js +0 -30
  695. package/src/modules/music/routes/genre.routes.js +0 -28
  696. package/src/modules/music/routes/music.routes.js +0 -106
  697. package/src/modules/music/routes/playlist.routes.js +0 -47
  698. /package/src/components/{DatePicker → Calendar}/Calendar.vue +0 -0
@@ -8,10 +8,10 @@ const common_schema = require("./common.schema-BzFEVNn3.cjs");
8
8
  const engagement_schema = require("./engagement.schema-JADHu8pj.cjs");
9
9
  const metadata_schema = require("./metadata.schema-RlxNv46L.cjs");
10
10
  const ownership_schema = require("./ownership.schema-DCosqOc1.cjs");
11
- const authJwt = require("./authJwt-DBB51Iql.cjs");
11
+ const authJwt = require("./authJwt-D35KyJlE.cjs");
12
12
  const globals_abac = require("./globals.abac-Cm9e8Jdk.cjs");
13
13
  const globals_verifier = require("./globals.verifier-D68mHEBl.cjs");
14
- const globals_observer = require("./globals.observer-CV2wCzzh.cjs");
14
+ const crud = require("./crud-BDIArc5A.cjs");
15
15
  const abac = require("./abac-6LjoG9u-.cjs");
16
16
  const controllerFactory$2 = (db) => {
17
17
  const Category = db.category;
@@ -1397,1096 +1397,6 @@ const productsRoutes = function(app, db, allowedOrigins) {
1397
1397
  app.delete("/api/products/:_id", controller.Delete);
1398
1398
  app.post("/api/product/recommended", controller.getProductRecommendation);
1399
1399
  };
1400
- class CRUDCore {
1401
- constructor(crud) {
1402
- this.crud = crud;
1403
- this.verifiers = {};
1404
- this.hooks = {};
1405
- this.aggregateExtensions = {};
1406
- this.cacheOptions = {
1407
- ttl: 300,
1408
- // 5 минут по умолчанию
1409
- tags: [crud.modelName],
1410
- enabled: true
1411
- };
1412
- this.auth = {
1413
- read: false,
1414
- // Публичный доступ к чтению
1415
- create: true,
1416
- // Требует авторизацию
1417
- update: true,
1418
- // Требует авторизацию
1419
- delete: true
1420
- // Требует авторизацию
1421
- };
1422
- this.options = {
1423
- enableEvents: true,
1424
- enableAudit: false,
1425
- enableMetrics: false,
1426
- strictMode: false,
1427
- serviceKey: process.env.SERVICE_KEY
1428
- };
1429
- }
1430
- // Инициализация с опциями
1431
- init(options = {}) {
1432
- if (options.auth !== void 0) {
1433
- if (options.auth === false) {
1434
- this.auth = false;
1435
- } else if (options.auth === true) {
1436
- this.auth = {
1437
- read: false,
1438
- create: true,
1439
- update: true,
1440
- delete: true
1441
- };
1442
- } else if (typeof options.auth === "object") {
1443
- this.auth = {
1444
- read: false,
1445
- create: true,
1446
- update: true,
1447
- delete: true,
1448
- ...options.auth
1449
- };
1450
- }
1451
- }
1452
- if (options.cache !== void 0) {
1453
- if (options.cache === false) {
1454
- this.cacheOptions.enabled = false;
1455
- } else if (typeof options.cache === "object") {
1456
- this.setCacheOptions(options.cache);
1457
- }
1458
- }
1459
- if (options.events !== void 0) {
1460
- if (options.events === false) {
1461
- this.options.enableEvents = false;
1462
- } else if (typeof options.events === "object") {
1463
- Object.assign(this.options, options.events);
1464
- }
1465
- }
1466
- if (options.verifiers) this.initVerifiers(options.verifiers);
1467
- if (options.hooks) this.initHooks(options.hooks);
1468
- if (options.middlewares) this.initMiddlewares(options.middlewares);
1469
- if (options.aggregateExtensions) this.initAggregateExtensions(options.aggregateExtensions);
1470
- if (options.abac) this.initABAC(options.abac, options.policies, options.fieldsPolicies);
1471
- if (options.serviceKey !== void 0) {
1472
- this.options.serviceKey = options.serviceKey;
1473
- }
1474
- this.crud.events.init(this.options);
1475
- if (options.abac) {
1476
- this.crud.policies.init(options.abac, options.policies, options.fieldsPolicies);
1477
- }
1478
- }
1479
- // Управление auth
1480
- setAuth(action, required) {
1481
- if (this.auth === false) {
1482
- this.auth = {};
1483
- }
1484
- this.auth[action] = required;
1485
- }
1486
- getAuth(action) {
1487
- if (this.auth === false) return false;
1488
- return this.auth[action] ?? true;
1489
- }
1490
- isAuthEnabled() {
1491
- return this.auth !== false;
1492
- }
1493
- // Управление верификаторами
1494
- setVerifier(action, verifier) {
1495
- this.verifiers[action] = verifier;
1496
- }
1497
- getVerifier(action) {
1498
- return this.verifiers[action];
1499
- }
1500
- initVerifiers(verifiers) {
1501
- Object.entries(verifiers).forEach(([action, verifier]) => {
1502
- this.setVerifier(action, verifier);
1503
- });
1504
- }
1505
- // Управление хуками
1506
- addHook(name, handler) {
1507
- this.hooks[name] = handler;
1508
- }
1509
- getHook(name) {
1510
- return this.hooks[name];
1511
- }
1512
- async executeHook(name, ...args) {
1513
- const hook = this.getHook(name);
1514
- if (hook) {
1515
- return await hook(...args);
1516
- }
1517
- }
1518
- initHooks(hooks) {
1519
- Object.entries(hooks).forEach(([name, handler]) => {
1520
- this.addHook(name, handler);
1521
- });
1522
- }
1523
- // Управление расширениями агрегации
1524
- addAggregateExtension(phase, extension) {
1525
- this.aggregateExtensions[phase] = extension;
1526
- }
1527
- getAggregateExtensions() {
1528
- return this.aggregateExtensions;
1529
- }
1530
- initAggregateExtensions(extensions) {
1531
- Object.entries(extensions).forEach(([phase, extension]) => {
1532
- this.addAggregateExtension(phase, extension);
1533
- });
1534
- }
1535
- // Управление middleware (делегирует в controller)
1536
- initMiddlewares(middlewares) {
1537
- Object.entries(middlewares).forEach(([phase, actions]) => {
1538
- if (typeof actions === "object") {
1539
- Object.entries(actions).forEach(([action, mws]) => {
1540
- const middlewareArray = Array.isArray(mws) ? mws : [mws];
1541
- middlewareArray.forEach((mw) => {
1542
- this.crud.controller.addMiddleware(phase, action, mw);
1543
- });
1544
- });
1545
- }
1546
- });
1547
- }
1548
- // Управление ABAC (делегирует в policies)
1549
- initABAC(abac2, policies = {}, fieldsPolicies = null) {
1550
- if (fieldsPolicies && typeof fieldsPolicies === "function" && abac2) {
1551
- abac2.registerFieldsPolicy(this.crud.modelName, fieldsPolicies);
1552
- }
1553
- }
1554
- // Управление кешем
1555
- getCacheOptions() {
1556
- return { ...this.cacheOptions };
1557
- }
1558
- setCacheOptions(options) {
1559
- Object.assign(this.cacheOptions, options);
1560
- if (!this.cacheOptions.tags.includes(this.crud.modelName)) {
1561
- this.cacheOptions.tags.unshift(this.crud.modelName);
1562
- }
1563
- }
1564
- // Получение опций
1565
- getOptions() {
1566
- return { ...this.options };
1567
- }
1568
- setOption(key, value) {
1569
- this.options[key] = value;
1570
- }
1571
- // Проверка включенности функций
1572
- isEventsEnabled() {
1573
- return this.options.enableEvents;
1574
- }
1575
- isCacheEnabled() {
1576
- return this.cacheOptions.enabled && this.crud.cache !== null;
1577
- }
1578
- isAuditEnabled() {
1579
- return this.options.enableAudit;
1580
- }
1581
- isMetricsEnabled() {
1582
- return this.options.enableMetrics;
1583
- }
1584
- }
1585
- class CRUDController {
1586
- constructor(crud) {
1587
- this.crud = crud;
1588
- this.routes = /* @__PURE__ */ new Map();
1589
- this.middlewares = {
1590
- before: {},
1591
- after: {}
1592
- };
1593
- this.jwt = authJwt.middlewareFactory(crud.db);
1594
- }
1595
- // Добавление middleware
1596
- addMiddleware(phase, action, middleware) {
1597
- if (!["before", "after"].includes(phase)) {
1598
- throw new Error(`Invalid middleware phase: ${phase}`);
1599
- }
1600
- if (!this.middlewares[phase][action]) {
1601
- this.middlewares[phase][action] = [];
1602
- }
1603
- this.middlewares[phase][action].push(middleware);
1604
- }
1605
- // Получение middleware для действия
1606
- getMiddlewares(phase, action) {
1607
- return this.middlewares[phase][action] || [];
1608
- }
1609
- // Регистрация роута
1610
- registerRoute(method, path, actionName) {
1611
- const fullPath = `${this.crud.basePath}${path}`;
1612
- const middlewareStack = [];
1613
- if (this.crud.core.isAuthEnabled()) {
1614
- const authRequired = this.crud.core.getAuth(actionName);
1615
- middlewareStack.push(this.jwt.verifyToken(!authRequired));
1616
- }
1617
- const verifierMiddleware = this._createVerifierMiddleware(method, actionName);
1618
- if (verifierMiddleware) {
1619
- middlewareStack.push(verifierMiddleware);
1620
- }
1621
- middlewareStack.push(...this.getMiddlewares("before", actionName));
1622
- const abacMiddleware = this.crud.policies.getPoliciesMiddleware(actionName);
1623
- if (abacMiddleware) {
1624
- middlewareStack.push(abacMiddleware);
1625
- }
1626
- if (["create", "update"].includes(actionName)) {
1627
- const fieldsMiddleware = this.crud.policies.getFieldsMiddleware(actionName);
1628
- if (fieldsMiddleware) {
1629
- middlewareStack.push(fieldsMiddleware);
1630
- }
1631
- }
1632
- const handler = this._createHandler(actionName);
1633
- const wrappedHandler = this._wrapHandler(handler, actionName);
1634
- this.crud.app[method](fullPath, ...middlewareStack, wrappedHandler);
1635
- this.routes.set(`${method.toUpperCase()} ${fullPath}`, {
1636
- method,
1637
- path: fullPath,
1638
- actionName,
1639
- middlewareStack
1640
- });
1641
- return this;
1642
- }
1643
- // Регистрация кастомного роута
1644
- registerCustomRoute(method, path, actionName, handler) {
1645
- this.crud.service.registerCustomHandler(actionName, handler);
1646
- return this.registerRoute(method, path, actionName);
1647
- }
1648
- // Создание handler для стандартных CRUD операций
1649
- _createHandler(actionName) {
1650
- switch (actionName) {
1651
- case "create":
1652
- return async (req, res) => {
1653
- try {
1654
- const data = req.verified || req.body;
1655
- const context = this._buildContext(req);
1656
- const created = await this.crud.service.create(data, context);
1657
- res.status(201).json(created);
1658
- } catch (error) {
1659
- this._handleError(error, res);
1660
- }
1661
- };
1662
- case "read":
1663
- return async (req, res) => {
1664
- try {
1665
- const query = req.verified || req.query;
1666
- const context = this._buildContext(req);
1667
- let data = await this.crud.service.read(query, context);
1668
- if (this.crud.policies.hasAbac()) {
1669
- data = await this.crud.policies.filterFieldsForRead(req, data);
1670
- }
1671
- res.json(data);
1672
- } catch (error) {
1673
- this._handleError(error, res);
1674
- }
1675
- };
1676
- case "update":
1677
- return async (req, res) => {
1678
- try {
1679
- const data = req.verified || req.body;
1680
- const { _id, ...updateData } = data;
1681
- if (!_id) {
1682
- return res.status(400).json({ error: "ID_REQUIRED" });
1683
- }
1684
- const context = this._buildContext(req);
1685
- const updated = await this.crud.service.update(_id, updateData, context);
1686
- res.json(updated);
1687
- } catch (error) {
1688
- this._handleError(error, res);
1689
- }
1690
- };
1691
- case "delete":
1692
- return async (req, res) => {
1693
- try {
1694
- const data = req.verified || req.query || req.body;
1695
- const { _id } = data;
1696
- if (!_id) {
1697
- return res.status(400).json({ error: "ID_REQUIRED" });
1698
- }
1699
- const context = this._buildContext(req);
1700
- await this.crud.service.delete(_id, context);
1701
- res.status(204).send();
1702
- } catch (error) {
1703
- this._handleError(error, res);
1704
- }
1705
- };
1706
- default:
1707
- return async (req, res) => {
1708
- try {
1709
- const customHandler = this.crud.service.getCustomHandler(actionName);
1710
- if (!customHandler) {
1711
- return res.status(404).json({ error: "ACTION_NOT_FOUND" });
1712
- }
1713
- await customHandler.call(this.crud, req, res);
1714
- } catch (error) {
1715
- this._handleError(error, res);
1716
- }
1717
- };
1718
- }
1719
- }
1720
- // Создание контекста из request
1721
- _buildContext(req) {
1722
- return {
1723
- userId: req.userId,
1724
- user: req.user,
1725
- organizationId: req.organizationId,
1726
- roles: req.roles || [],
1727
- permissions: req.permissions || [],
1728
- abacContext: req.abacContext || {},
1729
- ip: req.ip,
1730
- userAgent: req.get("user-agent"),
1731
- isServiceRequest: req.isServiceRequest || false,
1732
- ...req.context
1733
- // Дополнительный контекст
1734
- };
1735
- }
1736
- // Обработка ошибок
1737
- _handleError(error, res) {
1738
- if (res.headersSent) return;
1739
- const statusCode = error.statusCode || error.code === "NOT_FOUND" ? 404 : 500;
1740
- const message = error.message || "Internal Server Error";
1741
- res.status(statusCode).json({
1742
- error: message,
1743
- code: error.code
1744
- });
1745
- }
1746
- // Создание middleware для верификации
1747
- _createVerifierMiddleware(method, actionName) {
1748
- const verifier = this.crud.core.getVerifier(actionName);
1749
- if (!verifier) return null;
1750
- const verifyTarget = this._getVerificationTarget(method, actionName);
1751
- if (!verifyTarget) return null;
1752
- return (req, res, next) => {
1753
- const data = verifyTarget === "query" ? req.query : req.body;
1754
- const result = verifier.verify ? verifier.verify(data) : verifier.validate(data);
1755
- if (!result.isValid) {
1756
- return res.status(400).json({
1757
- error: "VALIDATION_ERROR",
1758
- field: verifyTarget,
1759
- errors: result.verificationErrors || result.errors
1760
- });
1761
- }
1762
- console.log("verified result", result);
1763
- req.verified = result.verifiedData || data;
1764
- next();
1765
- };
1766
- }
1767
- // Определение цели верификации
1768
- _getVerificationTarget(method, actionName) {
1769
- if (["create", "update"].includes(actionName)) {
1770
- return "body";
1771
- }
1772
- if (["read", "delete"].includes(actionName)) {
1773
- return "query";
1774
- }
1775
- if (["post", "put", "patch"].includes(method)) {
1776
- return "body";
1777
- }
1778
- if (["get", "delete"].includes(method)) {
1779
- return "query";
1780
- }
1781
- return null;
1782
- }
1783
- // Обертка handler для after middleware
1784
- _wrapHandler(handler, actionName) {
1785
- return async (req, res, next) => {
1786
- try {
1787
- await handler(req, res, next);
1788
- if (!res.headersSent) {
1789
- const afterMiddlewares = this.getMiddlewares("after", actionName);
1790
- for (const mw of afterMiddlewares) {
1791
- await new Promise((resolve, reject) => {
1792
- mw(req, res, (err) => err ? reject(err) : resolve());
1793
- });
1794
- }
1795
- }
1796
- } catch (error) {
1797
- next(error);
1798
- }
1799
- };
1800
- }
1801
- // Получение информации о роутах
1802
- getRoutes() {
1803
- return Array.from(this.routes.entries()).map(([key, value]) => ({
1804
- key,
1805
- ...value
1806
- }));
1807
- }
1808
- // Удаление роута
1809
- removeRoute(method, path) {
1810
- const key = `${method.toUpperCase()} ${this.crud.basePath}${path}`;
1811
- return this.routes.delete(key);
1812
- }
1813
- // Проверка существования роута
1814
- hasRoute(method, path) {
1815
- const key = `${method.toUpperCase()} ${this.crud.basePath}${path}`;
1816
- return this.routes.has(key);
1817
- }
1818
- }
1819
- class CRUDService {
1820
- constructor(crud) {
1821
- this.crud = crud;
1822
- this.customHandlers = /* @__PURE__ */ new Map();
1823
- }
1824
- // Регистрация кастомного handler
1825
- registerCustomHandler(name, handler) {
1826
- this.customHandlers.set(name, handler);
1827
- }
1828
- // CREATE операция
1829
- async create(data, context = {}) {
1830
- try {
1831
- const hookData = await this.crud.core.executeHook("beforeCreate", data, context);
1832
- const finalData = hookData || data;
1833
- const created = await this.crud.model.create(finalData);
1834
- if (this.crud.core.isCacheEnabled()) {
1835
- await this.invalidateCache("create", created);
1836
- }
1837
- if (this.crud.core.isEventsEnabled()) {
1838
- await this.crud.events.emit("created", {
1839
- document: created,
1840
- user: context.userId
1841
- });
1842
- }
1843
- await this.crud.core.executeHook("afterCreate", created, context);
1844
- return created;
1845
- } catch (error) {
1846
- console.log(error);
1847
- await this.crud.events.logError("create", error);
1848
- throw error;
1849
- }
1850
- }
1851
- // READ операция
1852
- async read(query = {}, context = {}) {
1853
- try {
1854
- await this.crud.core.executeHook("beforeRead", query, context);
1855
- let data = null;
1856
- let cacheKey = null;
1857
- if (this.crud.core.isCacheEnabled()) {
1858
- cacheKey = this.generateCacheKey("read", query);
1859
- data = await this.crud.cache.get(cacheKey);
1860
- }
1861
- if (!data) {
1862
- const pipeline = await this.buildAggregationPipeline(query, context);
1863
- data = await this.crud.model.aggregate(pipeline).exec();
1864
- if (this.crud.core.isCacheEnabled() && cacheKey) {
1865
- const cacheOptions = this.crud.core.getCacheOptions();
1866
- await this.crud.cache.setWithTags(
1867
- cacheKey,
1868
- data,
1869
- [...cacheOptions.tags, `${this.crud.modelName}_list`],
1870
- cacheOptions.ttl
1871
- );
1872
- }
1873
- }
1874
- if (this.crud.core.isEventsEnabled()) {
1875
- await this.crud.events.emitRead(query, data, context.userId);
1876
- }
1877
- const hookResult = await this.crud.core.executeHook("afterRead", data, context);
1878
- return hookResult || data;
1879
- } catch (error) {
1880
- console.log(error);
1881
- await this.crud.events.logError("read", error);
1882
- throw error;
1883
- }
1884
- }
1885
- // UPDATE операция
1886
- async update(id, updateData, context = {}) {
1887
- try {
1888
- const current = await this.crud.model.findById(id);
1889
- if (!current) {
1890
- const error = new Error("NOT_FOUND");
1891
- error.code = "NOT_FOUND";
1892
- error.statusCode = 404;
1893
- throw error;
1894
- }
1895
- const hookData = await this.crud.core.executeHook("beforeUpdate", updateData, context, current);
1896
- const finalData = hookData || updateData;
1897
- const updated = await this.crud.model.findByIdAndUpdate(
1898
- id,
1899
- finalData,
1900
- { new: true, runValidators: true }
1901
- );
1902
- if (this.crud.core.isCacheEnabled()) {
1903
- await this.invalidateCache("update", updated);
1904
- }
1905
- if (this.crud.core.isEventsEnabled()) {
1906
- await this.crud.events.emit("updated", {
1907
- document: updated,
1908
- previousDocument: current,
1909
- user: context.userId
1910
- });
1911
- }
1912
- await this.crud.core.executeHook("afterUpdate", updated, context, current);
1913
- return updated;
1914
- } catch (error) {
1915
- await this.crud.events.logError("update", error);
1916
- throw error;
1917
- }
1918
- }
1919
- // DELETE операция
1920
- async delete(id, context = {}) {
1921
- try {
1922
- const document = await this.crud.model.findById(id);
1923
- if (!document) {
1924
- const error = new Error("NOT_FOUND");
1925
- error.code = "NOT_FOUND";
1926
- error.statusCode = 404;
1927
- throw error;
1928
- }
1929
- await this.crud.core.executeHook("beforeDelete", document, context);
1930
- await this.crud.model.findByIdAndDelete(id);
1931
- if (this.crud.core.isCacheEnabled()) {
1932
- await this.invalidateCache("delete", document);
1933
- }
1934
- if (this.crud.core.isEventsEnabled()) {
1935
- await this.crud.events.emit("deleted", {
1936
- document,
1937
- user: context.userId
1938
- });
1939
- }
1940
- await this.crud.core.executeHook("afterDelete", document, context);
1941
- return document;
1942
- } catch (error) {
1943
- await this.crud.events.logError("delete", error);
1944
- throw error;
1945
- }
1946
- }
1947
- // Получение кастомного handler
1948
- getCustomHandler(name) {
1949
- return this.customHandlers.get(name);
1950
- }
1951
- // Построение aggregation pipeline
1952
- async buildAggregationPipeline(query, context) {
1953
- const stages = [];
1954
- const extensions = this.crud.core.getAggregateExtensions();
1955
- if (extensions.before) {
1956
- stages.push(...await extensions.before(query, context));
1957
- }
1958
- stages.push(...queryProcessor.queryProcessorGlobals.getBasicOptions(query));
1959
- if (extensions.middle) {
1960
- stages.push(...await extensions.middle(query, context));
1961
- }
1962
- stages.push(
1963
- queryProcessor.queryProcessorGlobals.getCreatorUserLookupStage(),
1964
- queryProcessor.queryProcessorGlobals.getCreatorOrganizationLookupStage(),
1965
- queryProcessor.queryProcessorGlobals.getOwnerUserLookupStage(),
1966
- queryProcessor.queryProcessorGlobals.getOwnerOrganizationLookupStage(),
1967
- queryProcessor.queryProcessorGlobals.getAddFieldsCreatorOwnerStage()
1968
- );
1969
- if (extensions.beforePagination) {
1970
- stages.push(...await extensions.beforePagination(query, context));
1971
- }
1972
- stages.push(
1973
- ...queryProcessor.queryProcessorGlobals.getSortingOptions(query.sortParam, query.sortOrder),
1974
- ...queryProcessor.queryProcessorGlobals.getPaginationOptions(query.skip, query.limit),
1975
- queryProcessor.queryProcessorGlobals.removeTempPropeties()
1976
- );
1977
- if (extensions.after) {
1978
- stages.push(...await extensions.after(query, context));
1979
- }
1980
- return stages;
1981
- }
1982
- // Управление кешем
1983
- generateCacheKey(operation, data) {
1984
- const prefix = `${this.crud.modelName}:${operation}`;
1985
- if (operation === "read") {
1986
- return `${prefix}:${JSON.stringify(this._normalizeQuery(data))}`;
1987
- }
1988
- return `${prefix}:${Date.now()}`;
1989
- }
1990
- _normalizeQuery(query) {
1991
- const normalized = {};
1992
- const keys = Object.keys(query).sort();
1993
- for (const key of keys) {
1994
- if (query[key] !== void 0 && query[key] !== null && query[key] !== "") {
1995
- normalized[key] = query[key];
1996
- }
1997
- }
1998
- return normalized;
1999
- }
2000
- async invalidateCache(operation, document) {
2001
- const cacheOptions = this.crud.core.getCacheOptions();
2002
- const tags = [...cacheOptions.tags];
2003
- if (["create", "update", "delete"].includes(operation)) {
2004
- tags.push(`${this.crud.modelName}_list`);
2005
- if (document && document._id) {
2006
- tags.push(`${this.crud.modelName}_${document._id}`);
2007
- }
2008
- }
2009
- for (const tag of tags) {
2010
- await this.crud.cache.delByTags([tag]);
2011
- }
2012
- }
2013
- }
2014
- class CRUDPolicies {
2015
- constructor(crud) {
2016
- this.crud = crud;
2017
- this.abac = null;
2018
- this.policyOptions = {};
2019
- this.defaultPolicies = {};
2020
- }
2021
- // Инициализация с ABAC
2022
- init(abac2, policies = {}, fieldPolicies = null) {
2023
- this.abac = abac2;
2024
- this.defaultPolicies = policies;
2025
- }
2026
- // Установка опций для конкретного действия
2027
- setOptions(action, options) {
2028
- this.policyOptions[action] = {
2029
- enabled: options.enabled !== false,
2030
- policies: options.policies || [],
2031
- customPolicies: options.customPolicies || {},
2032
- skipDefaultPolicies: options.skipDefaultPolicies || false,
2033
- ...options
2034
- };
2035
- }
2036
- // Получение опций для действия
2037
- getOptions(action) {
2038
- return this.policyOptions[action] || this.defaultPolicies[action] || {};
2039
- }
2040
- // Получение ABAC middleware для действия
2041
- getPoliciesMiddleware(action) {
2042
- if (!this.abac) return null;
2043
- const options = this.getOptions(action);
2044
- if (options.enabled === false) {
2045
- return null;
2046
- }
2047
- if (options.policies && options.policies.length > 0) {
2048
- return this.abac.policyMiddleware(
2049
- options.policies,
2050
- options.customPolicies || {},
2051
- {
2052
- resource: this.crud.modelName,
2053
- action,
2054
- skipDefaultPolicies: options.skipDefaultPolicies
2055
- }
2056
- );
2057
- }
2058
- return this.abac.middleware(this.crud.modelName, action, options);
2059
- }
2060
- // Получение middleware для проверки доступа к полям
2061
- getFieldsMiddleware(action) {
2062
- if (!this.abac) return null;
2063
- return async (req, res, next) => {
2064
- try {
2065
- const data = req.verified || req.body;
2066
- const context = {
2067
- user: req.userId,
2068
- resource: this.crud.modelName,
2069
- action,
2070
- req,
2071
- data: {
2072
- ...req.body,
2073
- ...req.query,
2074
- params: req.params
2075
- },
2076
- params: req.params
2077
- };
2078
- if (req.skipFieldPolicies) {
2079
- console.log("Skipping field policies for admin/moderator");
2080
- req.verified = data;
2081
- return next();
2082
- }
2083
- if (action === "update" && data._id) {
2084
- try {
2085
- const current = await this.crud.model.findById(data._id);
2086
- if (current) {
2087
- context.currentResource = current;
2088
- }
2089
- } catch (err) {
2090
- }
2091
- }
2092
- const fieldsResult = await this.abac.checkFields(
2093
- context,
2094
- data,
2095
- action
2096
- );
2097
- if (fieldsResult.denied && fieldsResult.denied.length > 0) {
2098
- return res.status(403).json({
2099
- error: "FIELD_ACCESS_DENIED",
2100
- deniedFields: fieldsResult.denied.map((d) => d.path)
2101
- });
2102
- }
2103
- if (fieldsResult.errors && fieldsResult.errors.length > 0) {
2104
- return res.status(400).json({
2105
- error: "FIELD_VALIDATION_ERROR",
2106
- fields: fieldsResult.errors
2107
- });
2108
- }
2109
- req.verified = fieldsResult.transformed || fieldsResult.allowed;
2110
- next();
2111
- } catch (error) {
2112
- next(error);
2113
- }
2114
- };
2115
- }
2116
- // Фильтрация полей для чтения (вызывается из controller после получения данных)
2117
- async filterFieldsForRead(req, data) {
2118
- if (!this.abac) {
2119
- return data;
2120
- }
2121
- const context = {
2122
- user: req.userId,
2123
- resource: this.crud.modelName,
2124
- action: "read",
2125
- req,
2126
- data: {
2127
- ...req.query,
2128
- params: req.params
2129
- },
2130
- params: req.params
2131
- };
2132
- if (Array.isArray(data)) {
2133
- const results = [];
2134
- for (const doc of data) {
2135
- const fieldsResult2 = await this.abac.checkFields(
2136
- { ...context, currentResource: doc },
2137
- doc,
2138
- "read"
2139
- );
2140
- results.push(fieldsResult2.transformed || fieldsResult2.allowed);
2141
- }
2142
- return results;
2143
- }
2144
- const fieldsResult = await this.abac.checkFields(
2145
- { ...context, currentResource: data },
2146
- data,
2147
- "read"
2148
- );
2149
- return fieldsResult.transformed || fieldsResult.allowed;
2150
- }
2151
- // Добавление кастомной политики
2152
- addPolicy(action, policyName, policyFn = null) {
2153
- if (!this.policyOptions[action]) {
2154
- this.policyOptions[action] = {
2155
- enabled: true,
2156
- policies: [],
2157
- customPolicies: {}
2158
- };
2159
- }
2160
- if (policyFn) {
2161
- this.policyOptions[action].customPolicies[policyName] = policyFn;
2162
- }
2163
- if (!this.policyOptions[action].policies.includes(policyName)) {
2164
- this.policyOptions[action].policies.push(policyName);
2165
- }
2166
- }
2167
- // Удаление политики
2168
- removePolicy(action, policyName) {
2169
- if (!this.policyOptions[action]) return;
2170
- const policies = this.policyOptions[action].policies;
2171
- const index = policies.indexOf(policyName);
2172
- if (index > -1) {
2173
- policies.splice(index, 1);
2174
- }
2175
- delete this.policyOptions[action].customPolicies[policyName];
2176
- }
2177
- // Проверка наличия ABAC
2178
- hasAbac() {
2179
- return !!this.abac;
2180
- }
2181
- // Получение всех политик для действия
2182
- getPolicies(action) {
2183
- const options = this.getOptions(action);
2184
- return {
2185
- enabled: options.enabled !== false,
2186
- policies: options.policies || [],
2187
- customPolicies: options.customPolicies || {},
2188
- defaultPolicies: this.defaultPolicies[action] || {}
2189
- };
2190
- }
2191
- // Временное отключение ABAC для действия
2192
- disableForAction(action) {
2193
- if (!this.policyOptions[action]) {
2194
- this.policyOptions[action] = {};
2195
- }
2196
- this.policyOptions[action].enabled = false;
2197
- }
2198
- // Включение ABAC для действия
2199
- enableForAction(action) {
2200
- if (!this.policyOptions[action]) {
2201
- this.policyOptions[action] = {};
2202
- }
2203
- this.policyOptions[action].enabled = true;
2204
- }
2205
- // Установка политик по умолчанию для всех действий
2206
- setDefaultPolicies(policies) {
2207
- ["create", "read", "update", "delete"].forEach((action) => {
2208
- if (!this.policyOptions[action]) {
2209
- this.policyOptions[action] = {};
2210
- }
2211
- this.policyOptions[action].policies = [...policies];
2212
- });
2213
- }
2214
- }
2215
- class CRUDEvents {
2216
- constructor(crud) {
2217
- this.crud = crud;
2218
- this.observer = null;
2219
- this.logger = null;
2220
- this.enabled = false;
2221
- this.options = {};
2222
- }
2223
- init(options = {}) {
2224
- this.enabled = options.enabled !== false;
2225
- this.options = options;
2226
- if (this.enabled) {
2227
- this.observer = options.observer || new globals_observer.Observer();
2228
- this.logger = options.logger || new globals_logger.Logger(this.crud.db);
2229
- }
2230
- }
2231
- // Отправка события
2232
- async emit(eventName, data) {
2233
- if (!this.enabled || !this.observer) return;
2234
- const fullEventName = `${this.crud.modelName}:${eventName}`;
2235
- try {
2236
- await this.observer.notify(fullEventName, {
2237
- ...data,
2238
- timestamp: /* @__PURE__ */ new Date(),
2239
- model: this.crud.modelName
2240
- });
2241
- await this.log("info", `Event emitted: ${fullEventName}`, data);
2242
- } catch (error) {
2243
- console.error(`Error emitting event ${fullEventName}:`, error);
2244
- }
2245
- }
2246
- // Подписка на событие
2247
- subscribe(eventName, handler) {
2248
- if (!this.observer) return null;
2249
- const fullEventName = `${this.crud.modelName}:${eventName}`;
2250
- return this.observer.subscribe(fullEventName, handler);
2251
- }
2252
- // Отписка от события
2253
- unsubscribe(eventName, handler) {
2254
- if (!this.observer) return;
2255
- const fullEventName = `${this.crud.modelName}:${eventName}`;
2256
- this.observer.unsubscribe(fullEventName, handler);
2257
- }
2258
- // Логирование
2259
- async log(level, message, data = {}) {
2260
- if (!this.enabled || !this.logger) return;
2261
- try {
2262
- const logData = {
2263
- model: this.crud.modelName,
2264
- ...data
2265
- };
2266
- switch (level) {
2267
- case "info":
2268
- await this.logger.info(message, logData);
2269
- break;
2270
- case "warning":
2271
- await this.logger.warning(message, logData);
2272
- break;
2273
- case "error":
2274
- await this.logger.error(message, logData);
2275
- break;
2276
- default:
2277
- await this.logger.info(message, logData);
2278
- }
2279
- } catch (error) {
2280
- console.error("Logging error:", error);
2281
- }
2282
- }
2283
- // Логирование ошибок
2284
- async logError(operation, error) {
2285
- await this.log("error", `Error in ${operation} operation`, {
2286
- operation,
2287
- error: error.message,
2288
- stack: error.stack
2289
- });
2290
- }
2291
- // Специализированные методы событий
2292
- async emitCreate(document, userId) {
2293
- await this.emit("created", {
2294
- document,
2295
- user: userId,
2296
- action: "create"
2297
- });
2298
- }
2299
- async emitUpdate(document, previousDocument, userId) {
2300
- await this.emit("updated", {
2301
- document,
2302
- previousDocument,
2303
- user: userId,
2304
- action: "update",
2305
- changes: this._getChanges(previousDocument, document)
2306
- });
2307
- }
2308
- async emitDelete(document, userId) {
2309
- await this.emit("deleted", {
2310
- document,
2311
- user: userId,
2312
- action: "delete"
2313
- });
2314
- }
2315
- async emitRead(query, results, userId) {
2316
- if (this.options.logReads !== false) {
2317
- await this.emit("read", {
2318
- query,
2319
- resultCount: Array.isArray(results) ? results.length : 1,
2320
- user: userId,
2321
- action: "read"
2322
- });
2323
- }
2324
- }
2325
- // Вспомогательные методы
2326
- _getChanges(oldDoc, newDoc) {
2327
- const changes = {};
2328
- if (!oldDoc || !newDoc) return changes;
2329
- for (const key in newDoc) {
2330
- if (newDoc.hasOwnProperty(key)) {
2331
- const oldVal = oldDoc[key];
2332
- const newVal = newDoc[key];
2333
- if (["_id", "__v", "updatedAt"].includes(key)) continue;
2334
- if (JSON.stringify(oldVal) !== JSON.stringify(newVal)) {
2335
- changes[key] = {
2336
- old: oldVal,
2337
- new: newVal
2338
- };
2339
- }
2340
- }
2341
- }
2342
- return changes;
2343
- }
2344
- // Аудит действий
2345
- async audit(action, data) {
2346
- if (!this.options.enableAudit) return;
2347
- const auditData = {
2348
- action,
2349
- model: this.crud.modelName,
2350
- timestamp: /* @__PURE__ */ new Date(),
2351
- ...data
2352
- };
2353
- await this.emit("audit", auditData);
2354
- await this.log("info", `Audit: ${action}`, auditData);
2355
- }
2356
- // Метрики
2357
- async recordMetric(metric, value = 1) {
2358
- if (!this.options.enableMetrics) return;
2359
- await this.emit("metric", {
2360
- metric,
2361
- value,
2362
- model: this.crud.modelName,
2363
- timestamp: /* @__PURE__ */ new Date()
2364
- });
2365
- }
2366
- // Проверка включены ли события
2367
- isEnabled() {
2368
- return this.enabled;
2369
- }
2370
- // Временное отключение событий
2371
- disable() {
2372
- this.enabled = false;
2373
- }
2374
- // Включение событий
2375
- enable() {
2376
- if (this.observer && this.logger) {
2377
- this.enabled = true;
2378
- }
2379
- }
2380
- }
2381
- class CRUD {
2382
- constructor(options = {}) {
2383
- const {
2384
- app,
2385
- db,
2386
- model,
2387
- basePath,
2388
- modelName = model?.modelName || "resource",
2389
- cache,
2390
- logger,
2391
- ...otherOptions
2392
- } = options;
2393
- this.app = app;
2394
- this.db = db;
2395
- this.model = model;
2396
- this.basePath = basePath;
2397
- this.modelName = modelName;
2398
- this.cache = cache !== false ? cache instanceof globals_logger.Cache ? cache : new globals_logger.Cache() : null;
2399
- this.logger = logger || new globals_logger.Logger(db);
2400
- this.initModules(otherOptions);
2401
- this.core.init(otherOptions);
2402
- if (!otherOptions.disableDefaultRoutes) {
2403
- this.registerDefaultRoutes();
2404
- }
2405
- }
2406
- initModules(options) {
2407
- this.core = new CRUDCore(this);
2408
- this.service = new CRUDService(this);
2409
- this.controller = new CRUDController(this);
2410
- this.policies = new CRUDPolicies(this);
2411
- this.events = new CRUDEvents(this);
2412
- }
2413
- // Регистрация дефолтных CRUD роутов
2414
- registerDefaultRoutes() {
2415
- this.controller.registerRoute("post", "/create", "create");
2416
- this.controller.registerRoute("get", "/read", "read");
2417
- this.controller.registerRoute("put", "/update", "update");
2418
- this.controller.registerRoute("delete", "/delete", "delete");
2419
- }
2420
- // API методы для конфигурации
2421
- setVerifier(action, verifier) {
2422
- this.core.setVerifier(action, verifier);
2423
- return this;
2424
- }
2425
- addHook(name, handler) {
2426
- this.core.addHook(name, handler);
2427
- return this;
2428
- }
2429
- addMiddleware(phase, action, middleware) {
2430
- this.controller.addMiddleware(phase, action, middleware);
2431
- return this;
2432
- }
2433
- addAbac(action, options = {}) {
2434
- this.policies.setOptions(action, options);
2435
- return this;
2436
- }
2437
- addAggregateExtension(phase, extension) {
2438
- this.core.addAggregateExtension(phase, extension);
2439
- return this;
2440
- }
2441
- // Управление авторизацией
2442
- setAuth(action, required) {
2443
- this.core.setAuth(action, required);
2444
- return this;
2445
- }
2446
- // Добавление кастомного действия
2447
- addAction(name, config) {
2448
- const {
2449
- method = "post",
2450
- path = `/${name}`,
2451
- handler,
2452
- verifier,
2453
- middlewares = { before: [], after: [] },
2454
- abac: abac2 = {},
2455
- hooks = {},
2456
- auth = true
2457
- // По умолчанию требует авторизацию
2458
- } = config;
2459
- if (verifier) this.setVerifier(name, verifier);
2460
- if (abac2) this.addAbac(name, abac2);
2461
- if (auth !== void 0) this.setAuth(name, auth);
2462
- if (middlewares.before) {
2463
- const beforeMiddlewares = Array.isArray(middlewares.before) ? middlewares.before : [middlewares.before];
2464
- beforeMiddlewares.forEach((mw) => this.addMiddleware("before", name, mw));
2465
- }
2466
- if (middlewares.after) {
2467
- const afterMiddlewares = Array.isArray(middlewares.after) ? middlewares.after : [middlewares.after];
2468
- afterMiddlewares.forEach((mw) => this.addMiddleware("after", name, mw));
2469
- }
2470
- Object.entries(hooks).forEach(([hookName, hookFn]) => {
2471
- this.addHook(hookName, hookFn);
2472
- });
2473
- if (handler) {
2474
- this.controller.registerCustomRoute(method, path, name, handler);
2475
- } else {
2476
- this.controller.registerRoute(method, path, name);
2477
- }
2478
- return this;
2479
- }
2480
- // Получение конфигурации кеша
2481
- getCacheOptions() {
2482
- return this.core.getCacheOptions();
2483
- }
2484
- // Установка опций кеша
2485
- setCacheOptions(options) {
2486
- this.core.setCacheOptions(options);
2487
- return this;
2488
- }
2489
- }
2490
1400
  const verifierFactory = function(db) {
2491
1401
  const createVerifier = new globals_verifier.Verifier({
2492
1402
  name: {
@@ -2646,7 +1556,7 @@ const { getInstance } = abac.ABAC;
2646
1556
  function setupVariantsRoutes(app, db) {
2647
1557
  const abac2 = getInstance(db);
2648
1558
  const verifier = verifierFactory();
2649
- const variantsCRUD = new CRUD({
1559
+ const variantsCRUD = new crud.CRUD({
2650
1560
  app,
2651
1561
  db,
2652
1562
  model: db.variant,