@abi-software/mapintegratedvuer 1.16.3-simulation.1 → 1.17.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 (43) hide show
  1. package/dist/ConnectivityGraph-DbqPx-8k.js +125 -0
  2. package/dist/{ContentMixin-CN4E1Tcm.js → ContentMixin-R9Bw7Ou4.js} +545 -270
  3. package/dist/Flatmap-BYUfDJ9B.js +202 -0
  4. package/dist/{Iframe-NY9zAQZz.js → Iframe-2ofJ9NJW.js} +2 -2
  5. package/dist/{MultiFlatmap-C8gAg-MI.js → MultiFlatmap-CYxpB20e.js} +25 -18
  6. package/dist/{Plot-DH_Px9IB.js → Plot-DmQzP7lz.js} +2 -2
  7. package/dist/{Scaffold-C6XY3IQb.js → Scaffold-C8x1IHb9.js} +53 -79
  8. package/dist/Simulation-D9pblkqI.js +28 -0
  9. package/dist/{index-DaB85Tpy.js → index-raNlNgsS.js} +30069 -28444
  10. package/dist/mapintegratedvuer.js +1 -1
  11. package/dist/mapintegratedvuer.umd.cjs +238 -4270
  12. package/dist/{DynamicMarkerMixin-ToiTtIcj.js → style-QpNSY6to.js} +1 -1
  13. package/dist/style.css +1 -1
  14. package/package.json +6 -11
  15. package/src/App.vue +265 -283
  16. package/src/assets/styles.scss +1 -1
  17. package/src/components/ContentVuer.vue +5 -1
  18. package/src/components/ContextCard.vue +1 -0
  19. package/src/components/EventBus.js +3 -0
  20. package/src/components/MapContent.vue +9 -8
  21. package/src/components/SplitDialog.vue +5 -6
  22. package/src/components/SplitFlow.vue +491 -469
  23. package/src/components/scripts/utilities.js +16 -1
  24. package/src/components/viewers/ConnectivityGraph.vue +146 -0
  25. package/src/components/viewers/Flatmap.vue +84 -136
  26. package/src/components/viewers/MultiFlatmap.vue +9 -5
  27. package/src/components/viewers/Simulation.vue +15 -66
  28. package/src/components.d.ts +1 -3
  29. package/src/main.js +3 -9
  30. package/src/mixins/ContentMixin.js +391 -420
  31. package/src/stores/connectivities.js +6 -1
  32. package/src/stores/entries.js +1 -1
  33. package/src/stores/splitFlow.js +366 -427
  34. package/dist/Flatmap-D7eEw_Q5.js +0 -103398
  35. package/dist/Simulation-Bb3HbeD4.js +0 -72
  36. package/src/components/DummyRouteComponent.vue +0 -1
  37. package/src/components/EventBus.ts +0 -13
  38. package/src/components/FloatingWindow.vue +0 -125
  39. package/src/components/PlotComponent.vue +0 -56
  40. package/src/services/mapping.js +0 -69
  41. package/src/stores/mapping.js +0 -29
  42. package/src/stores/simulationPlotStore.js +0 -104
  43. package/src/types/simulation.js +0 -18
