@abi-software/mapintegratedvuer 0.7.2-vue3.0-alpha.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +150 -150
  3. package/assets/styleguide.css +19 -19
  4. package/cypress.config.js +23 -23
  5. package/dist/index.html +17 -17
  6. package/dist/mapintegratedvuer.js +74203 -73758
  7. package/dist/mapintegratedvuer.umd.cjs +878 -515
  8. package/dist/style.css +1 -1
  9. package/package.json +134 -135
  10. package/public/index.html +17 -17
  11. package/reporter-config.json +9 -9
  12. package/src/App.vue +245 -245
  13. package/src/assets/_variables.scss +43 -43
  14. package/src/assets/fonts/mapicon-species.eot +0 -0
  15. package/src/assets/fonts/mapicon-species.ttf +0 -0
  16. package/src/assets/fonts/mapicon-species.woff +0 -0
  17. package/src/assets/header-icon.scss +67 -67
  18. package/src/assets/mapicon-species-style.css +41 -41
  19. package/src/assets/styles.scss +9 -9
  20. package/src/components/ContentBar.vue +376 -376
  21. package/src/components/ContentVuer.vue +217 -217
  22. package/src/components/ContextCard.vue +385 -385
  23. package/src/components/ContextHelp.vue +73 -73
  24. package/src/components/CustomSplitter.vue +151 -151
  25. package/src/components/DatasetHeader.vue +97 -97
  26. package/src/components/DialogToolbarContent.vue +464 -464
  27. package/src/components/EventBus.js +3 -3
  28. package/src/components/FlatmapContextCard.vue +134 -134
  29. package/src/components/MapContent.vue +328 -333
  30. package/src/components/ResizeSensor.vue +47 -47
  31. package/src/components/SearchControls.vue +115 -115
  32. package/src/components/SimulatedData.js +721 -721
  33. package/src/components/SplitDialog.vue +287 -287
  34. package/src/components/SplitFlow.vue +414 -414
  35. package/src/components/index.js +7 -7
  36. package/src/components/markerZoomLevelsHardCoded.js +255 -255
  37. package/src/components/scripts/utilities.js +173 -173
  38. package/src/components/viewers/Flatmap.vue +145 -145
  39. package/src/components/viewers/Iframe.vue +31 -31
  40. package/src/components/viewers/MultiFlatmap.vue +384 -384
  41. package/src/components/viewers/Plot.vue +23 -23
  42. package/src/components/viewers/Scaffold.vue +198 -198
  43. package/src/components/viewers/Simulation.vue +21 -21
  44. package/src/icons/yellowstar.js +1 -1
  45. package/src/main.js +31 -31
  46. package/src/mixins/ContentMixin.js +438 -438
  47. package/src/mixins/DynamicMarkerMixin.js +88 -88
  48. package/src/mixins/S3Bucket.vue +37 -37
  49. package/src/stores/entries.js +40 -40
  50. package/src/stores/index.js +23 -23
  51. package/src/stores/settings.js +144 -144
  52. package/src/stores/splitFlow.js +523 -523
  53. package/static.json +7 -7
  54. package/vite.config.js +70 -70
  55. package/vite.static-build.js +12 -12
  56. package/vitest.workspace.js +3 -3
  57. package/vuese-generator.js +65 -65
  58. package/assets/gazelle-icons-no-background.css +0 -32
  59. package/dist/matterport.pdf +0 -0
  60. package/dist/test.txt +0 -0
  61. package/public/matterport.pdf +0 -0
  62. package/public/test.txt +0 -0
  63. package/q.json +0 -690
  64. package/src/mixins/RetrieveContextCardMixin.js +0 -82
  65. package/tsconfig.json +0 -19
