@abi-software/flatmapvuer 0.4.1-beta.0 → 0.4.1-beta.1
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/flatmapvuer.common.js +950 -643
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +950 -643
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +3 -2
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FlatmapVuer.vue +12 -3
- package/src/services/flatmapQueries.js +122 -175
|
@@ -87,6 +87,17 @@ module.exports =
|
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
+
/***/ "0676":
|
|
91
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
92
|
+
|
|
93
|
+
__webpack_require__("dc50");
|
|
94
|
+
function _nonIterableSpread() {
|
|
95
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
96
|
+
}
|
|
97
|
+
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
98
|
+
|
|
99
|
+
/***/ }),
|
|
100
|
+
|
|
90
101
|
/***/ "06b8":
|
|
91
102
|
/***/ (function(module, exports, __webpack_require__) {
|
|
92
103
|
|
|
@@ -255,6 +266,24 @@ row.install = function (Vue) {
|
|
|
255
266
|
|
|
256
267
|
/***/ }),
|
|
257
268
|
|
|
269
|
+
/***/ "11b0":
|
|
270
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
271
|
+
|
|
272
|
+
__webpack_require__("9b22");
|
|
273
|
+
__webpack_require__("4933");
|
|
274
|
+
__webpack_require__("97d3");
|
|
275
|
+
__webpack_require__("2ff9");
|
|
276
|
+
__webpack_require__("4ccb");
|
|
277
|
+
__webpack_require__("9bb5");
|
|
278
|
+
__webpack_require__("1a25");
|
|
279
|
+
__webpack_require__("4362");
|
|
280
|
+
function _iterableToArray(iter) {
|
|
281
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
282
|
+
}
|
|
283
|
+
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
284
|
+
|
|
285
|
+
/***/ }),
|
|
286
|
+
|
|
258
287
|
/***/ "12f2":
|
|
259
288
|
/***/ (function(module, exports, __webpack_require__) {
|
|
260
289
|
|
|
@@ -761,17 +790,21 @@ module.exports = require("core-js/modules/es.string.search.js");
|
|
|
761
790
|
|
|
762
791
|
/***/ }),
|
|
763
792
|
|
|
764
|
-
/***/ "
|
|
765
|
-
/***/ (function(module, exports) {
|
|
793
|
+
/***/ "222e":
|
|
794
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
766
795
|
|
|
767
|
-
|
|
796
|
+
// extracted by mini-css-extract-plugin
|
|
768
797
|
|
|
769
798
|
/***/ }),
|
|
770
799
|
|
|
771
|
-
/***/ "
|
|
800
|
+
/***/ "2236":
|
|
772
801
|
/***/ (function(module, exports, __webpack_require__) {
|
|
773
802
|
|
|
774
|
-
|
|
803
|
+
var arrayLikeToArray = __webpack_require__("5a43");
|
|
804
|
+
function _arrayWithoutHoles(arr) {
|
|
805
|
+
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
|
806
|
+
}
|
|
807
|
+
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
775
808
|
|
|
776
809
|
/***/ }),
|
|
777
810
|
|
|
@@ -931,6 +964,388 @@ module.exports = require("core-js/modules/es.object.get-prototype-of.js");
|
|
|
931
964
|
|
|
932
965
|
/***/ }),
|
|
933
966
|
|
|
967
|
+
/***/ "3630":
|
|
968
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
969
|
+
|
|
970
|
+
var _regeneratorRuntime = __webpack_require__("7ec2").default;
|
|
971
|
+
var _asyncToGenerator = __webpack_require__("c973").default;
|
|
972
|
+
var _toConsumableArray = __webpack_require__("448a").default;
|
|
973
|
+
__webpack_require__("4391");
|
|
974
|
+
__webpack_require__("4ccb");
|
|
975
|
+
__webpack_require__("97d3");
|
|
976
|
+
__webpack_require__("8535");
|
|
977
|
+
__webpack_require__("9bb5");
|
|
978
|
+
__webpack_require__("1a25");
|
|
979
|
+
__webpack_require__("a9ee");
|
|
980
|
+
__webpack_require__("ec71");
|
|
981
|
+
__webpack_require__("13e3");
|
|
982
|
+
__webpack_require__("ccb0");
|
|
983
|
+
__webpack_require__("da6e");
|
|
984
|
+
__webpack_require__("722b");
|
|
985
|
+
__webpack_require__("2439");
|
|
986
|
+
__webpack_require__("1a89");
|
|
987
|
+
__webpack_require__("712c");
|
|
988
|
+
__webpack_require__("30df");
|
|
989
|
+
/* eslint-disable no-alert, no-console */
|
|
990
|
+
// remove duplicates by stringifying the objects
|
|
991
|
+
var removeDuplicates = function removeDuplicates(arrayOfAnything) {
|
|
992
|
+
return _toConsumableArray(new Set(arrayOfAnything.map(function (e) {
|
|
993
|
+
return JSON.stringify(e);
|
|
994
|
+
}))).map(function (e) {
|
|
995
|
+
return JSON.parse(e);
|
|
996
|
+
});
|
|
997
|
+
};
|
|
998
|
+
var inArray = function inArray(ar1, ar2) {
|
|
999
|
+
var as1 = JSON.stringify(ar1);
|
|
1000
|
+
var as2 = JSON.stringify(ar2);
|
|
1001
|
+
return as1.indexOf(as2) !== -1;
|
|
1002
|
+
};
|
|
1003
|
+
exports.FlatmapQueries = function (sparcApi, flatmapApi) {
|
|
1004
|
+
var _this = this;
|
|
1005
|
+
this.sparcApi = sparcApi;
|
|
1006
|
+
this.flatmapApi = flatmapApi;
|
|
1007
|
+
this.destinations = [];
|
|
1008
|
+
this.origins = [];
|
|
1009
|
+
this.components = [];
|
|
1010
|
+
this.uberons = [];
|
|
1011
|
+
this.urls = [];
|
|
1012
|
+
this.controller = undefined;
|
|
1013
|
+
this.createTooltipData = function (eventData) {
|
|
1014
|
+
var tooltipData = {
|
|
1015
|
+
destinations: _this.destinations,
|
|
1016
|
+
origins: _this.origins,
|
|
1017
|
+
components: _this.components,
|
|
1018
|
+
destinationsWithDatasets: _this.destinationsWithDatasets,
|
|
1019
|
+
originsWithDatasets: _this.originsWithDatasets,
|
|
1020
|
+
componentsWithDatasets: _this.componentsWithDatasets,
|
|
1021
|
+
title: eventData.label,
|
|
1022
|
+
featureId: eventData.resource,
|
|
1023
|
+
hyperlinks: eventData.feature.hyperlinks ? eventData.feature.hyperlinks : _this.urls.map(function (url) {
|
|
1024
|
+
return {
|
|
1025
|
+
url: url,
|
|
1026
|
+
id: "pubmed"
|
|
1027
|
+
};
|
|
1028
|
+
})
|
|
1029
|
+
};
|
|
1030
|
+
return tooltipData;
|
|
1031
|
+
};
|
|
1032
|
+
var getOrganCuries = function getOrganCuries() {
|
|
1033
|
+
return new Promise(function (resolve) {
|
|
1034
|
+
fetch("".concat(_this.sparcAPI, "get-organ-curies/")).then(function (response) {
|
|
1035
|
+
return response.json();
|
|
1036
|
+
}).then(function (data) {
|
|
1037
|
+
resolve(data.uberon.array);
|
|
1038
|
+
});
|
|
1039
|
+
});
|
|
1040
|
+
};
|
|
1041
|
+
var createLabelLookup = function createLabelLookup(uberons) {
|
|
1042
|
+
return new Promise(function (resolve) {
|
|
1043
|
+
var uberonMap = {};
|
|
1044
|
+
var data = {
|
|
1045
|
+
sql: buildLabelSqlStatement(uberons)
|
|
1046
|
+
};
|
|
1047
|
+
fetch("".concat(_this.flatmapApi, "knowledge/query/"), {
|
|
1048
|
+
method: 'POST',
|
|
1049
|
+
headers: {
|
|
1050
|
+
'Content-Type': 'application/json'
|
|
1051
|
+
},
|
|
1052
|
+
body: JSON.stringify(data)
|
|
1053
|
+
}).then(function (response) {
|
|
1054
|
+
return response.json();
|
|
1055
|
+
}).then(function (payload) {
|
|
1056
|
+
var entity = payload.keys.indexOf("entity");
|
|
1057
|
+
var label = payload.keys.indexOf("label");
|
|
1058
|
+
if (entity > -1 && label > -1) {
|
|
1059
|
+
payload.values.forEach(function (pair) {
|
|
1060
|
+
uberonMap[pair[entity]] = pair[label];
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
resolve(uberonMap);
|
|
1064
|
+
});
|
|
1065
|
+
});
|
|
1066
|
+
};
|
|
1067
|
+
getOrganCuries().then(function (uberons) {
|
|
1068
|
+
_this.uberons = uberons;
|
|
1069
|
+
createLabelLookup(uberons).then(function (lookUp) {
|
|
1070
|
+
_this.lookUp = lookUp;
|
|
1071
|
+
});
|
|
1072
|
+
});
|
|
1073
|
+
var buildConnectivitySqlStatement = function buildConnectivitySqlStatement(keastIds) {
|
|
1074
|
+
var sql = 'select knowledge from knowledge where entity in (';
|
|
1075
|
+
if (keastIds.length === 1) {
|
|
1076
|
+
sql += "'".concat(keastIds[0], "')");
|
|
1077
|
+
} else if (keastIds.length > 1) {
|
|
1078
|
+
for (var i in keastIds) {
|
|
1079
|
+
sql += "'".concat(keastIds[i], "'").concat(i >= keastIds.length - 1 ? ')' : ',', " ");
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
return sql;
|
|
1083
|
+
};
|
|
1084
|
+
var buildLabelSqlStatement = function buildLabelSqlStatement(uberons) {
|
|
1085
|
+
var sql = 'select entity, label from labels where entity in (';
|
|
1086
|
+
if (uberons.length === 1) {
|
|
1087
|
+
sql += "'".concat(uberons[0], "')");
|
|
1088
|
+
} else if (uberons.length > 1) {
|
|
1089
|
+
for (var i in uberons) {
|
|
1090
|
+
sql += "'".concat(uberons[i], "'").concat(i >= uberons.length - 1 ? ')' : ',', " ");
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
return sql;
|
|
1094
|
+
};
|
|
1095
|
+
var findAllIdsFromConnectivity = function findAllIdsFromConnectivity(connectivity) {
|
|
1096
|
+
var dnodes = connectivity.connectivity.flat(); // get nodes from edgelist
|
|
1097
|
+
var nodes = _toConsumableArray(new Set(dnodes)); // remove duplicates
|
|
1098
|
+
var found = [];
|
|
1099
|
+
nodes.forEach(function (n) {
|
|
1100
|
+
if (Array.isArray(n)) {
|
|
1101
|
+
found.push(n.flat());
|
|
1102
|
+
} else {
|
|
1103
|
+
found.push(n);
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
return _toConsumableArray(new Set(found.flat()));
|
|
1107
|
+
};
|
|
1108
|
+
this.retrieveFlatmapKnowledgeForEvent = /*#__PURE__*/function () {
|
|
1109
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(eventData) {
|
|
1110
|
+
var signal, keastIds, data, prom1, prom2;
|
|
1111
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1112
|
+
while (1) {
|
|
1113
|
+
switch (_context.prev = _context.next) {
|
|
1114
|
+
case 0:
|
|
1115
|
+
// check if there is an existing query
|
|
1116
|
+
if (_this.controller) _this.controller.abort();
|
|
1117
|
+
|
|
1118
|
+
// set up the abort controller
|
|
1119
|
+
_this.controller = new AbortController();
|
|
1120
|
+
signal = _this.controller.signal;
|
|
1121
|
+
keastIds = eventData.resource;
|
|
1122
|
+
_this.destinations = [];
|
|
1123
|
+
_this.origins = [];
|
|
1124
|
+
_this.components = [];
|
|
1125
|
+
if (!(!keastIds || keastIds.length == 0)) {
|
|
1126
|
+
_context.next = 9;
|
|
1127
|
+
break;
|
|
1128
|
+
}
|
|
1129
|
+
return _context.abrupt("return");
|
|
1130
|
+
case 9:
|
|
1131
|
+
data = {
|
|
1132
|
+
sql: buildConnectivitySqlStatement(keastIds)
|
|
1133
|
+
};
|
|
1134
|
+
prom1 = new Promise(function (resolve) {
|
|
1135
|
+
fetch("".concat(_this.flatmapApi, "knowledge/query/"), {
|
|
1136
|
+
method: 'POST',
|
|
1137
|
+
headers: {
|
|
1138
|
+
'Content-Type': 'application/json'
|
|
1139
|
+
},
|
|
1140
|
+
body: JSON.stringify(data),
|
|
1141
|
+
signal: signal
|
|
1142
|
+
}).then(function (response) {
|
|
1143
|
+
return response.json();
|
|
1144
|
+
}).then(function (data) {
|
|
1145
|
+
if (connectivityExists(data)) {
|
|
1146
|
+
var connectivity = JSON.parse(data.values[0][0]);
|
|
1147
|
+
processConnectivity(connectivity).then(function () {
|
|
1148
|
+
resolve(true);
|
|
1149
|
+
});
|
|
1150
|
+
} else {
|
|
1151
|
+
console.log('No connectivity data found');
|
|
1152
|
+
resolve(true);
|
|
1153
|
+
}
|
|
1154
|
+
}).catch(function (error) {
|
|
1155
|
+
console.error('Error:', error);
|
|
1156
|
+
resolve(false);
|
|
1157
|
+
});
|
|
1158
|
+
});
|
|
1159
|
+
prom2 = pubmedQueryOnIds(eventData);
|
|
1160
|
+
_context.next = 14;
|
|
1161
|
+
return Promise.all([prom1, prom2]);
|
|
1162
|
+
case 14:
|
|
1163
|
+
return _context.abrupt("return", _context.sent);
|
|
1164
|
+
case 15:
|
|
1165
|
+
case "end":
|
|
1166
|
+
return _context.stop();
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}, _callee);
|
|
1170
|
+
}));
|
|
1171
|
+
return function (_x) {
|
|
1172
|
+
return _ref.apply(this, arguments);
|
|
1173
|
+
};
|
|
1174
|
+
}();
|
|
1175
|
+
var connectivityExists = function connectivityExists(data) {
|
|
1176
|
+
if (data.values && data.values.length > 0 && JSON.parse(data.values[0][0]).connectivity && JSON.parse(data.values[0][0]).connectivity.length > 0) {
|
|
1177
|
+
return true;
|
|
1178
|
+
} else {
|
|
1179
|
+
return false;
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
var createLabelFromNeuralNode = function createLabelFromNeuralNode(node, lookUp) {
|
|
1183
|
+
var label = lookUp[node[0]];
|
|
1184
|
+
if (node.length === 2 && node[1].length > 0) {
|
|
1185
|
+
node[1].forEach(function (n) {
|
|
1186
|
+
if (lookUp[n] == undefined) {
|
|
1187
|
+
label += ", ".concat(n);
|
|
1188
|
+
} else {
|
|
1189
|
+
label += ", ".concat(lookUp[n]);
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
return label;
|
|
1194
|
+
};
|
|
1195
|
+
var flattenAndFindDatasets = function flattenAndFindDatasets(components, axons, dendrites) {
|
|
1196
|
+
// process the nodes for finding datasets (Note this is not critical to the tooltip, only for the 'search on components' button)
|
|
1197
|
+
var componentsFlat = flattenConntectivity(components);
|
|
1198
|
+
var axonsFlat = flattenConntectivity(axons);
|
|
1199
|
+
var dendritesFlat = flattenConntectivity(dendrites);
|
|
1200
|
+
|
|
1201
|
+
// Filter for the anatomy which is annotated on datasets
|
|
1202
|
+
_this.destinationsWithDatasets = _this.uberons.filter(function (ub) {
|
|
1203
|
+
return axonsFlat.indexOf(ub.id) !== -1;
|
|
1204
|
+
});
|
|
1205
|
+
_this.originsWithDatasets = _this.uberons.filter(function (ub) {
|
|
1206
|
+
return dendritesFlat.indexOf(ub.id) !== -1;
|
|
1207
|
+
});
|
|
1208
|
+
_this.componentsWithDatasets = _this.uberons.filter(function (ub) {
|
|
1209
|
+
return componentsFlat.indexOf(ub.id) !== -1;
|
|
1210
|
+
});
|
|
1211
|
+
};
|
|
1212
|
+
var processConnectivity = function processConnectivity(connectivity) {
|
|
1213
|
+
return new Promise(function (resolve) {
|
|
1214
|
+
// Filter the origin and destinations from components
|
|
1215
|
+
var components = findComponents(connectivity);
|
|
1216
|
+
|
|
1217
|
+
// Remove duplicates
|
|
1218
|
+
var axons = removeDuplicates(connectivity.axons);
|
|
1219
|
+
var dendrites = removeDuplicates(connectivity.dendrites);
|
|
1220
|
+
|
|
1221
|
+
// Create list of ids to get labels for
|
|
1222
|
+
var conIds = findAllIdsFromConnectivity(connectivity);
|
|
1223
|
+
|
|
1224
|
+
// Create readable labels from the nodes. Setting this to 'this.origins' updates the display
|
|
1225
|
+
createLabelLookup(conIds).then(function (lookUp) {
|
|
1226
|
+
_this.destinations = axons.map(function (a) {
|
|
1227
|
+
return createLabelFromNeuralNode(a, lookUp);
|
|
1228
|
+
});
|
|
1229
|
+
_this.origins = dendrites.map(function (d) {
|
|
1230
|
+
return createLabelFromNeuralNode(d, lookUp);
|
|
1231
|
+
});
|
|
1232
|
+
_this.components = components.map(function (c) {
|
|
1233
|
+
return createLabelFromNeuralNode(c, lookUp);
|
|
1234
|
+
});
|
|
1235
|
+
flattenAndFindDatasets(components, axons, dendrites);
|
|
1236
|
+
resolve(true);
|
|
1237
|
+
});
|
|
1238
|
+
});
|
|
1239
|
+
};
|
|
1240
|
+
var flattenConntectivity = function flattenConntectivity(connectivity) {
|
|
1241
|
+
var dnodes = connectivity.flat(); // get nodes from edgelist
|
|
1242
|
+
var nodes = _toConsumableArray(new Set(dnodes)); // remove duplicates
|
|
1243
|
+
var found = [];
|
|
1244
|
+
nodes.forEach(function (n) {
|
|
1245
|
+
if (Array.isArray(n)) {
|
|
1246
|
+
found.push(n.flat());
|
|
1247
|
+
} else {
|
|
1248
|
+
found.push(n);
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
return found.flat();
|
|
1252
|
+
};
|
|
1253
|
+
var findComponents = function findComponents(connectivity) {
|
|
1254
|
+
var dnodes = connectivity.connectivity.flat(); // get nodes from edgelist
|
|
1255
|
+
var nodes = removeDuplicates(dnodes);
|
|
1256
|
+
var found = [];
|
|
1257
|
+
var terminal = false;
|
|
1258
|
+
nodes.forEach(function (node) {
|
|
1259
|
+
terminal = false;
|
|
1260
|
+
// Check if the node is an destination or origin (note that they are labelled dendrite and axon as opposed to origin and destination)
|
|
1261
|
+
if (inArray(connectivity.axons, node)) {
|
|
1262
|
+
terminal = true;
|
|
1263
|
+
}
|
|
1264
|
+
if (inArray(connectivity.dendrites, node)) {
|
|
1265
|
+
terminal = true;
|
|
1266
|
+
}
|
|
1267
|
+
if (!terminal) {
|
|
1268
|
+
found.push(node);
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
return found;
|
|
1272
|
+
};
|
|
1273
|
+
var stripPMIDPrefix = function stripPMIDPrefix(pubmedId) {
|
|
1274
|
+
return pubmedId.split(':')[1];
|
|
1275
|
+
};
|
|
1276
|
+
var buildPubmedSqlStatement = function buildPubmedSqlStatement(keastIds) {
|
|
1277
|
+
var sql = 'select distinct publication from publications where entity in (';
|
|
1278
|
+
if (keastIds.length === 1) {
|
|
1279
|
+
sql += "'".concat(keastIds[0], "')");
|
|
1280
|
+
} else if (keastIds.length > 1) {
|
|
1281
|
+
for (var i in keastIds) {
|
|
1282
|
+
sql += "'".concat(keastIds[i], "'").concat(i >= keastIds.length - 1 ? ')' : ',', " ");
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
return sql;
|
|
1286
|
+
};
|
|
1287
|
+
var buildPubmedSqlStatementForModels = function buildPubmedSqlStatementForModels(model) {
|
|
1288
|
+
return "select distinct publication from publications where entity = '".concat(model, "'");
|
|
1289
|
+
};
|
|
1290
|
+
var flatmapQuery = function flatmapQuery(sql) {
|
|
1291
|
+
var data = {
|
|
1292
|
+
sql: sql
|
|
1293
|
+
};
|
|
1294
|
+
return fetch("".concat(_this.flatmapApi, "knowledge/query/"), {
|
|
1295
|
+
method: 'POST',
|
|
1296
|
+
headers: {
|
|
1297
|
+
'Content-Type': 'application/json'
|
|
1298
|
+
},
|
|
1299
|
+
body: JSON.stringify(data)
|
|
1300
|
+
}).then(function (response) {
|
|
1301
|
+
return response.json();
|
|
1302
|
+
}).catch(function (error) {
|
|
1303
|
+
console.error('Error:', error);
|
|
1304
|
+
});
|
|
1305
|
+
};
|
|
1306
|
+
var pubmedQueryOnIds = function pubmedQueryOnIds(eventData) {
|
|
1307
|
+
var keastIds = eventData.resource;
|
|
1308
|
+
var source = eventData.feature.source;
|
|
1309
|
+
if (!keastIds || keastIds.length === 0) return;
|
|
1310
|
+
var sql = buildPubmedSqlStatement(keastIds);
|
|
1311
|
+
return flatmapQuery(sql).then(function (data) {
|
|
1312
|
+
// Create pubmed url on paths if we have them
|
|
1313
|
+
if (data.values.length > 0) {
|
|
1314
|
+
_this.urls = [pubmedSearchUrl(data.values.map(function (id) {
|
|
1315
|
+
return stripPMIDPrefix(id[0]);
|
|
1316
|
+
}))];
|
|
1317
|
+
return true;
|
|
1318
|
+
} else {
|
|
1319
|
+
// Create pubmed url on models
|
|
1320
|
+
pubmedQueryOnModels(source).then(function () {
|
|
1321
|
+
return true;
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1325
|
+
};
|
|
1326
|
+
var pubmedQueryOnModels = function pubmedQueryOnModels(source) {
|
|
1327
|
+
return flatmapQuery(buildPubmedSqlStatementForModels(source)).then(function (data) {
|
|
1328
|
+
if (Array.isArray(data.values) && data.values.length > 0) {
|
|
1329
|
+
_this.urls = [pubmedSearchUrl(data.values.map(function (id) {
|
|
1330
|
+
return stripPMIDPrefix(id[0]);
|
|
1331
|
+
}))];
|
|
1332
|
+
} else {
|
|
1333
|
+
_this.urls = []; // Clears the pubmed search button
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
return;
|
|
1337
|
+
});
|
|
1338
|
+
};
|
|
1339
|
+
var pubmedSearchUrl = function pubmedSearchUrl(ids) {
|
|
1340
|
+
var url = 'https://pubmed.ncbi.nlm.nih.gov/?';
|
|
1341
|
+
var params = new URLSearchParams();
|
|
1342
|
+
params.append('term', ids);
|
|
1343
|
+
return url + params.toString();
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
/***/ }),
|
|
1348
|
+
|
|
934
1349
|
/***/ "3d2d":
|
|
935
1350
|
/***/ (function(module, exports, __webpack_require__) {
|
|
936
1351
|
|
|
@@ -1392,17 +1807,6 @@ exports.default = {
|
|
|
1392
1807
|
}
|
|
1393
1808
|
};
|
|
1394
1809
|
|
|
1395
|
-
/***/ }),
|
|
1396
|
-
|
|
1397
|
-
/***/ "4217":
|
|
1398
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1399
|
-
|
|
1400
|
-
"use strict";
|
|
1401
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FlatmapVuer_vue_vue_type_style_index_0_id_3bcd7b15_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ee41");
|
|
1402
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FlatmapVuer_vue_vue_type_style_index_0_id_3bcd7b15_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FlatmapVuer_vue_vue_type_style_index_0_id_3bcd7b15_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
1403
|
-
/* unused harmony reexport * */
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
1810
|
/***/ }),
|
|
1407
1811
|
|
|
1408
1812
|
/***/ "429c":
|
|
@@ -1426,6 +1830,20 @@ module.exports = require("core-js/modules/es.array.map.js");
|
|
|
1426
1830
|
|
|
1427
1831
|
/***/ }),
|
|
1428
1832
|
|
|
1833
|
+
/***/ "448a":
|
|
1834
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1835
|
+
|
|
1836
|
+
var arrayWithoutHoles = __webpack_require__("2236");
|
|
1837
|
+
var iterableToArray = __webpack_require__("11b0");
|
|
1838
|
+
var unsupportedIterableToArray = __webpack_require__("6613");
|
|
1839
|
+
var nonIterableSpread = __webpack_require__("0676");
|
|
1840
|
+
function _toConsumableArray(arr) {
|
|
1841
|
+
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
|
|
1842
|
+
}
|
|
1843
|
+
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1844
|
+
|
|
1845
|
+
/***/ }),
|
|
1846
|
+
|
|
1429
1847
|
/***/ "450d":
|
|
1430
1848
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1431
1849
|
|
|
@@ -3921,6 +4339,13 @@ src_select.install = function (Vue) {
|
|
|
3921
4339
|
|
|
3922
4340
|
/***/ }),
|
|
3923
4341
|
|
|
4342
|
+
/***/ "4fdd":
|
|
4343
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4344
|
+
|
|
4345
|
+
// extracted by mini-css-extract-plugin
|
|
4346
|
+
|
|
4347
|
+
/***/ }),
|
|
4348
|
+
|
|
3924
4349
|
/***/ "5128":
|
|
3925
4350
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3926
4351
|
|
|
@@ -4416,6 +4841,20 @@ module.exports = require("core-js/modules/es.regexp.test.js");
|
|
|
4416
4841
|
|
|
4417
4842
|
/***/ }),
|
|
4418
4843
|
|
|
4844
|
+
/***/ "5a43":
|
|
4845
|
+
/***/ (function(module, exports) {
|
|
4846
|
+
|
|
4847
|
+
function _arrayLikeToArray(arr, len) {
|
|
4848
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4849
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
4850
|
+
arr2[i] = arr[i];
|
|
4851
|
+
}
|
|
4852
|
+
return arr2;
|
|
4853
|
+
}
|
|
4854
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4855
|
+
|
|
4856
|
+
/***/ }),
|
|
4857
|
+
|
|
4419
4858
|
/***/ "6167":
|
|
4420
4859
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4421
4860
|
|
|
@@ -5694,6 +6133,29 @@ module.exports = require("core-js/modules/es.string.replace.js");
|
|
|
5694
6133
|
|
|
5695
6134
|
/***/ }),
|
|
5696
6135
|
|
|
6136
|
+
/***/ "6613":
|
|
6137
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6138
|
+
|
|
6139
|
+
__webpack_require__("ea12");
|
|
6140
|
+
__webpack_require__("97d3");
|
|
6141
|
+
__webpack_require__("db0a");
|
|
6142
|
+
__webpack_require__("4362");
|
|
6143
|
+
__webpack_require__("9bb5");
|
|
6144
|
+
__webpack_require__("c8a6");
|
|
6145
|
+
__webpack_require__("5a3b");
|
|
6146
|
+
var arrayLikeToArray = __webpack_require__("5a43");
|
|
6147
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
6148
|
+
if (!o) return;
|
|
6149
|
+
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
6150
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6151
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6152
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
6153
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
6154
|
+
}
|
|
6155
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
6156
|
+
|
|
6157
|
+
/***/ }),
|
|
6158
|
+
|
|
5697
6159
|
/***/ "6ac5":
|
|
5698
6160
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5699
6161
|
|
|
@@ -6736,6 +7198,29 @@ exports.default = {
|
|
|
6736
7198
|
|
|
6737
7199
|
/***/ }),
|
|
6738
7200
|
|
|
7201
|
+
/***/ "7037":
|
|
7202
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7203
|
+
|
|
7204
|
+
__webpack_require__("9b22");
|
|
7205
|
+
__webpack_require__("4933");
|
|
7206
|
+
__webpack_require__("97d3");
|
|
7207
|
+
__webpack_require__("2ff9");
|
|
7208
|
+
__webpack_require__("4ccb");
|
|
7209
|
+
__webpack_require__("9bb5");
|
|
7210
|
+
__webpack_require__("1a25");
|
|
7211
|
+
function _typeof(obj) {
|
|
7212
|
+
"@babel/helpers - typeof";
|
|
7213
|
+
|
|
7214
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
7215
|
+
return typeof obj;
|
|
7216
|
+
} : function (obj) {
|
|
7217
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
7218
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
7219
|
+
}
|
|
7220
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
7221
|
+
|
|
7222
|
+
/***/ }),
|
|
7223
|
+
|
|
6739
7224
|
/***/ "712c":
|
|
6740
7225
|
/***/ (function(module, exports) {
|
|
6741
7226
|
|
|
@@ -7071,51 +7556,389 @@ main.install = function (Vue) {
|
|
|
7071
7556
|
|
|
7072
7557
|
/***/ }),
|
|
7073
7558
|
|
|
7074
|
-
/***/ "
|
|
7559
|
+
/***/ "7ec2":
|
|
7075
7560
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7076
7561
|
|
|
7077
|
-
"
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7562
|
+
__webpack_require__("9b22");
|
|
7563
|
+
__webpack_require__("4933");
|
|
7564
|
+
__webpack_require__("97d3");
|
|
7565
|
+
__webpack_require__("2ff9");
|
|
7566
|
+
__webpack_require__("4ccb");
|
|
7567
|
+
__webpack_require__("9bb5");
|
|
7568
|
+
__webpack_require__("1a25");
|
|
7569
|
+
__webpack_require__("a52a");
|
|
7570
|
+
__webpack_require__("14f0");
|
|
7571
|
+
__webpack_require__("12fb");
|
|
7572
|
+
__webpack_require__("7267");
|
|
7573
|
+
__webpack_require__("362b");
|
|
7574
|
+
__webpack_require__("dc50");
|
|
7575
|
+
__webpack_require__("2439");
|
|
7576
|
+
__webpack_require__("13e3");
|
|
7577
|
+
__webpack_require__("db0a");
|
|
7578
|
+
__webpack_require__("4086");
|
|
7579
|
+
__webpack_require__("7949");
|
|
7580
|
+
__webpack_require__("ec71");
|
|
7581
|
+
__webpack_require__("ea12");
|
|
7582
|
+
var _typeof = __webpack_require__("7037")["default"];
|
|
7583
|
+
function _regeneratorRuntime() {
|
|
7584
|
+
"use strict";
|
|
7081
7585
|
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
}
|
|
7586
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
7587
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
7588
|
+
return exports;
|
|
7589
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
7590
|
+
var exports = {},
|
|
7591
|
+
Op = Object.prototype,
|
|
7592
|
+
hasOwn = Op.hasOwnProperty,
|
|
7593
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
7594
|
+
obj[key] = desc.value;
|
|
7595
|
+
},
|
|
7596
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
7597
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
7598
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
7599
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
7600
|
+
function define(obj, key, value) {
|
|
7601
|
+
return Object.defineProperty(obj, key, {
|
|
7602
|
+
value: value,
|
|
7603
|
+
enumerable: !0,
|
|
7604
|
+
configurable: !0,
|
|
7605
|
+
writable: !0
|
|
7606
|
+
}), obj[key];
|
|
7093
7607
|
}
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
}
|
|
7097
|
-
|
|
7098
|
-
;
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7608
|
+
try {
|
|
7609
|
+
define({}, "");
|
|
7610
|
+
} catch (err) {
|
|
7611
|
+
define = function define(obj, key, value) {
|
|
7612
|
+
return obj[key] = value;
|
|
7613
|
+
};
|
|
7614
|
+
}
|
|
7615
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
7616
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
7617
|
+
generator = Object.create(protoGenerator.prototype),
|
|
7618
|
+
context = new Context(tryLocsList || []);
|
|
7619
|
+
return defineProperty(generator, "_invoke", {
|
|
7620
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
7621
|
+
}), generator;
|
|
7622
|
+
}
|
|
7623
|
+
function tryCatch(fn, obj, arg) {
|
|
7624
|
+
try {
|
|
7625
|
+
return {
|
|
7626
|
+
type: "normal",
|
|
7627
|
+
arg: fn.call(obj, arg)
|
|
7628
|
+
};
|
|
7629
|
+
} catch (err) {
|
|
7630
|
+
return {
|
|
7631
|
+
type: "throw",
|
|
7632
|
+
arg: err
|
|
7633
|
+
};
|
|
7634
|
+
}
|
|
7635
|
+
}
|
|
7636
|
+
exports.wrap = wrap;
|
|
7637
|
+
var ContinueSentinel = {};
|
|
7638
|
+
function Generator() {}
|
|
7639
|
+
function GeneratorFunction() {}
|
|
7640
|
+
function GeneratorFunctionPrototype() {}
|
|
7641
|
+
var IteratorPrototype = {};
|
|
7642
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
7643
|
+
return this;
|
|
7644
|
+
});
|
|
7645
|
+
var getProto = Object.getPrototypeOf,
|
|
7646
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
7647
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
7648
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
7649
|
+
function defineIteratorMethods(prototype) {
|
|
7650
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
7651
|
+
define(prototype, method, function (arg) {
|
|
7652
|
+
return this._invoke(method, arg);
|
|
7653
|
+
});
|
|
7654
|
+
});
|
|
7655
|
+
}
|
|
7656
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
7657
|
+
function invoke(method, arg, resolve, reject) {
|
|
7658
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
7659
|
+
if ("throw" !== record.type) {
|
|
7660
|
+
var result = record.arg,
|
|
7661
|
+
value = result.value;
|
|
7662
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
7663
|
+
invoke("next", value, resolve, reject);
|
|
7664
|
+
}, function (err) {
|
|
7665
|
+
invoke("throw", err, resolve, reject);
|
|
7666
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
7667
|
+
result.value = unwrapped, resolve(result);
|
|
7668
|
+
}, function (error) {
|
|
7669
|
+
return invoke("throw", error, resolve, reject);
|
|
7670
|
+
});
|
|
7671
|
+
}
|
|
7672
|
+
reject(record.arg);
|
|
7673
|
+
}
|
|
7674
|
+
var previousPromise;
|
|
7675
|
+
defineProperty(this, "_invoke", {
|
|
7676
|
+
value: function value(method, arg) {
|
|
7677
|
+
function callInvokeWithMethodAndArg() {
|
|
7678
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
7679
|
+
invoke(method, arg, resolve, reject);
|
|
7680
|
+
});
|
|
7681
|
+
}
|
|
7682
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
7683
|
+
}
|
|
7684
|
+
});
|
|
7685
|
+
}
|
|
7686
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
7687
|
+
var state = "suspendedStart";
|
|
7688
|
+
return function (method, arg) {
|
|
7689
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
7690
|
+
if ("completed" === state) {
|
|
7691
|
+
if ("throw" === method) throw arg;
|
|
7692
|
+
return doneResult();
|
|
7693
|
+
}
|
|
7694
|
+
for (context.method = method, context.arg = arg;;) {
|
|
7695
|
+
var delegate = context.delegate;
|
|
7696
|
+
if (delegate) {
|
|
7697
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
7698
|
+
if (delegateResult) {
|
|
7699
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
7700
|
+
return delegateResult;
|
|
7701
|
+
}
|
|
7702
|
+
}
|
|
7703
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
7704
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
7705
|
+
context.dispatchException(context.arg);
|
|
7706
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
7707
|
+
state = "executing";
|
|
7708
|
+
var record = tryCatch(innerFn, self, context);
|
|
7709
|
+
if ("normal" === record.type) {
|
|
7710
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
7711
|
+
return {
|
|
7712
|
+
value: record.arg,
|
|
7713
|
+
done: context.done
|
|
7714
|
+
};
|
|
7715
|
+
}
|
|
7716
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
7717
|
+
}
|
|
7718
|
+
};
|
|
7719
|
+
}
|
|
7720
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
7721
|
+
var methodName = context.method,
|
|
7722
|
+
method = delegate.iterator[methodName];
|
|
7723
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
7724
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
7725
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
7726
|
+
var info = record.arg;
|
|
7727
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
7728
|
+
}
|
|
7729
|
+
function pushTryEntry(locs) {
|
|
7730
|
+
var entry = {
|
|
7731
|
+
tryLoc: locs[0]
|
|
7732
|
+
};
|
|
7733
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
7734
|
+
}
|
|
7735
|
+
function resetTryEntry(entry) {
|
|
7736
|
+
var record = entry.completion || {};
|
|
7737
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
7738
|
+
}
|
|
7739
|
+
function Context(tryLocsList) {
|
|
7740
|
+
this.tryEntries = [{
|
|
7741
|
+
tryLoc: "root"
|
|
7742
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
7743
|
+
}
|
|
7744
|
+
function values(iterable) {
|
|
7745
|
+
if (iterable) {
|
|
7746
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
7747
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
7748
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
7749
|
+
if (!isNaN(iterable.length)) {
|
|
7750
|
+
var i = -1,
|
|
7751
|
+
next = function next() {
|
|
7752
|
+
for (; ++i < iterable.length;) {
|
|
7753
|
+
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
7754
|
+
}
|
|
7755
|
+
return next.value = undefined, next.done = !0, next;
|
|
7756
|
+
};
|
|
7757
|
+
return next.next = next;
|
|
7758
|
+
}
|
|
7759
|
+
}
|
|
7760
|
+
return {
|
|
7761
|
+
next: doneResult
|
|
7762
|
+
};
|
|
7763
|
+
}
|
|
7764
|
+
function doneResult() {
|
|
7765
|
+
return {
|
|
7766
|
+
value: undefined,
|
|
7767
|
+
done: !0
|
|
7768
|
+
};
|
|
7769
|
+
}
|
|
7770
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
7771
|
+
value: GeneratorFunctionPrototype,
|
|
7772
|
+
configurable: !0
|
|
7773
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
7774
|
+
value: GeneratorFunction,
|
|
7775
|
+
configurable: !0
|
|
7776
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
7777
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
7778
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
7779
|
+
}, exports.mark = function (genFun) {
|
|
7780
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
7781
|
+
}, exports.awrap = function (arg) {
|
|
7782
|
+
return {
|
|
7783
|
+
__await: arg
|
|
7784
|
+
};
|
|
7785
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
7786
|
+
return this;
|
|
7787
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
7788
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
7789
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
7790
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
7791
|
+
return result.done ? result.value : iter.next();
|
|
7792
|
+
});
|
|
7793
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
7794
|
+
return this;
|
|
7795
|
+
}), define(Gp, "toString", function () {
|
|
7796
|
+
return "[object Generator]";
|
|
7797
|
+
}), exports.keys = function (val) {
|
|
7798
|
+
var object = Object(val),
|
|
7799
|
+
keys = [];
|
|
7800
|
+
for (var key in object) {
|
|
7801
|
+
keys.push(key);
|
|
7802
|
+
}
|
|
7803
|
+
return keys.reverse(), function next() {
|
|
7804
|
+
for (; keys.length;) {
|
|
7805
|
+
var key = keys.pop();
|
|
7806
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
7807
|
+
}
|
|
7808
|
+
return next.done = !0, next;
|
|
7809
|
+
};
|
|
7810
|
+
}, exports.values = values, Context.prototype = {
|
|
7811
|
+
constructor: Context,
|
|
7812
|
+
reset: function reset(skipTempReset) {
|
|
7813
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
|
|
7814
|
+
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
7815
|
+
}
|
|
7816
|
+
},
|
|
7817
|
+
stop: function stop() {
|
|
7818
|
+
this.done = !0;
|
|
7819
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
7820
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
7821
|
+
return this.rval;
|
|
7822
|
+
},
|
|
7823
|
+
dispatchException: function dispatchException(exception) {
|
|
7824
|
+
if (this.done) throw exception;
|
|
7825
|
+
var context = this;
|
|
7826
|
+
function handle(loc, caught) {
|
|
7827
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
7828
|
+
}
|
|
7829
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7830
|
+
var entry = this.tryEntries[i],
|
|
7831
|
+
record = entry.completion;
|
|
7832
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
7833
|
+
if (entry.tryLoc <= this.prev) {
|
|
7834
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
7835
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
7836
|
+
if (hasCatch && hasFinally) {
|
|
7837
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
7838
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
7839
|
+
} else if (hasCatch) {
|
|
7840
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
7841
|
+
} else {
|
|
7842
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
7843
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
7844
|
+
}
|
|
7845
|
+
}
|
|
7846
|
+
}
|
|
7847
|
+
},
|
|
7848
|
+
abrupt: function abrupt(type, arg) {
|
|
7849
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7850
|
+
var entry = this.tryEntries[i];
|
|
7851
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
7852
|
+
var finallyEntry = entry;
|
|
7853
|
+
break;
|
|
7854
|
+
}
|
|
7855
|
+
}
|
|
7856
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
7857
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
7858
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
7859
|
+
},
|
|
7860
|
+
complete: function complete(record, afterLoc) {
|
|
7861
|
+
if ("throw" === record.type) throw record.arg;
|
|
7862
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
7863
|
+
},
|
|
7864
|
+
finish: function finish(finallyLoc) {
|
|
7865
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7866
|
+
var entry = this.tryEntries[i];
|
|
7867
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
7868
|
+
}
|
|
7869
|
+
},
|
|
7870
|
+
"catch": function _catch(tryLoc) {
|
|
7871
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7872
|
+
var entry = this.tryEntries[i];
|
|
7873
|
+
if (entry.tryLoc === tryLoc) {
|
|
7874
|
+
var record = entry.completion;
|
|
7875
|
+
if ("throw" === record.type) {
|
|
7876
|
+
var thrown = record.arg;
|
|
7877
|
+
resetTryEntry(entry);
|
|
7878
|
+
}
|
|
7879
|
+
return thrown;
|
|
7880
|
+
}
|
|
7881
|
+
}
|
|
7882
|
+
throw new Error("illegal catch attempt");
|
|
7883
|
+
},
|
|
7884
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
7885
|
+
return this.delegate = {
|
|
7886
|
+
iterator: values(iterable),
|
|
7887
|
+
resultName: resultName,
|
|
7888
|
+
nextLoc: nextLoc
|
|
7889
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
7890
|
+
}
|
|
7891
|
+
}, exports;
|
|
7892
|
+
}
|
|
7893
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
7894
|
+
|
|
7895
|
+
/***/ }),
|
|
7896
|
+
|
|
7897
|
+
/***/ "7f4d":
|
|
7898
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7899
|
+
|
|
7900
|
+
"use strict";
|
|
7901
|
+
|
|
7902
|
+
|
|
7903
|
+
exports.__esModule = true;
|
|
7904
|
+
|
|
7905
|
+
exports.default = function (target) {
|
|
7906
|
+
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
7907
|
+
var source = arguments[i] || {};
|
|
7908
|
+
for (var prop in source) {
|
|
7909
|
+
if (source.hasOwnProperty(prop)) {
|
|
7910
|
+
var value = source[prop];
|
|
7911
|
+
if (value !== undefined) {
|
|
7912
|
+
target[prop] = value;
|
|
7913
|
+
}
|
|
7914
|
+
}
|
|
7915
|
+
}
|
|
7916
|
+
}
|
|
7917
|
+
|
|
7918
|
+
return target;
|
|
7919
|
+
};
|
|
7920
|
+
|
|
7921
|
+
;
|
|
7922
|
+
|
|
7923
|
+
/***/ }),
|
|
7924
|
+
|
|
7925
|
+
/***/ "7fc1":
|
|
7926
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7927
|
+
|
|
7928
|
+
module.exports =
|
|
7929
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
7930
|
+
/******/ // The module cache
|
|
7931
|
+
/******/ var installedModules = {};
|
|
7932
|
+
/******/
|
|
7933
|
+
/******/ // The require function
|
|
7934
|
+
/******/ function __webpack_require__(moduleId) {
|
|
7935
|
+
/******/
|
|
7936
|
+
/******/ // Check if module is in cache
|
|
7937
|
+
/******/ if(installedModules[moduleId]) {
|
|
7938
|
+
/******/ return installedModules[moduleId].exports;
|
|
7939
|
+
/******/ }
|
|
7940
|
+
/******/ // Create a new module (and put it into the cache)
|
|
7941
|
+
/******/ var module = installedModules[moduleId] = {
|
|
7119
7942
|
/******/ i: moduleId,
|
|
7120
7943
|
/******/ l: false,
|
|
7121
7944
|
/******/ exports: {}
|
|
@@ -8790,6 +9613,17 @@ var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
|
8790
9613
|
|
|
8791
9614
|
module.exports = require("resize-observer-polyfill");
|
|
8792
9615
|
|
|
9616
|
+
/***/ }),
|
|
9617
|
+
|
|
9618
|
+
/***/ "a47e":
|
|
9619
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9620
|
+
|
|
9621
|
+
"use strict";
|
|
9622
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FlatmapVuer_vue_vue_type_style_index_0_id_1f482509_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4fdd");
|
|
9623
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FlatmapVuer_vue_vue_type_style_index_0_id_1f482509_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FlatmapVuer_vue_vue_type_style_index_0_id_1f482509_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
9624
|
+
/* unused harmony reexport * */
|
|
9625
|
+
|
|
9626
|
+
|
|
8793
9627
|
/***/ }),
|
|
8794
9628
|
|
|
8795
9629
|
/***/ "a52a":
|
|
@@ -9821,6 +10655,45 @@ module.exports = require("core-js/modules/es.regexp.exec.js");
|
|
|
9821
10655
|
|
|
9822
10656
|
/***/ }),
|
|
9823
10657
|
|
|
10658
|
+
/***/ "c973":
|
|
10659
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10660
|
+
|
|
10661
|
+
__webpack_require__("97d3");
|
|
10662
|
+
__webpack_require__("ec71");
|
|
10663
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
10664
|
+
try {
|
|
10665
|
+
var info = gen[key](arg);
|
|
10666
|
+
var value = info.value;
|
|
10667
|
+
} catch (error) {
|
|
10668
|
+
reject(error);
|
|
10669
|
+
return;
|
|
10670
|
+
}
|
|
10671
|
+
if (info.done) {
|
|
10672
|
+
resolve(value);
|
|
10673
|
+
} else {
|
|
10674
|
+
Promise.resolve(value).then(_next, _throw);
|
|
10675
|
+
}
|
|
10676
|
+
}
|
|
10677
|
+
function _asyncToGenerator(fn) {
|
|
10678
|
+
return function () {
|
|
10679
|
+
var self = this,
|
|
10680
|
+
args = arguments;
|
|
10681
|
+
return new Promise(function (resolve, reject) {
|
|
10682
|
+
var gen = fn.apply(self, args);
|
|
10683
|
+
function _next(value) {
|
|
10684
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
10685
|
+
}
|
|
10686
|
+
function _throw(err) {
|
|
10687
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
10688
|
+
}
|
|
10689
|
+
_next(undefined);
|
|
10690
|
+
});
|
|
10691
|
+
};
|
|
10692
|
+
}
|
|
10693
|
+
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
10694
|
+
|
|
10695
|
+
/***/ }),
|
|
10696
|
+
|
|
9824
10697
|
/***/ "ccb0":
|
|
9825
10698
|
/***/ (function(module, exports) {
|
|
9826
10699
|
|
|
@@ -11320,13 +12193,6 @@ module.exports = require("core-js/modules/es.promise.js");
|
|
|
11320
12193
|
|
|
11321
12194
|
/***/ }),
|
|
11322
12195
|
|
|
11323
|
-
/***/ "ee41":
|
|
11324
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
11325
|
-
|
|
11326
|
-
// extracted by mini-css-extract-plugin
|
|
11327
|
-
|
|
11328
|
-
/***/ }),
|
|
11329
|
-
|
|
11330
12196
|
/***/ "eedf":
|
|
11331
12197
|
/***/ (function(module, exports, __webpack_require__) {
|
|
11332
12198
|
|
|
@@ -13376,7 +14242,7 @@ if (typeof window !== 'undefined') {
|
|
|
13376
14242
|
// Indicate to webpack that this file can be concatenated
|
|
13377
14243
|
/* harmony default export */ var setPublicPath = (null);
|
|
13378
14244
|
|
|
13379
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7e4b77ee-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FlatmapVuer.vue?vue&type=template&id=
|
|
14245
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7e4b77ee-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FlatmapVuer.vue?vue&type=template&id=1f482509&scoped=true&
|
|
13380
14246
|
var render = function render() {
|
|
13381
14247
|
var _vm = this,
|
|
13382
14248
|
_c = _vm._self._c;
|
|
@@ -13868,7 +14734,7 @@ var render = function render() {
|
|
|
13868
14734
|
};
|
|
13869
14735
|
var staticRenderFns = [];
|
|
13870
14736
|
|
|
13871
|
-
// CONCATENATED MODULE: ./src/components/FlatmapVuer.vue?vue&type=template&id=
|
|
14737
|
+
// CONCATENATED MODULE: ./src/components/FlatmapVuer.vue?vue&type=template&id=1f482509&scoped=true&
|
|
13872
14738
|
|
|
13873
14739
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.js"
|
|
13874
14740
|
var es_symbol_js_ = __webpack_require__("9b22");
|
|
@@ -15404,570 +16270,9 @@ var SvgLegends_component = normalizeComponent(
|
|
|
15404
16270
|
/* harmony default export */ var SvgLegends = (SvgLegends_component.exports);
|
|
15405
16271
|
// CONCATENATED MODULE: ./src/icons/flatmap-marker.js
|
|
15406
16272
|
/* harmony default export */ var flatmap_marker = ('<div class="flatmap-marker"><svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#005974"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg></div>');
|
|
15407
|
-
//
|
|
15408
|
-
|
|
15409
|
-
function _classCallCheck(instance, Constructor) {
|
|
15410
|
-
if (!(instance instanceof Constructor)) {
|
|
15411
|
-
throw new TypeError("Cannot call a class as a function");
|
|
15412
|
-
}
|
|
15413
|
-
}
|
|
15414
|
-
// EXTERNAL MODULE: external "core-js/modules/es.symbol.to-primitive.js"
|
|
15415
|
-
var es_symbol_to_primitive_js_ = __webpack_require__("fb89");
|
|
15416
|
-
|
|
15417
|
-
// EXTERNAL MODULE: external "core-js/modules/es.date.to-primitive.js"
|
|
15418
|
-
var es_date_to_primitive_js_ = __webpack_require__("1f48");
|
|
15419
|
-
|
|
15420
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
function _toPrimitive(input, hint) {
|
|
15430
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
15431
|
-
var prim = input[Symbol.toPrimitive];
|
|
15432
|
-
if (prim !== undefined) {
|
|
15433
|
-
var res = prim.call(input, hint || "default");
|
|
15434
|
-
if (_typeof(res) !== "object") return res;
|
|
15435
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15436
|
-
}
|
|
15437
|
-
return (hint === "string" ? String : Number)(input);
|
|
15438
|
-
}
|
|
15439
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
function _toPropertyKey(arg) {
|
|
15443
|
-
var key = _toPrimitive(arg, "string");
|
|
15444
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
15445
|
-
}
|
|
15446
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
15447
|
-
|
|
15448
|
-
function _defineProperties(target, props) {
|
|
15449
|
-
for (var i = 0; i < props.length; i++) {
|
|
15450
|
-
var descriptor = props[i];
|
|
15451
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
15452
|
-
descriptor.configurable = true;
|
|
15453
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
15454
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
15455
|
-
}
|
|
15456
|
-
}
|
|
15457
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
15458
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
15459
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
15460
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
15461
|
-
writable: false
|
|
15462
|
-
});
|
|
15463
|
-
return Constructor;
|
|
15464
|
-
}
|
|
15465
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
15466
|
-
|
|
15467
|
-
function _defineProperty(obj, key, value) {
|
|
15468
|
-
key = _toPropertyKey(key);
|
|
15469
|
-
if (key in obj) {
|
|
15470
|
-
Object.defineProperty(obj, key, {
|
|
15471
|
-
value: value,
|
|
15472
|
-
enumerable: true,
|
|
15473
|
-
configurable: true,
|
|
15474
|
-
writable: true
|
|
15475
|
-
});
|
|
15476
|
-
} else {
|
|
15477
|
-
obj[key] = value;
|
|
15478
|
-
}
|
|
15479
|
-
return obj;
|
|
15480
|
-
}
|
|
15481
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
|
15482
|
-
|
|
15483
|
-
function _arrayWithoutHoles(arr) {
|
|
15484
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
15485
|
-
}
|
|
15486
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
|
15487
|
-
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
|
|
15491
|
-
|
|
15492
|
-
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
function _iterableToArray(iter) {
|
|
15496
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
15497
|
-
}
|
|
15498
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
|
15499
|
-
|
|
15500
|
-
function _nonIterableSpread() {
|
|
15501
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
15502
|
-
}
|
|
15503
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
function _toConsumableArray(arr) {
|
|
15509
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
15510
|
-
}
|
|
15511
|
-
// EXTERNAL MODULE: external "core-js/modules/es.json.stringify.js"
|
|
15512
|
-
var es_json_stringify_js_ = __webpack_require__("a9ee");
|
|
15513
|
-
|
|
15514
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.flat.js"
|
|
15515
|
-
var es_array_flat_js_ = __webpack_require__("da6e");
|
|
15516
|
-
|
|
15517
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.unscopables.flat.js"
|
|
15518
|
-
var es_array_unscopables_flat_js_ = __webpack_require__("722b");
|
|
15519
|
-
|
|
15520
|
-
// EXTERNAL MODULE: external "core-js/modules/web.url-search-params.js"
|
|
15521
|
-
var web_url_search_params_js_ = __webpack_require__("712c");
|
|
15522
|
-
|
|
15523
|
-
// EXTERNAL MODULE: external "core-js/modules/es.regexp.to-string.js"
|
|
15524
|
-
var es_regexp_to_string_js_ = __webpack_require__("30df");
|
|
15525
|
-
|
|
15526
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.filter.js"
|
|
15527
|
-
var es_array_filter_js_ = __webpack_require__("1a89");
|
|
15528
|
-
|
|
15529
|
-
// CONCATENATED MODULE: ./src/services/flatmapQueries.js
|
|
15530
|
-
|
|
15531
|
-
|
|
15532
|
-
|
|
15533
|
-
|
|
15534
|
-
|
|
15535
|
-
|
|
15536
|
-
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
|
|
15546
|
-
|
|
15547
|
-
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
/* eslint-disable no-alert, no-console */
|
|
15553
|
-
// remove duplicates by stringifying the objects
|
|
15554
|
-
var flatmapQueries_removeDuplicates = function removeDuplicates(arrayOfAnything) {
|
|
15555
|
-
return _toConsumableArray(new Set(arrayOfAnything.map(function (e) {
|
|
15556
|
-
return JSON.stringify(e);
|
|
15557
|
-
}))).map(function (e) {
|
|
15558
|
-
return JSON.parse(e);
|
|
15559
|
-
});
|
|
15560
|
-
};
|
|
15561
|
-
var inArray = function inArray(ar1, ar2) {
|
|
15562
|
-
var as1 = JSON.stringify(ar1);
|
|
15563
|
-
var as2 = JSON.stringify(ar2);
|
|
15564
|
-
return as1.indexOf(as2) !== -1;
|
|
15565
|
-
};
|
|
15566
|
-
var flatmapQueries_FlatmapQueries = /*#__PURE__*/function () {
|
|
15567
|
-
function FlatmapQueries(sparcApi, flatmapApi) {
|
|
15568
|
-
var _this7 = this;
|
|
15569
|
-
_classCallCheck(this, FlatmapQueries);
|
|
15570
|
-
_defineProperty(this, "createTooltipData", function (eventData) {
|
|
15571
|
-
var tooltipData = {
|
|
15572
|
-
destinations: this.destinations,
|
|
15573
|
-
origins: this.origins,
|
|
15574
|
-
components: this.components,
|
|
15575
|
-
destinationsWithDatasets: this.destinationsWithDatasets,
|
|
15576
|
-
originsWithDatasets: this.originsWithDatasets,
|
|
15577
|
-
componentsWithDatasets: this.componentsWithDatasets,
|
|
15578
|
-
title: eventData.label,
|
|
15579
|
-
featureId: eventData.resource,
|
|
15580
|
-
hyperlinks: eventData.feature.hyperlinks ? eventData.feature.hyperlinks : this.urls.map(function (url) {
|
|
15581
|
-
return {
|
|
15582
|
-
url: url,
|
|
15583
|
-
id: "pubmed"
|
|
15584
|
-
};
|
|
15585
|
-
})
|
|
15586
|
-
};
|
|
15587
|
-
return tooltipData;
|
|
15588
|
-
});
|
|
15589
|
-
_defineProperty(this, "getOrganCuries", function () {
|
|
15590
|
-
var _this = this;
|
|
15591
|
-
return new Promise(function (resolve) {
|
|
15592
|
-
fetch("".concat(_this.sparcAPI, "get-organ-curies/")).then(function (response) {
|
|
15593
|
-
return response.json();
|
|
15594
|
-
}).then(function (data) {
|
|
15595
|
-
resolve(data.uberon.array);
|
|
15596
|
-
});
|
|
15597
|
-
});
|
|
15598
|
-
});
|
|
15599
|
-
_defineProperty(this, "createComponentsLabelList", function (components, lookUp) {
|
|
15600
|
-
var _this2 = this;
|
|
15601
|
-
var labelList = [];
|
|
15602
|
-
components.forEach(function (n) {
|
|
15603
|
-
labelList.push(_this2.createLabelFromNeuralNode(n[0]), lookUp);
|
|
15604
|
-
if (n.length === 2) {
|
|
15605
|
-
labelList.push(_this2.createLabelFromNeuralNode(n[1]), lookUp);
|
|
15606
|
-
}
|
|
15607
|
-
});
|
|
15608
|
-
return labelList;
|
|
15609
|
-
});
|
|
15610
|
-
_defineProperty(this, "createLabelLookup", function (uberons) {
|
|
15611
|
-
var _this3 = this;
|
|
15612
|
-
return new Promise(function (resolve) {
|
|
15613
|
-
var uberonMap = {};
|
|
15614
|
-
var data = {
|
|
15615
|
-
sql: _this3.buildLabelSqlStatement(uberons)
|
|
15616
|
-
};
|
|
15617
|
-
fetch("".concat(_this3.flatmapApi, "knowledge/query/"), {
|
|
15618
|
-
method: 'POST',
|
|
15619
|
-
headers: {
|
|
15620
|
-
'Content-Type': 'application/json'
|
|
15621
|
-
},
|
|
15622
|
-
body: JSON.stringify(data)
|
|
15623
|
-
}).then(function (response) {
|
|
15624
|
-
return response.json();
|
|
15625
|
-
}).then(function (payload) {
|
|
15626
|
-
var entity = payload.keys.indexOf("entity");
|
|
15627
|
-
var label = payload.keys.indexOf("label");
|
|
15628
|
-
if (entity > -1 && label > -1) {
|
|
15629
|
-
payload.values.forEach(function (pair) {
|
|
15630
|
-
uberonMap[pair[entity]] = pair[label];
|
|
15631
|
-
});
|
|
15632
|
-
}
|
|
15633
|
-
resolve(uberonMap);
|
|
15634
|
-
});
|
|
15635
|
-
});
|
|
15636
|
-
});
|
|
15637
|
-
_defineProperty(this, "buildConnectivitySqlStatement", function (keastIds) {
|
|
15638
|
-
var sql = 'select knowledge from knowledge where entity in (';
|
|
15639
|
-
if (keastIds.length === 1) {
|
|
15640
|
-
sql += "'".concat(keastIds[0], "')");
|
|
15641
|
-
} else if (keastIds.length > 1) {
|
|
15642
|
-
for (var i in keastIds) {
|
|
15643
|
-
sql += "'".concat(keastIds[i], "'").concat(i >= keastIds.length - 1 ? ')' : ',', " ");
|
|
15644
|
-
}
|
|
15645
|
-
}
|
|
15646
|
-
return sql;
|
|
15647
|
-
});
|
|
15648
|
-
_defineProperty(this, "buildLabelSqlStatement", function (uberons) {
|
|
15649
|
-
var sql = 'select entity, label from labels where entity in (';
|
|
15650
|
-
if (uberons.length === 1) {
|
|
15651
|
-
sql += "'".concat(uberons[0], "')");
|
|
15652
|
-
} else if (uberons.length > 1) {
|
|
15653
|
-
for (var i in uberons) {
|
|
15654
|
-
sql += "'".concat(uberons[i], "'").concat(i >= uberons.length - 1 ? ')' : ',', " ");
|
|
15655
|
-
}
|
|
15656
|
-
}
|
|
15657
|
-
return sql;
|
|
15658
|
-
});
|
|
15659
|
-
_defineProperty(this, "findAllIdsFromConnectivity", function (connectivity) {
|
|
15660
|
-
var dnodes = connectivity.connectivity.flat(); // get nodes from edgelist
|
|
15661
|
-
var nodes = _toConsumableArray(new Set(dnodes)); // remove duplicates
|
|
15662
|
-
var found = [];
|
|
15663
|
-
nodes.forEach(function (n) {
|
|
15664
|
-
if (Array.isArray(n)) {
|
|
15665
|
-
found.push(n.flat());
|
|
15666
|
-
} else {
|
|
15667
|
-
found.push(n);
|
|
15668
|
-
}
|
|
15669
|
-
});
|
|
15670
|
-
return _toConsumableArray(new Set(found.flat()));
|
|
15671
|
-
});
|
|
15672
|
-
_defineProperty(this, "flattenConntectivity", function (connectivity) {
|
|
15673
|
-
var dnodes = connectivity.flat(); // get nodes from edgelist
|
|
15674
|
-
var nodes = _toConsumableArray(new Set(dnodes)); // remove duplicates
|
|
15675
|
-
var found = [];
|
|
15676
|
-
nodes.forEach(function (n) {
|
|
15677
|
-
if (Array.isArray(n)) {
|
|
15678
|
-
found.push(n.flat());
|
|
15679
|
-
} else {
|
|
15680
|
-
found.push(n);
|
|
15681
|
-
}
|
|
15682
|
-
});
|
|
15683
|
-
return found.flat();
|
|
15684
|
-
});
|
|
15685
|
-
_defineProperty(this, "findComponents", function (connectivity) {
|
|
15686
|
-
var dnodes = connectivity.connectivity.flat(); // get nodes from edgelist
|
|
15687
|
-
var nodes = flatmapQueries_removeDuplicates(dnodes);
|
|
15688
|
-
var found = [];
|
|
15689
|
-
var terminal = false;
|
|
15690
|
-
nodes.forEach(function (node) {
|
|
15691
|
-
terminal = false;
|
|
15692
|
-
// Check if the node is an destination or origin (note that they are labelled dendrite and axon as opposed to origin and destination)
|
|
15693
|
-
if (inArray(connectivity.axons, node)) {
|
|
15694
|
-
terminal = true;
|
|
15695
|
-
}
|
|
15696
|
-
if (inArray(connectivity.dendrites, node)) {
|
|
15697
|
-
terminal = true;
|
|
15698
|
-
}
|
|
15699
|
-
if (!terminal) {
|
|
15700
|
-
found.push(node);
|
|
15701
|
-
}
|
|
15702
|
-
});
|
|
15703
|
-
return found;
|
|
15704
|
-
});
|
|
15705
|
-
_defineProperty(this, "retrieveFlatmapKnowledgeForEvent", /*#__PURE__*/function () {
|
|
15706
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(eventData) {
|
|
15707
|
-
var _this4 = this;
|
|
15708
|
-
var signal, keastIds, data, prom1, prom2;
|
|
15709
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15710
|
-
while (1) {
|
|
15711
|
-
switch (_context.prev = _context.next) {
|
|
15712
|
-
case 0:
|
|
15713
|
-
// check if there is an existing query
|
|
15714
|
-
if (this.controller) this.controller.abort();
|
|
15715
|
-
|
|
15716
|
-
// set up the abort controller
|
|
15717
|
-
this.controller = new AbortController();
|
|
15718
|
-
signal = this.controller.signal;
|
|
15719
|
-
keastIds = eventData.resource;
|
|
15720
|
-
this.destinations = [];
|
|
15721
|
-
this.origins = [];
|
|
15722
|
-
this.components = [];
|
|
15723
|
-
if (!(!keastIds || keastIds.length == 0)) {
|
|
15724
|
-
_context.next = 9;
|
|
15725
|
-
break;
|
|
15726
|
-
}
|
|
15727
|
-
return _context.abrupt("return");
|
|
15728
|
-
case 9:
|
|
15729
|
-
data = {
|
|
15730
|
-
sql: this.buildConnectivitySqlStatement(keastIds)
|
|
15731
|
-
};
|
|
15732
|
-
prom1 = new Promise(function (resolve) {
|
|
15733
|
-
fetch("".concat(_this4.flatmapApi, "knowledge/query/"), {
|
|
15734
|
-
method: 'POST',
|
|
15735
|
-
headers: {
|
|
15736
|
-
'Content-Type': 'application/json'
|
|
15737
|
-
},
|
|
15738
|
-
body: JSON.stringify(data),
|
|
15739
|
-
signal: signal
|
|
15740
|
-
}).then(function (response) {
|
|
15741
|
-
return response.json();
|
|
15742
|
-
}).then(function (data) {
|
|
15743
|
-
if (_this4.connectivityExists(data)) {
|
|
15744
|
-
var connectivity = JSON.parse(data.values[0][0]);
|
|
15745
|
-
_this4.processConnectivity(connectivity).then(function () {
|
|
15746
|
-
resolve(true);
|
|
15747
|
-
});
|
|
15748
|
-
} else {
|
|
15749
|
-
console.log('No connectivity data found');
|
|
15750
|
-
resolve(true);
|
|
15751
|
-
}
|
|
15752
|
-
}).catch(function (error) {
|
|
15753
|
-
console.error('Error:', error);
|
|
15754
|
-
resolve(false);
|
|
15755
|
-
});
|
|
15756
|
-
});
|
|
15757
|
-
prom2 = this.pubmedQueryOnIds(eventData);
|
|
15758
|
-
_context.next = 14;
|
|
15759
|
-
return Promise.all([prom1, prom2]);
|
|
15760
|
-
case 14:
|
|
15761
|
-
return _context.abrupt("return", _context.sent);
|
|
15762
|
-
case 15:
|
|
15763
|
-
case "end":
|
|
15764
|
-
return _context.stop();
|
|
15765
|
-
}
|
|
15766
|
-
}
|
|
15767
|
-
}, _callee, this);
|
|
15768
|
-
}));
|
|
15769
|
-
return function (_x) {
|
|
15770
|
-
return _ref.apply(this, arguments);
|
|
15771
|
-
};
|
|
15772
|
-
}());
|
|
15773
|
-
_defineProperty(this, "connectivityExists", function (data) {
|
|
15774
|
-
if (data.values && data.values.length > 0 && JSON.parse(data.values[0][0]).connectivity && JSON.parse(data.values[0][0]).connectivity.length > 0) {
|
|
15775
|
-
return true;
|
|
15776
|
-
} else {
|
|
15777
|
-
return false;
|
|
15778
|
-
}
|
|
15779
|
-
});
|
|
15780
|
-
_defineProperty(this, "createLabelFromNeuralNode", function (node, lookUp) {
|
|
15781
|
-
var label = lookUp[node[0]];
|
|
15782
|
-
if (node.length === 2 && node[1].length > 0) {
|
|
15783
|
-
node[1].forEach(function (n) {
|
|
15784
|
-
if (lookUp[n] == undefined) {
|
|
15785
|
-
label += ", ".concat(n);
|
|
15786
|
-
} else {
|
|
15787
|
-
label += ", ".concat(lookUp[n]);
|
|
15788
|
-
}
|
|
15789
|
-
});
|
|
15790
|
-
}
|
|
15791
|
-
return label;
|
|
15792
|
-
});
|
|
15793
|
-
_defineProperty(this, "findComponents", function (connectivity) {
|
|
15794
|
-
var dnodes = connectivity.connectivity.flat(); // get nodes from edgelist
|
|
15795
|
-
var nodes = flatmapQueries_removeDuplicates(dnodes);
|
|
15796
|
-
var found = [];
|
|
15797
|
-
var terminal = false;
|
|
15798
|
-
nodes.forEach(function (node) {
|
|
15799
|
-
terminal = false;
|
|
15800
|
-
// Check if the node is an destination or origin (note that they are labelled dendrite and axon as opposed to origin and destination)
|
|
15801
|
-
if (inArray(connectivity.axons, node)) {
|
|
15802
|
-
terminal = true;
|
|
15803
|
-
}
|
|
15804
|
-
if (inArray(connectivity.dendrites, node)) {
|
|
15805
|
-
terminal = true;
|
|
15806
|
-
}
|
|
15807
|
-
if (!terminal) {
|
|
15808
|
-
found.push(node);
|
|
15809
|
-
}
|
|
15810
|
-
});
|
|
15811
|
-
return found;
|
|
15812
|
-
});
|
|
15813
|
-
_defineProperty(this, "stripPMIDPrefix", function (pubmedId) {
|
|
15814
|
-
return pubmedId.split(':')[1];
|
|
15815
|
-
});
|
|
15816
|
-
_defineProperty(this, "buildPubmedSqlStatement", function (keastIds) {
|
|
15817
|
-
var sql = 'select distinct publication from publications where entity in (';
|
|
15818
|
-
if (keastIds.length === 1) {
|
|
15819
|
-
sql += "'".concat(keastIds[0], "')");
|
|
15820
|
-
} else if (keastIds.length > 1) {
|
|
15821
|
-
for (var i in keastIds) {
|
|
15822
|
-
sql += "'".concat(keastIds[i], "'").concat(i >= keastIds.length - 1 ? ')' : ',', " ");
|
|
15823
|
-
}
|
|
15824
|
-
}
|
|
15825
|
-
return sql;
|
|
15826
|
-
});
|
|
15827
|
-
_defineProperty(this, "buildPubmedSqlStatementForModels", function (model) {
|
|
15828
|
-
return "select distinct publication from publications where entity = '".concat(model, "'");
|
|
15829
|
-
});
|
|
15830
|
-
_defineProperty(this, "flatmapQuery", function (sql) {
|
|
15831
|
-
var data = {
|
|
15832
|
-
sql: sql
|
|
15833
|
-
};
|
|
15834
|
-
return fetch("".concat(this.flatmapApi, "knowledge/query/"), {
|
|
15835
|
-
method: 'POST',
|
|
15836
|
-
headers: {
|
|
15837
|
-
'Content-Type': 'application/json'
|
|
15838
|
-
},
|
|
15839
|
-
body: JSON.stringify(data)
|
|
15840
|
-
}).then(function (response) {
|
|
15841
|
-
return response.json();
|
|
15842
|
-
}).catch(function (error) {
|
|
15843
|
-
console.error('Error:', error);
|
|
15844
|
-
});
|
|
15845
|
-
});
|
|
15846
|
-
_defineProperty(this, "pubmedQueryOnIds", function (eventData) {
|
|
15847
|
-
var _this5 = this;
|
|
15848
|
-
var keastIds = eventData.resource;
|
|
15849
|
-
var source = eventData.feature.source;
|
|
15850
|
-
if (!keastIds || keastIds.length === 0) return;
|
|
15851
|
-
var sql = this.buildPubmedSqlStatement(keastIds);
|
|
15852
|
-
return this.flatmapQuery(sql).then(function (data) {
|
|
15853
|
-
// Create pubmed url on paths if we have them
|
|
15854
|
-
if (data.values.length > 0) {
|
|
15855
|
-
_this5.urls = [_this5.pubmedSearchUrl(data.values.map(function (id) {
|
|
15856
|
-
return _this5.stripPMIDPrefix(id[0]);
|
|
15857
|
-
}))];
|
|
15858
|
-
return true;
|
|
15859
|
-
} else {
|
|
15860
|
-
// Create pubmed url on models
|
|
15861
|
-
_this5.pubmedQueryOnModels(source).then(function () {
|
|
15862
|
-
return true;
|
|
15863
|
-
});
|
|
15864
|
-
}
|
|
15865
|
-
});
|
|
15866
|
-
});
|
|
15867
|
-
_defineProperty(this, "pubmedQueryOnModels", function (source) {
|
|
15868
|
-
var _this6 = this;
|
|
15869
|
-
return this.flatmapQuery(this.buildPubmedSqlStatementForModels(source)).then(function (data) {
|
|
15870
|
-
if (Array.isArray(data.values) && data.values.length > 0) {
|
|
15871
|
-
_this6.urls = [_this6.pubmedSearchUrl(data.values.map(function (id) {
|
|
15872
|
-
return _this6.stripPMIDPrefix(id[0]);
|
|
15873
|
-
}))];
|
|
15874
|
-
} else {
|
|
15875
|
-
_this6.urls = []; // Clears the pubmed search button
|
|
15876
|
-
}
|
|
15877
|
-
|
|
15878
|
-
return;
|
|
15879
|
-
});
|
|
15880
|
-
});
|
|
15881
|
-
_defineProperty(this, "pubmedSearchUrl", function (ids) {
|
|
15882
|
-
var url = 'https://pubmed.ncbi.nlm.nih.gov/?';
|
|
15883
|
-
var params = new URLSearchParams();
|
|
15884
|
-
params.append('term', ids);
|
|
15885
|
-
return url + params.toString();
|
|
15886
|
-
});
|
|
15887
|
-
this.sparcApi = sparcApi;
|
|
15888
|
-
this.flatmapApi = flatmapApi;
|
|
15889
|
-
this.destinations = [];
|
|
15890
|
-
this.origins = [];
|
|
15891
|
-
this.components = [];
|
|
15892
|
-
this.uberons = [];
|
|
15893
|
-
this.urls = [];
|
|
15894
|
-
this.controller = undefined;
|
|
15895
|
-
this.getOrganCuries().then(function (uberons) {
|
|
15896
|
-
_this7.uberons = uberons;
|
|
15897
|
-
_this7.createLabelLookup(uberons).then(function (lookUp) {
|
|
15898
|
-
_this7.lookUp = lookUp;
|
|
15899
|
-
});
|
|
15900
|
-
});
|
|
15901
|
-
}
|
|
15902
|
-
_createClass(FlatmapQueries, [{
|
|
15903
|
-
key: "flattenAndFindDatasets",
|
|
15904
|
-
value: function flattenAndFindDatasets(components, axons, dendrites) {
|
|
15905
|
-
// process the nodes for finding datasets (Note this is not critical to the tooltip, only for the 'search on components' button)
|
|
15906
|
-
var componentsFlat = this.flattenConntectivity(components);
|
|
15907
|
-
var axonsFlat = this.flattenConntectivity(axons);
|
|
15908
|
-
var dendritesFlat = this.flattenConntectivity(dendrites);
|
|
15909
|
-
|
|
15910
|
-
// Filter for the anatomy which is annotated on datasets
|
|
15911
|
-
this.destinationsWithDatasets = this.uberons.filter(function (ub) {
|
|
15912
|
-
return axonsFlat.indexOf(ub.id) !== -1;
|
|
15913
|
-
});
|
|
15914
|
-
this.originsWithDatasets = this.uberons.filter(function (ub) {
|
|
15915
|
-
return dendritesFlat.indexOf(ub.id) !== -1;
|
|
15916
|
-
});
|
|
15917
|
-
this.componentsWithDatasets = this.uberons.filter(function (ub) {
|
|
15918
|
-
return componentsFlat.indexOf(ub.id) !== -1;
|
|
15919
|
-
});
|
|
15920
|
-
}
|
|
15921
|
-
}, {
|
|
15922
|
-
key: "processConnectivity",
|
|
15923
|
-
value: function processConnectivity(connectivity) {
|
|
15924
|
-
var _this8 = this;
|
|
15925
|
-
return new Promise(function (resolve) {
|
|
15926
|
-
// Filter the origin and destinations from components
|
|
15927
|
-
var components = _this8.findComponents(connectivity);
|
|
15928
|
-
|
|
15929
|
-
// Remove duplicates
|
|
15930
|
-
var axons = flatmapQueries_removeDuplicates(connectivity.axons);
|
|
15931
|
-
var dendrites = flatmapQueries_removeDuplicates(connectivity.dendrites);
|
|
16273
|
+
// EXTERNAL MODULE: ./src/services/flatmapQueries.js
|
|
16274
|
+
var flatmapQueries = __webpack_require__("3630");
|
|
15932
16275
|
|
|
15933
|
-
// Create list of ids to get labels for
|
|
15934
|
-
var conIds = _this8.findAllIdsFromConnectivity(connectivity);
|
|
15935
|
-
|
|
15936
|
-
// Create readable labels from the nodes. Setting this to 'this.origins' updates the display
|
|
15937
|
-
_this8.createLabelLookup(conIds).then(function (lookUp) {
|
|
15938
|
-
_this8.destinations = axons.map(function (a) {
|
|
15939
|
-
return _this8.createLabelFromNeuralNode(a, lookUp);
|
|
15940
|
-
});
|
|
15941
|
-
_this8.origins = dendrites.map(function (d) {
|
|
15942
|
-
return _this8.createLabelFromNeuralNode(d, lookUp);
|
|
15943
|
-
});
|
|
15944
|
-
_this8.components = components.map(function (c) {
|
|
15945
|
-
return _this8.createLabelFromNeuralNode(c, lookUp);
|
|
15946
|
-
});
|
|
15947
|
-
_this8.flattenAndFindDatasets(components, axons, dendrites);
|
|
15948
|
-
resolve(true);
|
|
15949
|
-
});
|
|
15950
|
-
});
|
|
15951
|
-
}
|
|
15952
|
-
}, {
|
|
15953
|
-
key: "flattenConntectivity",
|
|
15954
|
-
value: function flattenConntectivity(connectivity) {
|
|
15955
|
-
var dnodes = connectivity.flat(); // get nodes from edgelist
|
|
15956
|
-
var nodes = _toConsumableArray(new Set(dnodes)); // remove duplicates
|
|
15957
|
-
var found = [];
|
|
15958
|
-
nodes.forEach(function (n) {
|
|
15959
|
-
if (Array.isArray(n)) {
|
|
15960
|
-
found.push(n.flat());
|
|
15961
|
-
} else {
|
|
15962
|
-
found.push(n);
|
|
15963
|
-
}
|
|
15964
|
-
});
|
|
15965
|
-
return found.flat();
|
|
15966
|
-
}
|
|
15967
|
-
}]);
|
|
15968
|
-
return FlatmapQueries;
|
|
15969
|
-
}();
|
|
15970
|
-
/* harmony default export */ var flatmapQueries = (flatmapQueries_FlatmapQueries);
|
|
15971
16276
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FlatmapVuer.vue?vue&type=script&lang=js&
|
|
15972
16277
|
|
|
15973
16278
|
|
|
@@ -16497,10 +16802,18 @@ var createUnfilledTooltipData = function createUnfilledTooltipData() {
|
|
|
16497
16802
|
}
|
|
16498
16803
|
},
|
|
16499
16804
|
mapResize: function mapResize() {
|
|
16500
|
-
|
|
16501
|
-
this.mapImp
|
|
16805
|
+
try {
|
|
16806
|
+
if (this.mapImp) {
|
|
16807
|
+
this.mapImp.resize();
|
|
16808
|
+
this.showMinimap(this.displayMinimap);
|
|
16809
|
+
if (this.mapImp._minimap) {
|
|
16810
|
+
this.mapImp._minimap.resize();
|
|
16811
|
+
}
|
|
16812
|
+
}
|
|
16813
|
+
this.computePathControlsMaximumHeight();
|
|
16814
|
+
} catch (_unused) {
|
|
16815
|
+
console.error("Map resize error");
|
|
16502
16816
|
}
|
|
16503
|
-
this.computePathControlsMaximumHeight();
|
|
16504
16817
|
},
|
|
16505
16818
|
onFlatmapReady: function onFlatmapReady() {
|
|
16506
16819
|
// onFlatmapReady is used for functions that need to run immediately after the flatmap is loaded
|
|
@@ -16518,6 +16831,7 @@ var createUnfilledTooltipData = function createUnfilledTooltipData() {
|
|
|
16518
16831
|
this.loading = false;
|
|
16519
16832
|
this.computePathControlsMaximumHeight();
|
|
16520
16833
|
this.drawerOpen = true;
|
|
16834
|
+
this.mapResize();
|
|
16521
16835
|
this.$emit("ready", this);
|
|
16522
16836
|
},
|
|
16523
16837
|
showMinimap: function showMinimap(flag) {
|
|
@@ -16712,13 +17026,13 @@ var createUnfilledTooltipData = function createUnfilledTooltipData() {
|
|
|
16712
17026
|
var flatmap = __webpack_require__("4979");
|
|
16713
17027
|
this.mapManager = new flatmap.MapManager(this.flatmapAPI);
|
|
16714
17028
|
if (this.renderAtMounted) this.createFlatmap();
|
|
16715
|
-
this.flatmapQueries = new
|
|
17029
|
+
this.flatmapQueries = new flatmapQueries["FlatmapQueries"](this.sparcAPI, this.flatmapAPI);
|
|
16716
17030
|
}
|
|
16717
17031
|
});
|
|
16718
17032
|
// CONCATENATED MODULE: ./src/components/FlatmapVuer.vue?vue&type=script&lang=js&
|
|
16719
17033
|
/* harmony default export */ var components_FlatmapVuervue_type_script_lang_js_ = (FlatmapVuervue_type_script_lang_js_);
|
|
16720
|
-
// EXTERNAL MODULE: ./src/components/FlatmapVuer.vue?vue&type=style&index=0&id=
|
|
16721
|
-
var
|
|
17034
|
+
// EXTERNAL MODULE: ./src/components/FlatmapVuer.vue?vue&type=style&index=0&id=1f482509&prod&scoped=true&lang=scss&
|
|
17035
|
+
var FlatmapVuervue_type_style_index_0_id_1f482509_prod_scoped_true_lang_scss_ = __webpack_require__("a47e");
|
|
16722
17036
|
|
|
16723
17037
|
// CONCATENATED MODULE: ./src/components/FlatmapVuer.vue
|
|
16724
17038
|
|
|
@@ -16735,7 +17049,7 @@ var FlatmapVuer_component = normalizeComponent(
|
|
|
16735
17049
|
staticRenderFns,
|
|
16736
17050
|
false,
|
|
16737
17051
|
null,
|
|
16738
|
-
"
|
|
17052
|
+
"1f482509",
|
|
16739
17053
|
null
|
|
16740
17054
|
|
|
16741
17055
|
)
|
|
@@ -17334,13 +17648,6 @@ var MultiFlatmapVuer_component = normalizeComponent(
|
|
|
17334
17648
|
|
|
17335
17649
|
|
|
17336
17650
|
|
|
17337
|
-
/***/ }),
|
|
17338
|
-
|
|
17339
|
-
/***/ "fb89":
|
|
17340
|
-
/***/ (function(module, exports) {
|
|
17341
|
-
|
|
17342
|
-
module.exports = require("core-js/modules/es.symbol.to-primitive.js");
|
|
17343
|
-
|
|
17344
17651
|
/***/ }),
|
|
17345
17652
|
|
|
17346
17653
|
/***/ "fd22":
|