@ozdao/martyrs 0.2.584 → 0.2.585
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.
- package/dist/builder.js +2 -0
- package/dist/{main-fmp55tJF.js → main-xL-jtBkT.js} +2 -1
- package/dist/martyrs/dist/{main-fmp55tJF.js → main-xL-jtBkT.js} +3 -2
- package/dist/martyrs/dist/{main-fmp55tJF.js.map → main-xL-jtBkT.js.map} +1 -1
- package/dist/martyrs/dist/{web-BDuQSQKS.js → web-BA6h6Z8P.js} +2 -2
- package/dist/martyrs/dist/{web-BDuQSQKS.js.map → web-BA6h6Z8P.js.map} +1 -1
- package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +2 -2
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +59 -40
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/backoffice/backoffice.client.js +3 -15
- package/dist/martyrs/src/modules/backoffice/backoffice.client.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js +99 -0
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js.map +1 -0
- package/dist/martyrs/src/modules/backoffice/{backoffice.router.js → router/backoffice.router.js} +9 -7
- package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js.map +1 -0
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +6 -0
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/core.app.js +5 -1
- package/dist/martyrs/src/modules/core/views/classes/core.app.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +20 -26
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +76 -7
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/store/core.store.js +1 -0
- package/dist/martyrs/src/modules/core/views/store/core.store.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +2 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -0
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/pages.router.js +7 -5
- package/dist/martyrs/src/modules/pages/pages.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/style.css +5 -0
- package/dist/{web-BDuQSQKS.js → web-BA6h6Z8P.js} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.rspack.dev.js +2 -0
- package/src/modules/auth/views/components/pages/Profile.vue +33 -5
- package/src/modules/backoffice/backoffice.client.js +1 -25
- package/src/modules/backoffice/configs/navigation.backoffice.config.js +99 -0
- package/src/modules/backoffice/router/backoffice.router.js +8 -7
- package/src/modules/community/components/pages/BlogPost.vue +9 -1
- package/src/modules/core/core.client.js +1 -0
- package/src/modules/core/views/classes/core.app.js +8 -3
- package/src/modules/core/views/components/layouts/Client.vue +41 -42
- package/src/modules/core/views/components/pages/404.vue +55 -3
- package/src/modules/core/views/store/core.store.js +1 -0
- package/src/modules/core/views/utils/vue-app-renderer.js +9 -1
- package/src/modules/pages/pages.router.js +4 -2
- package/src/modules/pages/views/router/pages.backoffice.router.js +4 -3
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
- package/dist/martyrs/src/modules/backoffice/backoffice.router.js.map +0 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +0 -150
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js.map +0 -1
- package/src/modules/backoffice/backoffice.router.js +0 -69
- package/src/modules/backoffice/components/partials/Sidebar.vue +0 -165
package/dist/martyrs/src/modules/backoffice/{backoffice.router.js → router/backoffice.router.js}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Navigation from "../../core/views/components/partials/Navigation.vue.js";
|
|
2
|
+
import { navigationItems } from "../configs/navigation.backoffice.config.js";
|
|
2
3
|
function getRoutes(options = {}) {
|
|
3
4
|
const route = options.route || "Home";
|
|
4
5
|
const routes = [];
|
|
@@ -11,8 +12,9 @@ function getRoutes(options = {}) {
|
|
|
11
12
|
path: "",
|
|
12
13
|
name: "Backoffice Root",
|
|
13
14
|
meta: {
|
|
14
|
-
sidebar_navigation:
|
|
15
|
-
|
|
15
|
+
sidebar_navigation: Navigation,
|
|
16
|
+
sidebar_navigation_items: navigationItems,
|
|
17
|
+
sidebar_width_hidden: "w-2r"
|
|
16
18
|
},
|
|
17
19
|
props: {
|
|
18
20
|
newsletterPopup: 12344
|
|
@@ -20,7 +22,7 @@ function getRoutes(options = {}) {
|
|
|
20
22
|
beforeEnter: [
|
|
21
23
|
() => import(
|
|
22
24
|
/* webpackChunkName: "auth-validation" */
|
|
23
|
-
"
|
|
25
|
+
"../../auth/views/middlewares/auth.validation.js"
|
|
24
26
|
).then((m) => m.requiresAdmin)
|
|
25
27
|
],
|
|
26
28
|
children: [
|
|
@@ -35,7 +37,7 @@ function getRoutes(options = {}) {
|
|
|
35
37
|
},
|
|
36
38
|
component: () => import(
|
|
37
39
|
/* webpackChunkName: 'BackofficeGallery' */
|
|
38
|
-
"
|
|
40
|
+
"../components/pages/Dashboard.vue.js"
|
|
39
41
|
)
|
|
40
42
|
},
|
|
41
43
|
{
|
|
@@ -50,7 +52,7 @@ function getRoutes(options = {}) {
|
|
|
50
52
|
},
|
|
51
53
|
component: () => import(
|
|
52
54
|
/* webpackChunkName: 'BackofficeOrganizations' */
|
|
53
|
-
"
|
|
55
|
+
"../../organizations/components/pages/Organizations.vue.js"
|
|
54
56
|
)
|
|
55
57
|
},
|
|
56
58
|
{
|
|
@@ -65,7 +67,7 @@ function getRoutes(options = {}) {
|
|
|
65
67
|
},
|
|
66
68
|
component: () => import(
|
|
67
69
|
/* webpackChunkName: 'BackofficeCommunity' */
|
|
68
|
-
"
|
|
70
|
+
"../../community/components/pages/Blog.vue.js"
|
|
69
71
|
)
|
|
70
72
|
}
|
|
71
73
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backoffice.router.js","sources":["../../../../../../src/modules/backoffice/router/backoffice.router.js"],"sourcesContent":["import Navigation from '@martyrs/src/modules/core/views/components/partials/Navigation.vue'\nimport { navigationItems } from '../configs/navigation.backoffice.config.js'\n\nexport function getRoutes(options = {}) {\n const route = options.route || 'Home';\n const routes = [];\n\n routes.push({\n parentName: route,\n config: {\n basePath: 'backoffice',\n routes: [\n {\n path: '',\n name: 'Backoffice Root',\n meta: {\n sidebar_navigation: Navigation,\n sidebar_navigation_items: navigationItems,\n sidebar_width_hidden: 'w-2r',\n },\n props: {\n newsletterPopup: 12344,\n },\n beforeEnter: [\n () => import(/* webpackChunkName: \"auth-validation\" */ '@martyrs/src/modules/auth/views/middlewares/auth.validation.js').then(m => m.requiresAdmin),\n ],\n children: [\n {\n path: '',\n name: 'Backoffice Admin',\n meta: {\n title: {\n en: 'Backoffice',\n ru: 'Управление',\n },\n },\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '../components/pages/Dashboard.vue'),\n },\n {\n path: 'organizations',\n name: 'Backoffice Organizations',\n meta: {\n title: {\n en: 'Backoffice Organizations',\n ru: 'Управление Организациями',\n },\n authorize: [],\n },\n component: () => import(/* webpackChunkName: 'BackofficeOrganizations' */ '@martyrs/src/modules/organizations/components/pages/Organizations.vue'),\n },\n {\n path: 'community',\n name: 'Backoffice Community',\n meta: {\n title: {\n en: 'Backoffice Community',\n ru: 'Управление Сообществом',\n },\n authorize: [],\n },\n component: () => import(/* webpackChunkName: 'BackofficeCommunity' */ '@martyrs/src/modules/community/components/pages/Blog.vue'),\n },\n ],\n }\n ],\n }\n });\n\n return routes;\n}\n"],"names":[],"mappings":";;AAGO,SAAS,UAAU,UAAU,IAAI;AACtC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,SAAS,CAAA;AAEf,SAAO,KAAK;AAAA,IACV,YAAY;AAAA,IACZ,QAAQ;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,QACN;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,YACJ,oBAAoB;AAAA,YACpB,0BAA0B;AAAA,YAC1B,sBAAsB;AAAA,UAClC;AAAA,UACU,OAAO;AAAA,YACL,iBAAiB;AAAA,UAC7B;AAAA,UACU,aAAa;AAAA,YACX,MAAM;AAAA;AAAA,cAAiD;AAAA,YAAgE,EAAE,KAAK,OAAK,EAAE,aAAa;AAAA,UAC9J;AAAA,UACU,UAAU;AAAA,YACR;AAAA,cACE,MAAM;AAAA,cACN,MAAM;AAAA,cACN,MAAM;AAAA,gBACJ,OAAO;AAAA,kBACL,IAAI;AAAA,kBACJ,IAAI;AAAA,gBACtB;AAAA,cACA;AAAA,cACc,WAAW,MAAM;AAAA;AAAA,gBAAmD;AAAA,cAAmC;AAAA,YACrH;AAAA,YACY;AAAA,cACE,MAAM;AAAA,cACN,MAAM;AAAA,cACN,MAAM;AAAA,gBACJ,OAAO;AAAA,kBACL,IAAI;AAAA,kBACJ,IAAI;AAAA,gBACtB;AAAA,gBACgB,WAAW,CAAA;AAAA,cAC3B;AAAA,cACc,WAAW,MAAM;AAAA;AAAA,gBAAyD;AAAA,cAAuE;AAAA,YAC/J;AAAA,YACY;AAAA,cACE,MAAM;AAAA,cACN,MAAM;AAAA,cACN,MAAM;AAAA,gBACJ,OAAO;AAAA,kBACL,IAAI;AAAA,kBACJ,IAAI;AAAA,gBACtB;AAAA,gBACgB,WAAW,CAAA;AAAA,cAC3B;AAAA,cACc,WAAW,MAAM;AAAA;AAAA,gBAAqD;AAAA,cAA0D;AAAA,YAC9I;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA,CAAG;AAED,SAAO;AACT;"}
|
|
@@ -14,11 +14,13 @@ import { state as state$1 } from "../../../auth/views/store/auth.js";
|
|
|
14
14
|
import _sfc_main$4 from "../sections/Comments.vue.js";
|
|
15
15
|
import _sfc_main$3 from "../../../constructor/components/sections/Viewer.vue.js";
|
|
16
16
|
import { state, read } from "../../store/blogposts.js";
|
|
17
|
+
import { useStore } from "../../../core/views/store/core.store.js";
|
|
17
18
|
const _hoisted_1 = ["href"];
|
|
18
19
|
const _sfc_main = {
|
|
19
20
|
__name: "BlogPost",
|
|
20
21
|
setup(__props) {
|
|
21
22
|
const route = useRoute();
|
|
23
|
+
const store = useStore();
|
|
22
24
|
const blogpost = computed(() => state.current);
|
|
23
25
|
const isLoading = ref(false);
|
|
24
26
|
const canShare = ref(false);
|
|
@@ -29,9 +31,13 @@ const _sfc_main = {
|
|
|
29
31
|
const data = await read({ user: state$1.user?._id, url: route.params.url });
|
|
30
32
|
blogpost.value = data[0];
|
|
31
33
|
state.current = data[0];
|
|
34
|
+
if (!data || data.length === 0 || !state.current) {
|
|
35
|
+
store.core.state.notFound = true;
|
|
36
|
+
}
|
|
32
37
|
} catch (err) {
|
|
33
38
|
error.value = err;
|
|
34
39
|
console.error("Error fetching blogpost:", err);
|
|
40
|
+
store.core.state.notFound = true;
|
|
35
41
|
} finally {
|
|
36
42
|
isLoading.value = false;
|
|
37
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogPost.vue.js","sources":["../../../../../../../src/modules/community/components/pages/BlogPost.vue"],"sourcesContent":["<template>\n <section>\n <TransitionGroup tag=\"ul\" name=\"fade\" class=\"o-hidden bg-light radius-medium\">\n <SkeletonBlogpost\n v-if=\"isLoading\"\n v-for=\"i in 3\" :key=\"i\"\n class=\"\"\n />\n </TransitionGroup>\n <transition \n name=\"fade\"\n >\n <EmptyState \n v-if=\"!isLoading && !blogpost\"\n title=\"No Blogpost Found\"\n description=\"Currently, there are no blogposts available. Please check back later.\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </transition>\n\n <TransitionGroup tag=\"div\" name=\"fade\" class=\"container\">\n \t <!-- <button @click=\"share\" >\n\t\t\t Поделиться\n\t\t\t </button>\n\t\t\t -->\n \t<CardBlogpost \n v-if=\"!isLoading && blogpost\"\n @click=\"$router.push({name: 'Blogpost', params: {url: blogpost.url}})\" \n :blogpost=\"blogpost\" \n :user=\"auth.state.user._id\"\n :type=\"'blogpostPage'\"\n :hideTitle=\"true\"\n class=\"mn-b-small bg-light radius-medium mobile:radius-zero\"\n >\n\n \t <Viewer\n \t v-if=\"blogpost && blogpost.content\"\n \t :content=\"blogpost.content\"\n \t />\n\n \t\t\t\t<a v-if=\"blogpost.source\" :href=\"blogpost.source\" target=\"_blank\" class=\"mn-b-semi d-block w-max radius-big pd-thin bg-black t-white\">\n \t\t\t\t\tCheck Source 🔗\n \t\t\t\t</a>\n \t\t\t\n </CardBlogpost>\n\n \t<!-- <h3 class=\"mn-b-small\">Recommended Communities</h3>\n \t\t<Publics \n \t\t\tclass=\"mn-b-small\"\n \t\t/> -->\n\n <Comments \n v-if=\"!isLoading && blogpost\" \n :type=\"'blogpost'\" \n :target=\"blogpost._id\" \n :owner=\"auth.state.user._id\"\n class=\"bg-light radius-medium mobile:radius-zero pd-medium\"\n />\n \n </TransitionGroup> \n \n </section>\n</template>\n\n<script setup>\nimport { ref, onMounted, computed, onServerPrefetch, watch } from 'vue';\nimport { useHead } from '@unhead/vue'\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport CardBlogpost from '@martyrs/src/modules/community/components/blocks/CardBlogpost.vue';\nimport SkeletonBlogpost from '@martyrs/src/modules/icons/skeletons/SkeletonBlogpost.vue'\nimport Publics from '@martyrs/src/modules/organizations/components/sections/Publics.vue'\nimport Comments from '@martyrs/src/modules/community/components/sections/Comments.vue';\nimport Viewer from '@martyrs/src/modules/constructor/components/sections/Viewer.vue';\nimport * as blog from '@martyrs/src/modules/community/store/blogposts.js';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n
|
|
1
|
+
{"version":3,"file":"BlogPost.vue.js","sources":["../../../../../../../src/modules/community/components/pages/BlogPost.vue"],"sourcesContent":["<template>\n <section>\n <TransitionGroup tag=\"ul\" name=\"fade\" class=\"o-hidden bg-light radius-medium\">\n <SkeletonBlogpost\n v-if=\"isLoading\"\n v-for=\"i in 3\" :key=\"i\"\n class=\"\"\n />\n </TransitionGroup>\n <transition \n name=\"fade\"\n >\n <EmptyState \n v-if=\"!isLoading && !blogpost\"\n title=\"No Blogpost Found\"\n description=\"Currently, there are no blogposts available. Please check back later.\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </transition>\n\n <TransitionGroup tag=\"div\" name=\"fade\" class=\"container\">\n \t <!-- <button @click=\"share\" >\n\t\t\t Поделиться\n\t\t\t </button>\n\t\t\t -->\n \t<CardBlogpost \n v-if=\"!isLoading && blogpost\"\n @click=\"$router.push({name: 'Blogpost', params: {url: blogpost.url}})\" \n :blogpost=\"blogpost\" \n :user=\"auth.state.user._id\"\n :type=\"'blogpostPage'\"\n :hideTitle=\"true\"\n class=\"mn-b-small bg-light radius-medium mobile:radius-zero\"\n >\n\n \t <Viewer\n \t v-if=\"blogpost && blogpost.content\"\n \t :content=\"blogpost.content\"\n \t />\n\n \t\t\t\t<a v-if=\"blogpost.source\" :href=\"blogpost.source\" target=\"_blank\" class=\"mn-b-semi d-block w-max radius-big pd-thin bg-black t-white\">\n \t\t\t\t\tCheck Source 🔗\n \t\t\t\t</a>\n \t\t\t\n </CardBlogpost>\n\n \t<!-- <h3 class=\"mn-b-small\">Recommended Communities</h3>\n \t\t<Publics \n \t\t\tclass=\"mn-b-small\"\n \t\t/> -->\n\n <Comments \n v-if=\"!isLoading && blogpost\" \n :type=\"'blogpost'\" \n :target=\"blogpost._id\" \n :owner=\"auth.state.user._id\"\n class=\"bg-light radius-medium mobile:radius-zero pd-medium\"\n />\n \n </TransitionGroup> \n \n </section>\n</template>\n\n<script setup>\nimport { ref, onMounted, computed, onServerPrefetch, watch } from 'vue';\nimport { useHead } from '@unhead/vue'\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport CardBlogpost from '@martyrs/src/modules/community/components/blocks/CardBlogpost.vue';\nimport SkeletonBlogpost from '@martyrs/src/modules/icons/skeletons/SkeletonBlogpost.vue'\nimport Publics from '@martyrs/src/modules/organizations/components/sections/Publics.vue'\nimport Comments from '@martyrs/src/modules/community/components/sections/Comments.vue';\nimport Viewer from '@martyrs/src/modules/constructor/components/sections/Viewer.vue';\nimport * as blog from '@martyrs/src/modules/community/store/blogposts.js';\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\nimport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\nconst store = useStore();\nconst blogpost = computed(() => blog.state.current);\nconst isLoading = ref(false);\nconst canShare = ref(false);\nconst error = ref(null);\n\nasync function fetchBlogpost() {\n try {\n isLoading.value = true;\n const data = await blog.read({ user: auth.state.user?._id, url: route.params.url });\n blogpost.value = data[0];\n // Обновляем состояние хранилища\n blog.state.current = data[0];\n\n // Если пост не найден - устанавливаем 404\n if (!data || data.length === 0 || !blog.state.current) {\n store.core.state.notFound = true;\n }\n } catch (err) {\n error.value = err;\n console.error('Error fetching blogpost:', err);\n store.core.state.notFound = true;\n } finally {\n isLoading.value = false;\n }\n}\n\nonServerPrefetch(async() => {\n\tawait fetchBlogpost()\n});\n\nonMounted(async() => {\n if (!blogpost.value || blogpost.value.url !== route.params.url) {\n await fetchBlogpost();\n }\n canShare.value = !!navigator.share;\n});\n\n\nconst share = async () => {\n if (!canShare.value) return;\n try {\n await navigator.share({\n title: blogpost.value.name,\n text: firstText.value?.content.slice(0, 120) || 'Check out this blog post!',\n url: window.location.href,\n });\n console.log('Content shared successfully');\n } catch (error) {\n console.error('Error sharing:', error);\n }\n};\n\nconst firstImage = computed(() => {\n return blogpost.value?.content?.find(block => block.type === 'ImageUpload');\n});\n\nconst firstText = computed(() => {\n return blogpost.value?.content?.find(block => \n block.type === 'Textarea' && block.class !== 'h2'\n );\n});\n\nconst metadata = computed(() => ({\n title: blogpost.value?.name,\n description: firstText.value?.content.slice(0, 120),\n meta: [\n { hid: 'description', name: 'description', content: firstText.value?.content.slice(0, 120) },\n { hid: 'og:title', property: 'og:title', content: blogpost.value?.name },\n { hid: 'og:description', property: 'og:description', content: firstText.value?.content.slice(0, 120) },\n { hid: 'og:image', property: 'og:image', content: firstImage.value?.content ? `${process.env.FILE_SERVER_URL}${firstImage.value.content}` : `${process.env.FILE_SERVER_URL}/favicon/cover.jpg` },\n { hid: 'twitter:title', name: 'twitter:title', content: blogpost.value?.name },\n { hid: 'twitter:description', name: 'twitter:description', content: firstText.value?.content.slice(0, 120) },\n { hid: 'twitter:image', name: 'twitter:image', content: firstImage.value?.content ? `${process.env.FILE_SERVER_URL}${firstImage.value.content}` : `${process.env.FILE_SERVER_URL}/favicon/cover.jpg` },\n { hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' },\n ],\n}));\n\nuseHead(metadata);\n</script>\n\n<style lang=\"scss\">\n\n</style>\n"],"names":["blog.state","blog.read","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgFA,UAAM,QAAQ,SAAQ;AACtB,UAAM,QAAQ,SAAQ;AACtB,UAAM,WAAW,SAAS,MAAMA,MAAW,OAAO;AAClD,UAAM,YAAY,IAAI,KAAK;A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M,GAAG,GAAG,EAAC;AAAA,QAC1F,EAAE,KAAK,YAAY,UAAU,YAAY,SAAS,SAAS,OAAO,KAAI;AAAA,QACtE,EAAE,KAAK,kBAAkB,UAAU,kBAAkB,SAAS,UAAU,OAAO,QAAQ,MAAM,GAAG,GAAG,EAAC;AAAA,QACpG,EAAE,KAAK,YAAY,UAAU,YAAY,SAAS,WAAW,OAAO,UAAU,GAAG,QAAQ,IAAI,eAAe,GAAG,WAAW,MAAM,OAAO,KAAK,GAAG,QAAQ,IAAI,eAAe,qBAAoB;AAAA,QAC9L,EAAE,KAAK,iBAAiB,MAAM,iBAAiB,SAAS,SAAS,OAAO,KAAI;AAAA,QAC5E,EAAE,KAAK,uBAAuB,MAAM,uBAAuB,SAAS,UAAU,OAAO,QAAQ,MAAM,GAAG,GAAG,EAAC;AAAA,QAC1G,EAAE,KAAK,iBAAiB,MAAM,iBAAiB,SAAS,WAAW,OAAO,UAAU,GAAG,QAAQ,IAAI,eAAe,GAAG,WAAW,MAAM,OAAO,KAAK,GAAG,QAAQ,IAAI,eAAe,qBAAoB;AAAA,QACpM,EAAE,KAAK,gBAAgB,MAAM,gBAAgB,SAAS,sBAAqB;AAAA,MAC/E;AAAA,IACA,EAAE;AAEF,YAAQ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.client.js","sources":["../../../../../src/modules/core/core.client.js"],"sourcesContent":["// Functional imports (needed for initialize function)\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport * as mixins from './views/mixins/mixins.js';\nimport * as storeCore from './views/store/core.store.js';\nimport { useSession, useStore } from './views/store/core.store.js';\nimport * as appRenderer from './views/utils/vue-app-renderer.js';\nimport './views/utils/polyfills.js'; // Auto-apply polyfills\n\nimport alertPlugin from './views/plugins/alert.plugin.js';\nimport popupAuthPlugin from './views/plugins/popup.auth.plugin.js';\nimport datePickerPlugin from './views/plugins/date-picker.plugin.js';\nimport storeDebuggerPlugin from './views/plugins/store-debugger/store-debugger.plugin.js';\n\n\nimport { wsManager } from './views/classes/ws.manager.js';\nimport { i18nManager } from '@martyrs/src/modules/core/views/classes/i18n.manager.js';\nimport { moduleManager } from './views/classes/module.manager.js';\n\n// Будущие менеджеры:\n// import { notificationManager } from './views/classes/notification.manager.js';\n// import { alertManager } from './views/classes/alert.manager.js';\n\nimport en from './locales/en.js';\nimport ru from './locales/ru.js';\n\n\n// Core module initialization\nfunction initializeCore(app, store, router, config, options = {}) {\n const route = options.route || 'Home';\n\n const locales = {\n en: en,\n ru: ru,\n es: {} // или es: undefined\n };\n\n i18nManager.register('core', locales);\n\n const envVariables = ['NODE_ENV', 'PORT', 'APP_NAME', 'DOMAIN_URL', 'API_URL', 'WSS_URL', 'FILE_SERVER_URL', 'WDT_TOKEN', 'WDM_URL_PROD', 'GOOGLE_MAPS_API_KEY', 'MOBILE_APP'];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.WSS_URL = process.env.WSS_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app.mixin(mixins.globalMixins);\n\n app.use(alertPlugin);\n app.use(popupAuthPlugin);\n app.use(datePickerPlugin);\n // app.use(storeDebuggerPlugin, store);\n\n\n // WebSocket инициализируется в client.js после гидратации\n // чтобы не блокировать главный поток\n\n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n });\n\n if (config) {\n if (config.modules) store.core.state.options = config.modules;\n store.core.state.config = config;\n }\n\n // Core module is already registered by default in createStore()\n // store.addStore('core', storeCore); // Not needed anymore\n\n router.addRoute(route, {\n path: '404',\n name: 'notfound',\n component: () => import('@martyrs/src/modules/core/views/components/pages/404.vue'),\n });\n router.addRoute(route, {\n path: '401',\n name: 'unauthorized',\n component: () => import('@martyrs/src/modules/core/views/components/pages/401.vue'),\n });\n router.addRoute(route, {\n path: ':pathMatch(.*)*',\n name: 'NotFound',\n redirect: { name: 'notfound' },\n });\n}\n\nconst ModuleCore = {\n initialize: initializeCore,\n views: {\n store: {\n storeCore,\n },\n router: {\n // routerCore\n },\n },\n};\n\n// Component re-exports (enables tree shaking)\nexport { default as layoutApp } from './views/components/layouts/App.vue';\nexport { default as layoutClient } from './views/components/layouts/Client.vue';\nexport { default as BlockSearch } from '@martyrs/src/modules/core/views/components/blocks/BlockSearch.vue';\nexport { default as BottomNavigationBar } from '@martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue';\nexport { default as Header } from '@martyrs/src/modules/core/views/components/partials/Header.vue';\nexport { default as Navigation } from '@martyrs/src/modules/core/views/components/partials/Navigation.vue';\nexport { default as NavigationBar } from '@martyrs/src/modules/core/views/components/partials/NavigationBar.vue';\nexport { default as Sidebar } from '@martyrs/src/modules/core/views/components/partials/Sidebar.vue';\nexport { default as Footer } from '@martyrs/src/modules/core/views/components/partials/Footer.vue';\nexport { default as Walkthrough } from '@martyrs/src/modules/core/views/components/sections/Walkthrough.vue';\n\n// Functional exports\nexport {\n appRenderer,\n getBrowserLocale,\n mixins,\n moduleManager,\n scrollBehavior,\n i18nManager,\n storeCore,\n useSession,\n useStore,\n wsManager,\n};\n\n// Export client factory\nexport { createUniversalApp } from './views/classes/core.app.js';\n\n// Re-export polyfills for documentation\nexport * from './views/utils/polyfills.js';\n\nexport default ModuleCore;\n"],"names":["mixins.globalMixins","storeCore"],"mappings":";;;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AM;AAAA,IACN,WAAW,MAAM,OAAO,qCAA0D;AAAA,EACtF,CAAG;AACD,SAAO,SAAS,OAAO;AAAA,IACrB,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU,EAAE,MAAM,WAAU;AAAA,EAChC,CAAG;AACH;AAEK,MAAC,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,WAAMC;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA;AAAA,IAEZ;AAAA,EACA;AACA;"}
|
|
1
|
+
{"version":3,"file":"core.client.js","sources":["../../../../../src/modules/core/core.client.js"],"sourcesContent":["// Functional imports (needed for initialize function)\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport * as mixins from './views/mixins/mixins.js';\nimport * as storeCore from './views/store/core.store.js';\nimport { useSession, useStore } from './views/store/core.store.js';\nimport * as appRenderer from './views/utils/vue-app-renderer.js';\nimport './views/utils/polyfills.js'; // Auto-apply polyfills\n\nimport alertPlugin from './views/plugins/alert.plugin.js';\nimport popupAuthPlugin from './views/plugins/popup.auth.plugin.js';\nimport datePickerPlugin from './views/plugins/date-picker.plugin.js';\nimport storeDebuggerPlugin from './views/plugins/store-debugger/store-debugger.plugin.js';\n\n\nimport { wsManager } from './views/classes/ws.manager.js';\nimport { i18nManager } from '@martyrs/src/modules/core/views/classes/i18n.manager.js';\nimport { moduleManager } from './views/classes/module.manager.js';\n\n// Будущие менеджеры:\n// import { notificationManager } from './views/classes/notification.manager.js';\n// import { alertManager } from './views/classes/alert.manager.js';\n\nimport en from './locales/en.js';\nimport ru from './locales/ru.js';\n\n\n// Core module initialization\nfunction initializeCore(app, store, router, config, options = {}) {\n const route = options.route || 'Home';\n\n const locales = {\n en: en,\n ru: ru,\n es: {} // или es: undefined\n };\n\n i18nManager.register('core', locales);\n\n const envVariables = ['NODE_ENV', 'PORT', 'APP_NAME', 'DOMAIN_URL', 'API_URL', 'WSS_URL', 'FILE_SERVER_URL', 'WDT_TOKEN', 'WDM_URL_PROD', 'GOOGLE_MAPS_API_KEY', 'MOBILE_APP'];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.WSS_URL = process.env.WSS_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app.mixin(mixins.globalMixins);\n\n app.use(alertPlugin);\n app.use(popupAuthPlugin);\n app.use(datePickerPlugin);\n // app.use(storeDebuggerPlugin, store);\n\n\n // WebSocket инициализируется в client.js после гидратации\n // чтобы не блокировать главный поток\n\n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n });\n\n if (config) {\n if (config.modules) store.core.state.options = config.modules;\n store.core.state.config = config;\n }\n\n // Core module is already registered by default in createStore()\n // store.addStore('core', storeCore); // Not needed anymore\n\n router.addRoute(route, {\n path: '404',\n name: 'notfound',\n component: () => import('@martyrs/src/modules/core/views/components/pages/404.vue'),\n });\n router.addRoute(route, {\n path: '401',\n name: 'unauthorized',\n component: () => import('@martyrs/src/modules/core/views/components/pages/401.vue'),\n });\n router.addRoute(route, {\n path: ':pathMatch(.*)*',\n name: 'NotFound',\n redirect: { name: 'notfound' },\n });\n}\n\nconst ModuleCore = {\n initialize: initializeCore,\n views: {\n store: {\n storeCore,\n },\n router: {\n // routerCore\n },\n },\n};\n\n// Component re-exports (enables tree shaking)\nexport { default as layoutApp } from './views/components/layouts/App.vue';\nexport { default as layoutClient } from './views/components/layouts/Client.vue';\nexport { default as BlockSearch } from '@martyrs/src/modules/core/views/components/blocks/BlockSearch.vue';\nexport { default as BottomNavigationBar } from '@martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue';\nexport { default as Header } from '@martyrs/src/modules/core/views/components/partials/Header.vue';\nexport { default as Navigation } from '@martyrs/src/modules/core/views/components/partials/Navigation.vue';\nexport { default as NavigationBar } from '@martyrs/src/modules/core/views/components/partials/NavigationBar.vue';\nexport { default as Sidebar } from '@martyrs/src/modules/core/views/components/partials/Sidebar.vue';\nexport { default as Footer } from '@martyrs/src/modules/core/views/components/partials/Footer.vue';\nexport { default as Walkthrough } from '@martyrs/src/modules/core/views/components/sections/Walkthrough.vue';\n\n\n// Functional exports\nexport {\n appRenderer,\n getBrowserLocale,\n mixins,\n moduleManager,\n scrollBehavior,\n i18nManager,\n storeCore,\n useSession,\n useStore,\n wsManager,\n};\n\n// Export client factory\nexport { createUniversalApp } from './views/classes/core.app.js';\n\n// Re-export polyfills for documentation\nexport * from './views/utils/polyfills.js';\n\nexport default ModuleCore;\n"],"names":["mixins.globalMixins","storeCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,eAAe,KAAK,OAAO,QAAQ,QAAQ,UAAU,IAAI;AAChE,QAAM,QAAQ,QAAQ,SAAS;AAE/B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,IACA,IAAI,CAAA;AAAA;AAAA,EACR;AAEE,cAAY,SAAS,QAAQ,OAAO;AAIpC,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI;AAC1D,MAAI,OAAO,iBAAiB,sBAAsB,QAAQ,IAAI;AAE9D,MAAI,MAAMA,YAAmB;AAE7B,MAAI,IAAI,WAAW;AACnB,MAAI,IAAI,eAAe;AACvB,MAAI,IAAI,gBAAgB;AAQxB,SAAO,WAAW,CAAC,IAAI,MAAM,SAAS;AACpC,UAAM,SAAS,GAAG,OAAO;AAEzB,QAAI,QAAQ;AACV,UAAI,CAAC,IAAI,OAAO,iBAAiB,MAAM,iBAAiB,SAAS,MAAM,GAAG;AACxE,eAAO,KAAK,EAAE,MAAM,QAAQ;AAAA,MAC9B,OAAO;AACL,YAAI,OAAO,iBAAiB,MAAM,SAAS;AAC3C,eAAO,KAAI;AAAA,MACb;AAAA,IACF;AAEA,WAAO,KAAI;AAAA,EACb,CAAC;AAED,MAAI,QAAQ;AACV,QAAI,OAAO,QAAS,OAAM,KAAK,MAAM,UAAU,OAAO;AACtD,UAAM,KAAK,MAAM,SAAS;AAAA,EAC5B;AAKA,SAAO,SAAS,OAAO;AAAA,IACrB,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW,MAAM,OAAO,qCAA0D;AAAA,EACtF,CAAG;AACD,SAAO,SAAS,OAAO;AAAA,IACrB,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW,MAAM,OAAO,qCAA0D;AAAA,EACtF,CAAG;AACD,SAAO,SAAS,OAAO;AAAA,IACrB,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU,EAAE,MAAM,WAAU;AAAA,EAChC,CAAG;AACH;AAEK,MAAC,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,WAAMC;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA;AAAA,IAEZ;AAAA,EACA;AACA;"}
|
|
@@ -186,8 +186,9 @@ function createUniversalApp({
|
|
|
186
186
|
ssr: true
|
|
187
187
|
};
|
|
188
188
|
performance.mark("loading-20-start");
|
|
189
|
-
console.log("[
|
|
189
|
+
console.log("[SSR-404] renderApp starting, url:", url);
|
|
190
190
|
const requiredModules = moduleManager2.getModulesForRoute(url);
|
|
191
|
+
console.log("[SSR-404] required modules:", requiredModules.map((m) => m.name));
|
|
191
192
|
const currentRouteModules = [];
|
|
192
193
|
for (const module of requiredModules) {
|
|
193
194
|
await moduleManager2.load(module.name, context);
|
|
@@ -198,8 +199,11 @@ function createUniversalApp({
|
|
|
198
199
|
performance.measure("loading-20", "loading-20-start", "loading-20-end");
|
|
199
200
|
const measure20 = performance.getEntriesByName("loading-20")[0];
|
|
200
201
|
console.log(`[LOADING 20] SSR modules loaded in ${measure20?.duration?.toFixed(2)}ms`);
|
|
202
|
+
console.log("[SSR-404] modules loaded, pushing url:", url);
|
|
203
|
+
console.log("[SSR-404] available routes:", router.getRoutes().map((r) => r.path));
|
|
201
204
|
await router.push(url);
|
|
202
205
|
await router.isReady();
|
|
206
|
+
console.log("[SSR-404] router ready, currentRoute:", router.currentRoute.value.name, router.currentRoute.value.path);
|
|
203
207
|
const result = await appRenderer.render({
|
|
204
208
|
url,
|
|
205
209
|
cookies,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.app.js","sources":["../../../../../../../src/modules/core/views/classes/core.app.js"],"sourcesContent":["// client-factory.js - фабрика для создания клиентского приложения\nimport { nextTick, createApp as createVueApp, createSSRApp as createVueSSRApp } from 'vue';\nimport { createHead } from '@unhead/vue';\n\nexport function createUniversalApp({\n getConfig,\n getRouter,\n getLocales,\n getStore,\n getHooks = {}\n}) {\n // Lazy imports to avoid circular dependencies\n const getLayoutApp = () => import('../components/layouts/App.vue').then(m => m.default);\n const getModuleRegistry = () => import('./module.manager.js').then(m => m.moduleManager);\n const getWebsockets = () => import('./ws.manager.js').then(m => m.default);\n const getAppRenderer = () => import('../utils/vue-app-renderer.js');\n \n // Асинхронная инициализация для избежания циклических зависимостей\n async function initializeApp() {\n // [LOADING 14] Starting initializeApp\n performance.mark('loading-14-start');\n console.log('[LOADING 14] Starting application initialization...');\n\n // Создаем конфигурацию\n const config = await getConfig();\n const hooks = getHooks;\n\n // [LOADING 15] Loading core dependencies\n performance.mark('loading-15-start');\n console.log('[LOADING 15] Loading core dependencies via Promise.all...');\n\n const [layoutApp, moduleManager, wsManager, appRenderer] = await Promise.all([\n getLayoutApp(),\n getModuleRegistry(),\n getWebsockets(),\n getAppRenderer()\n ]);\n\n performance.mark('loading-15-end');\n performance.measure('loading-15', 'loading-15-start', 'loading-15-end');\n const measure15 = performance.getEntriesByName('loading-15')[0];\n console.log(`[LOADING 15] Core dependencies loaded in ${measure15?.duration?.toFixed(2)}ms`);\n \n // Core module is always loaded - no need to register in moduleManager\n\n // [LOADING 16] Registering modules in registry\n performance.mark('loading-16-start');\n console.log('[LOADING 16] Registering modules in registry...');\n\n // Регистрация модулей из config\n Object.entries(config.modules).forEach(([name, module]) => {\n if (module.loader) {\n moduleManager.register(name, {\n loader: module.loader,\n routes: module.routes || [],\n priority: module.priority || 'normal',\n critical: module.critical || false,\n dependencies: module.dependencies || [],\n preload: module.preload || false\n });\n }\n });\n\n performance.mark('loading-16-end');\n performance.measure('loading-16', 'loading-16-start', 'loading-16-end');\n const measure16 = performance.getEntriesByName('loading-16')[0];\n console.log(`[LOADING 16] Modules registered in ${measure16?.duration?.toFixed(2)}ms`);\n \n // Основная функция создания приложения\n function createApp() {\n const store = getStore();\n const app = process.env.MOBILE_APP \n ? createVueApp(layoutApp, config) \n : createVueSSRApp(layoutApp, config);\n \n const meta = createHead();\n const i18n = getLocales();\n \n const context = {\n app,\n store,\n router: null,\n config,\n };\n \n // Создаем роутер с контекстом\n const router = getRouter(context);\n context.router = router;\n\n // Регистрируем заглушки для роутов, которые требуют другие модули\n // Когда Organizations/Backoffice/Auth загрузятся, они заменят эти заглушки\n const stubComponent = { template: '<router-view />' };\n\n router.addRoute('Home', {\n path: 'backoffice',\n name: 'Backoffice Root',\n children: [],\n component: stubComponent,\n meta: {\n sidebar_width_hidden: 'w-0',\n }\n });\n\n router.addRoute('Home', {\n path: 'organizations/:_id',\n name: 'OrganizationRoot',\n children: [],\n component: stubComponent\n });\n\n router.addRoute('Home', {\n path: 'users/:_id',\n name: 'User Profile Root',\n children: [],\n component: stubComponent\n });\n \n // No critical modules - everything loads on demand\n \n // Router guard для загрузки модулей ДО навигации (только на клиенте)\n if (typeof window !== 'undefined') {\n router.beforeEach(async (to, from) => {\n // Получаем оригинальный путь ДО fallback редиректа на 404\n // Это критически важно для SSR гидратации вложенных роутов!\n const target = to.redirectedFrom || to;\n \n // Используем оригинальный путь для определения нужных модулей\n const requiredModules = moduleManager.getModulesForRoute(target.path);\n \n // Проверяем, какие модули еще не загружены\n const modulesToLoad = requiredModules.filter(m => !moduleManager.initialized.has(m.name));\n \n if (modulesToLoad.length > 0) {\n // Логируем если это редирект с 404 (для отладки)\n if (to.redirectedFrom) {\n console.log('[Router] Loading modules for redirected path:', target.path, 'modules:', modulesToLoad.map(m => m.name));\n }\n\n // [LOADING 18] Loading modules for route\n performance.mark('loading-18-start');\n console.log(`[LOADING 18] Loading ${modulesToLoad.length} modules for route...`);\n\n // Загружаем и инициализируем модули\n for (const module of modulesToLoad) {\n try {\n await moduleManager.load(module.name, context);\n await moduleManager.initialize(module.name, context);\n } catch (error) {\n console.error(`Failed to load module ${module.name}:`, error);\n }\n }\n\n performance.mark('loading-18-end');\n performance.measure('loading-18', 'loading-18-start', 'loading-18-end');\n const measure18 = performance.getEntriesByName('loading-18')[0];\n console.log(`[LOADING 18] Modules loaded for route in ${measure18?.duration?.toFixed(2)}ms`);\n\n // После загрузки модулей и регистрации их роутов,\n // возвращаем объект с оригинальным путем и replace: true\n // Это заставит роутер заново резолвить маршрут с новыми роутами\n return { path: target.fullPath, replace: true };\n }\n });\n }\n\n router.beforeResolve(async (to, from) => {\n store.core.state.loading = false;\n })\n \n // Error handler для lazy loaded chunks\n if (typeof window !== 'undefined') {\n window.addEventListener('error', (e) => {\n if (e.message && e.message.includes('Loading chunk')) {\n console.error('Chunk loading failed:', e);\n // Можно показать уведомление пользователю\n // или попытаться перезагрузить\n }\n });\n }\n \n // Инициализация в правильном порядке\n const initialize = async () => {\n // Хук ДО инициализации\n if (hooks.beforeInitialize) {\n await hooks.beforeInitialize(context);\n }\n // [LOADING 17] Initializing Core module\n performance.mark('loading-17-start');\n console.log('[LOADING 17] Initializing Core module...');\n\n // Core module must ALWAYS be initialized\n const ModuleCore = await import('../../core.client.js');\n await ModuleCore.default.initialize(app, store, router, config);\n\n performance.mark('loading-17-end');\n performance.measure('loading-17', 'loading-17-start', 'loading-17-end');\n const measure17 = performance.getEntriesByName('loading-17')[0];\n console.log(`[LOADING 17] Core module initialized in ${measure17?.duration?.toFixed(2)}ms`);\n\n // 2. WebSocket (отложим после гидратации, только если включен)\n const useWebsocket = config.globals?.websocket !== false; // по умолчанию false\n\n if (useWebsocket && typeof window !== 'undefined') {\n // Откладываем инициализацию WebSocket после гидратации\n requestIdleCallback(() => {\n wsManager.initialize({\n wsUrl: process.env.WSS_URL || undefined,\n maxReconnectAttempts: 5,\n reconnectDelay: 3000,\n pingInterval: 30000,\n });\n });\n }\n\n // 3. Предзагрузка важных модулей в фоне\n if (typeof window !== 'undefined') {\n requestIdleCallback(() => {\n moduleManager.preloadModules(context);\n });\n }\n \n // 5. Подключаем Vue плагины\n app.use(router).use(i18n).use(meta);\n \n // 6. Монтируем приложение\n if (process.env.MOBILE_APP) {\n app.mount('#app');\n }\n\n // Хук ПОСЛЕ инициализации\n if (hooks.afterInitialize) {\n await hooks.afterInitialize(context);\n }\n\n // [LOADING 19] Application initialization completed\n performance.mark('loading-19-end');\n performance.measure('loading-19', 'loading-14-start', 'loading-19-end');\n const measure19 = performance.getEntriesByName('loading-19')[0];\n console.log(`[LOADING 19] Application initialization completed in ${measure19?.duration?.toFixed(2)}ms`);\n\n return {\n app,\n router,\n store,\n i18n,\n meta,\n moduleManager,\n config,\n };\n };\n \n // Возвращаем промис для SSR\n if (!process.env.MOBILE_APP) {\n return initialize();\n }\n \n // Для SPA инициализируем сразу\n initialize();\n }\n \n // FOR SSR / SERVER ENTRY\n async function renderApp({ url, cookies, headers, languages, ssrContext }) {\n const { app, router, store, i18n, meta, moduleManager } = await createApp();\n \n // Set SSR store for useStore calls\n if (typeof window === 'undefined') {\n const { setSSRStore } = await import('../store/core.store.js');\n await setSSRStore(store);\n }\n \n const context = {\n app,\n store,\n router,\n config,\n ssr: true,\n };\n\n // [LOADING 20] SSR renderApp starting and loading modules\n performance.mark('loading-20-start');\n console.log('[LOADING 20] SSR renderApp starting and loading modules...');\n\n // Для SSR загружаем модули для текущего маршрута\n const requiredModules = moduleManager.getModulesForRoute(url);\n\n // Собираем имена модулей которые нужны для текущего роута\n const currentRouteModules = [];\n\n // Загружаем необходимые модули для SSR\n for (const module of requiredModules) {\n await moduleManager.load(module.name, context);\n await moduleManager.initialize(module.name, context);\n currentRouteModules.push(module.name);\n }\n\n performance.mark('loading-20-end');\n performance.measure('loading-20', 'loading-20-start', 'loading-20-end');\n const measure20 = performance.getEntriesByName('loading-20')[0];\n console.log(`[LOADING 20] SSR modules loaded in ${measure20?.duration?.toFixed(2)}ms`);\n \n // После загрузки модулей и регистрации роутов, выполняем навигацию\n await router.push(url);\n await router.isReady();\n \n const result = await appRenderer.render({\n url,\n cookies,\n headers,\n createApp: () => ({ app, router, store, i18n, meta }),\n ssrContext\n });\n \n if (ssrContext?.modules) {\n result.usedModules = Array.from(ssrContext.modules);\n }\n \n // Передаем только модули текущего роута (без критических)\n result.loadedModules = currentRouteModules;\n\n // [LOADING 21] SSR render completed\n performance.mark('loading-21-end');\n performance.measure('loading-21', 'loading-20-start', 'loading-21-end');\n const measure21 = performance.getEntriesByName('loading-21')[0];\n console.log(`[LOADING 21] SSR render completed in ${measure21?.duration?.toFixed(2)}ms`);\n\n // Clean up for next SSR request\n if (typeof window === 'undefined') {\n moduleManager.initialized.clear();\n moduleManager.modules.clear();\n moduleManager.loadingPromises.clear();\n\n const { clearSSRStore } = await import('../store/core.store.js');\n await clearSSRStore();\n }\n\n return result;\n }\n \n // FOR SPA\n if (typeof window !== 'undefined' && process.env.MOBILE_APP) {\n createApp();\n }\n \n // FOR SSR / CLIENT ENTRY\n if (typeof window !== 'undefined' && !process.env.MOBILE_APP) {\n // Используем renderAndMountApp для правильной гидратации со state\n appRenderer.renderAndMountApp({ createApp, hooks }).then(({ app, router, store, moduleManager }) => {\n // Хук ПОСЛЕ гидратации\n if (hooks.afterHydration) {\n hooks.afterHydration({ app, router, store, moduleManager });\n }\n \n // Модули уже загружены в renderAndMountApp, просто ставим маркер\n if (typeof window !== 'undefined') {\n window.performance.mark('client-ready');\n }\n }).catch(error => {\n console.error('Hydration failed:', error);\n });\n }\n \n return { createApp, renderApp };\n }\n \n // Возвращаем промис, который резолвится с функциями\n return initializeApp();\n}"],"names":["createApp","createVueApp","createVueSSRApp","moduleManager"],"mappings":";;AAIO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW,CAAA;AACb,GAAG;AAED,QAAM,eAAe,MAAM,OAAO,kCAA+B,EAAE,KAAK,OAAK,EAAE,OAAO;AACtF,QAAM,oBAAoB,MAAM,OAAO,qBAAqB,EAAE,KAAK,OAAK,EAAE,aAAa;AACvF,QAAM,gBAAgB,MAAM,OAAO,iBAAiB,EAAE,KAAK,OAAK,EAAE,OAAO;AACzE,QAAM,iBAAiB,MAAM,OAAO,8BAA8B;AAGlE,iBAAe,gBAAgB;AAE7B,gBAAY,KAAK,kBAAkB;AACnC,YAAQ,IAAI,qDAAqD;AAGjE,UAAM,SAAS,MAAM,UAAS;AAC9B,UAAM,QAAQ;AAGd,gBAAY,KAAK,kBAAkB;AACnC,YAAQ,IAAI,2DAA2D;AAEvE,UAAM,CAAC,WAAW,eAAe,WAAW,WAAW,IAAI,MAAM,QAAQ,IAAI;AAAA,MAC3E,aAAY;AAAA,MACZ,kBAAiB;AAAA,MACjB,cAAa;AAAA,MACb,eAAc;AAAA,IACpB,CAAK;AAED,gBAAY,KAAK,gBAAgB;AACjC,gBAAY,QAAQ,cAAc,oBAAoB,gBAAgB;AACtE,UAAM,YAAY,YAAY,iBA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AAA,IACH;AAEA,WAAO,EAAA,WAAEH,aAAW,UAAS;AAAA,EAC/B;AAGA,SAAO,cAAa;AACtB;"}
|
|
1
|
+
{"version":3,"file":"core.app.js","sources":["../../../../../../../src/modules/core/views/classes/core.app.js"],"sourcesContent":["// client-factory.js - фабрика для создания клиентского приложения\nimport { nextTick, createApp as createVueApp, createSSRApp as createVueSSRApp } from 'vue';\nimport { createHead } from '@unhead/vue';\n\nexport function createUniversalApp({\n getConfig,\n getRouter,\n getLocales,\n getStore,\n getHooks = {}\n}) {\n // Lazy imports to avoid circular dependencies\n const getLayoutApp = () => import('../components/layouts/App.vue').then(m => m.default);\n const getModuleRegistry = () => import('./module.manager.js').then(m => m.moduleManager);\n const getWebsockets = () => import('./ws.manager.js').then(m => m.default);\n const getAppRenderer = () => import('../utils/vue-app-renderer.js');\n \n // Асинхронная инициализация для избежания циклических зависимостей\n async function initializeApp() {\n // [LOADING 14] Starting initializeApp\n performance.mark('loading-14-start');\n console.log('[LOADING 14] Starting application initialization...');\n\n // Создаем конфигурацию\n const config = await getConfig();\n const hooks = getHooks;\n\n // [LOADING 15] Loading core dependencies\n performance.mark('loading-15-start');\n console.log('[LOADING 15] Loading core dependencies via Promise.all...');\n\n const [layoutApp, moduleManager, wsManager, appRenderer] = await Promise.all([\n getLayoutApp(),\n getModuleRegistry(),\n getWebsockets(),\n getAppRenderer()\n ]);\n\n performance.mark('loading-15-end');\n performance.measure('loading-15', 'loading-15-start', 'loading-15-end');\n const measure15 = performance.getEntriesByName('loading-15')[0];\n console.log(`[LOADING 15] Core dependencies loaded in ${measure15?.duration?.toFixed(2)}ms`);\n \n // Core module is always loaded - no need to register in moduleManager\n\n // [LOADING 16] Registering modules in registry\n performance.mark('loading-16-start');\n console.log('[LOADING 16] Registering modules in registry...');\n\n // Регистрация модулей из config\n Object.entries(config.modules).forEach(([name, module]) => {\n if (module.loader) {\n moduleManager.register(name, {\n loader: module.loader,\n routes: module.routes || [],\n priority: module.priority || 'normal',\n critical: module.critical || false,\n dependencies: module.dependencies || [],\n preload: module.preload || false\n });\n }\n });\n\n performance.mark('loading-16-end');\n performance.measure('loading-16', 'loading-16-start', 'loading-16-end');\n const measure16 = performance.getEntriesByName('loading-16')[0];\n console.log(`[LOADING 16] Modules registered in ${measure16?.duration?.toFixed(2)}ms`);\n \n // Основная функция создания приложения\n function createApp() {\n const store = getStore();\n const app = process.env.MOBILE_APP \n ? createVueApp(layoutApp, config) \n : createVueSSRApp(layoutApp, config);\n \n const meta = createHead();\n const i18n = getLocales();\n \n const context = {\n app,\n store,\n router: null,\n config,\n };\n \n // Создаем роутер с контекстом\n const router = getRouter(context);\n context.router = router;\n\n // Регистрируем заглушки для роутов, которые требуют другие модули\n // Когда Organizations/Backoffice/Auth загрузятся, они заменят эти заглушки\n const stubComponent = { template: '<router-view />' };\n\n router.addRoute('Home', {\n path: 'backoffice',\n name: 'Backoffice Root',\n children: [],\n component: stubComponent,\n meta: {\n sidebar_width_hidden: 'w-0',\n }\n });\n\n router.addRoute('Home', {\n path: 'organizations/:_id',\n name: 'OrganizationRoot',\n children: [],\n component: stubComponent\n });\n\n router.addRoute('Home', {\n path: 'users/:_id',\n name: 'User Profile Root',\n children: [],\n component: stubComponent\n });\n \n // No critical modules - everything loads on demand\n \n // Router guard для загрузки модулей ДО навигации (только на клиенте)\n if (typeof window !== 'undefined') {\n router.beforeEach(async (to, from) => {\n // Получаем оригинальный путь ДО fallback редиректа на 404\n // Это критически важно для SSR гидратации вложенных роутов!\n const target = to.redirectedFrom || to;\n \n // Используем оригинальный путь для определения нужных модулей\n const requiredModules = moduleManager.getModulesForRoute(target.path);\n \n // Проверяем, какие модули еще не загружены\n const modulesToLoad = requiredModules.filter(m => !moduleManager.initialized.has(m.name));\n \n if (modulesToLoad.length > 0) {\n // Логируем если это редирект с 404 (для отладки)\n if (to.redirectedFrom) {\n console.log('[Router] Loading modules for redirected path:', target.path, 'modules:', modulesToLoad.map(m => m.name));\n }\n\n // [LOADING 18] Loading modules for route\n performance.mark('loading-18-start');\n console.log(`[LOADING 18] Loading ${modulesToLoad.length} modules for route...`);\n\n // Загружаем и инициализируем модули\n for (const module of modulesToLoad) {\n try {\n await moduleManager.load(module.name, context);\n await moduleManager.initialize(module.name, context);\n } catch (error) {\n console.error(`Failed to load module ${module.name}:`, error);\n }\n }\n\n performance.mark('loading-18-end');\n performance.measure('loading-18', 'loading-18-start', 'loading-18-end');\n const measure18 = performance.getEntriesByName('loading-18')[0];\n console.log(`[LOADING 18] Modules loaded for route in ${measure18?.duration?.toFixed(2)}ms`);\n\n // После загрузки модулей и регистрации их роутов,\n // возвращаем объект с оригинальным путем и replace: true\n // Это заставит роутер заново резолвить маршрут с новыми роутами\n return { path: target.fullPath, replace: true };\n }\n });\n }\n\n router.beforeResolve(async (to, from) => {\n store.core.state.loading = false;\n })\n \n // Error handler для lazy loaded chunks\n if (typeof window !== 'undefined') {\n window.addEventListener('error', (e) => {\n if (e.message && e.message.includes('Loading chunk')) {\n console.error('Chunk loading failed:', e);\n // Можно показать уведомление пользователю\n // или попытаться перезагрузить\n }\n });\n }\n \n // Инициализация в правильном порядке\n const initialize = async () => {\n // Хук ДО инициализации\n if (hooks.beforeInitialize) {\n await hooks.beforeInitialize(context);\n }\n // [LOADING 17] Initializing Core module\n performance.mark('loading-17-start');\n console.log('[LOADING 17] Initializing Core module...');\n\n // Core module must ALWAYS be initialized\n const ModuleCore = await import('../../core.client.js');\n await ModuleCore.default.initialize(app, store, router, config);\n\n performance.mark('loading-17-end');\n performance.measure('loading-17', 'loading-17-start', 'loading-17-end');\n const measure17 = performance.getEntriesByName('loading-17')[0];\n console.log(`[LOADING 17] Core module initialized in ${measure17?.duration?.toFixed(2)}ms`);\n\n // 2. WebSocket (отложим после гидратации, только если включен)\n const useWebsocket = config.globals?.websocket !== false; // по умолчанию false\n\n if (useWebsocket && typeof window !== 'undefined') {\n // Откладываем инициализацию WebSocket после гидратации\n requestIdleCallback(() => {\n wsManager.initialize({\n wsUrl: process.env.WSS_URL || undefined,\n maxReconnectAttempts: 5,\n reconnectDelay: 3000,\n pingInterval: 30000,\n });\n });\n }\n\n // 3. Предзагрузка важных модулей в фоне\n if (typeof window !== 'undefined') {\n requestIdleCallback(() => {\n moduleManager.preloadModules(context);\n });\n }\n \n // 5. Подключаем Vue плагины\n app.use(router).use(i18n).use(meta);\n \n // 6. Монтируем приложение\n if (process.env.MOBILE_APP) {\n app.mount('#app');\n }\n\n // Хук ПОСЛЕ инициализации\n if (hooks.afterInitialize) {\n await hooks.afterInitialize(context);\n }\n\n // [LOADING 19] Application initialization completed\n performance.mark('loading-19-end');\n performance.measure('loading-19', 'loading-14-start', 'loading-19-end');\n const measure19 = performance.getEntriesByName('loading-19')[0];\n console.log(`[LOADING 19] Application initialization completed in ${measure19?.duration?.toFixed(2)}ms`);\n\n return {\n app,\n router,\n store,\n i18n,\n meta,\n moduleManager,\n config,\n };\n };\n \n // Возвращаем промис для SSR\n if (!process.env.MOBILE_APP) {\n return initialize();\n }\n \n // Для SPA инициализируем сразу\n initialize();\n }\n \n // FOR SSR / SERVER ENTRY\n async function renderApp({ url, cookies, headers, languages, ssrContext }) {\n const { app, router, store, i18n, meta, moduleManager } = await createApp();\n\n // Set SSR store for useStore calls\n if (typeof window === 'undefined') {\n const { setSSRStore } = await import('../store/core.store.js');\n await setSSRStore(store);\n }\n\n\n const context = {\n app,\n store,\n router,\n config,\n ssr: true,\n };\n\n // [LOADING 20] SSR renderApp starting and loading modules\n performance.mark('loading-20-start');\n console.log('[SSR-404] renderApp starting, url:', url);\n\n // Для SSR загружаем модули для текущего маршрута\n const requiredModules = moduleManager.getModulesForRoute(url);\n console.log('[SSR-404] required modules:', requiredModules.map(m => m.name));\n\n // Собираем имена модулей которые нужны для текущего роута\n const currentRouteModules = [];\n\n // Загружаем необходимые модули для SSR\n for (const module of requiredModules) {\n await moduleManager.load(module.name, context);\n await moduleManager.initialize(module.name, context);\n currentRouteModules.push(module.name);\n }\n\n performance.mark('loading-20-end');\n performance.measure('loading-20', 'loading-20-start', 'loading-20-end');\n const measure20 = performance.getEntriesByName('loading-20')[0];\n console.log(`[LOADING 20] SSR modules loaded in ${measure20?.duration?.toFixed(2)}ms`);\n \n // После загрузки модулей и регистрации роутов, выполняем навигацию\n console.log('[SSR-404] modules loaded, pushing url:', url);\n console.log('[SSR-404] available routes:', router.getRoutes().map(r => r.path));\n await router.push(url);\n await router.isReady();\n console.log('[SSR-404] router ready, currentRoute:', router.currentRoute.value.name, router.currentRoute.value.path);\n \n const result = await appRenderer.render({\n url,\n cookies,\n headers,\n createApp: () => ({ app, router, store, i18n, meta }),\n ssrContext\n });\n \n if (ssrContext?.modules) {\n result.usedModules = Array.from(ssrContext.modules);\n }\n \n // Передаем только модули текущего роута (без критических)\n result.loadedModules = currentRouteModules;\n\n // [LOADING 21] SSR render completed\n performance.mark('loading-21-end');\n performance.measure('loading-21', 'loading-20-start', 'loading-21-end');\n const measure21 = performance.getEntriesByName('loading-21')[0];\n console.log(`[LOADING 21] SSR render completed in ${measure21?.duration?.toFixed(2)}ms`);\n\n // Clean up for next SSR request\n if (typeof window === 'undefined') {\n moduleManager.initialized.clear();\n moduleManager.modules.clear();\n moduleManager.loadingPromises.clear();\n\n const { clearSSRStore } = await import('../store/core.store.js');\n await clearSSRStore();\n }\n\n return result;\n }\n \n // FOR SPA\n if (typeof window !== 'undefined' && process.env.MOBILE_APP) {\n createApp();\n }\n \n // FOR SSR / CLIENT ENTRY\n if (typeof window !== 'undefined' && !process.env.MOBILE_APP) {\n // Используем renderAndMountApp для правильной гидратации со state\n appRenderer.renderAndMountApp({ createApp, hooks }).then(({ app, router, store, moduleManager }) => {\n // Хук ПОСЛЕ гидратации\n if (hooks.afterHydration) {\n hooks.afterHydration({ app, router, store, moduleManager });\n }\n \n // Модули уже загружены в renderAndMountApp, просто ставим маркер\n if (typeof window !== 'undefined') {\n window.performance.mark('client-ready');\n }\n }).catch(error => {\n console.error('Hydration failed:', error);\n });\n }\n \n return { createApp, renderApp };\n }\n \n // Возвращаем промис, который резолвится с функциями\n return initializeApp();\n}"],"names":["createApp","createVueApp","createVueSSRApp","moduleManager"],"mappings":";;AAIO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW,CAAA;AACb,GAAG;AAED,QAAM,eAAe,MAAM,OAAO,kCAA+B,EAAE,KAAK,OAAK,EAAE,OAAO;AACtF,QAAM,oBAAoB,MAAM,OAAO,qBAAqB,EAAE,KAAK,OAAK,EAAE,aAAa;AACvF,QAAM,gBAAgB,MAAM,OAAO,iBAAiB,EAAE,KAAK,OAAK,EAAE,OAAO;AACzE,QAAM,iBAAiB,MAAM,OAAO,8BAA8B;AAGlE,iBAAe,gBAAgB;AAE7B,gBAAY,KAAK,kBAAkB;AACnC,YAAQ,IAAI,qDAAqD;AAGjE,UAAM,SAAS,MAAM,UAAS;AAC9B,UAAM,QAAQ;AAGd,gBAAY,KAAK,kBAAkB;AACnC,YAAQ,IAAI,2DAA2D;AAEvE,UAAM,CAAC,WAAW,eAAe,WAAW,WAAW,IAAI,MAAM,QAAQ,IAAI;AAAA,MAC3E,aAAY;AAAA,MACZ,kBAAiB;AAAA,MACjB,cAAa;AAAA,MACb,eAAc;AAAA,IACpB,CAAK;AAED,gBAAY,KAAK,gBAAgB;AACjC,gBAAY,QAAQ,cAAc,oBAAoB,gBAAgB;AACtE,UAAM,YAAY,YAAY,iBAAiB,YAAY,EAAE,CAAC;AAC9D,YAAQ,IAAI,4CAA4C,WAAW,UAAU,QAAQ,CAAC,CAAC,IAAI;AAK3F,gBAAY,KAAK,kBAAkB;AACnC,YAAQ,IAAI,iDAAiD;AAG7D,WAAO,QAAQ,OAAO,OAAO,EAAE,QAAQ,CAAC,CAAC,MAAM,MAAM,MAAM;AACzD,UAAI,OAAO,QAAQ;AACjB,sBAAc,SAAS,MAAM;AAAA,UAC3B,QAAQ,OAAO;AAAA,UACf,QAAQ,OAAO,UAAU,CAAA;AAAA,UACzB,U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@ -129,7 +129,7 @@ const _sfc_main = {
|
|
|
129
129
|
!page.value || unref(store).core.state.loading ? (openBlock(), createBlock(Loader, {
|
|
130
130
|
key: 0,
|
|
131
131
|
centered: true,
|
|
132
|
-
class: "pos-fixed"
|
|
132
|
+
class: "pos-fixed z-index-10"
|
|
133
133
|
})) : createCommentVNode("", true)
|
|
134
134
|
]),
|
|
135
135
|
_: 1
|
|
@@ -286,14 +286,25 @@ const _sfc_main = {
|
|
|
286
286
|
appear: ""
|
|
287
287
|
}, {
|
|
288
288
|
default: withCtx(() => [
|
|
289
|
-
(openBlock(),
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
289
|
+
(openBlock(), createElementBlock("div", {
|
|
290
|
+
key: componentKey.value,
|
|
291
|
+
class: "w-100 h-min-100"
|
|
292
|
+
}, [
|
|
293
|
+
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
294
|
+
ref_key: "page",
|
|
295
|
+
ref: page,
|
|
296
|
+
class: "w-100 h-min-100",
|
|
297
|
+
onPageLoading: handlePageLoading,
|
|
298
|
+
onPageLoaded: handlePageLoaded
|
|
299
|
+
}, null, 544)),
|
|
300
|
+
!_ctx.MOBILE_APP && route2.meta.footer && !route2.meta.hideFooter ? (openBlock(), createBlock(resolveDynamicComponent(route2.meta.footer), {
|
|
301
|
+
key: 0,
|
|
302
|
+
ref: "footer",
|
|
303
|
+
theme: route2.meta.footer_theme || "light",
|
|
304
|
+
logotype: route2.meta.logotype,
|
|
305
|
+
location: route2.meta.location
|
|
306
|
+
}, null, 8, ["theme", "logotype", "location"])) : createCommentVNode("", true)
|
|
307
|
+
]))
|
|
297
308
|
]),
|
|
298
309
|
_: 2
|
|
299
310
|
}, 1024)
|
|
@@ -304,23 +315,6 @@ const _sfc_main = {
|
|
|
304
315
|
_: 1
|
|
305
316
|
}))
|
|
306
317
|
]),
|
|
307
|
-
createVNode(Transition, {
|
|
308
|
-
onBeforeEnter: scrollTop,
|
|
309
|
-
name: "scaleTransition",
|
|
310
|
-
mode: "out-in",
|
|
311
|
-
appear: ""
|
|
312
|
-
}, {
|
|
313
|
-
default: withCtx(() => [
|
|
314
|
-
!_ctx.MOBILE_APP && unref(route).meta.footer && !unref(route).meta.hideFooter && page.value && !unref(store).core.state.loading ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.footer), {
|
|
315
|
-
key: 0,
|
|
316
|
-
ref: "footer",
|
|
317
|
-
theme: unref(route).meta.footer_theme || "light",
|
|
318
|
-
logotype: unref(route).meta.logotype,
|
|
319
|
-
location: unref(route).meta.location
|
|
320
|
-
}, null, 8, ["theme", "logotype", "location"])) : createCommentVNode("", true)
|
|
321
|
-
]),
|
|
322
|
-
_: 1
|
|
323
|
-
}),
|
|
324
318
|
unref(route).meta.player ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.player), {
|
|
325
319
|
key: 2,
|
|
326
320
|
id: "player-wrapper",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/core/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n\t\t\t[(route.name \n ? route.name.replace(/\\s+/g, '_') \n : route.path.replace(/\\W+/g, '_')\n ).toLowerCase()]: true,\n \t\t'pd-t-big': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark',\n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || store.core.state.loading\" :centered=\"true\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n :class=\"{\n \t'header-scrolled': scrollOffset > 50 \n }\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.header_navigation_items\"\n\t\t\t\t:stateSidebar=\"store.core.state.isOpenSidebar\"\n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"store.core.state.isOpenSidebar\"\n />\n\t\t</transition>\n\n\t <Popup\n\t \t@close-popup=\"closeLocationPopup\"\n\t \t:isPopupOpen=\"store.core.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\t <component\n\t v-if=\"route.meta?.sidebar\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"store.core.state.isOpenSidebar\"\n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => store.core.state.isOpenSidebar = false\"\n\t >\n\t \t<!-- Header slot -->\n\t \t<template #header>\n\t \t\t<component\n\t \t\t\tv-if=\"route.meta?.sidebar_header_component\"\n\t \t\t\t:is=\"route.meta.sidebar_header_component\"\n\t \t\t\t:theme=\"headerTheme\"\n\t \t\t/>\n\t \t</template>\n\n\t \t<!-- Navigation (default slot) -->\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\">\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"store.core.state.isOpenSidebar\"\n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\n\t <!-- Footer slot -->\n\t \t<template #footer>\n\t \t\t<component\n\t \t\t\tv-if=\"route.meta?.sidebar_footer_component\"\n\t \t\t\t:is=\"route.meta.sidebar_footer_component\"\n\t \t\t\t:theme=\"headerTheme\"\n\t \t\t/>\n\t \t</template>\n\t </component>\n\t\t <!-- rows-[minmax(0,1fr)] z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-[minmax(0,1fr)] z-index-1 pos-relative w-100 h-100\">\n\t\t \t<div id=\"scrollview\" ref=\"scrollview\" @scroll=\"handleScroll\" class=\"o-y-scroll o-x-hidden h-100\">\n\t \t\t\t<Status\n\t \t\t\t\tv-if=\"store.core.state.error.show\"\n\t\t\t\t\t\t:data=\"store.core.state.error\"\n\t\t\t\t\t\t@close=\"store.core.state.error.show = false\"\n\t\t\t\t\t\tclass=\"z-index-7\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Snack\n\t \t\t\t\tv-if=\"store.core.state.snack.show\"\n\t\t\t\t\t\t:type=\"store.core.state.snack.type\"\n\t\t\t\t\t\t:message=\"store.core.state.snack.message\"\n\t\t\t\t\t\t:show=\"store.core.state.snack.show\"\n\t\t\t\t\t\t@close=\"store.core.state.snack.show = false\"\n\t\t\t\t\t\tclass=\"z-index-7\"\n\t\t\t\t\t/>\n\t\t\t\t\t<div class=\"h-min-100 pos-relative w-100\">\n\t\t\t\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t\t\t\t<Breadcrumbs \n\t\t\t\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\t\t\t\tclass=\"bg-light pd-small radius-small\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</section> -->\n\n\t\t\t\t \t\t<Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t\t\t<router-view \n\t\t\t\t\t\t\t\tid=\"view\"\n\t\t\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t\tclass=\"h-min-100 pos-relative w-100\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t\t\t \t<component \n\t\t\t\t\t \t\tref=\"page\" \n\t\t\t\t\t \t\t:is=\"Component\" \n\t\t\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t\t\t @page-loaded=\"handlePageLoaded\"\n\t\t\t :key=\"componentKey\"\n\t\t\t\t\t \t/>\n\t\t\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t\t\t \t<!-- :key=\"route.path\" -->\n\t\t\t\t\t </transition>\n\t\t\t\t\t\t </router-view>\n\t\t\t\t\t\t</Suspense>\n\t\t\t\t </div>\n\t\t\t \n\t\t\t \t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t <component\n\t\t\t\t\t\t\tv-if=\"!MOBILE_APP && route.meta.footer && !route.meta.hideFooter && page && !store.core.state.loading\"\n\t\t\t\t ref=\"footer\"\n\t\t\t\t :is=\"route.meta.footer\"\n\t\t\t\t :theme=\"route.meta.footer_theme || 'light'\"\n\t\t\t\t :logotype=\"route.meta.logotype\"\n\t\t\t\t :location=\"route.meta.location\"\n\t\t\t\t />\n\t\t\t \t</transition>\n\n\t\t\t\t\t<component\n\t\t\t v-if=\"route.meta.player\"\n\t\t\t id=\"player-wrapper\"\n\t\t\t class=\"z-index-2 \"\n\t\t\t \t:is=\"route.meta.player\"\n\t\t\t />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</section>\n\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\n\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n\timport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Snack from '@martyrs/src/components/Status/Snack.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\timport Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/core/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/core/views/components/partials/LocationSelection.vue';\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t// PROPS\n\tconst props = defineProps({\n env: {\n type: Object,\n required: true\n },\n app: {\n type: Object,\n required: true\n },\n modules: {\n type: Object,\n required: true\n }\n })\n\n\tconst store = useStore()\n\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n const scrollview = ref(null)\n\n // isPageLoading убран - используем core.state.loading\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n store.core.state.loading = true;\n }\n\n function handlePageLoaded() {\n store.core.state.loading = false;\n }\n\n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик\n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n store.core.state.loading = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\n\t// Инициализация sidebar для SSR + первая загрузка\n\tif (route.meta?.sidebarOpenOnEnter === true) {\n\t\tstore.core.state.isOpenSidebar = true\n\t}\n\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t store.core.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tif (scrollview.value) scrollview.value.scrollTop = 0;\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tconst { isPhone, isTablet } = useGlobalMixins();\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// Закрываем sidebar на mobile (CSS уже скрыл визуально)\n\t\tif ((isPhone() || isTablet()) && store.core.state.isOpenSidebar) {\n\t\t\tstore.core.state.isOpenSidebar = false\n\t\t}\n\n\t\t// Регистрация единого Service Worker (PWA + push notifications)\n\t\tif ('serviceWorker' in navigator && !window.__MOBILE_APP__) {\n\t \twindow.addEventListener('load', () => {\n\t \tnavigator.serviceWorker.register('/sw.js').then(registration => {\n\t \tconsole.log('Unified SW registered: ', registration);\n\t \t}).catch(registrationError => {\n\t \tconsole.log('SW registration failed: ', registrationError);\n\t \t});\n\t });\n\t \t}\n\n\t\tif (!store.core.state.position && route.meta.location) {\n store.core.state.isOpenLocationPopup = true;\n } else {\n store.core.state.isOpenLocationPopup = false;\n }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n\n\tconst componentKey = computed(() => {\n\t // Собираем только значимые параметры (ID сущностей)\n\t const significantParams = ['_id', 'product', 'organization', 'categoryPath', 'country', 'state', 'city']\n\t .map(param => route.params[param])\n\t .filter(Boolean)\n\t .join('-');\n\n\t return significantParams || route.name;\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n\n\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgQC,UAAM,QAAQ,SAAQ;AAMrB,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AACpB,UAAM,aAAa,IAAI,IAAI;AAK5B,aAAS,oBAAoB;AAC3B,YAAM,KAAK,MAAM,UAAU;AAAA,IAC7B;AAEA,aAAS,mBAAmB;AAC1B,YAAM,KAAK,MAAM,UAAU;AAAA,IAC7B;AAGA,aAAS,qBAAqB;AAI5B,YAAM,KAAK,MAAM,UAAU;AAAA,IAC7B;AAID,UAAM,QAAQ,SAAQ;AAItB,QAAI,MAAM,MAAM,uBAAuB,MAAM;AAC5C,YAAM,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AAAA,MACF;AAED,UAAI,CAAC,MAAM,KAAK,MAAM,YAAY,MAAM,KAAK,UAAU;AACnD,cAAM,KAAK,MAAM,sBAAsB;AAAA,MACzC,OAAO;AACL,cAAM,KAAK,MAAM,sBAAsB;AAAA,MACzC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACvD;AAEA,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC9B,CAAC;AAED,UAAM,eAAe,SAAS,MAAM;AAElC,YAAM,oBAAoB,CAAC,OAAO,WAAW,gBAAgB,gBAAgB,WAAW,SAAS,MAAM,EACpG,IAAI,WAAS,MAAM,OAAO,KAAK,CAAC,EAChC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,aAAO,qBAAqB,MAAM;AAAA,IACpC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/core/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n\t\t\t[(route.name \n ? route.name.replace(/\\s+/g, '_') \n : route.path.replace(/\\W+/g, '_')\n ).toLowerCase()]: true,\n \t\t'pd-t-big': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark',\n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || store.core.state.loading\" :centered=\"true\" class=\"pos-fixed z-index-10\"/>\n\t\t</transition>\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n :class=\"{\n \t'header-scrolled': scrollOffset > 50 \n }\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.header_navigation_items\"\n\t\t\t\t:stateSidebar=\"store.core.state.isOpenSidebar\"\n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"store.core.state.isOpenSidebar\"\n />\n\t\t</transition>\n\n\t <Popup\n\t \t@close-popup=\"closeLocationPopup\"\n\t \t:isPopupOpen=\"store.core.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\t <component\n\t v-if=\"route.meta?.sidebar\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"store.core.state.isOpenSidebar\"\n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => store.core.state.isOpenSidebar = false\"\n\t >\n\t \t<!-- Header slot -->\n\t \t<template #header>\n\t \t\t<component\n\t \t\t\tv-if=\"route.meta?.sidebar_header_component\"\n\t \t\t\t:is=\"route.meta.sidebar_header_component\"\n\t \t\t\t:theme=\"headerTheme\"\n\t \t\t/>\n\t \t</template>\n\n\t \t<!-- Navigation (default slot) -->\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\">\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"store.core.state.isOpenSidebar\"\n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\n\t <!-- Footer slot -->\n\t \t<template #footer>\n\t \t\t<component\n\t \t\t\tv-if=\"route.meta?.sidebar_footer_component\"\n\t \t\t\t:is=\"route.meta.sidebar_footer_component\"\n\t \t\t\t:theme=\"headerTheme\"\n\t \t\t/>\n\t \t</template>\n\t </component>\n\t\t <!-- rows-[minmax(0,1fr)] z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-[minmax(0,1fr)] z-index-1 pos-relative w-100 h-100\">\n\n\t\t\t<div id=\"scrollview\" ref=\"scrollview\" @scroll=\"handleScroll\" class=\"o-y-scroll o-x-hidden h-100\">\n\t \t\t\t<Status\n\t \t\t\t\tv-if=\"store.core.state.error.show\"\n\t\t\t\t\t:data=\"store.core.state.error\"\n\t\t\t\t\t@close=\"store.core.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\"\n\t\t\t\t/>\n\t\t\t\t<Snack\n\t\t\t\t\tv-if=\"store.core.state.snack.show\"\n\t\t\t\t\t:type=\"store.core.state.snack.type\"\n\t\t\t\t\t:message=\"store.core.state.snack.message\"\n\t\t\t\t\t:show=\"store.core.state.snack.show\"\n\t\t\t\t\t@close=\"store.core.state.snack.show = false\"\n\t\t\t\t\tclass=\"z-index-7\"\n\t\t\t\t/>\n\t\t\t\t\t<div class=\"h-min-100 pos-relative w-100\">\n\t\t\t\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t\t\t\t<Breadcrumbs \n\t\t\t\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\t\t\t\tclass=\"bg-light pd-small radius-small\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</section> -->\n\n\t\t\t\t\t\t<Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t\t\t<router-view\n\t\t\t\t\t\t\t\tid=\"view\"\n\t\t\t\t\t\t\t\tv-slot=\"{ Component, route }\"\n\t\t\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t\tclass=\"h-min-100 pos-relative w-100\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\n\t\t\t\t\t\t\t\t\t<div :key=\"componentKey\" class=\"w-100 h-min-100\">\n\t\t\t\t\t\t\t\t\t\t<component\n\t\t\t\t\t\t\t\t\t\t\tref=\"page\"\n\t\t\t\t\t\t\t\t\t\t\t:is=\"Component\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-100 h-min-100\"\n\t\t\t\t\t\t\t\t\t\t\t@page-loading=\"handlePageLoading\"\n\t\t\t\t\t\t\t\t\t\t\t@page-loaded=\"handlePageLoaded\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<component\n\t\t\t\t\t\t\t\t\t\t\tv-if=\"!MOBILE_APP && route.meta.footer && !route.meta.hideFooter\"\n\t\t\t\t\t\t\t\t\t\t\tref=\"footer\"\n\t\t\t\t\t\t\t\t\t\t\t:is=\"route.meta.footer\"\n\t\t\t\t\t\t\t\t\t\t\t:theme=\"route.meta.footer_theme || 'light'\"\n\t\t\t\t\t\t\t\t\t\t\t:logotype=\"route.meta.logotype\"\n\t\t\t\t\t\t\t\t\t\t\t:location=\"route.meta.location\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t\t</router-view>\n\t\t\t\t\t\t</Suspense>\n\t\t\t\t </div>\n\n\t\t\t\t\t<component\n\t\t\t v-if=\"route.meta.player\"\n\t\t\t id=\"player-wrapper\"\n\t\t\t class=\"z-index-2 \"\n\t\t\t \t:is=\"route.meta.player\"\n\t\t\t />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</section>\n\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\n\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n\timport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Snack from '@martyrs/src/components/Status/Snack.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\timport Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\t\n\timport NavigationBar from '@martyrs/src/modules/core/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/core/views/components/partials/LocationSelection.vue';\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t// PROPS\n\tconst props = defineProps({\n env: {\n type: Object,\n required: true\n },\n app: {\n type: Object,\n required: true\n },\n modules: {\n type: Object,\n required: true\n }\n })\n\n\tconst store = useStore()\n\n\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n const scrollview = ref(null)\n\n // isPageLoading убран - используем core.state.loading\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n store.core.state.loading = true;\n }\n\n function handlePageLoaded() {\n store.core.state.loading = false;\n }\n\n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик\n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n store.core.state.loading = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\n\t// Инициализация sidebar для SSR + первая загрузка\n\tif (route.meta?.sidebarOpenOnEnter === true) {\n\t\tstore.core.state.isOpenSidebar = true\n\t}\n\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t store.core.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tif (scrollview.value) scrollview.value.scrollTop = 0;\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tconst { isPhone, isTablet } = useGlobalMixins();\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// Закрываем sidebar на mobile (CSS уже скрыл визуально)\n\t\tif ((isPhone() || isTablet()) && store.core.state.isOpenSidebar) {\n\t\t\tstore.core.state.isOpenSidebar = false\n\t\t}\n\n\t\t// Регистрация единого Service Worker (PWA + push notifications)\n\t\tif ('serviceWorker' in navigator && !window.__MOBILE_APP__) {\n\t \twindow.addEventListener('load', () => {\n\t \tnavigator.serviceWorker.register('/sw.js').then(registration => {\n\t \tconsole.log('Unified SW registered: ', registration);\n\t \t}).catch(registrationError => {\n\t \tconsole.log('SW registration failed: ', registrationError);\n\t \t});\n\t });\n\t \t}\n\n\t\tif (!store.core.state.position && route.meta.location) {\n store.core.state.isOpenLocationPopup = true;\n } else {\n store.core.state.isOpenLocationPopup = false;\n }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n\n\tconst componentKey = computed(() => {\n\t // Собираем только значимые параметры (ID сущностей)\n\t const significantParams = ['_id', 'product', 'organization', 'categoryPath', 'country', 'state', 'city']\n\t .map(param => route.params[param])\n\t .filter(Boolean)\n\t .join('-');\n\n\t return significantParams || route.name;\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n\n\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8PC,UAAM,QAAQ,SAAQ;AAOrB,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AACpB,UAAM,aAAa,IAAI,IAAI;AAK5B,aAAS,oBAAoB;AAC3B,Y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AAgB;AACzD,eAAO,iBAAiB,QAAQ,MAAM;AACpC,oBAAU,cAAc,SAAS,QAAQ,EAAE,KAAK,kBAAgB;AAC9D,oBAAQ,IAAI,2BAA2B,YAAY;AAAA,UACrD,CAAC,EAAE,MAAM,uBAAqB;AAC5B,oBAAQ,IAAI,4BAA4B,iBAAiB;AAAA,UAC3D,CAAC;AAAA,QACJ,CAAC;AAAA,MACF;AAED,UAAI,CAAC,MAAM,KAAK,MAAM,YAAY,MAAM,KAAK,UAAU;AACnD,cAAM,KAAK,MAAM,sBAAsB;AAAA,MACzC,OAAO;AACL,cAAM,KAAK,MAAM,sBAAsB;AAAA,MACzC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACvD;AAEA,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC9B,CAAC;AAED,UAAM,eAAe,SAAS,MAAM;AAElC,YAAM,oBAAoB,CAAC,OAAO,WAAW,gBAAgB,gBAAgB,WAAW,SAAS,MAAM,EACpG,IAAI,WAAS,MAAM,OAAO,KAAK,CAAC,EAChC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,aAAO,qBAAqB,MAAM;AAAA,IACpC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,80 @@
|
|
|
1
|
-
import { createElementBlock, openBlock } from "vue";
|
|
1
|
+
import { resolveComponent, createElementBlock, openBlock, createElementVNode, createStaticVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
2
|
+
import { useRouter } from "vue-router";
|
|
3
|
+
import _sfc_main$1 from "../../../../icons/entities/IconHome.vue.js";
|
|
4
|
+
import _sfc_main$2 from "../../../../icons/navigation/IconArrow.vue.js";
|
|
5
|
+
import _sfc_main$3 from "../../../../icons/navigation/IconSearch.vue.js";
|
|
6
|
+
import _sfc_main$4 from "../../../../icons/entities/IconInfo.vue.js";
|
|
7
|
+
/* empty css */
|
|
2
8
|
import _export_sfc from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
const
|
|
9
|
+
const _hoisted_1 = { class: "pd-thin flex flex-v-center w-100 h-100" };
|
|
10
|
+
const _hoisted_2 = { class: "bg-light w-100 h-100 flex flex-h-center flex-column radius-big pd-medium" };
|
|
11
|
+
const _hoisted_3 = { class: "flex gap-small mn-b-extra" };
|
|
12
|
+
const _hoisted_4 = { class: "pd-t-medium w-max-25r" };
|
|
13
|
+
const _hoisted_5 = { class: "field-wrapper bg-white flex flex-v-center radius-small pd-small gap-small" };
|
|
14
|
+
const _hoisted_6 = { class: "flex gap-medium mn-t-small" };
|
|
15
|
+
const _hoisted_7 = {
|
|
16
|
+
href: "#",
|
|
17
|
+
class: "flex flex-v-center gap-micro p-small t-transp"
|
|
18
|
+
};
|
|
19
|
+
const _sfc_main = {
|
|
20
|
+
__name: "404",
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const router = useRouter();
|
|
23
|
+
const goBack = () => window.history.length > 1 ? router.back() : router.push("/");
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
const _component_router_link = resolveComponent("router-link");
|
|
26
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
27
|
+
createElementVNode("div", _hoisted_2, [
|
|
28
|
+
_cache[6] || (_cache[6] = createStaticVNode('<div class="flex flex-v-center gap-thin pd-thin radius-big bg-main w-fit mn-b-medium" data-v-4a88f18b><span class="i-medium radius-big bg-grey" data-v-4a88f18b></span><span class="p-small" data-v-4a88f18b>Error 404</span></div><h1 class="mn-b-semi" data-v-4a88f18b>Page not found</h1><p class="p-medium t-transp w-max-35r mn-b-big" style="line-height:1.6;" data-v-4a88f18b> The page you are looking for doesn't exist or has been moved. Please check the URL or navigate back to the home page. </p>', 3)),
|
|
29
|
+
createElementVNode("div", _hoisted_3, [
|
|
30
|
+
createVNode(_component_router_link, {
|
|
31
|
+
to: "/",
|
|
32
|
+
class: "button bg-black t-white pd-regular radius-small flex flex-v-center gap-thin"
|
|
33
|
+
}, {
|
|
34
|
+
default: withCtx(() => [
|
|
35
|
+
createVNode(_sfc_main$1, {
|
|
36
|
+
class: "i-regular",
|
|
37
|
+
fill: "rgb(var(--white))"
|
|
38
|
+
}),
|
|
39
|
+
_cache[0] || (_cache[0] = createElementVNode("span", null, "Go home", -1))
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
}),
|
|
43
|
+
createElementVNode("button", {
|
|
44
|
+
onClick: goBack,
|
|
45
|
+
class: "button bg-white t-black pd-regular radius-small flex flex-v-center gap-thin"
|
|
46
|
+
}, [
|
|
47
|
+
createVNode(_sfc_main$2, { class: "i-regular rotate-180" }),
|
|
48
|
+
_cache[1] || (_cache[1] = createElementVNode("span", null, "Go back", -1))
|
|
49
|
+
])
|
|
50
|
+
]),
|
|
51
|
+
createElementVNode("div", _hoisted_4, [
|
|
52
|
+
_cache[5] || (_cache[5] = createElementVNode("span", { class: "p-micro t-transp t-upper t-500 ls-wide d-block mn-b-small" }, "Search Documentation", -1)),
|
|
53
|
+
createElementVNode("div", _hoisted_5, [
|
|
54
|
+
createVNode(_sfc_main$3, { class: "i-small t-transp" }),
|
|
55
|
+
_cache[2] || (_cache[2] = createElementVNode("input", {
|
|
56
|
+
type: "text",
|
|
57
|
+
placeholder: "e.g. Installation guide...",
|
|
58
|
+
class: "w-100 bd-none"
|
|
59
|
+
}, null, -1))
|
|
60
|
+
]),
|
|
61
|
+
createElementVNode("div", _hoisted_6, [
|
|
62
|
+
createElementVNode("a", _hoisted_7, [
|
|
63
|
+
createVNode(_sfc_main$4, { class: "i-small" }),
|
|
64
|
+
_cache[3] || (_cache[3] = createTextVNode(" Help Center"))
|
|
65
|
+
]),
|
|
66
|
+
_cache[4] || (_cache[4] = createElementVNode("a", {
|
|
67
|
+
href: "#",
|
|
68
|
+
class: "p-small t-transp"
|
|
69
|
+
}, "API Status", -1))
|
|
70
|
+
])
|
|
71
|
+
])
|
|
72
|
+
])
|
|
73
|
+
]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const NotFound = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4a88f18b"]]);
|
|
9
78
|
export {
|
|
10
79
|
NotFound as default
|
|
11
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"404.vue.js","sources":["../../../../../../../../src/modules/core/views/components/pages/404.vue"],"sourcesContent":["<template>\n <div class=\"\">\n 404
|
|
1
|
+
{"version":3,"file":"404.vue.js","sources":["../../../../../../../../src/modules/core/views/components/pages/404.vue"],"sourcesContent":["<script setup>\nimport { useRouter } from 'vue-router'\nimport IconHome from '@martyrs/src/modules/icons/entities/IconHome.vue'\nimport IconArrow from '@martyrs/src/modules/icons/navigation/IconArrow.vue'\nimport IconSearch from '@martyrs/src/modules/icons/navigation/IconSearch.vue'\nimport IconInfo from '@martyrs/src/modules/icons/entities/IconInfo.vue'\n\nconst router = useRouter()\nconst goBack = () => window.history.length > 1 ? router.back() : router.push('/')\n</script>\n\n<template>\n <div class=\"pd-thin flex flex-v-center w-100 h-100 \">\n <div class=\"bg-light w-100 h-100 flex flex-h-center flex-column radius-big pd-medium\">\n\n <div class=\"flex flex-v-center gap-thin pd-thin radius-big bg-main w-fit mn-b-medium\">\n <span class=\"i-medium radius-big bg-grey\"></span>\n <span class=\"p-small\">Error 404</span>\n </div>\n\n <h1 class=\"mn-b-semi\">Page not found</h1>\n\n <p class=\"p-medium t-transp w-max-35r mn-b-big\" style=\"line-height: 1.6;\">\n The page you are looking for doesn't exist or has been moved. Please check the URL or navigate back to the home page.\n </p>\n\n <div class=\"flex gap-small mn-b-extra\">\n <router-link to=\"/\" class=\"button bg-black t-white pd-regular radius-small flex flex-v-center gap-thin\">\n <IconHome class=\"i-regular\" :fill=\"'rgb(var(--white))'\" />\n <span>Go home</span>\n </router-link>\n <button @click=\"goBack\" class=\"button bg-white t-black pd-regular radius-small flex flex-v-center gap-thin\">\n <IconArrow class=\"i-regular rotate-180\" />\n <span>Go back</span>\n </button>\n </div>\n\n <div class=\"pd-t-medium w-max-25r\">\n <span class=\"p-micro t-transp t-upper t-500 ls-wide d-block mn-b-small\">Search Documentation</span>\n <div class=\"field-wrapper bg-white flex flex-v-center radius-small pd-small gap-small\">\n <IconSearch class=\"i-small t-transp\" />\n <input type=\"text\" placeholder=\"e.g. Installation guide...\" class=\"w-100 bd-none\" />\n </div>\n <div class=\"flex gap-medium mn-t-small\">\n <a href=\"#\" class=\"flex flex-v-center gap-micro p-small t-transp\"><IconInfo class=\"i-small\" /> Help Center</a>\n <a href=\"#\" class=\"p-small t-transp\">API Status</a>\n </div>\n </div>\n\n </div>\n </div>\n</template>\n\n<style scoped>\ninput { border: none; outline: none; }\ninput::placeholder { color: rgba(var(--dark), 0.4); }\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,UAAM,SAAS,UAAS;AACxB,UAAM,SAAS,MAAM,OAAO,QAAQ,SAAS,IAAI,OAAO,KAAI,IAAK,OAAO,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, normalizeClass, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../../../../../components/Tab/Tab.
|
|
2
|
+
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
|
|
3
3
|
const _hoisted_1 = { class: "flex-v-center flex-nowrap flex" };
|
|
4
4
|
const _hoisted_2 = { class: "h2 mn-r-auto" };
|
|
5
5
|
const _hoisted_3 = ["onClick"];
|