@@ -1,23 +1,23 @@
1
- <template>
2
- <PlotVuer
3
- :data-source="entry.resource.dataSource"
4
- :metadata="entry.resource.metadata"
5
- :supplemental-data="entry.resource.supplementalData"
6
- style="overflow: hidden"
7
- />
8
- </template>
9
-
10
- <script>
11
- /* eslint-disable no-alert, no-console */
12
- import { PlotVuer } from "@abi-software/plotvuer";
13
- import "@abi-software/plotvuer/dist/style.css";
14
- import ContentMixin from "../../mixins/ContentMixin";
15
-
16
- export default {
17
- name: "Plot",
18
- mixins: [ ContentMixin ],
19
- components: {
20
- PlotVuer,
21
- }
22
- };
23
- </script>
1
+ <template>
2
+ <PlotVuer
3
+ :data-source="entry.resource.dataSource"
4
+ :metadata="entry.resource.metadata"
5
+ :supplemental-data="entry.resource.supplementalData"
6
+ style="overflow: hidden"
7
+ />
8
+ </template>
9
+
10
+ <script>
11
+ /* eslint-disable no-alert, no-console */
12
+ import { PlotVuer } from "@abi-software/plotvuer";
13
+ import "@abi-software/plotvuer/dist/style.css";
14
+ import ContentMixin from "../../mixins/ContentMixin";
15
+
16
+ export default {
17
+ name: "Plot",
18
+ mixins: [ ContentMixin ],
19
+ components: {
20
+ PlotVuer,
21
+ }
22
+ };
23
+ </script>
@@ -1,198 +1,198 @@
1
- <template>
2
- <ScaffoldVuer
3
- :state="entry.state"
4
- :url="entry.resource"
5
- :region="entry.region"
6
- @scaffold-selected="resourceSelected(entry.type, $event, true)"
7
- @scaffold-highlighted="scaffoldHighlighted(entry.type, $event)"
8
- @scaffold-navigated="scaffoldNavigated(entry.type, $event)"
9
- @on-ready="scaffoldIsReady"
10
- @open-map="openMap"
11
- ref="scaffold"
12
- :background-toggle="true"
13
- :traditional="true"
14
- :help-mode="helpMode"
15
- :render="visible"
16
- :display-latest-message="true"
17
- :warning-message="warningMessage"
18
- :display-minimap="false"
19
- :display-markers="false"
20
- :enableOpenMapUI="true"
21
- :view-u-r-l="entry.viewUrl"
22
- :markerLabels="markerLabels"
23
- :flatmapAPI="flatmapAPI"
24
- />
25
- </template>
26
-
27
- <script>
28
- /* eslint-disable no-alert, no-console */
29
- import EventBus from "../EventBus";
30
- import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
31
- import ContentMixin from "../../mixins/ContentMixin";
32
-
33
- import "@abi-software/scaffoldvuer/dist/style.css";
34
-
35
- export default {
36
- name: "Scaffold",
37
- mixins: [ ContentMixin ],
38
- components: {
39
- ScaffoldVuer,
40
- },
41
- methods: {
42
- onResize: function () {
43
- this.scaffoldCamera.onResize();
44
- },
45
- getState: function () {
46
- return this.$refs.scaffold.getState();
47
- },
48
- /**
49
- * Perform a local search on this contentvuer
50
- */
51
- search: function (term) {
52
- //Remove first and last letter if they are double quote
53
- const parsed = term.replace(/(^"|"$)/g, '');
54
- return this.$refs.scaffold.search(parsed, true);
55
- },
56
- searchSuggestions: function(term, suggestions){
57
- if (term === "" || !this.$refs.scaffold) {
58
- return suggestions;
59
- }
60
- const items = this.$refs.scaffold.fetchSuggestions(term);
61
- items.forEach(item => {
62
- if (item.suggestion) suggestions.push(item.suggestion);
63
- });
64
- },
65
- /**
66
- * Handle sync pan zoom event
67
- */
68
- handleSyncPanZoomEvent: function (data) {
69
- //Prevent recursive callback
70
- if (!this.mouseHovered) {
71
- if (data.type !== this.entry.type) {
72
- const origin = data.payload.origin;
73
- const size = data.payload.size;
74
- const center = [origin[0] + size[0] / 2, origin[1] + size[1] / 2];
75
- const convertedCenter = [
76
- (center[0] - 0.5) * 2,
77
- (0.5 - center[1]) * 2,
78
- ];
79
- const zoom = 1 / Math.max(size[0], size[1]);
80
- this.$refs.scaffold.$module.setSyncControlCenterZoom(
81
- convertedCenter,
82
- zoom
83
- );
84
- }
85
- }
86
- },
87
- displayTooltip: function(info) {
88
- let name = undefined;
89
- if (info) {
90
- name = info.name;
91
- }
92
- if (name) {
93
- this.$refs.scaffold.search(name, true);
94
- } else {
95
- this.$refs.scaffold.hideRegionTooltip();
96
- }
97
- },
98
- zoomToFeatures: function(info, forceSelect) {
99
- let names = undefined;
100
- if (Array.isArray(info)) names = info;
101
- else names = [ info.name ];
102
- if (forceSelect) {
103
- this.$refs.scaffold.changeActiveByName(names, "", false);
104
- }
105
- this.$refs.scaffold.viewRegion(names);
106
- },
107
- highlightFeatures: function(info) {
108
- let names = undefined;
109
- if (Array.isArray(info)) names = info;
110
- else names = [ info.name ];
111
- this.$refs.scaffold.changeHighlightedByName(names, "", false);
112
- },
113
- scaffoldIsReady: function () {
114
- this.scaffoldLoaded = true;
115
- this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1];
116
- if (this.isVisible()) {
117
- let rotation = "free";
118
- if (this.entry.rotation) rotation = this.entry.rotation;
119
- this.$refs.scaffold.toggleSyncControl(this.splitFlowStore.globalCallback, rotation);
120
- if (this.splitFlowStore.syncMode) this.$refs.scaffold.fitWindow();
121
- }
122
- },
123
- requestSynchronisedEvent: function (flag) {
124
- if (this.scaffoldLoaded) {
125
- let rotation = "free";
126
- if (this.entry.rotation) rotation = this.entry.rotation;
127
- this.$refs.scaffold.toggleSyncControl(flag, rotation);
128
- }
129
- },
130
- /**
131
- * Callback when the vuers emit a selected event.
132
- */
133
- scaffoldHighlighted: function (type, resource) {
134
- const result = {
135
- paneIndex: this.entry.id,
136
- type: type,
137
- resource: resource,
138
- internalName: undefined,
139
- };
140
- if (resource && resource[0]) {
141
- result.internalName = resource[0].data.id;
142
- result.eventType = "highlighted";
143
- }
144
- this.$emit("resource-selected", result);
145
- },
146
- /**
147
- * Callback when the vuers emit a selected event.
148
- */
149
- scaffoldNavigated: function (type, resource) {
150
- if (this.mouseHovered) {
151
- const result = {
152
- paneIndex: this.entry.id,
153
- eventType: "panZoom",
154
- payload: resource,
155
- type: type,
156
- };
157
- this.$emit("resource-selected", result);
158
- }
159
- },
160
- updateWithViewUrl: function(viewUrl) {
161
- this.$refs.scaffold.updateViewURL(viewUrl);
162
- },
163
- },
164
- computed: {
165
- warningMessage: function() {
166
- if (this.entry.isBodyScaffold) {
167
- return "This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed.";
168
- } else {
169
- return "Under active development";
170
- }
171
- },
172
- markerLabels: function () {
173
- return this.settingsStore.facetLabels;
174
- },
175
- },
176
- data: function () {
177
- return {
178
- apiLocation: process.env.VUE_APP_API_LOCATION,
179
- scaffoldCamera: undefined,
180
- scaffoldLoaded: false,
181
- };
182
- },
183
- mounted: function () {
184
- this.scaffoldCamera =
185
- this.$refs.scaffold.$module.scene.getZincCameraControls();
186
- EventBus.on("startHelp", () => {
187
- this.startHelp();
188
- });
189
- },
190
- };
191
- </script>
192
-
193
- <style scoped lang="scss">
194
- :deep(.message-popper) {
195
- white-space: unset;
196
- max-width: 200px;
197
- }
198
- </style>
1
+ <template>
2
+ <ScaffoldVuer
3
+ :state="entry.state"
4
+ :url="entry.resource"
5
+ :region="entry.region"
6
+ @scaffold-selected="resourceSelected(entry.type, $event, true)"
7
+ @scaffold-highlighted="scaffoldHighlighted(entry.type, $event)"
8
+ @scaffold-navigated="scaffoldNavigated(entry.type, $event)"
9
+ @on-ready="scaffoldIsReady"
10
+ @open-map="openMap"
11
+ ref="scaffold"
12
+ :background-toggle="true"
13
+ :traditional="true"
14
+ :help-mode="helpMode"
15
+ :render="visible"
16
+ :display-latest-message="true"
17
+ :warning-message="warningMessage"
18
+ :display-minimap="false"
19
+ :display-markers="false"
20
+ :enableOpenMapUI="true"
21
+ :view-u-r-l="entry.viewUrl"
22
+ :markerLabels="markerLabels"
23
+ :flatmapAPI="flatmapAPI"
24
+ />
25
+ </template>
26
+
27
+ <script>
28
+ /* eslint-disable no-alert, no-console */
29
+ import EventBus from "../EventBus";
30
+ import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
31
+ import ContentMixin from "../../mixins/ContentMixin";
32
+
33
+ import "@abi-software/scaffoldvuer/dist/style.css";
34
+
35
+ export default {
36
+ name: "Scaffold",
37
+ mixins: [ ContentMixin ],
38
+ components: {
39
+ ScaffoldVuer,
40
+ },
41
+ methods: {
42
+ onResize: function () {
43
+ this.scaffoldCamera.onResize();
44
+ },
45
+ getState: function () {
46
+ return this.$refs.scaffold.getState();
47
+ },
48
+ /**
49
+ * Perform a local search on this contentvuer
50
+ */
51
+ search: function (term) {
52
+ //Remove first and last letter if they are double quote
53
+ const parsed = term.replace(/(^"|"$)/g, '');
54
+ return this.$refs.scaffold.search(parsed, true);
55
+ },
56
+ searchSuggestions: function(term, suggestions){
57
+ if (term === "" || !this.$refs.scaffold) {
58
+ return suggestions;
59
+ }
60
+ const items = this.$refs.scaffold.fetchSuggestions(term);
61
+ items.forEach(item => {
62
+ if (item.suggestion) suggestions.push(item.suggestion);
63
+ });
64
+ },
65
+ /**
66
+ * Handle sync pan zoom event
67
+ */
68
+ handleSyncPanZoomEvent: function (data) {
69
+ //Prevent recursive callback
70
+ if (!this.mouseHovered) {
71
+ if (data.type !== this.entry.type) {
72
+ const origin = data.payload.origin;
73
+ const size = data.payload.size;
74
+ const center = [origin[0] + size[0] / 2, origin[1] + size[1] / 2];
75
+ const convertedCenter = [
76
+ (center[0] - 0.5) * 2,
77
+ (0.5 - center[1]) * 2,
78
+ ];
79
+ const zoom = 1 / Math.max(size[0], size[1]);
80
+ this.$refs.scaffold.$module.setSyncControlCenterZoom(
81
+ convertedCenter,
82
+ zoom
83
+ );
84
+ }
85
+ }
86
+ },
87
+ displayTooltip: function(info) {
88
+ let name = undefined;
89
+ if (info) {
90
+ name = info.name;
91
+ }
92
+ if (name) {
93
+ this.$refs.scaffold.search(name, true);
94
+ } else {
95
+ this.$refs.scaffold.hideRegionTooltip();
96
+ }
97
+ },
98
+ zoomToFeatures: function(info, forceSelect) {
99
+ let names = undefined;
100
+ if (Array.isArray(info)) names = info;
101
+ else names = [ info.name ];
102
+ if (forceSelect) {
103
+ this.$refs.scaffold.changeActiveByName(names, "", false);
104
+ }
105
+ this.$refs.scaffold.viewRegion(names);
106
+ },
107
+ highlightFeatures: function(info) {
108
+ let names = undefined;
109
+ if (Array.isArray(info)) names = info;
110
+ else names = [ info.name ];
111
+ this.$refs.scaffold.changeHighlightedByName(names, "", false);
112
+ },
113
+ scaffoldIsReady: function () {
114
+ this.scaffoldLoaded = true;
115
+ this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1];
116
+ if (this.isVisible()) {
117
+ let rotation = "free";
118
+ if (this.entry.rotation) rotation = this.entry.rotation;
119
+ this.$refs.scaffold.toggleSyncControl(this.splitFlowStore.globalCallback, rotation);
120
+ if (this.splitFlowStore.syncMode) this.$refs.scaffold.fitWindow();
121
+ }
122
+ },
123
+ requestSynchronisedEvent: function (flag) {
124
+ if (this.scaffoldLoaded) {
125
+ let rotation = "free";
126
+ if (this.entry.rotation) rotation = this.entry.rotation;
127
+ this.$refs.scaffold.toggleSyncControl(flag, rotation);
128
+ }
129
+ },
130
+ /**
131
+ * Callback when the vuers emit a selected event.
132
+ */
133
+ scaffoldHighlighted: function (type, resource) {
134
+ const result = {
135
+ paneIndex: this.entry.id,
136
+ type: type,
137
+ resource: resource,
138
+ internalName: undefined,
139
+ };
140
+ if (resource && resource[0]) {
141
+ result.internalName = resource[0].data.id;
142
+ result.eventType = "highlighted";
143
+ }
144
+ this.$emit("resource-selected", result);
145
+ },
146
+ /**
147
+ * Callback when the vuers emit a selected event.
148
+ */
149
+ scaffoldNavigated: function (type, resource) {
150
+ if (this.mouseHovered) {
151
+ const result = {
152
+ paneIndex: this.entry.id,
153
+ eventType: "panZoom",
154
+ payload: resource,
155
+ type: type,
156
+ };
157
+ this.$emit("resource-selected", result);
158
+ }
159
+ },
160
+ updateWithViewUrl: function(viewUrl) {
161
+ this.$refs.scaffold.updateViewURL(viewUrl);
162
+ },
163
+ },
164
+ computed: {
165
+ warningMessage: function() {
166
+ if (this.entry.isBodyScaffold) {
167
+ return "This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed.";
168
+ } else {
169
+ return "Under active development";
170
+ }
171
+ },
172
+ markerLabels: function () {
173
+ return this.settingsStore.facetLabels;
174
+ },
175
+ },
176
+ data: function () {
177
+ return {
178
+ apiLocation: process.env.VUE_APP_API_LOCATION,
179
+ scaffoldCamera: undefined,
180
+ scaffoldLoaded: false,
181
+ };
182
+ },
183
+ mounted: function () {
184
+ this.scaffoldCamera =
185
+ this.$refs.scaffold.$module.scene.getZincCameraControls();
186
+ EventBus.on("startHelp", () => {
187
+ this.startHelp();
188
+ });
189
+ },
190
+ };
191
+ </script>
192
+
193
+ <style scoped lang="scss">
194
+ :deep(.message-popper) {
195
+ white-space: unset;
196
+ max-width: 200px;
197
+ }
198
+ </style>
@@ -1,21 +1,21 @@
1
- <template>
2
- <SimulationVuer
3
- :apiLocation="apiLocation"
4
- :id="entry.discoverId"
5
- />
6
- </template>
7
-
8
- <script>
9
- /* eslint-disable no-alert, no-console */
10
- import ContentMixin from "../../mixins/ContentMixin";
11
- import { SimulationVuer } from "@abi-software/simulationvuer";
12
- import "@abi-software/simulationvuer/dist/style.css";
13
-
14
- export default {
15
- name: "Simulation",
16
- mixins: [ ContentMixin ],
17
- components: {
18
- SimulationVuer,
19
- },
20
- };
21
- </script>
1
+ <template>
2
+ <SimulationVuer
3
+ :apiLocation="apiLocation"
4
+ :id="entry.discoverId"
5
+ />
6
+ </template>
7
+
8
+ <script>
9
+ /* eslint-disable no-alert, no-console */
10
+ import ContentMixin from "../../mixins/ContentMixin";
11
+ import { SimulationVuer } from "@abi-software/simulationvuer";
12
+ import "@abi-software/simulationvuer/dist/style.css";
13
+
14
+ export default {
15
+ name: "Simulation",
16
+ mixins: [ ContentMixin ],
17
+ components: {
18
+ SimulationVuer,
19
+ },
20
+ };
21
+ </script>
@@ -1 +1 @@
1
- export default '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>';
1
+ export default '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>';
package/src/main.js CHANGED
@@ -1,32 +1,32 @@
1
-
2
- import { createApp } from 'vue'
3
- import { createPinia } from 'pinia'
4
- import * as VueRouter from 'vue-router'
5
- import App from './App.vue'
6
- import { useMainStore } from './stores/index'
7
-
8
- const routes = [
9
- { path: '/' },
10
- ]
11
-
12
- const router = VueRouter.createRouter({
13
- // 4. Provide the history implementation to use. We are using the hash history for simplicity here.
14
- history: VueRouter.createWebHashHistory(),
15
- routes,
16
- })
17
-
18
- const pinia = createPinia()
19
- const app = createApp(App)
20
-
21
- app.use(pinia)
22
- app.use(router)
23
-
24
- const mainStore = useMainStore()
25
- const token = document.cookie
26
- .split("; ")
27
- .find((row) => row.startsWith("user-token"))
28
- if (mainStore && token) {
29
- mainStore.setUserToken(token.split("=")[1])
30
- }
31
-
1
+
2
+ import { createApp } from 'vue'
3
+ import { createPinia } from 'pinia'
4
+ import * as VueRouter from 'vue-router'
5
+ import App from './App.vue'
6
+ import { useMainStore } from './stores/index'
7
+
8
+ const routes = [
9
+ { path: '/' },
10
+ ]
11
+
12
+ const router = VueRouter.createRouter({
13
+ // 4. Provide the history implementation to use. We are using the hash history for simplicity here.
14
+ history: VueRouter.createWebHashHistory(),
15
+ routes,
16
+ })
17
+
18
+ const pinia = createPinia()
19
+ const app = createApp(App)
20
+
21
+ app.use(pinia)
22
+ app.use(router)
23
+
24
+ const mainStore = useMainStore()
25
+ const token = document.cookie
26
+ .split("; ")
27
+ .find((row) => row.startsWith("user-token"))
28
+ if (mainStore && token) {
29
+ mainStore.setUserToken(token.split("=")[1])
30
+ }
31
+
32
32
  app.mount('#app')