@ozdao/martyrs 0.2.466 → 0.2.468

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 (364) hide show
  1. package/dist/_virtual/index.cjs +1 -1
  2. package/dist/_virtual/index.js +1 -1
  3. package/dist/martyrs/node_modules/.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
  4. package/dist/martyrs/node_modules/.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor/core/dist/index.js.map +1 -0
  5. package/dist/martyrs/node_modules/{@capacitor → .pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor}/preferences/dist/esm/index.cjs +1 -1
  6. package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.cjs.map +1 -0
  7. package/dist/martyrs/node_modules/{@capacitor → .pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor}/preferences/dist/esm/index.js +1 -1
  8. package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js.map +1 -0
  9. package/dist/martyrs/node_modules/{@capacitor → .pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor}/preferences/dist/esm/web.cjs +1 -1
  10. package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/web.cjs.map +1 -0
  11. package/dist/martyrs/node_modules/{@capacitor → .pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor}/preferences/dist/esm/web.js +1 -1
  12. package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/web.js.map +1 -0
  13. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/ParseError.cjs.map +1 -0
  14. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/ParseError.js.map +1 -0
  15. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.map +1 -0
  16. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -0
  17. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/constants.cjs.map +1 -0
  18. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/constants.js.map +1 -0
  19. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/format.cjs.map +1 -0
  20. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/format.js.map +1 -0
  21. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.map +1 -0
  22. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +1 -0
  23. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.map +1 -0
  24. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +1 -0
  25. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.map +1 -0
  26. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -0
  27. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.map +1 -0
  28. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +1 -0
  29. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.map +1 -0
  30. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +1 -0
  31. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.map +1 -0
  32. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -0
  33. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.map +1 -0
  34. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -0
  35. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.map +1 -0
  36. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -0
  37. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.map +1 -0
  38. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -0
  39. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.map +1 -0
  40. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -0
  41. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.map +1 -0
  42. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +1 -0
  43. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.map +1 -0
  44. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +1 -0
  45. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.map +1 -0
  46. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -0
  47. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.map +1 -0
  48. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -0
  49. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.map +1 -0
  50. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +1 -0
  51. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.map +1 -0
  52. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +1 -0
  53. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.map +1 -0
  54. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +1 -0
  55. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.map +1 -0
  56. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +1 -0
  57. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.map +1 -0
  58. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +1 -0
  59. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.map +1 -0
  60. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -0
  61. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.map +1 -0
  62. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +1 -0
  63. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.map +1 -0
  64. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +1 -0
  65. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isPossible.cjs.map +1 -0
  66. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -0
  67. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isValid.cjs.map +1 -0
  68. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isValid.js.map +1 -0
  69. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/metadata.cjs.map +1 -0
  70. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/metadata.js.map +1 -0
  71. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.map +1 -0
  72. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +1 -0
  73. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parse.cjs.map +1 -0
  74. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parse.js.map +1 -0
  75. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.map +1 -0
  76. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -0
  77. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.map +1 -0
  78. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +1 -0
  79. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.map +1 -0
  80. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +1 -0
  81. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.map +1 -0
  82. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +1 -0
  83. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.map +1 -0
  84. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +1 -0
  85. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/metadata.min.json.cjs.map +1 -0
  86. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -0
  87. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.cjs.map +1 -0
  88. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js.map +1 -0
  89. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/withMetadataArgument.cjs.map +1 -0
  90. package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js.map +1 -0
  91. package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
  92. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  93. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  94. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  95. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.cjs → Tooltip.vue.cjs} +2 -2
  96. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js.map → Tooltip.vue.cjs.map} +1 -1
  97. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
  98. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
  99. package/dist/martyrs/src/modules/auth/views/store/auth.cjs +2 -5
  100. package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/auth/views/store/auth.js +2 -5
  102. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  103. package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  105. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  107. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
  108. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js +1 -1
  109. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  111. package/dist/martyrs/src/modules/globals/views/store/globals.cjs +1 -1
  112. package/dist/martyrs/src/modules/globals/views/store/globals.js +1 -1
  113. package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +1 -1
  114. package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +1 -1
  115. package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.cjs +10 -0
  116. package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.cjs.map +1 -1
  117. package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js +11 -1
  118. package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js.map +1 -1
  119. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +1 -1
  120. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/notifications/notifications.client.js +1 -1
  122. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  123. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
  125. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  127. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +64 -8
  128. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  129. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +65 -9
  130. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  133. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +12 -2
  134. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  135. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +12 -2
  136. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  137. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  138. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  139. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +33 -0
  140. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  141. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +33 -0
  142. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  143. package/dist/{martyrs → node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +1 -1
  144. package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
  145. package/dist/{martyrs → node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1 -1
  146. package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
  147. package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
  148. package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
  149. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs +6 -0
  150. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs.map +1 -0
  151. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +6 -0
  152. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  153. package/dist/{martyrs → node_modules/.pnpm/uuid@11.1.0}/node_modules/uuid/dist/esm-browser/rng.cjs +4 -4
  154. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.cjs.map +1 -0
  155. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +15 -0
  156. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  157. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs +11 -0
  158. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs.map +1 -0
  159. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +11 -0
  160. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  161. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs +21 -0
  162. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs.map +1 -0
  163. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +21 -0
  164. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  165. package/package.json +1 -1
  166. package/src/modules/auth/views/store/auth.js +1 -7
  167. package/src/modules/marketplace/views/components/pages/Catalog.vue +11 -0
  168. package/src/modules/orders/components/pages/OrderCreate.vue +54 -10
  169. package/src/modules/organizations/components/pages/Organization.vue +12 -2
  170. package/src/modules/products/components/pages/Product.vue +32 -7
  171. package/dist/martyrs/node_modules/@capacitor/core/dist/index.cjs.map +0 -1
  172. package/dist/martyrs/node_modules/@capacitor/core/dist/index.js.map +0 -1
  173. package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/index.cjs.map +0 -1
  174. package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/index.js.map +0 -1
  175. package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/web.cjs.map +0 -1
  176. package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/web.js.map +0 -1
  177. package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +0 -1
  178. package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +0 -1
  179. package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +0 -1
  180. package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
  181. package/dist/martyrs/node_modules/libphonenumber-js/es6/ParseError.cjs.map +0 -1
  182. package/dist/martyrs/node_modules/libphonenumber-js/es6/ParseError.js.map +0 -1
  183. package/dist/martyrs/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.map +0 -1
  184. package/dist/martyrs/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +0 -1
  185. package/dist/martyrs/node_modules/libphonenumber-js/es6/constants.cjs.map +0 -1
  186. package/dist/martyrs/node_modules/libphonenumber-js/es6/constants.js.map +0 -1
  187. package/dist/martyrs/node_modules/libphonenumber-js/es6/format.cjs.map +0 -1
  188. package/dist/martyrs/node_modules/libphonenumber-js/es6/format.js.map +0 -1
  189. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.map +0 -1
  190. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +0 -1
  191. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.map +0 -1
  192. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +0 -1
  193. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.map +0 -1
  194. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +0 -1
  195. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.map +0 -1
  196. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +0 -1
  197. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.map +0 -1
  198. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +0 -1
  199. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.map +0 -1
  200. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +0 -1
  201. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.map +0 -1
  202. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +0 -1
  203. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.map +0 -1
  204. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +0 -1
  205. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.map +0 -1
  206. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +0 -1
  207. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.map +0 -1
  208. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +0 -1
  209. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.map +0 -1
  210. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +0 -1
  211. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.map +0 -1
  212. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +0 -1
  213. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.map +0 -1
  214. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +0 -1
  215. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.map +0 -1
  216. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +0 -1
  217. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.map +0 -1
  218. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +0 -1
  219. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.map +0 -1
  220. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +0 -1
  221. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.map +0 -1
  222. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +0 -1
  223. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.map +0 -1
  224. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +0 -1
  225. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.map +0 -1
  226. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +0 -1
  227. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.map +0 -1
  228. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +0 -1
  229. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.map +0 -1
  230. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +0 -1
  231. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.map +0 -1
  232. package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +0 -1
  233. package/dist/martyrs/node_modules/libphonenumber-js/es6/isPossible.cjs.map +0 -1
  234. package/dist/martyrs/node_modules/libphonenumber-js/es6/isPossible.js.map +0 -1
  235. package/dist/martyrs/node_modules/libphonenumber-js/es6/isValid.cjs.map +0 -1
  236. package/dist/martyrs/node_modules/libphonenumber-js/es6/isValid.js.map +0 -1
  237. package/dist/martyrs/node_modules/libphonenumber-js/es6/metadata.cjs.map +0 -1
  238. package/dist/martyrs/node_modules/libphonenumber-js/es6/metadata.js.map +0 -1
  239. package/dist/martyrs/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.map +0 -1
  240. package/dist/martyrs/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +0 -1
  241. package/dist/martyrs/node_modules/libphonenumber-js/es6/parse.cjs.map +0 -1
  242. package/dist/martyrs/node_modules/libphonenumber-js/es6/parse.js.map +0 -1
  243. package/dist/martyrs/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.map +0 -1
  244. package/dist/martyrs/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +0 -1
  245. package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.map +0 -1
  246. package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +0 -1
  247. package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.map +0 -1
  248. package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +0 -1
  249. package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.map +0 -1
  250. package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +0 -1
  251. package/dist/martyrs/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.map +0 -1
  252. package/dist/martyrs/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +0 -1
  253. package/dist/martyrs/node_modules/libphonenumber-js/metadata.min.json.cjs.map +0 -1
  254. package/dist/martyrs/node_modules/libphonenumber-js/metadata.min.json.js.map +0 -1
  255. package/dist/martyrs/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.cjs.map +0 -1
  256. package/dist/martyrs/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js.map +0 -1
  257. package/dist/martyrs/node_modules/libphonenumber-js/min/exports/withMetadataArgument.cjs.map +0 -1
  258. package/dist/martyrs/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js.map +0 -1
  259. package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs +0 -5
  260. package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs.map +0 -1
  261. package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js +0 -5
  262. package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
  263. package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.cjs.map +0 -1
  264. package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js +0 -15
  265. package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js.map +0 -1
  266. package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs +0 -17
  267. package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs.map +0 -1
  268. package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js +0 -17
  269. package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js.map +0 -1
  270. package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs +0 -13
  271. package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs.map +0 -1
  272. package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js +0 -13
  273. package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js.map +0 -1
  274. package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs +0 -8
  275. package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs.map +0 -1
  276. package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js +0 -8
  277. package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
  278. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
  279. /package/dist/martyrs/node_modules/{@capacitor → .pnpm/@capacitor_core@7.2.0/node_modules/@capacitor}/core/dist/index.cjs +0 -0
  280. /package/dist/martyrs/node_modules/{@capacitor → .pnpm/@capacitor_core@7.2.0/node_modules/@capacitor}/core/dist/index.js +0 -0
  281. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/ParseError.cjs +0 -0
  282. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/ParseError.js +0 -0
  283. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/PhoneNumber.cjs +0 -0
  284. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/PhoneNumber.js +0 -0
  285. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/constants.cjs +0 -0
  286. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/constants.js +0 -0
  287. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/format.cjs +0 -0
  288. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/format.js +0 -0
  289. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/RFC3966.cjs +0 -0
  290. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/RFC3966.js +0 -0
  291. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/applyInternationalSeparatorStyle.cjs +0 -0
  292. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
  293. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/checkNumberLength.cjs +0 -0
  294. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/checkNumberLength.js +0 -0
  295. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extension/createExtensionPattern.cjs +0 -0
  296. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extension/createExtensionPattern.js +0 -0
  297. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extension/extractExtension.cjs +0 -0
  298. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extension/extractExtension.js +0 -0
  299. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractCountryCallingCode.cjs +0 -0
  300. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractCountryCallingCode.js +0 -0
  301. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs +0 -0
  302. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
  303. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs +0 -0
  304. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
  305. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractNationalNumber.cjs +0 -0
  306. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractNationalNumber.js +0 -0
  307. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs +0 -0
  308. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
  309. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractPhoneContext.cjs +0 -0
  310. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/extractPhoneContext.js +0 -0
  311. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/formatNationalNumberUsingFormat.cjs +0 -0
  312. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
  313. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getCountryByCallingCode.cjs +0 -0
  314. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getCountryByCallingCode.js +0 -0
  315. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getCountryByNationalNumber.cjs +0 -0
  316. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getCountryByNationalNumber.js +0 -0
  317. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getIddPrefix.cjs +0 -0
  318. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getIddPrefix.js +0 -0
  319. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getNumberType.cjs +0 -0
  320. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getNumberType.js +0 -0
  321. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getPossibleCountriesForNumber.cjs +0 -0
  322. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/getPossibleCountriesForNumber.js +0 -0
  323. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/isObject.cjs +0 -0
  324. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/isObject.js +0 -0
  325. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/isViablePhoneNumber.cjs +0 -0
  326. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/isViablePhoneNumber.js +0 -0
  327. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/matchesEntirely.cjs +0 -0
  328. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/matchesEntirely.js +0 -0
  329. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/parseDigits.cjs +0 -0
  330. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/parseDigits.js +0 -0
  331. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/stripIddPrefix.cjs +0 -0
  332. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/helpers/stripIddPrefix.js +0 -0
  333. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/isPossible.cjs +0 -0
  334. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/isPossible.js +0 -0
  335. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/isValid.cjs +0 -0
  336. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/isValid.js +0 -0
  337. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/metadata.cjs +0 -0
  338. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/metadata.js +0 -0
  339. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/normalizeArguments.cjs +0 -0
  340. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/normalizeArguments.js +0 -0
  341. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parse.cjs +0 -0
  342. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parse.js +0 -0
  343. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parseIncompletePhoneNumber.cjs +0 -0
  344. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parseIncompletePhoneNumber.js +0 -0
  345. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parsePhoneNumber.cjs +0 -0
  346. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parsePhoneNumber.js +0 -0
  347. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parsePhoneNumberWithError_.cjs +0 -0
  348. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parsePhoneNumberWithError_.js +0 -0
  349. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parsePhoneNumber_.cjs +0 -0
  350. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/parsePhoneNumber_.js +0 -0
  351. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/tools/semver-compare.cjs +0 -0
  352. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/es6/tools/semver-compare.js +0 -0
  353. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/metadata.min.json.cjs +0 -0
  354. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/metadata.min.json.js +0 -0
  355. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/min/exports/parsePhoneNumber.cjs +0 -0
  356. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/min/exports/parsePhoneNumber.js +0 -0
  357. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/min/exports/withMetadataArgument.cjs +0 -0
  358. /package/dist/martyrs/node_modules/{libphonenumber-js → .pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js}/min/exports/withMetadataArgument.js +0 -0
  359. /package/dist/{martyrs → node_modules/.pnpm/@vue_shared@3.5.13}/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +0 -0
  360. /package/dist/{martyrs → node_modules/.pnpm/@vue_shared@3.5.13}/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -0
  361. /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.cjs +0 -0
  362. /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.cjs.map +0 -0
  363. /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.js +0 -0
  364. /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"auth.cjs","sources":["../../../../../../../src/modules/auth/views/store/auth.js"],"sourcesContent":["// Dependencies\nimport $axios, { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\nimport Cookies from 'js-cookie'\n// Capacitor\nimport { Preferences } from '@capacitor/preferences';\n// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// State\nimport * as twofa from './twofa'\n\n// State\nconst state = reactive({\n user: {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n },\n access: {\n roles: null,\n token: null,\n status: false\n },\n accesses: []\n});\n\nconst actions = {\n async initialize(cookie) {\n try {\n const userCookie = cookie ? cookie : await getCookie('user');\n\n if (userCookie) {\n const { _id, email, phone, avatar, roles, accessToken } = userCookie;\n\n setAuthToken(accessToken);\n\n // Проверка токена через серверный маршрут\n const response = await $axios.get('/api/auth/check-accesses');\n const userAccesses = response.data;\n state.accesses = userAccesses;\n\n // Обновление состояния приложения с информацией о пользователе и его правах доступа\n Object.assign(state.user, { _id, email, phone, avatar });\n Object.assign(state.access, { token: accessToken, roles, status: !!accessToken });\n } else {\n console.log('no cookies')\n setAuthToken(null);\n this.resetState();\n }\n } catch (error) {\n console.error('Error initializing auth:', error);\n // Make sure we remove the cookie when there's an error\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n setError(error)\n }\n },\n \n // Helper method to reset state\n resetState() {\n state.accesses = [];\n state.user = {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n };\n state.access = {\n roles: null,\n token: null,\n status: false\n };\n },\n \n async login(user, type) {\n try {\n const response = await $axios.post('/api/auth/signin', {\n ...user,\n type\n });\n\n setCookie('user', response.data);\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on login error\n await removeCookie('user');\n \n Object.assign(state.access, {\n token: null,\n status: false,\n roles: null\n });\n\n console.log(error);\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async signup(user, type, invite) {\n const { password, passwordRepeat } = state.user;\n\n console.log(password);\n console.log(passwordRepeat);\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/signup', {\n ...user,\n type,\n inviteCode: invite\n });\n\n console.log(response);\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on signup error\n await removeCookie('user');\n setError(error);\n console.log('Sign up failed');\n throw error;\n }\n },\n\n async logout() {\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n },\n\n async resetPassword(user, type) {\n try {\n const response = await $axios.post('/api/auth/reset-password', {\n email: user.email,\n phone: user.phone,\n type\n });\n\n Object.assign(twofa.state.code, {\n ...response.data,\n isSended: true\n });\n\n return response.data;\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async updatePassword(user, type) {\n const { password, passwordRepeat } = state.user;\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/update-password', {\n email: user.email,\n phone: user.phone,\n password: user.password,\n passwordRepeat: user.passwordRepeat,\n type\n });\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true\n });\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on password update error\n await removeCookie('user');\n setError(error);\n return Promise.reject(error);\n }\n }\n};\n\n// Cookies\nconst optionsDefault = {\n development: { secure: false, expires: 7, sameSite: 'Lax' },\n production: { expires: 7, path: '/', domain: process.env.DOMAIN_URL, sameSite: 'strict', secure: true }\n};\n\nasync function getCookie(name) {\n if (process.env.MOBILE_APP) {\n const { value } = await Preferences.get({ key: name });\n return value ? JSON.parse(value) : null;\n } else {\n const cookie = Cookies.get(name);\n return cookie ? JSON.parse(cookie) : null;\n }\n}\n\nasync function setCookie(name, data, env = process.env.DOMAIN_URL) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.set({\n key: name,\n value: JSON.stringify(data)\n });\n } else {\n // Для веб-версии\n Cookies.set(name, JSON.stringify(data), optionsDefault[env]);\n }\n}\n\nasync function removeCookie(name, env = process.env.NODE_ENV) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.remove({ key: name });\n } else {\n // Для веб-версии\n const options = env === 'production' ? { domain: process.env.DOMAIN_URL } : {};\n\n\n console.log(options)\n\n console.log(name)\n console.log(Cookies.get())\n Cookies.remove(name, options);\n }\n}\n\n// History\nconst history = [];\nhistory.push(state);\n\n// Watch\nwatch(state, (newState, oldState) => {\n history.push(newState);\n});\n\n// Module Export\nexport {\n state,\n actions\n};"],"names":["reactive","setAuthToken","$axios","setError","twofa.state","Preferences","Cookies","watch"],"mappings":";;;;;;;;AAaK,MAAC,QAAQA,IAAAA,SAAS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AI;AAAA,IAChC,CAAK;AAAA,EACL,OAAS;AAELC,sBAAQ,IAAI,MAAM,KAAK,UAAU,IAAI,GAAG,eAAe,GAAG,CAAC;AAAA,EAC/D;AACA;AAEA,eAAe,aAAa,MAAM,MAAM,QAAQ,IAAI,UAAU;AAC5D,MAAI,QAAQ,IAAI,YAAY;AAE1B,UAAMD,MAAW,YAAC,OAAO,EAAE,KAAK,KAAI,CAAE;AAAA,EAC1C,OAAS;AAEL,UAAM,UAAU,QAAQ,eAAe,EAAE,QAAQ,QAAQ,IAAI,WAAU,IAAK,CAAE;AAG9E,YAAQ,IAAI,OAAO;AAEnB,YAAQ,IAAI,IAAI;AAChB,YAAQ,IAAIC,UAAO,QAAC,IAAK,CAAA;AACzBA,sBAAQ,OAAO,MAAM,OAAO;AAAA,EAChC;AACA;AAOAC,IAAAA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;;;"}
1
+ {"version":3,"file":"auth.cjs","sources":["../../../../../../../src/modules/auth/views/store/auth.js"],"sourcesContent":["// Dependencies\nimport $axios, { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\nimport Cookies from 'js-cookie'\n// Capacitor\nimport { Preferences } from '@capacitor/preferences';\n// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// State\nimport * as twofa from './twofa'\n\n// State\nconst state = reactive({\n user: {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n },\n access: {\n roles: null,\n token: null,\n status: false\n },\n accesses: []\n});\n\nconst actions = {\n async initialize(cookie) {\n try {\n const userCookie = cookie ? cookie : await getCookie('user');\n\n if (userCookie) {\n const { _id, email, phone, avatar, roles, accessToken } = userCookie;\n\n setAuthToken(accessToken);\n\n // Проверка токена через серверный маршрут\n const response = await $axios.get('/api/auth/check-accesses');\n const userAccesses = response.data;\n state.accesses = userAccesses;\n\n // Обновление состояния приложения с информацией о пользователе и его правах доступа\n Object.assign(state.user, { _id, email, phone, avatar });\n Object.assign(state.access, { token: accessToken, roles, status: !!accessToken });\n } else {\n console.log('no cookies')\n setAuthToken(null);\n this.resetState();\n }\n } catch (error) {\n console.error('Error initializing auth:', error);\n // Make sure we remove the cookie when there's an error\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n setError(error)\n }\n },\n \n // Helper method to reset state\n resetState() {\n state.accesses = [];\n state.user = {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n };\n state.access = {\n roles: null,\n token: null,\n status: false\n };\n },\n \n async login(user, type) {\n try {\n const response = await $axios.post('/api/auth/signin', {\n ...user,\n type\n });\n\n setCookie('user', response.data);\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on login error\n await removeCookie('user');\n \n Object.assign(state.access, {\n token: null,\n status: false,\n roles: null\n });\n\n console.log(error);\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async signup(user, type, invite) {\n const { password, passwordRepeat } = state.user;\n\n console.log(password);\n console.log(passwordRepeat);\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/signup', {\n ...user,\n type,\n inviteCode: invite\n });\n\n console.log(response);\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on signup error\n await removeCookie('user');\n setError(error);\n console.log('Sign up failed');\n throw error;\n }\n },\n\n async logout() {\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n },\n\n async resetPassword(user, type) {\n try {\n const response = await $axios.post('/api/auth/reset-password', {\n email: user.email,\n phone: user.phone,\n type\n });\n\n Object.assign(twofa.state.code, {\n ...response.data,\n isSended: true\n });\n\n return response.data;\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async updatePassword(user, type) {\n const { password, passwordRepeat } = state.user;\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/update-password', {\n email: user.email,\n phone: user.phone,\n password: user.password,\n passwordRepeat: user.passwordRepeat,\n type\n });\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true\n });\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on password update error\n await removeCookie('user');\n setError(error);\n return Promise.reject(error);\n }\n }\n};\n\n// Cookies\nconst optionsDefault = {\n development: { secure: false, expires: 7, sameSite: 'Lax' },\n production: { expires: 7, path: '/', domain: process.env.DOMAIN_URL, sameSite: 'strict', secure: true }\n};\n\nasync function getCookie(name) {\n if (process.env.MOBILE_APP) {\n const { value } = await Preferences.get({ key: name });\n return value ? JSON.parse(value) : null;\n } else {\n const cookie = Cookies.get(name);\n return cookie ? JSON.parse(cookie) : null;\n }\n}\n\nasync function setCookie(name, data, env = process.env.DOMAIN_URL) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.set({\n key: name,\n value: JSON.stringify(data)\n });\n } else {\n // Для веб-версии\n Cookies.set(name, JSON.stringify(data), optionsDefault[env]);\n }\n}\n\nasync function removeCookie(name, env = process.env.NODE_ENV) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.remove({ key: name });\n } else {\n // Для веб-версии\n const options = env === 'production' ? { domain: process.env.DOMAIN_URL, path: '/' } : {};\n Cookies.remove(name, options);\n }\n}\n\n// History\nconst history = [];\nhistory.push(state);\n\n// Watch\nwatch(state, (newState, oldState) => {\n history.push(newState);\n});\n\n// Module Export\nexport {\n state,\n actions\n};"],"names":["reactive","setAuthToken","$axios","setError","twofa.state","Preferences","Cookies","watch"],"mappings":";;;;;;;;AAaK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,IACV,gBAAgB;AAAA,EACjB;AAAA,EACD,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,EACT;AAAA,EACD,UAAU,CAAA;AACZ,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,WAAW,QAAQ;AACvB,QAAI;AACF,YAAM,aAAa,SAAS,SAAS,MAAM,UAAU,MAAM;AAE3D,UAAI,YAAY;AACd,cAAM,EAAE,KAAK,OAAO,OAAO,QAAQ,OAAO,YAAW,IAAK;AAE1DC,sBAAAA,aAAa,WAAW;AAGxB,cAAM,WAAW,MAAMC,sBAAO,IAAI,0BAA0B;AAC5D,cAAM,eAAe,SAAS;AAC9B,cAAM,WAAW;AAGjB,eAAO,OAAO,MAAM,MAAM,EAAE,KAAK,OAAO,OAAO,QAAQ;AACvD,eAAO,OAAO,MAAM,QAAQ,EAAE,OAAO,aAAa,OAAO,QAAQ,CAAC,CAAC,YAAW,CAAE;AAAA,MACxF,OAAa;AACL,gBAAQ,IAAI,YAAY;AACxBD,sBAAAA,aAAa,IAAI;AACjB,aAAK,WAAY;AAAA,MACzB;AAAA,IACK,SAAQ,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAE/C,YAAM,aAAa,MAAM;AACzBA,oBAAAA,aAAa,IAAI;AACjB,WAAK,WAAY;AACjBE,cAAAA,SAAS,KAA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AA,QAAQ,IAAI,IAAI;AAC/B,WAAO,SAAS,KAAK,MAAM,MAAM,IAAI;AAAA,EACzC;AACA;AAEA,eAAe,UAAU,MAAM,MAAM,MAAM,QAAQ,IAAI,YAAY;AACjE,MAAI,QAAQ,IAAI,YAAY;AAE1B,UAAMD,MAAAA,YAAY,IAAI;AAAA,MACpB,KAAK;AAAA,MACL,OAAO,KAAK,UAAU,IAAI;AAAA,IAChC,CAAK;AAAA,EACL,OAAS;AAELC,sBAAQ,IAAI,MAAM,KAAK,UAAU,IAAI,GAAG,eAAe,GAAG,CAAC;AAAA,EAC/D;AACA;AAEA,eAAe,aAAa,MAAM,MAAM,QAAQ,IAAI,UAAU;AAC5D,MAAI,QAAQ,IAAI,YAAY;AAE1B,UAAMD,MAAW,YAAC,OAAO,EAAE,KAAK,KAAI,CAAE;AAAA,EAC1C,OAAS;AAEL,UAAM,UAAU,QAAQ,eAAe,EAAE,QAAQ,QAAQ,IAAI,YAAY,MAAM,IAAK,IAAG,CAAE;AACzFC,sBAAQ,OAAO,MAAM,OAAO;AAAA,EAChC;AACA;AAOAC,IAAAA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;;;"}
@@ -1,6 +1,6 @@
1
1
  import $axios, { setAuthToken } from "../../../globals/views/utils/axios-instance.js";
2
2
  import api from "../../../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js";
3
- import { Preferences } from "../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
3
+ import { Preferences } from "../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js";
4
4
  import { reactive, watch } from "vue";
5
5
  import { setError } from "../../../globals/views/store/globals.js";
6
6
  import { state as state$1 } from "./twofa.js";
@@ -219,10 +219,7 @@ async function removeCookie(name, env = process.env.NODE_ENV) {
219
219
  if (process.env.MOBILE_APP) {
220
220
  await Preferences.remove({ key: name });
221
221
  } else {
222
- const options = env === "production" ? { domain: process.env.DOMAIN_URL } : {};
223
- console.log(options);
224
- console.log(name);
225
- console.log(api.get());
222
+ const options = env === "production" ? { domain: process.env.DOMAIN_URL, path: "/" } : {};
226
223
  api.remove(name, options);
227
224
  }
228
225
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sources":["../../../../../../../src/modules/auth/views/store/auth.js"],"sourcesContent":["// Dependencies\nimport $axios, { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\nimport Cookies from 'js-cookie'\n// Capacitor\nimport { Preferences } from '@capacitor/preferences';\n// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// State\nimport * as twofa from './twofa'\n\n// State\nconst state = reactive({\n user: {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n },\n access: {\n roles: null,\n token: null,\n status: false\n },\n accesses: []\n});\n\nconst actions = {\n async initialize(cookie) {\n try {\n const userCookie = cookie ? cookie : await getCookie('user');\n\n if (userCookie) {\n const { _id, email, phone, avatar, roles, accessToken } = userCookie;\n\n setAuthToken(accessToken);\n\n // Проверка токена через серверный маршрут\n const response = await $axios.get('/api/auth/check-accesses');\n const userAccesses = response.data;\n state.accesses = userAccesses;\n\n // Обновление состояния приложения с информацией о пользователе и его правах доступа\n Object.assign(state.user, { _id, email, phone, avatar });\n Object.assign(state.access, { token: accessToken, roles, status: !!accessToken });\n } else {\n console.log('no cookies')\n setAuthToken(null);\n this.resetState();\n }\n } catch (error) {\n console.error('Error initializing auth:', error);\n // Make sure we remove the cookie when there's an error\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n setError(error)\n }\n },\n \n // Helper method to reset state\n resetState() {\n state.accesses = [];\n state.user = {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n };\n state.access = {\n roles: null,\n token: null,\n status: false\n };\n },\n \n async login(user, type) {\n try {\n const response = await $axios.post('/api/auth/signin', {\n ...user,\n type\n });\n\n setCookie('user', response.data);\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on login error\n await removeCookie('user');\n \n Object.assign(state.access, {\n token: null,\n status: false,\n roles: null\n });\n\n console.log(error);\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async signup(user, type, invite) {\n const { password, passwordRepeat } = state.user;\n\n console.log(password);\n console.log(passwordRepeat);\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/signup', {\n ...user,\n type,\n inviteCode: invite\n });\n\n console.log(response);\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on signup error\n await removeCookie('user');\n setError(error);\n console.log('Sign up failed');\n throw error;\n }\n },\n\n async logout() {\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n },\n\n async resetPassword(user, type) {\n try {\n const response = await $axios.post('/api/auth/reset-password', {\n email: user.email,\n phone: user.phone,\n type\n });\n\n Object.assign(twofa.state.code, {\n ...response.data,\n isSended: true\n });\n\n return response.data;\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async updatePassword(user, type) {\n const { password, passwordRepeat } = state.user;\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/update-password', {\n email: user.email,\n phone: user.phone,\n password: user.password,\n passwordRepeat: user.passwordRepeat,\n type\n });\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true\n });\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on password update error\n await removeCookie('user');\n setError(error);\n return Promise.reject(error);\n }\n }\n};\n\n// Cookies\nconst optionsDefault = {\n development: { secure: false, expires: 7, sameSite: 'Lax' },\n production: { expires: 7, path: '/', domain: process.env.DOMAIN_URL, sameSite: 'strict', secure: true }\n};\n\nasync function getCookie(name) {\n if (process.env.MOBILE_APP) {\n const { value } = await Preferences.get({ key: name });\n return value ? JSON.parse(value) : null;\n } else {\n const cookie = Cookies.get(name);\n return cookie ? JSON.parse(cookie) : null;\n }\n}\n\nasync function setCookie(name, data, env = process.env.DOMAIN_URL) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.set({\n key: name,\n value: JSON.stringify(data)\n });\n } else {\n // Для веб-версии\n Cookies.set(name, JSON.stringify(data), optionsDefault[env]);\n }\n}\n\nasync function removeCookie(name, env = process.env.NODE_ENV) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.remove({ key: name });\n } else {\n // Для веб-версии\n const options = env === 'production' ? { domain: process.env.DOMAIN_URL } : {};\n\n\n console.log(options)\n\n console.log(name)\n console.log(Cookies.get())\n Cookies.remove(name, options);\n }\n}\n\n// History\nconst history = [];\nhistory.push(state);\n\n// Watch\nwatch(state, (newState, oldState) => {\n history.push(newState);\n});\n\n// Module Export\nexport {\n state,\n actions\n};"],"names":["twofa.state","Cookies"],"mappings":";;;;;;AAaK,MAAC,QAAQ,SAAS;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,IACV,gBAAgB;AAAA,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AAM,UAAU,QAAQ,eAAe,EAAE,QAAQ,QAAQ,IAAI,WAAU,IAAK,CAAE;AAG9E,YAAQ,IAAI,OAAO;AAEnB,YAAQ,IAAI,IAAI;AAChB,YAAQ,IAAIA,IAAQ,IAAK,CAAA;AACzBA,QAAQ,OAAO,MAAM,OAAO;AAAA,EAChC;AACA;AAOA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
1
+ {"version":3,"file":"auth.js","sources":["../../../../../../../src/modules/auth/views/store/auth.js"],"sourcesContent":["// Dependencies\nimport $axios, { setAuthToken } from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\nimport Cookies from 'js-cookie'\n// Capacitor\nimport { Preferences } from '@capacitor/preferences';\n// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// State\nimport * as twofa from './twofa'\n\n// State\nconst state = reactive({\n user: {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n },\n access: {\n roles: null,\n token: null,\n status: false\n },\n accesses: []\n});\n\nconst actions = {\n async initialize(cookie) {\n try {\n const userCookie = cookie ? cookie : await getCookie('user');\n\n if (userCookie) {\n const { _id, email, phone, avatar, roles, accessToken } = userCookie;\n\n setAuthToken(accessToken);\n\n // Проверка токена через серверный маршрут\n const response = await $axios.get('/api/auth/check-accesses');\n const userAccesses = response.data;\n state.accesses = userAccesses;\n\n // Обновление состояния приложения с информацией о пользователе и его правах доступа\n Object.assign(state.user, { _id, email, phone, avatar });\n Object.assign(state.access, { token: accessToken, roles, status: !!accessToken });\n } else {\n console.log('no cookies')\n setAuthToken(null);\n this.resetState();\n }\n } catch (error) {\n console.error('Error initializing auth:', error);\n // Make sure we remove the cookie when there's an error\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n setError(error)\n }\n },\n \n // Helper method to reset state\n resetState() {\n state.accesses = [];\n state.user = {\n _id: undefined,\n avatar: null,\n username: '',\n email: '',\n phone: '',\n password: '',\n passwordRepeat: ''\n };\n state.access = {\n roles: null,\n token: null,\n status: false\n };\n },\n \n async login(user, type) {\n try {\n const response = await $axios.post('/api/auth/signin', {\n ...user,\n type\n });\n\n setCookie('user', response.data);\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on login error\n await removeCookie('user');\n \n Object.assign(state.access, {\n token: null,\n status: false,\n roles: null\n });\n\n console.log(error);\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async signup(user, type, invite) {\n const { password, passwordRepeat } = state.user;\n\n console.log(password);\n console.log(passwordRepeat);\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/signup', {\n ...user,\n type,\n inviteCode: invite\n });\n\n console.log(response);\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true,\n roles: response.data.roles\n });\n\n await this.initialize();\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on signup error\n await removeCookie('user');\n setError(error);\n console.log('Sign up failed');\n throw error;\n }\n },\n\n async logout() {\n await removeCookie('user');\n setAuthToken(null);\n this.resetState();\n },\n\n async resetPassword(user, type) {\n try {\n const response = await $axios.post('/api/auth/reset-password', {\n email: user.email,\n phone: user.phone,\n type\n });\n\n Object.assign(twofa.state.code, {\n ...response.data,\n isSended: true\n });\n\n return response.data;\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async updatePassword(user, type) {\n const { password, passwordRepeat } = state.user;\n\n if (password !== passwordRepeat) {\n const error = {\n response: {\n data: { errorCode: \"PASSWORDS_DO_NOT_MATCH\" }\n }\n };\n setError(error);\n throw new Error(error.response.status);\n }\n\n try {\n const response = await $axios.post('/api/auth/update-password', {\n email: user.email,\n phone: user.phone,\n password: user.password,\n passwordRepeat: user.passwordRepeat,\n type\n });\n\n if (response.data.accessToken) {\n setCookie('user', response.data);\n }\n\n Object.assign(state.user, {\n ...response.data\n });\n\n Object.assign(state.access, {\n token: response.data.accessToken,\n status: true\n });\n\n return response.data;\n } catch (error) {\n // Make sure cookie is removed on password update error\n await removeCookie('user');\n setError(error);\n return Promise.reject(error);\n }\n }\n};\n\n// Cookies\nconst optionsDefault = {\n development: { secure: false, expires: 7, sameSite: 'Lax' },\n production: { expires: 7, path: '/', domain: process.env.DOMAIN_URL, sameSite: 'strict', secure: true }\n};\n\nasync function getCookie(name) {\n if (process.env.MOBILE_APP) {\n const { value } = await Preferences.get({ key: name });\n return value ? JSON.parse(value) : null;\n } else {\n const cookie = Cookies.get(name);\n return cookie ? JSON.parse(cookie) : null;\n }\n}\n\nasync function setCookie(name, data, env = process.env.DOMAIN_URL) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.set({\n key: name,\n value: JSON.stringify(data)\n });\n } else {\n // Для веб-версии\n Cookies.set(name, JSON.stringify(data), optionsDefault[env]);\n }\n}\n\nasync function removeCookie(name, env = process.env.NODE_ENV) {\n if (process.env.MOBILE_APP) {\n // Если приложение запущено в Capacitor\n await Preferences.remove({ key: name });\n } else {\n // Для веб-версии\n const options = env === 'production' ? { domain: process.env.DOMAIN_URL, path: '/' } : {};\n Cookies.remove(name, options);\n }\n}\n\n// History\nconst history = [];\nhistory.push(state);\n\n// Watch\nwatch(state, (newState, oldState) => {\n history.push(newState);\n});\n\n// Module Export\nexport {\n state,\n actions\n};"],"names":["twofa.state","Cookies"],"mappings":";;;;;;AAaK,MAAC,QAAQ,SAAS;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,OAAO;AAAA,IAC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EAAE,KAAK,KAAI,CAAE;AAAA,EAC1C,OAAS;AAEL,UAAM,UAAU,QAAQ,eAAe,EAAE,QAAQ,QAAQ,IAAI,YAAY,MAAM,IAAK,IAAG,CAAE;AACzFA,QAAQ,OAAO,MAAM,OAAO;AAAA,EAChC;AACA;AAOA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
@@ -8,7 +8,7 @@ const Card = require("../elements/Card.vue.cjs");
8
8
  const Audio = require("../elements/Audio.vue.cjs");
9
9
  const Video = require("../elements/Video.vue.cjs");
10
10
  const Draggable = require("../../../../components/Draggable/Draggable.vue.cjs");
11
- const v4 = require("../../../../../node_modules/uuid/dist/esm-browser/v4.cjs");
11
+ const v4 = require("../../../../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs");
12
12
  const _hoisted_1 = ["data-index"];
13
13
  const _hoisted_2 = ["onMouseover"];
14
14
  const _hoisted_3 = {
@@ -6,7 +6,7 @@ import _sfc_main$6 from "../elements/Card.vue.js";
6
6
  import _sfc_main$3 from "../elements/Audio.vue.js";
7
7
  import _sfc_main$2 from "../elements/Video.vue.js";
8
8
  import _sfc_main$1 from "../../../../components/Draggable/Draggable.vue.js";
9
- import v4 from "../../../../../node_modules/uuid/dist/esm-browser/v4.js";
9
+ import v4 from "../../../../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";
10
10
  const _hoisted_1 = ["data-index"];
11
11
  const _hoisted_2 = ["onMouseover"];
12
12
  const _hoisted_3 = {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
- const Tooltip = require("../../../../../components/Tooltip/Tooltip.vue2.cjs");
5
+ const Tooltip = require("../../../../../components/Tooltip/Tooltip.vue.cjs");
6
6
  const Dropdown = require("../../../../../components/Dropdown/Dropdown.vue2.cjs");
7
7
  const PlaceholderUserpic = require("../../../../icons/placeholders/PlaceholderUserpic.vue.cjs");
8
8
  const PlaceholderOrganizationPic = require("../../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs");
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent, createElementBlock, createCommentVNode, openBlock, createElementVNode, createBlock, withModifiers, resolveDynamicComponent, toDisplayString, withCtx, createTextVNode, Fragment, renderList, normalizeClass } from "vue";
2
2
  import { useRouter } from "vue-router";
3
- import _sfc_main$1 from "../../../../../components/Tooltip/Tooltip.vue2.js";
3
+ import _sfc_main$1 from "../../../../../components/Tooltip/Tooltip.vue.js";
4
4
  import _sfc_main$3 from "../../../../../components/Dropdown/Dropdown.vue2.js";
5
5
  import PlaceholderUserpic from "../../../../icons/placeholders/PlaceholderUserpic.vue.js";
6
6
  import PlaceholderOrganizationPic from "../../../../icons/placeholders/PlaceholderOrganizationPic.vue.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const index$1 = require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
4
+ const index$1 = require("../../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.cjs");
5
5
  const index = require("../../../../../../../node_modules/.pnpm/@capacitor_keyboard@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/keyboard/dist/esm/index.cjs");
6
6
  const vue_SixQ7xP = require("../../../../../../../node_modules/.pnpm/@unhead_vue@1.11.20_vue@3.5.13_typescript@5.8.3_/node_modules/@unhead/vue/dist/shared/vue.-sixQ7xP.cjs");
7
7
  const vueI18n = require("vue-i18n");
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onBeforeMount, resolveComponent, createBlock, openBlock, withCtx, resolveDynamicComponent } from "vue";
2
- import { Preferences } from "../../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
2
+ import { Preferences } from "../../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js";
3
3
  import { Keyboard } from "../../../../../../../node_modules/.pnpm/@capacitor_keyboard@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/keyboard/dist/esm/index.js";
4
4
  import { u as useHead } from "../../../../../../../node_modules/.pnpm/@unhead_vue@1.11.20_vue@3.5.13_typescript@5.8.3_/node_modules/@unhead/vue/dist/shared/vue.-sixQ7xP.js";
5
5
  import { useI18n } from "vue-i18n";
@@ -13,7 +13,7 @@ require("../../../../auth/views/store/auth.cjs");
13
13
  ;/* empty css */
14
14
  const LocationSelection = require("../partials/LocationSelection.vue.cjs");
15
15
  const ShopCart = require("../../../../orders/components/partials/ShopCart.vue.cjs");
16
- const index = require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
16
+ const index = require("../../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.cjs");
17
17
  ;/* empty css */
18
18
  const _hoisted_1 = {
19
19
  key: 0,
@@ -11,7 +11,7 @@ import "../../../../auth/views/store/auth.js";
11
11
  /* empty css */
12
12
  import _sfc_main$2 from "../partials/LocationSelection.vue.js";
13
13
  import _sfc_main$3 from "../../../../orders/components/partials/ShopCart.vue.js";
14
- import { Preferences } from "../../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
14
+ import { Preferences } from "../../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js";
15
15
  /* empty css */
16
16
  const _hoisted_1 = {
17
17
  key: 0,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
- const index = require("../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
4
+ const index = require("../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.cjs");
5
5
  const state = vue.reactive({
6
6
  loading: false,
7
7
  isOpenLocationPopup: false,
@@ -1,5 +1,5 @@
1
1
  import { reactive } from "vue";
2
- import { Preferences } from "../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
2
+ import { Preferences } from "../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js";
3
3
  const state = reactive({
4
4
  loading: false,
5
5
  isOpenLocationPopup: false,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const serverRenderer_esmBundler = require("../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs");
3
+ const serverRenderer_esmBundler = require("../../../../../../node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs");
4
4
  const index = require("../../../../../../node_modules/.pnpm/@unhead_ssr@1.11.20/node_modules/@unhead/ssr/dist/index.cjs");
5
5
  const axiosInstance = require("./axios-instance.cjs");
6
6
  function renderAndMountApp({ createApp }) {
@@ -1,4 +1,4 @@
1
- import { renderToString } from "../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js";
1
+ import { renderToString } from "../../../../../../node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js";
2
2
  import { renderSSRHead } from "../../../../../../node_modules/.pnpm/@unhead_ssr@1.11.20/node_modules/@unhead/ssr/dist/index.js";
3
3
  import { setAuthToken } from "./axios-instance.js";
4
4
  function renderAndMountApp({ createApp }) {
@@ -11,6 +11,16 @@ const _sfc_main = {
11
11
  __name: "Catalog",
12
12
  setup(__props) {
13
13
  const route = vueRouter.useRoute();
14
+ vue.onMounted(() => {
15
+ var _a;
16
+ if (typeof gtag === "function") {
17
+ gtag("event", "view_marketplace", {
18
+ location: ((_a = globals.state.position) == null ? void 0 : _a.location) || "unknown",
19
+ page_path: window.location.pathname,
20
+ marketplace_id: route.params.id || "main"
21
+ });
22
+ }
23
+ });
14
24
  return (_ctx, _cache) => {
15
25
  var _a;
16
26
  return vue.openBlock(), vue.createBlock(Feed.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"Catalog.vue.cjs","sources":["../../../../../../../../src/modules/marketplace/views/components/pages/Catalog.vue"],"sourcesContent":["<template>\n\t<Feed\n\t\tv-model:sort=\"marketplace.state.sort\"\n\t\tv-model:filter=\"marketplace.state.filter\"\n :search=\"true\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Shops Found',\n description: 'Currently, there are no shops.'\n },\n }\"\n :store=\"{\n read: (options) => organization.actions.read(options)\n }\"\n :options=\"{\n country: route.params.country,\n\t state: route.params.state,\n\t city: route.params.city,\n\t categories: route.query.categories,\n\t prices: route.query.prices,\n\t delivery: route.query.delivery,\n\t location: globals.state.position?.location,\n\t lookup: ['products','spots'],\n\t contain: ['products'],\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"rows-1 gap-thin\"\n >\n <CardOrganization \n\t v-for=\"organization in items\" \n\t :key=\"organization._id\"\n\t :organization=\"organization\"\n\t :showRating=\"true\"\n\t :showFollowers=\"false\"\n\t :showProducts=\"true\"\n\t class=\"bg-light w-100 o-hidden radius-medium pd-small \"\n\t />\n </Feed>\n</template>\n\n<script setup>\n\timport { computed,reactive,ref, onMounted,watch } from 'vue'\n\timport { useRoute } from 'vue-router'\n\n\timport Feed from '@martyrs/src/components/Feed/Feed.vue'\n\t\n\timport * as organization from '@martyrs/src/modules/organizations/store/organizations'\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n\n\timport CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport * as marketplace from '../../store/marketplace';\n\t\n\tconst route = useRoute()\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":["useRoute"],"mappings":";;;;;;;;;;;;AAwDC,UAAM,QAAQA,UAAQ,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Catalog.vue.cjs","sources":["../../../../../../../../src/modules/marketplace/views/components/pages/Catalog.vue"],"sourcesContent":["<template>\n\t<Feed\n\t\tv-model:sort=\"marketplace.state.sort\"\n\t\tv-model:filter=\"marketplace.state.filter\"\n :search=\"true\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Shops Found',\n description: 'Currently, there are no shops.'\n },\n }\"\n :store=\"{\n read: (options) => organization.actions.read(options)\n }\"\n :options=\"{\n country: route.params.country,\n\t state: route.params.state,\n\t city: route.params.city,\n\t categories: route.query.categories,\n\t prices: route.query.prices,\n\t delivery: route.query.delivery,\n\t location: globals.state.position?.location,\n\t lookup: ['products','spots'],\n\t contain: ['products'],\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"rows-1 gap-thin\"\n >\n <CardOrganization \n\t v-for=\"organization in items\" \n\t :key=\"organization._id\"\n\t :organization=\"organization\"\n\t :showRating=\"true\"\n\t :showFollowers=\"false\"\n\t :showProducts=\"true\"\n\t class=\"bg-light w-100 o-hidden radius-medium pd-small \"\n\t />\n </Feed>\n</template>\n\n<script setup>\n\timport { computed,reactive,ref, onMounted,watch } from 'vue'\n\timport { useRoute } from 'vue-router'\n\n\timport Feed from '@martyrs/src/components/Feed/Feed.vue'\n\t\n\timport * as organization from '@martyrs/src/modules/organizations/store/organizations'\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n\n\timport CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport * as marketplace from '../../store/marketplace';\n\t\n\tconst route = useRoute()\n\n\tonMounted(() => {\n\t\t// Добавление Google Analytics event на открытие маркетплейса\n\t\tif (typeof gtag === 'function') {\n\t\t\tgtag('event', 'view_marketplace', {\n\t\t\t\tlocation: globals.state.position?.location || 'unknown',\n\t\t\t\tpage_path: window.location.pathname,\n\t\t\t\tmarketplace_id: route.params.id || 'main',\n\t\t\t});\n\t\t}\n\t})\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":["useRoute","onMounted","globals.state"],"mappings":";;;;;;;;;;;;AAwDC,UAAM,QAAQA,UAAQ,SAAA;AAEtBC,QAAAA,UAAU,MAAM;;AAEf,UAAI,OAAO,SAAS,YAAY;AAC/B,aAAK,SAAS,oBAAoB;AAAA,UACjC,YAAUC,aAAa,MAAC,aAAdA,mBAAwB,aAAY;AAAA,UAC9C,WAAW,OAAO,SAAS;AAAA,UAC3B,gBAAgB,MAAM,OAAO,MAAM;AAAA,QACvC,CAAI;AAAA,MACJ;AAAA,IACE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList } from "vue";
1
+ import { onMounted, createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList } from "vue";
2
2
  import { useRoute } from "vue-router";
3
3
  import _sfc_main$1 from "../../../../../components/Feed/Feed.vue.js";
4
4
  import { actions } from "../../../../organizations/store/organizations.js";
@@ -9,6 +9,16 @@ const _sfc_main = {
9
9
  __name: "Catalog",
10
10
  setup(__props) {
11
11
  const route = useRoute();
12
+ onMounted(() => {
13
+ var _a;
14
+ if (typeof gtag === "function") {
15
+ gtag("event", "view_marketplace", {
16
+ location: ((_a = state.position) == null ? void 0 : _a.location) || "unknown",
17
+ page_path: window.location.pathname,
18
+ marketplace_id: route.params.id || "main"
19
+ });
20
+ }
21
+ });
12
22
  return (_ctx, _cache) => {
13
23
  var _a;
14
24
  return openBlock(), createBlock(_sfc_main$1, {
@@ -1 +1 @@
1
- {"version":3,"file":"Catalog.vue.js","sources":["../../../../../../../../src/modules/marketplace/views/components/pages/Catalog.vue"],"sourcesContent":["<template>\n\t<Feed\n\t\tv-model:sort=\"marketplace.state.sort\"\n\t\tv-model:filter=\"marketplace.state.filter\"\n :search=\"true\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Shops Found',\n description: 'Currently, there are no shops.'\n },\n }\"\n :store=\"{\n read: (options) => organization.actions.read(options)\n }\"\n :options=\"{\n country: route.params.country,\n\t state: route.params.state,\n\t city: route.params.city,\n\t categories: route.query.categories,\n\t prices: route.query.prices,\n\t delivery: route.query.delivery,\n\t location: globals.state.position?.location,\n\t lookup: ['products','spots'],\n\t contain: ['products'],\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"rows-1 gap-thin\"\n >\n <CardOrganization \n\t v-for=\"organization in items\" \n\t :key=\"organization._id\"\n\t :organization=\"organization\"\n\t :showRating=\"true\"\n\t :showFollowers=\"false\"\n\t :showProducts=\"true\"\n\t class=\"bg-light w-100 o-hidden radius-medium pd-small \"\n\t />\n </Feed>\n</template>\n\n<script setup>\n\timport { computed,reactive,ref, onMounted,watch } from 'vue'\n\timport { useRoute } from 'vue-router'\n\n\timport Feed from '@martyrs/src/components/Feed/Feed.vue'\n\t\n\timport * as organization from '@martyrs/src/modules/organizations/store/organizations'\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n\n\timport CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport * as marketplace from '../../store/marketplace';\n\t\n\tconst route = useRoute()\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":[],"mappings":";;;;;;;;;;AAwDC,UAAM,QAAQ,SAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Catalog.vue.js","sources":["../../../../../../../../src/modules/marketplace/views/components/pages/Catalog.vue"],"sourcesContent":["<template>\n\t<Feed\n\t\tv-model:sort=\"marketplace.state.sort\"\n\t\tv-model:filter=\"marketplace.state.filter\"\n :search=\"true\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Shops Found',\n description: 'Currently, there are no shops.'\n },\n }\"\n :store=\"{\n read: (options) => organization.actions.read(options)\n }\"\n :options=\"{\n country: route.params.country,\n\t state: route.params.state,\n\t city: route.params.city,\n\t categories: route.query.categories,\n\t prices: route.query.prices,\n\t delivery: route.query.delivery,\n\t location: globals.state.position?.location,\n\t lookup: ['products','spots'],\n\t contain: ['products'],\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"rows-1 gap-thin\"\n >\n <CardOrganization \n\t v-for=\"organization in items\" \n\t :key=\"organization._id\"\n\t :organization=\"organization\"\n\t :showRating=\"true\"\n\t :showFollowers=\"false\"\n\t :showProducts=\"true\"\n\t class=\"bg-light w-100 o-hidden radius-medium pd-small \"\n\t />\n </Feed>\n</template>\n\n<script setup>\n\timport { computed,reactive,ref, onMounted,watch } from 'vue'\n\timport { useRoute } from 'vue-router'\n\n\timport Feed from '@martyrs/src/components/Feed/Feed.vue'\n\t\n\timport * as organization from '@martyrs/src/modules/organizations/store/organizations'\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals'\n\n\timport CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport * as marketplace from '../../store/marketplace';\n\t\n\tconst route = useRoute()\n\n\tonMounted(() => {\n\t\t// Добавление Google Analytics event на открытие маркетплейса\n\t\tif (typeof gtag === 'function') {\n\t\t\tgtag('event', 'view_marketplace', {\n\t\t\t\tlocation: globals.state.position?.location || 'unknown',\n\t\t\t\tpage_path: window.location.pathname,\n\t\t\t\tmarketplace_id: route.params.id || 'main',\n\t\t\t});\n\t\t}\n\t})\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":["globals.state"],"mappings":";;;;;;;;;;AAwDC,UAAM,QAAQ,SAAQ;AAEtB,cAAU,MAAM;;AAEf,UAAI,OAAO,SAAS,YAAY;AAC/B,aAAK,SAAS,oBAAoB;AAAA,UACjC,YAAUA,WAAc,aAAdA,mBAAwB,aAAY;AAAA,UAC9C,WAAW,OAAO,SAAS;AAAA,UAC3B,gBAAgB,MAAM,OAAO,MAAM;AAAA,QACvC,CAAI;AAAA,MACJ;AAAA,IACE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -26,7 +26,7 @@ class CapacitorPushHandler {
26
26
  return false;
27
27
  }
28
28
  try {
29
- const { Capacitor } = await Promise.resolve().then(() => require("../../../node_modules/@capacitor/core/dist/index.cjs"));
29
+ const { Capacitor } = await Promise.resolve().then(() => require("../../../node_modules/.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor/core/dist/index.cjs"));
30
30
  const { PushNotifications } = await Promise.resolve().then(() => require("../../../../node_modules/.pnpm/@capacitor_push-notifications@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/push-notifications/dist/esm/index.cjs"));
31
31
  const { Device } = await Promise.resolve().then(() => require("../../../../node_modules/.pnpm/@capacitor_device@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/device/dist/esm/index.cjs"));
32
32
  this.capacitor = Capacitor;
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n /**\n * Initialize notifications\n */\n async initialize() {\n if (this.initialized || this.isServer) return;\n \n // Get current user ID from auth store instead of localStorage\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n \n // Initialize WebSocket for realtime notifications\n await globalWebSocket.connect(userId);\n \n // Initialize push notifications for mobile if enabled\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n }\n \n this.initialized = true;\n \n // Fetch existing notifications\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n /**\n * Disconnect and clean up\n */\n disconnect() {\n if (this.isServer) return;\n \n globalWebSocket.removeModuleListeners('notifications');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.isAuthenticated;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.isAuthenticated, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb;AAEI,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,sDAAiB,CAAC;AACrD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,wJAA+B,CAAC;AAC3E,YAAM,EAAE,OAAM,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,gIAAmB,CAAC;AAEpD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACf;AAEM,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACR,SAAQ,OAAO;AACd,cAAQ,MAAM,sCAAsC,KAAK;AACzD,aAAO;AAAA,IACb;AAAA,EACA;AAAA;AAAA;AAAA;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C,cAAM,cAAc,UAAU,mBAAoB;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL;AAGE,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGC,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACD;AAAA,EACL,CAAG;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACND,qBAAAA,qBAAAA;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAiB;AAAA;AAAA,MAEvB,kBAAMC,iBAAgB;AAAA;AAAA,MAEtB,mBAAMC,kBAAiB;AAAA,MACvB,yBAAMC,wBAAuB;AAAA;AAAA,MAE7B,eAAMC,cAAa;AAAA;AAAA,MAEbC,qBAAAA,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n /**\n * Initialize notifications\n */\n async initialize() {\n if (this.initialized || this.isServer) return;\n \n // Get current user ID from auth store instead of localStorage\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n \n // Initialize WebSocket for realtime notifications\n await globalWebSocket.connect(userId);\n \n // Initialize push notifications for mobile if enabled\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n }\n \n this.initialized = true;\n \n // Fetch existing notifications\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n /**\n * Disconnect and clean up\n */\n disconnect() {\n if (this.isServer) return;\n \n globalWebSocket.removeModuleListeners('notifications');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.isAuthenticated;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.isAuthenticated, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb;AAEI,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,+FAAiB,CAAC;AACrD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,wJAA+B,CAAC;AAC3E,YAAM,EAAE,OAAM,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,gIAAmB,CAAC;AAEpD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACf;AAEM,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACR,SAAQ,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BAAoB;AACjE,UAAIA,kBAAiB;AACnB,4BAAoB,WAAY;AAAA,MACxC,OAAa;AACL,4BAAoB,WAAY;AAChC,cAAM,cAAc,UAAU,mBAAoB;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL;AAGE,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGC,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACD;AAAA,EACL,CAAG;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACND,qBAAAA,qBAAAA;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAiB;AAAA;AAAA,MAEvB,kBAAMC,iBAAgB;AAAA;AAAA,MAEtB,mBAAMC,kBAAiB;AAAA,MACvB,yBAAMC,wBAAuB;AAAA;AAAA,MAE7B,eAAMC,cAAa;AAAA;AAAA,MAEbC,qBAAAA,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
@@ -24,7 +24,7 @@ class CapacitorPushHandler {
24
24
  return false;
25
25
  }
26
26
  try {
27
- const { Capacitor } = await import("../../../node_modules/@capacitor/core/dist/index.js");
27
+ const { Capacitor } = await import("../../../node_modules/.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor/core/dist/index.js");
28
28
  const { PushNotifications } = await import("../../../../node_modules/.pnpm/@capacitor_push-notifications@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/push-notifications/dist/esm/index.js");
29
29
  const { Device } = await import("../../../../node_modules/.pnpm/@capacitor_device@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/device/dist/esm/index.js");
30
30
  this.capacitor = Capacitor;
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n /**\n * Initialize notifications\n */\n async initialize() {\n if (this.initialized || this.isServer) return;\n \n // Get current user ID from auth store instead of localStorage\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n \n // Initialize WebSocket for realtime notifications\n await globalWebSocket.connect(userId);\n \n // Initialize push notifications for mobile if enabled\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n }\n \n this.initialized = true;\n \n // Fetch existing notifications\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n /**\n * Disconnect and clean up\n */\n disconnect() {\n if (this.isServer) return;\n \n globalWebSocket.removeModuleListeners('notifications');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.isAuthenticated;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.isAuthenticated, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","isAuthenticated"],"mappings":";;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb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,sBAAsB;AAG5B,QAAM,WAAW,OAAO,WAAW;AACnC,QAAM,WAAW,CAAC,YAAY,QAAQ,aAAa;AAEnD,MAAI,UAAU;AAEZ,UAAM,kBAAkB,MAAM,KAAK,MAAM;AACzC,UAAM,UAAS,WAAM,KAAK,MAAM,SAAjB,mBAAuB;AAEtC,QAAI,mBAAmB,QAAQ;AAC7B,0BAAoB,WAAY;AAAA,IACtC;AAGI,UAAM,MAAM,MAAM,KAAK,MAAM,iBAAiB,CAACC,qBAAoB;AACjE,UAAIA,kBAAiB;AACnB,4BAAoB,WAAY;AAAA,MACxC,OAAa;AACL,4BAAoB,WAAY;AAChC,cAAM,cAAc,UAAU,mBAAoB;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL;AAGE,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAG,OAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACD;AAAA,EACL,CAAG;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMD;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACND,qBAAAA;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,IACN;AAAA,EACA;AACA;"}
1
+ {"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n /**\n * Initialize notifications\n */\n async initialize() {\n if (this.initialized || this.isServer) return;\n \n // Get current user ID from auth store instead of localStorage\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n \n // Initialize WebSocket for realtime notifications\n await globalWebSocket.connect(userId);\n \n // Initialize push notifications for mobile if enabled\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n }\n \n this.initialized = true;\n \n // Fetch existing notifications\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n /**\n * Disconnect and clean up\n */\n disconnect() {\n if (this.isServer) return;\n \n globalWebSocket.removeModuleListeners('notifications');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.isAuthenticated;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.isAuthenticated, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","isAuthenticated"],"mappings":";;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb;AAEI,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,8FAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,OAAO,+HAAmB;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,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,IACtC;AAGI,UAAM,MAAM,MAAM,KAAK,MAAM,iBAAiB,CAACC,qBAAoB;AACjE,UAAIA,kBAAiB;AACnB,4BAAoB,WAAY;AAAA,MACxC,OAAa;AACL,4BAAoB,WAAY;AAChC,cAAM,cAAc,UAAU,mBAAoB;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL;AAGE,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAG,OAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACD;AAAA,EACL,CAAG;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMD;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACND,qBAAAA;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,IACN;AAAA,EACA;AACA;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Tooltip = require("../../../../components/Tooltip/Tooltip.vue2.cjs");
4
+ const Tooltip = require("../../../../components/Tooltip/Tooltip.vue.cjs");
5
5
  const IconStatusCreated = require("../icons/IconStatusCreated.vue.cjs");
6
6
  const IconStatusConfirmed = require("../icons/IconStatusConfirmed.vue.cjs");
7
7
  const IconStatusInUse = require("../icons/IconStatusInUse.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, Fragment, renderList, toDisplayString, createVNode, withCtx, createBlock, resolveDynamicComponent } from "vue";
2
- import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue2.js";
2
+ import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue.js";
3
3
  import _sfc_main$6 from "../icons/IconStatusCreated.vue.js";
4
4
  import _sfc_main$5 from "../icons/IconStatusConfirmed.vue.js";
5
5
  import _sfc_main$2 from "../icons/IconStatusInUse.vue.js";
@@ -10,7 +10,7 @@ const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
10
10
  const CardOrganization = require("../../../organizations/components/blocks/CardOrganization.vue.cjs");
11
11
  const ChatPage = require("../../../chats/components/pages/ChatPage.vue.cjs");
12
12
  const PriceTotal = require("../elements/PriceTotal.vue.cjs");
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  const globals = require("../../../globals/views/store/globals.cjs");
15
15
  const auth = require("../../../auth/views/store/auth.cjs");
16
16
  const orders = require("../../store/orders.cjs");
@@ -8,7 +8,7 @@ import _sfc_main$3 from "../blocks/CardOrderItem.vue.js";
8
8
  import _sfc_main$5 from "../../../organizations/components/blocks/CardOrganization.vue.js";
9
9
  import _sfc_main$6 from "../../../chats/components/pages/ChatPage.vue.js";
10
10
  import _sfc_main$4 from "../elements/PriceTotal.vue.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  import { state } from "../../../globals/views/store/globals.js";
13
13
  import { state as state$1 } from "../../../auth/views/store/auth.js";
14
14
  import { actions, state as state$2, getters, mutations } from "../../store/orders.js";