@@ -0,0 +1,202 @@
1
+ import { _ as d, z as c, E as l, T as h } from "./index-raNlNgsS.js";
2
+ import { C as u } from "./ContentMixin-R9Bw7Ou4.js";
3
+ import { D as y } from "./style-QpNSY6to.js";
4
+ import { FlatmapVuer as g } from "@abi-software/flatmapvuer";
5
+ import { resolveComponent as r, openBlock as p, createElementBlock as M, createVNode as C, createBlock as v, createCommentVNode as I } from "vue";
6
+ const S = {
7
+ name: "Flatmap",
8
+ mixins: [u, y],
9
+ components: {
10
+ FlatmapVuer: g,
11
+ HelpModeDialog: c
12
+ },
13
+ data: function() {
14
+ return {
15
+ flatmapReady: !1,
16
+ displayMinimap: !1
17
+ };
18
+ },
19
+ methods: {
20
+ getState: function() {
21
+ return this.$refs.flatmap.getState();
22
+ },
23
+ /**
24
+ * Perform a local search on this contentvuer
25
+ * This is similar to directly clicking onthe map
26
+ */
27
+ search: function(e) {
28
+ return this.$refs.flatmap.searchAndShowResult(e, !0, !0);
29
+ },
30
+ getFlatmapImp() {
31
+ var e;
32
+ return (e = this.$refs.flatmap) == null ? void 0 : e.mapImp;
33
+ },
34
+ contextRestored(e) {
35
+ this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings();
36
+ },
37
+ flatmapReadyCall: function(e) {
38
+ var n, i, o;
39
+ this.flatmapReady = !0;
40
+ const t = this.getFlatmapImp();
41
+ (n = t == null ? void 0 : t.mapMetadata) != null && n.name && (this.updateEntryLabel((i = t == null ? void 0 : t.mapMetadata) == null ? void 0 : i.name), this.updateEntryTitle((o = t == null ? void 0 : t.mapMetadata) == null ? void 0 : o.name));
42
+ let a = { id: this.entry.id, prov: t.mapMetadata };
43
+ l.emit("mapImpProv", a), this.$emit("flatmap-provenance-ready", a), this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings(), this.loadConnectivityExplorerConfig(e).then(() => {
44
+ l.emit("mapLoaded", e);
45
+ });
46
+ },
47
+ onPathwaySelectionChanged: function(e) {
48
+ const { label: t, property: a, checked: n, selectionsTitle: i } = e;
49
+ h.sendEvent({
50
+ event: "interaction_event",
51
+ event_name: "portal_maps_pathway_change",
52
+ category: t + " [" + a + "] " + n,
53
+ location: i
54
+ });
55
+ },
56
+ onSidebarAnnotationClose: function() {
57
+ this.flatmapReady && this.$refs.flatmap && this.$refs.flatmap.annotationEventCallback({}, { type: "aborted" });
58
+ },
59
+ /**
60
+ * Append the list of suggested terms to suggestions
61
+ */
62
+ searchSuggestions: function(e, t) {
63
+ if (e && this.$refs.flatmap.mapImp) {
64
+ const a = this.$refs.flatmap.mapImp.search(e);
65
+ (a.__featureIds || a.featureIds).forEach((i) => {
66
+ const o = this.$refs.flatmap.mapImp.annotation(i);
67
+ o && o.label && t.push(o.label);
68
+ });
69
+ }
70
+ },
71
+ showConnectivity: function(e) {
72
+ if (this != null && this.alive) {
73
+ const { featureIds: t, offset: a } = e, n = this.$refs.flatmap;
74
+ n && n.moveMap(t, {
75
+ offsetX: a ? -150 : 0,
76
+ zoom: 4
77
+ });
78
+ }
79
+ },
80
+ showConnectivityTooltips: function(e) {
81
+ this != null && this.alive && this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e);
82
+ },
83
+ showConnectivitiesByReference: function(e) {
84
+ if (this != null && this.alive) {
85
+ const t = this.$refs.flatmap;
86
+ t && t.showConnectivitiesByReference(e);
87
+ }
88
+ },
89
+ changeConnectivitySource: function(e, t) {
90
+ if (this != null && this.alive && this.flatmapReady) {
91
+ const a = this.$refs.flatmap, n = a.mapImp.mapMetadata.uuid;
92
+ t.includes(n) || (t.push(n), a.changeConnectivitySource(e));
93
+ }
94
+ },
95
+ zoomToFeatures: function(e, t) {
96
+ let a = e.name;
97
+ const n = this.$refs.flatmap.mapImp;
98
+ if (a) {
99
+ const i = n.search(a);
100
+ if (i.featureIds.length) {
101
+ let o = n.modelForFeature(i.featureIds[0]);
102
+ o ? (t && n.selectFeatures(o), n.zoomToFeatures(o)) : n.clearSearchResults();
103
+ }
104
+ } else
105
+ n.clearSearchResults();
106
+ },
107
+ changeViewingMode: function(e) {
108
+ this.$refs.flatmap.changeViewingMode(e);
109
+ },
110
+ updateViewerSettings: function() {
111
+ const {
112
+ backgroundDisplay: e,
113
+ viewingMode: t,
114
+ flightPathDisplay: a,
115
+ organsDisplay: n,
116
+ outlinesDisplay: i,
117
+ connectionType: o
118
+ } = this.settingsStore.globalSettings, s = this.$refs.flatmap;
119
+ s.changeViewingMode(t), s.setFlightPath3D(a), s.setColour(n), s.setOutlines(i), s.backgroundChangeCallback(e), s.setConnectionType(o);
120
+ },
121
+ setVisibilityFilter: function(e) {
122
+ if (this != null && this.alive) {
123
+ const t = this.$refs.flatmap;
124
+ t && t.setVisibilityFilter(e);
125
+ }
126
+ },
127
+ getKnowledgeTooltip: async function(e) {
128
+ if (this != null && this.alive) {
129
+ const t = this.$refs.flatmap;
130
+ if (t) {
131
+ const a = e.data[0];
132
+ t.searchAndShowResult(a.id, !0, !1);
133
+ }
134
+ }
135
+ }
136
+ },
137
+ computed: {
138
+ facetSpecies() {
139
+ return this.settingsStore.facets.species;
140
+ }
141
+ }
142
+ }, w = { class: "viewer-container" };
143
+ function F(e, t, a, n, i, o) {
144
+ const s = r("FlatmapVuer"), f = r("HelpModeDialog");
145
+ return p(), M("div", w, [
146
+ C(s, {
147
+ state: e.entry.state,
148
+ entry: e.entry.resource,
149
+ mapManager: e.mapManager,
150
+ onResourceSelected: t[0] || (t[0] = (m) => e.flatmapResourceSelected(e.entry.type, m)),
151
+ onPanZoomCallback: e.flatmapPanZoomCallback,
152
+ name: e.entry.resource,
153
+ style: { height: "100%", width: "100%" },
154
+ minZoom: e.entry.minZoom,
155
+ helpMode: e.helpMode,
156
+ helpModeActiveItem: e.helpModeActiveItem,
157
+ helpModeInitialIndex: -1,
158
+ helpModeDialog: e.useHelpModeDialog,
159
+ onHelpModeLastItem: e.onHelpModeLastItem,
160
+ onShownTooltip: e.onTooltipShown,
161
+ onShownMapTooltip: e.onMapTooltipShown,
162
+ onAnnotationOpen: e.onAnnotationOpen,
163
+ onAnnotationClose: e.onAnnotationClose,
164
+ onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
165
+ annotationSidebar: e.annotationSidebar,
166
+ onConnectivityInfoOpen: e.onConnectivityInfoOpen,
167
+ onConnectivityError: e.onConnectivityError,
168
+ onConnectivityInfoClose: e.onConnectivityInfoClose,
169
+ onNeuronConnectionFeatureClick: e.onNeuronConnectionFeatureClick,
170
+ connectivityInfoSidebar: e.connectivityInfoSidebar,
171
+ pathControls: !0,
172
+ ref: "flatmap",
173
+ onContextRestored: o.contextRestored,
174
+ onReady: o.flatmapReadyCall,
175
+ displayMinimap: e.displayMinimap,
176
+ displayWarning: !0,
177
+ enableOpenMapUI: !0,
178
+ flatmapAPI: e.flatmapAPI,
179
+ render: e.visible,
180
+ sparcAPI: e.apiLocation,
181
+ showLocalSettings: e.showLocalSettings,
182
+ showOpenMapButton: e.showOpenMapButton,
183
+ onOpenMap: e.openMap,
184
+ onPathwaySelectionChanged: o.onPathwaySelectionChanged,
185
+ onMapmanagerLoaded: e.onMapmanagerLoaded,
186
+ showPathwayFilter: !1,
187
+ onTrackEvent: e.trackEvent
188
+ }, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "onNeuronConnectionFeatureClick", "connectivityInfoSidebar", "onContextRestored", "onReady", "displayMinimap", "flatmapAPI", "render", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded", "onTrackEvent"]),
189
+ e.helpMode && e.useHelpModeDialog ? (p(), v(f, {
190
+ key: 0,
191
+ ref: "flatmapHelp",
192
+ flatmapRef: e.flatmapRef,
193
+ lastItem: e.helpModeLastItem,
194
+ onShowNext: e.onHelpModeShowNext,
195
+ onFinishHelpMode: e.onFinishHelpMode
196
+ }, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : I("", !0)
197
+ ]);
198
+ }
199
+ const $ = /* @__PURE__ */ d(S, [["render", F], ["__scopeId", "data-v-a87dcfac"]]);
200
+ export {
201
+ $ as default
202
+ };
@@ -1,6 +1,6 @@
1
- import { C as r } from "./ContentMixin-CN4E1Tcm.js";
1
+ import { C as r } from "./ContentMixin-R9Bw7Ou4.js";
2
2
  import { openBlock as o, createElementBlock as t, createElementVNode as a } from "vue";
3
- import { _ as s } from "./index-DaB85Tpy.js";
3
+ import { _ as s } from "./index-raNlNgsS.js";
4
4
  const n = {
5
5
  name: "Iframe",
6
6
  mixins: [r]
@@ -1,9 +1,9 @@
1
- import { _ as c, q as h, E as r, T as l, b as g } from "./index-DaB85Tpy.js";
2
- import { C as M } from "./ContentMixin-CN4E1Tcm.js";
3
- import { D as C } from "./DynamicMarkerMixin-ToiTtIcj.js";
4
- import { MultiFlatmapVuer as y } from "@abi-software/flatmapvuer";
1
+ import { _ as c, z as h, a as g, T as r, E as l } from "./index-raNlNgsS.js";
2
+ import { C as M } from "./ContentMixin-R9Bw7Ou4.js";
3
+ import { D as y } from "./style-QpNSY6to.js";
4
+ import { MultiFlatmapVuer as C } from "@abi-software/flatmapvuer";
5
5
  import { resolveComponent as p, openBlock as m, createElementBlock as v, createVNode as I, createBlock as S, createCommentVNode as F } from "vue";
6
- const w = '<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>', f = (e) => [
6
+ const w = '<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>', d = (e) => [
7
7
  {
8
8
  display: "Open AC Map",
9
9
  key: "AC"
@@ -15,12 +15,16 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
15
15
  {
16
16
  display: "Open 3D Human Map",
17
17
  key: "3D"
18
+ },
19
+ {
20
+ display: "Open Connectivity Graph",
21
+ key: "CG"
18
22
  }
19
23
  ], k = {
20
24
  name: "MultiFlatmap",
21
- mixins: [M, C],
25
+ mixins: [M, y],
22
26
  components: {
23
- MultiFlatmapVuer: y,
27
+ MultiFlatmapVuer: C,
24
28
  HelpModeDialog: h
25
29
  },
26
30
  data: function() {
@@ -30,7 +34,7 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
30
34
  scaffoldResource: {},
31
35
  showStarInLegend: !1,
32
36
  speciesHasChanged: !1,
33
- openMapOptions: f(),
37
+ openMapOptions: d(),
34
38
  zoomLevel: 6
35
39
  };
36
40
  },
@@ -70,7 +74,7 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
70
74
  },
71
75
  onPathwaySelectionChanged: function(e) {
72
76
  const { label: t, property: a, checked: n, selectionsTitle: i } = e;
73
- l.sendEvent({
77
+ r.sendEvent({
74
78
  event: "interaction_event",
75
79
  event_name: "portal_maps_pathway_change",
76
80
  category: t + " [" + a + "] " + n,
@@ -81,7 +85,7 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
81
85
  this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().annotationEventCallback({}, { type: "aborted" });
82
86
  },
83
87
  onOpenPubmedUrl: function(e) {
84
- l.sendEvent({
88
+ r.sendEvent({
85
89
  event: "interaction_event",
86
90
  event_name: "portal_maps_pubmed_url",
87
91
  file_path: e,
@@ -101,16 +105,16 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
101
105
  const e = this.getFlatmapImp();
102
106
  if (e) {
103
107
  let t = { id: this.entry.id, prov: e.mapMetadata };
104
- r.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t);
108
+ l.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t);
105
109
  }
106
110
  },
107
111
  contextRestored: function(e) {
108
112
  e && (this.flatmapMarkerUpdate(e.mapImp), this.updateViewerSettings(), this.speciesHasChanged && (this.speciesHasChanged = !1, this.$emit("species-changed", this.activeSpecies)));
109
113
  },
110
114
  flatmapChanged: async function(e) {
111
- this.activeSpecies = e, this.openMapOptions = f();
115
+ this.activeSpecies = e, this.openMapOptions = d();
112
116
  const t = this.getFlatmapImp();
113
- this.updateProvCard(), t && (t.contextLost ? this.speciesHasChanged = !0 : (this.flatmapMarkerUpdate(t), this.updateViewerSettings(), this.speciesHasChanged = !1, this.$emit("species-changed", e))), l.sendEvent({
117
+ this.updateProvCard(), t && (t.contextLost ? this.speciesHasChanged = !0 : (this.flatmapMarkerUpdate(t), this.updateViewerSettings(), this.speciesHasChanged = !1, this.$emit("species-changed", e))), r.sendEvent({
114
118
  event: "interaction_event",
115
119
  event_name: "portal_maps_species_change",
116
120
  category: this.activeSpecies
@@ -121,7 +125,7 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
121
125
  e.enablePanZoomEvents(!0), this.flatmapReady = !0;
122
126
  const t = e.mapImp;
123
127
  this.flatmapMarkerUpdate(t), this.updateProvCard(), this.updateViewerSettings(), this.loadConnectivityExplorerConfig(e).then(() => {
124
- r.emit("mapLoaded", e);
128
+ l.emit("mapLoaded", e);
125
129
  });
126
130
  }
127
131
  },
@@ -135,7 +139,10 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
135
139
  label: "Unused",
136
140
  val: this.getFlatmapImp().visibleMarkerAnatomicalIds().map((n) => this.idNamePair[n])
137
141
  };
138
- r.emit("PopoverActionClick", a);
142
+ l.emit("PopoverActionClick", a);
143
+ },
144
+ flatmapIsReady() {
145
+ return this.flatmapReady;
139
146
  },
140
147
  restoreFeaturedMarkers: function(e) {
141
148
  this.settingsStore.resetFeaturedMarkerIdentifier();
@@ -247,7 +254,7 @@ const w = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
247
254
  }
248
255
  }, b = { class: "viewer-container" };
249
256
  function R(e, t, a, n, i, o) {
250
- const s = p("MultiFlatmapVuer"), d = p("HelpModeDialog");
257
+ const s = p("MultiFlatmapVuer"), f = p("HelpModeDialog");
251
258
  return m(), v("div", b, [
252
259
  I(s, {
253
260
  availableSpecies: e.availableSpecies,
@@ -293,7 +300,7 @@ function R(e, t, a, n, i, o) {
293
300
  showPathwayFilter: !1,
294
301
  onTrackEvent: e.trackEvent
295
302
  }, null, 8, ["availableSpecies", "onContextRestored", "onFlatmapChanged", "onReady", "state", "mapManager", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "onNeuronConnectionFeatureClick", "connectivityInfoSidebar", "displayMinimap", "showStarInLegend", "openMapOptions", "flatmapAPI", "render", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl", "onMapmanagerLoaded", "onTrackEvent"]),
296
- e.helpMode && e.useHelpModeDialog ? (m(), S(d, {
303
+ e.helpMode && e.useHelpModeDialog ? (m(), S(f, {
297
304
  key: 0,
298
305
  ref: "multiflatmapHelp",
299
306
  multiflatmapRef: e.multiflatmapRef,
@@ -303,7 +310,7 @@ function R(e, t, a, n, i, o) {
303
310
  }, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : F("", !0)
304
311
  ]);
305
312
  }
306
- const E = /* @__PURE__ */ c(k, [["render", R], ["__scopeId", "data-v-5b5fef5e"]]);
313
+ const E = /* @__PURE__ */ c(k, [["render", R], ["__scopeId", "data-v-541f45fa"]]);
307
314
  export {
308
315
  E as default
309
316
  };
@@ -1,7 +1,7 @@
1
1
  import { PlotVuer as o } from "@abi-software/plotvuer";
2
- import { C as r } from "./ContentMixin-CN4E1Tcm.js";
2
+ import { C as r } from "./ContentMixin-R9Bw7Ou4.js";
3
3
  import { resolveComponent as a, openBlock as n, createBlock as s } from "vue";
4
- import { _ as p } from "./index-DaB85Tpy.js";
4
+ import { _ as p } from "./index-raNlNgsS.js";
5
5
  const l = {
6
6
  name: "Plot",
7
7
  mixins: [r],
@@ -1,53 +1,27 @@
1
- import { _ as p, q as m, E as c } from "./index-DaB85Tpy.js";
2
- import { C as v } from "./ContentMixin-CN4E1Tcm.js";
3
- import { ScaffoldVuer as w } from "@abi-software/scaffoldvuer";
4
- import { resolveComponent as u, openBlock as g, createElementBlock as y, createVNode as b, createBlock as S, createCommentVNode as M } from "vue";
5
- async function k(e) {
6
- const t = sessionStorage.getItem("flatmap-knowledge");
7
- if (t) {
8
- const i = JSON.parse(t).filter((s) => s.references && s.references.length).filter((s) => s.references.includes(e));
9
- if (i.length)
10
- return i.map((l) => l.id);
11
- }
12
- return [];
13
- }
14
- async function I(e, t, n) {
15
- const i = `select knowledge from knowledge
16
- where source="${N(e)}" and
17
- knowledge like "%${t}%" order by source desc`;
18
- return (await n.queryKnowledge(i)).map((a) => JSON.parse(a)).map((a) => a.id);
19
- }
20
- function N(e) {
21
- return $(e.mapMetadata);
22
- }
23
- function $(e) {
24
- let t = "";
25
- if (e != null && e.connectivity) {
26
- const n = e.connectivity;
27
- "knowledge-source" in n ? t = n["knowledge-source"] : "npo" in n && (t = `${n.npo.release}-npo`);
28
- }
29
- return t;
30
- }
1
+ import { _ as g, z as m, g as v, b as y, E as d } from "./index-raNlNgsS.js";
2
+ import { C as w } from "./ContentMixin-R9Bw7Ou4.js";
3
+ import { ScaffoldVuer as b } from "@abi-software/scaffoldvuer";
4
+ import { resolveComponent as p, openBlock as u, createElementBlock as S, createVNode as M, createBlock as N, createCommentVNode as $ } from "vue";
31
5
  const C = {
32
6
  name: "Scaffold",
33
- mixins: [v],
7
+ mixins: [w],
34
8
  components: {
35
- ScaffoldVuer: w,
9
+ ScaffoldVuer: b,
36
10
  HelpModeDialog: m
37
11
  },
38
12
  methods: {
39
13
  showConnectivitiesByReference: async function(e) {
40
14
  const t = sessionStorage.getItem("flatmap-knowledge");
41
15
  let n = [];
42
- t ? n = await k(e) : n = await I(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
16
+ t ? n = await v(e) : n = await y(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
43
17
  const o = [];
44
- for (const i of n) {
45
- const s = this.nervesKnowledge.find((r) => r.id === i);
46
- if (!s) continue;
47
- const l = s["nerve-label"];
48
- if (l) {
49
- const r = l.flatMap((a) => a.subNerves);
50
- o.push(...r);
18
+ for (const s of n) {
19
+ const i = this.nervesKnowledge.find((l) => l.id === s);
20
+ if (!i) continue;
21
+ const f = i["nerve-label"];
22
+ if (f) {
23
+ const l = f.flatMap((a) => a.subNerves);
24
+ o.push(...l);
51
25
  }
52
26
  }
53
27
  this.$refs.scaffold.changeHighlightedByName(o, "", !1);
@@ -63,14 +37,14 @@ const C = {
63
37
  const n = !!e;
64
38
  if (e) {
65
39
  const o = [];
66
- e.OR.forEach((i) => {
67
- "AND" in i && i.AND.length >= 2 && "models" in i.AND[1] && o.push(...i.AND[1].models);
40
+ e.OR.forEach((s) => {
41
+ "AND" in s && s.AND.length >= 2 && "models" in s.AND[1] && o.push(...s.AND[1].models);
68
42
  });
69
- for (const i of o) {
70
- const s = this.nervesKnowledge.find((l) => l.id === i);
71
- if (s) {
72
- const l = s["nerve-label"].map((r) => r.subNerves).flat(1 / 0);
73
- t.push(...l);
43
+ for (const s of o) {
44
+ const i = this.nervesKnowledge.find((f) => f.id === s);
45
+ if (i) {
46
+ const f = i["nerve-label"].map((l) => l.subNerves).flat(1 / 0);
47
+ t.push(...f);
74
48
  }
75
49
  }
76
50
  }
@@ -95,41 +69,41 @@ const C = {
95
69
  facetPropPath: "scaffold.connectivity.nerve"
96
70
  });
97
71
  else {
98
- const i = o.toLowerCase();
99
- let s = this.clickedObject.anatomicalId || "";
100
- if (s)
72
+ const s = o.toLowerCase();
73
+ let i = this.clickedObject.anatomicalId || "";
74
+ if (i)
101
75
  this.filter.push({
102
- facet: `["${s}",[]]`,
103
- facetPropPath: `flatmap.connectivity.source.${i}`,
76
+ facet: `["${i}",[]]`,
77
+ facetPropPath: `flatmap.connectivity.source.${s}`,
104
78
  tagLabel: n.charAt(0).toUpperCase() + n.slice(1),
105
79
  term: o
106
80
  });
107
81
  else {
108
- const r = this.connectivitiesStore.filterOptions[this.entry.resource].find((f) => f.key === `flatmap.connectivity.source.${i}`);
82
+ const l = this.connectivitiesStore.filterOptions[this.entry.resource].find((r) => r.key === `flatmap.connectivity.source.${s}`);
109
83
  let a;
110
- r == null || r.children.forEach((f) => {
111
- var d;
112
- f.label.toLowerCase() === n && (a = f), (d = f.children) == null || d.forEach((h) => {
84
+ l == null || l.children.forEach((r) => {
85
+ var c;
86
+ r.label.toLowerCase() === n && (a = r), (c = r.children) == null || c.forEach((h) => {
113
87
  h.label.toLowerCase() === n && (a = h);
114
88
  });
115
- }), a && (s = a.key.replace(`flatmap.connectivity.source.${i}.`, ""), this.filter.push({
116
- facet: s,
117
- facetPropPath: `flatmap.connectivity.source.${i}`,
89
+ }), a && (i = a.key.replace(`flatmap.connectivity.source.${s}.`, ""), this.filter.push({
90
+ facet: i,
91
+ facetPropPath: `flatmap.connectivity.source.${s}`,
118
92
  tagLabel: a.tagLabel,
119
93
  term: o
120
94
  }));
121
95
  }
122
96
  }
123
- c.emit("neuron-connection-feature-click", {
97
+ d.emit("neuron-connection-feature-click", {
124
98
  filters: this.filter,
125
99
  search: this.filter.length ? "" : n
126
100
  });
127
101
  } else if (this.$refs.scaffold.viewingMode === "Exploration") {
128
- const o = this.nervesKnowledge.filter((i) => JSON.stringify(i["nerve-label"]).includes(n));
102
+ const o = this.nervesKnowledge.filter((s) => JSON.stringify(s["nerve-label"]).includes(n));
129
103
  o.length && this.getKnowledgeTooltip({ data: o, type: this.entry });
130
104
  }
131
105
  }
132
- } else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, c.emit("connectivity-info-close"));
106
+ } else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, d.emit("connectivity-info-close"));
133
107
  },
134
108
  onResize: function() {
135
109
  this.scaffoldCamera.onResize();
@@ -167,7 +141,7 @@ const C = {
167
141
  Array.isArray(e) ? n = e : n = [e.name], t && this.$refs.scaffold.changeActiveByName(n, "", !1), this.$refs.scaffold.viewRegion(n);
168
142
  },
169
143
  scaffoldIsReady: function() {
170
- this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.visible && this.entry.rotation && this.entry.rotation, this.updateViewerSettings(), c.emit("mapLoaded", this.$refs.scaffold), setTimeout(() => {
144
+ this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.visible && this.entry.rotation && this.entry.rotation, this.updateViewerSettings(), d.emit("mapLoaded", this.$refs.scaffold), setTimeout(() => {
171
145
  this.setNerveGreyScale();
172
146
  }, 500);
173
147
  },
@@ -175,14 +149,14 @@ const C = {
175
149
  * Callback when the vuers emit a selected event.
176
150
  */
177
151
  scaffoldHighlighted: function(e, t) {
178
- var o, i, s;
152
+ var o, s, i;
179
153
  const n = {
180
154
  paneIndex: this.entry.id,
181
155
  type: e,
182
156
  resource: t,
183
157
  internalName: void 0
184
158
  };
185
- t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((i = t[0].data) == null ? void 0 : i.id) === "") && (t[0].data.id = (s = t[0].data) == null ? void 0 : s.group), n.internalName = t[0].data.id, n.eventType = "highlighted"), this.$emit("resource-selected", n);
159
+ t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((s = t[0].data) == null ? void 0 : s.id) === "") && (t[0].data.id = (i = t[0].data) == null ? void 0 : i.group), n.internalName = t[0].data.id, n.eventType = "highlighted"), this.$emit("resource-selected", n);
186
160
  },
187
161
  /**
188
162
  * Callback when the vuers emit a selected event.
@@ -251,18 +225,18 @@ const C = {
251
225
  mounted: function() {
252
226
  this.scaffoldCamera = this.$refs.scaffold.$module.scene.getZincCameraControls();
253
227
  }
254
- }, O = { class: "viewer-container" };
255
- function L(e, t, n, o, i, s) {
256
- const l = u("ScaffoldVuer"), r = u("HelpModeDialog");
257
- return g(), y("div", O, [
258
- b(l, {
228
+ }, I = { class: "viewer-container" };
229
+ function O(e, t, n, o, s, i) {
230
+ const f = p("ScaffoldVuer"), l = p("HelpModeDialog");
231
+ return u(), S("div", I, [
232
+ M(f, {
259
233
  state: e.entry.state,
260
234
  url: e.entry.resource,
261
235
  region: e.entry.region,
262
- onScaffoldSelected: t[0] || (t[0] = (a) => s.scaffoldResourceSelected(e.entry.type, a)),
263
- onScaffoldHighlighted: t[1] || (t[1] = (a) => s.scaffoldHighlighted(e.entry.type, a)),
264
- onScaffoldNavigated: t[2] || (t[2] = (a) => s.scaffoldNavigated(e.entry.type, a)),
265
- onOnReady: s.scaffoldIsReady,
236
+ onScaffoldSelected: t[0] || (t[0] = (a) => i.scaffoldResourceSelected(e.entry.type, a)),
237
+ onScaffoldHighlighted: t[1] || (t[1] = (a) => i.scaffoldHighlighted(e.entry.type, a)),
238
+ onScaffoldNavigated: t[2] || (t[2] = (a) => i.scaffoldNavigated(e.entry.type, a)),
239
+ onOnReady: i.scaffoldIsReady,
266
240
  onOpenMap: e.openMap,
267
241
  ref: "scaffold",
268
242
  "background-toggle": !0,
@@ -279,13 +253,13 @@ function L(e, t, n, o, i, s) {
279
253
  onShownMapTooltip: e.onMapTooltipShown,
280
254
  render: e.visible,
281
255
  "display-latest-message": !0,
282
- "warning-message": s.warningMessage,
256
+ "warning-message": i.warningMessage,
283
257
  "display-minimap": !1,
284
258
  "display-markers": !1,
285
259
  enableOpenMapUI: !0,
286
260
  "view-u-r-l": e.entry.viewUrl,
287
261
  markerCluster: !0,
288
- markerLabels: s.markerLabels,
262
+ markerLabels: i.markerLabels,
289
263
  flatmapAPI: e.flatmapAPI,
290
264
  showLocalSettings: e.showLocalSettings,
291
265
  showOpenMapButton: e.showOpenMapButton,
@@ -294,17 +268,17 @@ function L(e, t, n, o, i, s) {
294
268
  tubeLines: e.entry.discoverId === "307" || e.entry.discoverId === 307
295
269
  }
296
270
  }, null, 8, ["state", "url", "region", "onOnReady", "onOpenMap", "helpMode", "helpModeActiveItem", "helpModeDialog", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "render", "warning-message", "view-u-r-l", "markerLabels", "flatmapAPI", "showLocalSettings", "showOpenMapButton", "usageConfig"]),
297
- e.helpMode && e.useHelpModeDialog ? (g(), S(r, {
271
+ e.helpMode && e.useHelpModeDialog ? (u(), N(l, {
298
272
  key: 0,
299
273
  ref: "scaffoldHelp",
300
274
  scaffoldRef: e.scaffoldRef,
301
275
  lastItem: e.helpModeLastItem,
302
276
  onShowNext: e.onHelpModeShowNext,
303
277
  onFinishHelpMode: e.onFinishHelpMode
304
- }, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : M("", !0)
278
+ }, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : $("", !0)
305
279
  ]);
306
280
  }
307
- const H = /* @__PURE__ */ p(C, [["render", L], ["__scopeId", "data-v-5de11cee"]]);
281
+ const H = /* @__PURE__ */ g(C, [["render", O], ["__scopeId", "data-v-5de11cee"]]);
308
282
  export {
309
283
  H as default
310
284
  };
@@ -0,0 +1,28 @@
1
+ import { C as n } from "./ContentMixin-R9Bw7Ou4.js";
2
+ import { SimulationVuer as e } from "@abi-software/simulationvuer";
3
+ import { resolveComponent as r, openBlock as a, createBlock as c } from "vue";
4
+ import { _ as m } from "./index-raNlNgsS.js";
5
+ const s = {
6
+ name: "Simulation",
7
+ mixins: [n],
8
+ components: {
9
+ SimulationVuer: e
10
+ },
11
+ computed: {
12
+ id: function() {
13
+ return this.entry.resource ? this.entry.resource : this.entry.discoverId;
14
+ }
15
+ }
16
+ };
17
+ function u(o, p, l, d, f, t) {
18
+ const i = r("SimulationVuer");
19
+ return a(), c(i, {
20
+ apiLocation: o.apiLocation,
21
+ id: t.id,
22
+ ref: "simulation"
23
+ }, null, 8, ["apiLocation", "id"]);
24
+ }
25
+ const y = /* @__PURE__ */ m(s, [["render", u]]);
26
+ export {
27
+ y as default
28
+ };