{"remainingRequest":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js!/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js??ref--14-0!/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/mixins/ContentMixin.js","dependencies":[{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/mixins/ContentMixin.js","mtime":1697426030200},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/babel.config.js","mtime":1684261475125},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:aW1wb3J0IF9yZWdlbmVyYXRvclJ1bnRpbWUgZnJvbSAiL2hvbWUvY21pc3MvSmVua2lucy93b3Jrc3BhY2UvbWFwaW50ZWdyYXRlZHZ1ZXIvbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL3JlZ2VuZXJhdG9yUnVudGltZS5qcyI7CmltcG9ydCBfYXN5bmNUb0dlbmVyYXRvciBmcm9tICIvaG9tZS9jbWlzcy9KZW5raW5zL3dvcmtzcGFjZS9tYXBpbnRlZ3JhdGVkdnVlci9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9lc20vYXN5bmNUb0dlbmVyYXRvci5qcyI7CmltcG9ydCAiY29yZS1qcy9tb2R1bGVzL2VzLmFycmF5LmZpbHRlci5qcyI7CmltcG9ydCAiY29yZS1qcy9tb2R1bGVzL2VzLm9iamVjdC50by1zdHJpbmcuanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy9lcy5yZWdleHAuZXhlYy5qcyI7CmltcG9ydCAi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XN1bHQuaW50ZXJuYWxOYW1lID0gdGhpcy5pZE5hbWVQYWlyW3Jlc291cmNlLmZlYXR1cmUubW9kZWxzXTsKICAgICAgICBpZiAocmVzb3VyY2UuZXZlbnRUeXBlID09ICJjbGljayIpIHsKICAgICAgICAgIHJlc3VsdC5ldmVudFR5cGUgPSAic2VsZWN0ZWQiOwogICAgICAgICAgaWYgKHJlc291cmNlLmZlYXR1cmUudHlwZSA9PSAibWFya2VyIikgewogICAgICAgICAgICB2YXIgbGFiZWwgPSB0aGlzLmlkTmFtZVBhaXJbcmVzb3VyY2UuZmVhdHVyZS5tb2RlbHNdOwogICAgICAgICAgICB2YXIgaGFyZGNvZGVkQW5ub3RhdGlvbiA9IG1hcmtlclpvb21MZXZlbHMuZmlsdGVyKGZ1bmN0aW9uIChteikgewogICAgICAgICAgICAgIHJldHVybiBtei5pZCA9PT0gcmVzb3VyY2UuZmVhdHVyZS5tb2RlbHM7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoc3RvcmUuZ2V0dGVyc1sic2V0dGluZ3MvaXNGZWF0dXJlZE1hcmtlcklkZW50aWZpZXIiXShyZXNvdXJjZS5mZWF0dXJlLmlkKSkgewogICAgICAgICAgICAgIC8vIEl0IGlzIGEgZmVhdHVyZWQgZGF0YXNldCBzZWFyY2ggZm9yIERPSS4KICAgICAgICAgICAgICByZXR1cm5lZEFjdGlvbiA9IHsKICAgICAgICAgICAgICAgIHR5cGU6ICJTZWFyY2giLAogICAgICAgICAgICAgICAgdGVybTogc3RvcmUuZ2V0dGVyc1sic2V0dGluZ3MvZmVhdHVyZWRNYXJrZXJEb2kiXShyZXNvdXJjZS5mZWF0dXJlLmlkKQogICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0gZWxzZSBpZiAoaGFyZGNvZGVkQW5ub3RhdGlvbi5maWx0ZXIoZnVuY3Rpb24gKGgpIHsKICAgICAgICAgICAgICByZXR1cm4gaC5rZXl3b3JkOwogICAgICAgICAgICB9KS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgLy8gaWYgaXQgbWF0Y2hlcyBvdXIgc3RvcmVkIGtleXdvcmRzLCBpdCBpcyBhIGtleXdvcmQgc2VhcmNoCiAgICAgICAgICAgICAgLy8gS2V5d29yZCBzZWFyY2hlcyBkbyBub3QgY29udGFpbiBsYWJlbHMsIHNvIHN3aXRjaCB0byBrZXl3b3JkIHNlYXJjaCBpZiBubyBsYWJlbCBleGlzdHMKICAgICAgICAgICAgICByZXR1cm5lZEFjdGlvbiA9IHsKICAgICAgICAgICAgICAgIHR5cGU6ICJTZWFyY2giLAogICAgICAgICAgICAgICAgdGVybTogImh0dHA6Ly9wdXJsLm9ib2xpYnJhcnkub3JnL29iby8iICsgcmVzb3VyY2UuZmVhdHVyZS5tb2RlbHMucmVwbGFjZSgiOiIsICJfIikKICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIC8vIEZhY2V0IHNlYXJjaCBvbiBhbmF0b215IGlmIGl0IGlzIG5vdCBhIGtleXdvcmQgc2VhcmNoCiAgICAgICAgICAgICAgcmV0dXJuZWRBY3Rpb24gPSB7CiAgICAgICAgICAgICAgICB0eXBlOiAiRmFjZXQiLAogICAgICAgICAgICAgICAgZmFjZXQ6IGxhYmVsLAogICAgICAgICAgICAgICAgZmFjZXRQcm9wUGF0aDogImFuYXRvbXkub3JnYW4ubmFtZSIsCiAgICAgICAgICAgICAgICB0ZXJtOiAiQW5hdG9taWNhbCBzdHJ1Y3R1cmUiCiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmaXJlUmVzb3VyY2VTZWxlY3RlZCA9IHRydWU7CiAgICAgICAgICAgIGlmICh0eXBlID09ICJNdWx0aUZsYXRtYXAiKSB7CiAgICAgICAgICAgICAgdmFyIGZsYXRtYXAgPSB0aGlzLiRyZWZzLm11bHRpZmxhdG1hcC5nZXRDdXJyZW50RmxhdG1hcCgpLm1hcEltcDsKICAgICAgICAgICAgICBmbGF0bWFwLmNsZWFyU2VhcmNoUmVzdWx0cygpOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgaWYgKHJlc291cmNlLmZlYXR1cmUudHlwZSA9PSAiZmVhdHVyZSIpIHsKICAgICAgICAgICAgLy8gRG8gbm8gb3BlbiBzY2FmZm9sZCBpbiBzeW5jIG1hcAogICAgICAgICAgICBpZiAodGhpcy5zeW5jTW9kZSkgewogICAgICAgICAgICAgIGZpcmVSZXNvdXJjZVNlbGVjdGVkID0gdHJ1ZTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBhY3Rpb24gPSAic2NhZmZvbGQiOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChyZXNvdXJjZS5ldmVudFR5cGUgPT0gIm1vdXNlZW50ZXIiKSB7CiAgICAgICAgICByZXN1bHQuZXZlbnRUeXBlID0gImhpZ2hsaWdodGVkIjsKICAgICAgICAgIGZpcmVSZXNvdXJjZVNlbGVjdGVkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgIH0gZWxzZSBpZiAodHlwZSA9PSAiU2NhZmZvbGQiKSB7CiAgICAgICAgaWYgKHJlc291cmNlICYmIHJlc291cmNlWzBdKSB7CiAgICAgICAgICByZXN1bHQuaW50ZXJuYWxOYW1lID0gcmVzb3VyY2VbMF0uZGF0YS5pZDsKICAgICAgICAgIC8vIEZhY2V0IHNlYXJjaCBpZiBtYXJrZXIgaXMgY2xpY2tlZAogICAgICAgICAgaWYgKHJlc291cmNlWzBdLmRhdGEubGFzdEFjdGlvbk9uTWFya2VyID09PSB0cnVlKSB7CiAgICAgICAgICAgIHJldHVybmVkQWN0aW9uID0gewogICAgICAgICAgICAgIHR5cGU6ICJGYWNldCIsCiAgICAgICAgICAgICAgZmFjZXQ6IGNhcGl0YWxpc2UocmVzb3VyY2VbMF0uZGF0YS5pZCksCiAgICAgICAgICAgICAgZmFjZXRQcm9wUGF0aDogImFuYX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maW5lZCAmJiBkYXRhLnJlc291cmNlKSB7CiAgICAgICAgICAgICAgICBuYW1lID0gZGF0YS5yZXNvdXJjZS5sYWJlbDsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWQgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgaWYgKGRhdGEucmVzb3VyY2UgJiYgZGF0YS5yZXNvdXJjZS5yZXNvdXJjZSkgewogICAgICAgICAgICAgICAgaWQgPSBkYXRhLnJlc291cmNlLnJlc291cmNlWzBdOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAoISh0aGlzLmVudHJ5LnR5cGUgPT09ICJTY2FmZm9sZCIpKSB7CiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTg7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgb2JqZWN0cyA9IHRoaXMuJHJlZnMuc2NhZmZvbGQuZmluZE9iamVjdHNXaXRoR3JvdXBOYW1lKG5hbWUpOyAvLyBJZiBhIHJlZ2lvbiBpcyBub3QgZm91bmQgdXNlIGEgaGFyZGNvZGVkIGxpc3QgdG8gZGV0ZXJtaW5lCiAgICAgICAgICAgICAgLy8gaXRzIHBhcmVudHMgcmVnaW9uIGZpcnN0CiAgICAgICAgICAgICAgaWYgKCEob2JqZWN0cy5sZW5ndGggPT09IDApKSB7CiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTY7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKCEoZGF0YS5yZXNvdXJjZSAmJiBkYXRhLnJlc291cmNlLmZlYXR1cmUpKSB7CiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTE7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgbWF0Y2hlZCA9IGdldE5lcnZlTmFtZXMoZGF0YS5yZXNvdXJjZS5mZWF0dXJlLm1vZGVscyk7CiAgICAgICAgICAgICAgaWYgKCEobWF0Y2hlZC5sZW5ndGggPiAwKSkgewogICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDExOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoInJldHVybiIsIG1hdGNoZWQpOwogICAgICAgICAgICBjYXNlIDExOgogICAgICAgICAgICAgIG1hdGNoZWQgPSBnZXRQYXJlbnRzUmVnaW9uKG5hbWUpOwogICAgICAgICAgICAgIGlmICghbWF0Y2hlZCkgewogICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDE0OwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoInJldHVybiIsIG1hdGNoZWQpOwogICAgICAgICAgICBjYXNlIDE0OgogICAgICAgICAgICAgIGlmICghKGlkICYmIGRhdGEuZXZlbnRUeXBlID09PSAic2VsZWN0ZWQiKSkgewogICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDE2OwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoInJldHVybiIsIGZldGNoKCIiLmNvbmNhdCh0aGlzLmFwaUxvY2F0aW9uLCAiZ2V0LXJlbGF0ZWQtdGVybXMvIikuY29uY2F0KGlkKSkudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHsKICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7CiAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAoZGF0YSkgewogICAgICAgICAgICAgICAgaWYgKGRhdGEudWJlcm9uLmFycmF5Lmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgICAgbmFtZSA9IGRhdGEudWJlcm9uLmFycmF5WzBdLm5hbWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKCkgKyBkYXRhLnViZXJvbi5hcnJheVswXS5uYW1lLnNsaWNlKDEpOwogICAgICAgICAgICAgICAgICBpZCA9IGRhdGEudWJlcm9uLmFycmF5WzBdLmlkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgaWQ6IGlkLAogICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUKICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGNhc2UgMTY6CiAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDE5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDE4OgogICAgICAgICAgICAgIGlmICh0aGlzLmVudHJ5LnR5cGUgPT09ICJNdWx0aUZsYXRtYXAiKSB7CiAgICAgICAgICAgICAgICBpZiAobmFtZSA9PT0gIkJsYWRkZXIiKSB7CiAgICAgICAgICAgICAgICAgIG5hbWUgPSAiVXJpbmFyeSBCbGFkZGVyIjsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIF9tYXRjaGVkID0gZ2V0TmVydmVOYW1lcyhuYW1lKTsKICAgICAgICAgICAgICAgICAgaWYgKF9tYXRjaGVkLmxlbmd0aCA+IDApIG5hbWUgPSBfbWF0Y2hlZFswXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgMTk6CiAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdCgicmV0dXJuIiwgewogICAgICAgICAgICAgICAgaWQ6IGlkLAogICAgICAgICAgICAgICAgbmFtZTogbmFtZQogICAgICAgICAgICAgIH0pOwogICAgICAgICAgICBjYXNlIDIwOgogICAgICAgICAgICBjYXNlICJlbmQiOgogICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7CiAgICAgICAgICB9CiAgICAgICAgfSwgX2NhbGxlZSwgdGhpcyk7CiAgICAgIH0pKTsKICAgICAgZnVuY3Rpb24gZ2V0TmFtZUFuZElkRnJvbVN5bmNEYXRhKF94KSB7CiAgICAgICAgcmV0dXJuIF9nZXROYW1lQW5kSWRGcm9tU3luY0RhdGEuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgfQogICAgICByZXR1cm4gZ2V0TmFtZUFuZElkRnJvbVN5bmNEYXRhOwogICAgfSgpLAogICAgZ2V0RGF0YXNldEFuYXRvbXlJbmZvOiBmdW5jdGlvbiBnZXREYXRhc2V0QW5hdG9teUluZm8oaWRlbnRpZmllcikgewogICAgICBmZXRjaCgiIi5jb25jYXQodGhpcy5hcGlMb2NhdGlvbiwgImRhdGFzZXRfaW5mby9hbmF0b215P2lkZW50aWZpZXI9IikuY29uY2F0KGlkZW50aWZpZXIpKS50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkgewogICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7CiAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHsKICAgICAgICB2YXIgcmVzdWx0UGF5bG9hZCA9IGRhdGEucmVzdWx0WzBdOwogICAgICAgIHZhciBtYXJrZXJDdXJpZTsKICAgICAgICB0cnkgewogICAgICAgICAgbWFya2VyQ3VyaWUgPSByZXN1bHRQYXlsb2FkLmFuYXRvbXkub3JnYW5bMF0uY3VyaWU7CiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgIG1hcmtlckN1cmllID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICB2YXIgbWFya2VyRG9pOwogICAgICAgIHRyeSB7CiAgICAgICAgICBtYXJrZXJEb2kgPSByZXN1bHRQYXlsb2FkLml0ZW0uY3VyaWU7CiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgIG1hcmtlckRvaSA9IHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgdmFyIG1hcmtlclNwZWNpZXM7CiAgICAgICAgdHJ5IHsKICAgICAgICAgIHZhciBpbmRleCA9IDA7CiAgICAgICAgICB2YXIgZm91bmQgPSBmYWxzZTsKICAgICAgICAgIHdoaWxlICghZm91bmQgJiYgaW5kZXggPCByZXN1bHRQYXlsb2FkLm9yZ2FuaXNtcy5zdWJqZWN0Lmxlbmd0aCkgewogICAgICAgICAgICB2YXIgZW50cnkgPSByZXN1bHRQYXlsb2FkLm9yZ2FuaXNtcy5zdWJqZWN0W2luZGV4XTsKICAgICAgICAgICAgaWYgKGVudHJ5LnNwZWNpZXMpIHsKICAgICAgICAgICAgICBtYXJrZXJTcGVjaWVzID0gZW50cnkuc3BlY2llcy5uYW1lOwogICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpbmRleCArPSAxOwogICAgICAgICAgfQogICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICBtYXJrZXJTcGVjaWVzID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICBzdG9yZS5jb21taXQoInNldHRpbmdzL3VwZGF0ZUZlYXR1cmVkTWFya2VyIiwgewogICAgICAgICAgaWRlbnRpZmllcjogaWRlbnRpZmllciwKICAgICAgICAgIG1hcmtlcjogbWFya2VyQ3VyaWUsCiAgICAgICAgICBkb2k6IG1hcmtlckRvaSwKICAgICAgICAgIHNwZWNpZXM6IG1hcmtlclNwZWNpZXMKICAgICAgICB9KTsKICAgICAgfSk7CiAgICB9LAogICAgLyoqCiAgICAgKiBHZXQgYSBsaXN0IG9mIGZlYXR1cmVkIGRhdGFzZXRzIHRvIGRpc3BsYXkuCiAgICAgKi8KICAgIGdldEZlYXR1cmVkRGF0YXNldHM6IGZ1bmN0aW9uIGdldEZlYXR1cmVkRGF0YXNldHMoKSB7CiAgICAgIHZhciBsb2NhbF90aGlzID0gdGhpczsKICAgICAgZm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TeW5jRGF0YShkYXRhKTsKICAgICAgICAgICAgY2FzZSAyOgogICAgICAgICAgICAgIGluZm8gPSBfY29udGV4dDIuc2VudDsKICAgICAgICAgICAgICBpZiAoZGF0YS5ldmVudFR5cGUgPT09ICJoaWdobGlnaHRlZCIpIHsKICAgICAgICAgICAgICAgIHRoaXMuaGlnaGxpZ2h0RmVhdHVyZXMoaW5mbyk7CiAgICAgICAgICAgICAgfSBlbHNlIGlmIChkYXRhLmV2ZW50VHlwZSA9PT0gInNlbGVjdGVkIikgewogICAgICAgICAgICAgICAgdGhpcy5kaXNwbGF5VG9vbHRpcChpbmZvKTsKICAgICAgICAgICAgICAgIC8vdGhpcy56b29tVG9GZWF0dXJlcyhpbmZvLCB0cnVlKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgNDoKICAgICAgICAgICAgY2FzZSAiZW5kIjoKICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQyLnN0b3AoKTsKICAgICAgICAgIH0KICAgICAgICB9LCBfY2FsbGVlMiwgdGhpcyk7CiAgICAgIH0pKTsKICAgICAgZnVuY3Rpb24gaGFuZGxlU3luY01vdXNlRXZlbnQoX3gyKSB7CiAgICAgICAgcmV0dXJuIF9oYW5kbGVTeW5jTW91c2VFdmVudC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICB9CiAgICAgIHJldHVybiBoYW5kbGVTeW5jTW91c2VFdmVudDsKICAgIH0oKSwKICAgIC8qKgogICAgICogSGFuZGxlIHN5bmMgcGFuIHpvb20gZXZlbnQKICAgICAqLwogICAgaGFuZGxlU3luY1Bhblpvb21FdmVudDogZnVuY3Rpb24gaGFuZGxlU3luY1Bhblpvb21FdmVudCgpIHsKICAgICAgcmV0dXJuOwogICAgfSwKICAgIGhpZ2hsaWdodEZlYXR1cmVzOiBmdW5jdGlvbiBoaWdobGlnaHRGZWF0dXJlcygpIHsKICAgICAgcmV0dXJuOwogICAgfSwKICAgIHJlY2VpdmVTeW5jaHJvbmlzZWRFdmVudDogZnVuY3Rpb24gKCkgewogICAgICB2YXIgX3JlY2VpdmVTeW5jaHJvbmlzZWRFdmVudCA9IF9hc3luY1RvR2VuZXJhdG9yKCAvKiNfX1BVUkVfXyovX3JlZ2VuZXJhdG9yUnVudGltZSgpLm1hcmsoZnVuY3Rpb24gX2NhbGxlZTMoZGF0YSkgewogICAgICAgIHZhciBpbmZvOwogICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lKCkud3JhcChmdW5jdGlvbiBfY2FsbGVlMyQoX2NvbnRleHQzKSB7CiAgICAgICAgICB3aGlsZSAoMSkgc3dpdGNoIChfY29udGV4dDMucHJldiA9IF9jb250ZXh0My5uZXh0KSB7CiAgICAgICAgICAgIGNhc2UgMDoKICAgICAgICAgICAgICBpZiAoIShkYXRhLnBhbmVJbmRleCAhPT0gdGhpcy5lbnRyeS5pZCkpIHsKICAgICAgICAgICAgICAgIF9jb250ZXh0My5uZXh0ID0gNDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAoZGF0YS5ldmVudFR5cGUgPT0gInBhblpvb20iKSB7CiAgICAgICAgICAgICAgICAvL3RoaXMuaGFuZGxlU3luY1Bhblpvb21FdmVudChkYXRhKTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVTeW5jTW91c2VFdmVudChkYXRhKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgX2NvbnRleHQzLm5leHQgPSA5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDQ6CiAgICAgICAgICAgICAgaWYgKCEoZGF0YS5ldmVudFR5cGUgPT0gInNlbGVjdGVkIikpIHsKICAgICAgICAgICAgICAgIF9jb250ZXh0My5uZXh0ID0gOTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBfY29udGV4dDMubmV4dCA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QYWlyW3Rlcm1zW2ldLmlkXSA9IHRlcm1zW2ldLm5hbWU7CiAgICAgIH0KICAgICAgaWYgKHRoaXMuYXBpTG9jYXRpb24pIHsKICAgICAgICBpZiAodGhpcy5fY29udHJvbGxlcikgdGhpcy5fY29udHJvbGxlci5hYm9ydCgpOwogICAgICAgIHRoaXMuX2NvbnRyb2xsZXIgPSBuZXcgQWJvcnRDb250cm9sbGVyKCk7CiAgICAgICAgdmFyIHNpZ25hbCA9IHRoaXMuX2NvbnRyb2xsZXIuc2lnbmFsOwogICAgICAgIGZldGNoKCIiLmNvbmNhdCh0aGlzLmFwaUxvY2F0aW9uLCAiZ2V0LW9yZ2FuLWN1cmllcyIpLCB7CiAgICAgICAgICBzaWduYWw6IHNpZ25hbAogICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKHJlc3BvbnNlKSB7CiAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpOwogICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHsKICAgICAgICAgIF90aGlzMi5fY29udHJvbGxlciA9IHVuZGVmaW5lZDsKICAgICAgICAgIGRhdGEudWJlcm9uLmFycmF5LmZvckVhY2goZnVuY3Rpb24gKHBhaXIpIHsKICAgICAgICAgICAgX3RoaXMyLmlkTmFtZVBhaXJbcGFpci5pZC50b1VwcGVyQ2FzZSgpXSA9IHBhaXIubmFtZS5jaGFyQXQoMCkudG9VcHBlckNhc2UoKSArIHBhaXIubmFtZS5zbGljZSgxKTsKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0pOwogICAgICB9CiAgICB9LAogICAgZmxhdG1hcE1hcmtlclpvb21VcGRhdGU6IGZ1bmN0aW9uIGZsYXRtYXBNYXJrZXJab29tVXBkYXRlKCkgewogICAgICByZXR1cm47CiAgICB9LAogICAgb25SZXNpemU6IGZ1bmN0aW9uIG9uUmVzaXplKCkgewogICAgICByZXR1cm47CiAgICB9LAogICAgc3RhcnRIZWxwOiBmdW5jdGlvbiBzdGFydEhlbHAoKSB7CiAgICAgIGlmICh0aGlzLmlzSW5IZWxwID09PSBmYWxzZSkgewogICAgICAgIHRoaXMuaGVscE1vZGUgPSB0cnVlOwogICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCJtb3VzZWRvd24iLCB0aGlzLmVuZEhlbHApOwogICAgICAgIHRoaXMuaXNJbkhlbHAgPSB0cnVlOwogICAgICB9CiAgICB9LAogICAgZW5kSGVscDogZnVuY3Rpb24gZW5kSGVscCgpIHsKICAgICAgdmFyIF90aGlzMyA9IHRoaXM7CiAgICAgIHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKCJtb3VzZWRvd24iLCB0aGlzLmVuZEhlbHApOwogICAgICB0aGlzLmhlbHBNb2RlID0gZmFsc2U7CiAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgewogICAgICAgIF90aGlzMy5pc0luSGVscCA9IGZhbHNlOwogICAgICB9LCAyMDApOwogICAgfQogIH0sCiAgZGF0YTogZnVuY3Rpb24gZGF0YSgpIHsKICAgIHJldHVybiB7CiAgICAgIGFwaUxvY2F0aW9uOiBwcm9jZXNzLmVudi5WVUVfQVBQX0FQSV9MT0NBVElPTiwKICAgICAgYWN0aXZlU3BlY2llczogIlJhdCIsCiAgICAgIHNjYWZmb2xkQ2FtZXJhOiB1bmRlZmluZWQsCiAgICAgIG1haW5TdHlsZTogewogICAgICAgIGhlaWdodDogdGhpcy5lbnRyeS5kYXRhc2V0VGl0bGUgPyAiY2FsYygxMDAlIC0gMzBweCkiIDogIjEwMCUiLAogICAgICAgIHdpZHRoOiAiMTAwJSIsCiAgICAgICAgYm90dG9tOiAiMHB4IgogICAgICB9LAogICAgICBoZWxwTW9kZTogZmFsc2UsCiAgICAgIGlkTmFtZVBhaXI6IHt9LAogICAgICBzY2FmZm9sZExvYWRlZDogZmFsc2UsCiAgICAgIGlzSW5IZWxwOiBmYWxzZQogICAgfTsKICB9LAogIGNyZWF0ZWQ6IGZ1bmN0aW9uIGNyZWF0ZWQoKSB7CiAgICB0aGlzLmZsYXRtYXBBUEkgPSB1bmRlZmluZWQ7CiAgICB0aGlzLmFwaUxvY2F0aW9uID0gdW5kZWZpbmVkOwogICAgaWYgKHN0b3JlLnN0YXRlLnNldHRpbmdzLmZsYXRtYXBBUEkpIHRoaXMuZmxhdG1hcEFQSSA9IHN0b3JlLnN0YXRlLnNldHRpbmdzLmZsYXRtYXBBUEk7CiAgICBpZiAoc3RvcmUuc3RhdGUuc2V0dGluZ3Muc3BhcmNBcGkpIHRoaXMuYXBpTG9jYXRpb24gPSBzdG9yZS5zdGF0ZS5zZXR0aW5ncy5zcGFyY0FwaTsKICB9Cn07"},{"version":3,"names":["getAvailableTermsForSpecies","getInteractiveAction","getNerveNames","getParentsRegion","EventBus","markerZoomLevels","store","capitalise","text","toUpperCase","substring","props","entry","Object","visible","type","Boolean","default","mouseHovered","computed","syncMode","state","splitFlow","mounted","_this","$on","startHelp","methods","toggleSyncMode","getState","undefined","openMap","$emit","updateWithViewUrl","search","searchSuggestions","resourceSelected","resource","resourceHasAction","returnedAction","action","fireResourceSelected","result","paneIndex","id","internalName","eventType","idNamePair","feature","models","label","hardcodedAnnotation","filter","mz","getters","term","h","keyword","length","replace","facet","facetPropPath","flatmap","$refs","multiflatmap","getCurrentFlatmap","mapImp","clearSearchResults","data","lastActionOnMarker","isVisible","slot","displayTooltip","getNameAndIdFromSyncData","_getNameAndIdFromSyncData","_asyncToGenerator","_regeneratorRuntime","mark","_callee","name","objects","matched","_matched","wrap","_callee$","_context","prev","next","scaffold","findObjectsWithGroupName","abrupt","fetch","concat","apiLocation","then","response","json","uberon","array","charAt","slice","stop","_x","apply","arguments","getDatasetAnatomyInfo","identifier","resultPayload","markerCurie","anatomy","organ","curie","error","markerDoi","item","markerSpecies","index","found","organisms","subject","species","commit","marker","doi","getFeaturedDatasets","local_this","identifiers","forEach","element","zoomToFeatures","handleSyncMouseEvent","_handleSyncMouseEvent","_callee2","info","_callee2$","_context2","sent","highlightFeatures","_x2","handleSyncPanZoomEvent","receiveSynchronisedEvent","_receiveSynchronisedEvent","_callee3","_callee3$","_context3","_x3","requestSynchronisedEvent","getAvailableTerms","_this2","terms","i","_controller","abort","AbortController","signal","pair","flatmapMarkerZoomUpdate","onResize","isInHelp","helpMode","window","addEventListener","endHelp","_this3","removeEventListener","setTimeout","process","env","VUE_APP_API_LOCATION","activeSpecies","scaffoldCamera","mainStyle","height","datasetTitle","width","bottom","scaffoldLoaded","created","flatmapAPI","settings","sparcApi"],"sources":["/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/mixins/ContentMixin.js"],"sourcesContent":["import {\n getAvailableTermsForSpecies,\n getInteractiveAction,\n getNerveNames,\n getParentsRegion,\n} from \"../components/SimulatedData.js\";\nimport EventBus from \"../components/EventBus\";\nimport markerZoomLevels from \"../components/markerZoomLevelsHardCoded.js\";\nimport store from \"../store\";\n\nfunction capitalise(text) {\n return text[0].toUpperCase() + text.substring(1)\n}\n\n/* eslint-disable no-alert, no-console */\nexport default {\n props: {\n /**\n * Object containing information for\n * the required viewing.\n */\n entry: Object,\n visible: {\n type: Boolean,\n default: true,\n },\n mouseHovered: {\n type: Boolean,\n default: false,\n },\n },\n computed: {\n syncMode() {\n return store.state.splitFlow.syncMode;\n },\n },\n mounted: function () {\n EventBus.$on(\"startHelp\", () => {\n this.startHelp();\n });\n },\n methods: {\n toggleSyncMode: function () {\n return;\n },\n getState: function () {\n return undefined;\n },\n openMap: function (type) {\n if (type === \"SYNC\") {\n this.toggleSyncMode();\n } else {\n EventBus.$emit(\"OpenNewMap\", type);\n }\n },\n updateWithViewUrl: function() {\n return;\n },\n /**\n * Perform a local search on this contentvuer\n */\n search: function () {\n return false;\n },\n /**\n * Get a list of search suggestions on this contentvuer\n */\n searchSuggestions: function () {\n return;\n },\n /**\n * Callback when the vuers emit a selected event.\n */\n resourceSelected: function (type, resource) {\n // Skip processing if resources already has actions\n if (this.resourceHasAction(resource)) {\n EventBus.$emit(\"PopoverActionClick\", resource);\n return;\n }\n\n let returnedAction = undefined;\n let action = \"none\";\n let fireResourceSelected = false;\n const result = {\n paneIndex: this.entry.id,\n type: type,\n resource: resource,\n internalName: undefined,\n eventType: undefined,\n };\n\n if (type == \"MultiFlatmap\" || type == \"Flatmap\") {\n result.internalName = this.idNamePair[resource.feature.models];\n if (resource.eventType == \"click\") {\n result.eventType = \"selected\";\n if (resource.feature.type == \"marker\") {\n let label = this.idNamePair[resource.feature.models];\n let hardcodedAnnotation = markerZoomLevels.filter(\n mz => mz.id === resource.feature.models\n );\n\n if (\n store.getters[\"settings/isFeaturedMarkerIdentifier\"](\n resource.feature.id\n )\n ) {\n // It is a featured dataset search for DOI.\n returnedAction = {\n type: \"Search\",\n term: store.getters[\"settings/featuredMarkerDoi\"](\n resource.feature.id\n ),\n };\n } else if (hardcodedAnnotation.filter(h => h.keyword).length > 0) {\n // if it matches our stored keywords, it is a keyword search\n // Keyword searches do not contain labels, so switch to keyword search if no label exists\n returnedAction = {\n type: \"Search\",\n term:\n \"http://purl.obolibrary.org/obo/\" +\n resource.feature.models.replace(\":\", \"_\"),\n };\n } else {\n // Facet search on anatomy if it is not a keyword search\n returnedAction = {\n type: \"Facet\",\n facet: label,\n facetPropPath: \"anatomy.organ.name\",\n term: \"Anatomical structure\",\n };\n }\n\n fireResourceSelected = true;\n if (type == \"MultiFlatmap\") {\n const flatmap =\n this.$refs.multiflatmap.getCurrentFlatmap().mapImp;\n flatmap.clearSearchResults();\n }\n } else if (resource.feature.type == \"feature\") {\n // Do no open scaffold in sync map\n if (this.syncMode) {\n fireResourceSelected = true;\n } else {\n action = \"scaffold\";\n }\n }\n } else if (resource.eventType == \"mouseenter\") {\n result.eventType = \"highlighted\";\n fireResourceSelected = true;\n }\n } else if (type == \"Scaffold\") {\n if (resource && resource[0]) {\n result.internalName = resource[0].data.id;\n // Facet search if marker is clicked\n if (resource[0].data.lastActionOnMarker === true) {\n returnedAction = {\n type: \"Facet\",\n facet: capitalise(resource[0].data.id),\n facetPropPath: \"anatomy.organ.name\",\n term: \"Anatomical structure\",\n };\n }\n }\n result.eventType = \"selected\";\n fireResourceSelected = true;\n action = \"search\";\n }\n if (returnedAction === undefined)\n returnedAction = getInteractiveAction(result, action);\n if (returnedAction) EventBus.$emit(\"PopoverActionClick\", returnedAction);\n if (fireResourceSelected) this.$emit(\"resource-selected\", result);\n },\n resourceHasAction: function (resource) {\n return (\n resource.type === \"URL\" ||\n resource.type === \"Search\" ||\n resource.type === \"Neuron Search\" ||\n resource.type == \"Facet\" ||\n resource.type == \"Facets\"\n );\n },\n /**\n * Check if this viewer is currently visible\n */\n isVisible: function () {\n let slot = store.getters[\"splitFlow/getSlotById\"](this.entry.id);\n if (slot) return store.getters[\"splitFlow/isSlotActive\"](slot);\n return false;\n },\n displayTooltip: function() {\n return;\n },\n /**\n * Get the term to zoom/highlight in a synchronisation event,\n * if it cannot be found in the map, it will perform several\n * calls to try to ge a valid name/id.\n */\n getNameAndIdFromSyncData: async function (data) {\n let name = data.internalName;\n if (name === undefined && data.resource) {\n name = data.resource.label;\n }\n let id = undefined;\n if (data.resource && data.resource.resource) {\n id = data.resource.resource[0];\n }\n if (this.entry.type === \"Scaffold\") {\n const objects = this.$refs.scaffold.findObjectsWithGroupName(name);\n // If a region is not found use a hardcoded list to determine\n // its parents region first\n if (objects.length === 0) {\n //Use nerve mapping\n if (data.resource && data.resource.feature) {\n matched = getNerveNames(data.resource.feature.models);\n if (matched.length > 0) return matched;\n }\n let matched = getParentsRegion(name);\n if (matched) {\n return matched;\n }\n // Hardcoded list failed - use an endpoint to find its parents\n if (id && data.eventType === \"selected\") {\n return fetch(`${this.apiLocation}get-related-terms/${id}`)\n .then(response => response.json())\n .then(data => {\n if (data.uberon.array.length > 0) {\n name =\n data.uberon.array[0].name.charAt(0).toUpperCase() +\n data.uberon.array[0].name.slice(1);\n id = data.uberon.array[0].id.toUpperCase();\n return { id, name };\n }\n });\n }\n }\n } else if (this.entry.type === \"MultiFlatmap\") {\n if (name === \"Bladder\") {\n name = \"Urinary Bladder\";\n } else {\n const matched = getNerveNames(name);\n if (matched.length > 0) name = matched[0];\n }\n }\n return { id, name };\n },\n getDatasetAnatomyInfo: function (identifier) {\n fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${identifier}`)\n .then(response => response.json())\n .then(data => {\n const resultPayload = data.result[0];\n let markerCurie;\n try {\n markerCurie = resultPayload.anatomy.organ[0].curie;\n } catch (error) {\n markerCurie = undefined;\n }\n let markerDoi;\n try {\n markerDoi = resultPayload.item.curie;\n } catch (error) {\n markerDoi = undefined;\n }\n let markerSpecies;\n try {\n let index = 0;\n let found = false;\n while (!found && index < resultPayload.organisms.subject.length) {\n const entry = resultPayload.organisms.subject[index];\n if (entry.species) {\n markerSpecies = entry.species.name;\n found = true;\n }\n index += 1;\n }\n } catch (error) {\n markerSpecies = undefined;\n }\n store.commit(\"settings/updateFeaturedMarker\", {\n identifier,\n marker: markerCurie,\n doi: markerDoi,\n species: markerSpecies,\n });\n });\n },\n /**\n * Get a list of featured datasets to display.\n */\n getFeaturedDatasets: function () {\n const local_this = this;\n fetch(`${this.apiLocation}get_featured_datasets_identifiers`)\n .then(response => response.json())\n .then(data => {\n store.commit(\"settings/updateFeatured\", data.identifiers);\n data.identifiers.forEach(element => {\n local_this.getDatasetAnatomyInfo(element);\n });\n });\n },\n zoomToFeatures: function () {\n return;\n },\n handleSyncMouseEvent: async function (data) {\n let info = await this.getNameAndIdFromSyncData(data);\n if (data.eventType === \"highlighted\") {\n this.highlightFeatures(info);\n } else if (data.eventType === \"selected\") {\n this.displayTooltip(info);\n //this.zoomToFeatures(info, true);\n }\n },\n /**\n * Handle sync pan zoom event\n */\n handleSyncPanZoomEvent: function () {\n return;\n },\n highlightFeatures: function () {\n return;\n },\n receiveSynchronisedEvent: async function (data) {\n if (data.paneIndex !== this.entry.id) {\n if (data.eventType == \"panZoom\") {\n //this.handleSyncPanZoomEvent(data);\n } else {\n this.handleSyncMouseEvent(data);\n }\n } else {\n if (data.eventType == \"selected\") {\n let info = await this.getNameAndIdFromSyncData(data);\n this.zoomToFeatures(info, false);\n }\n }\n },\n requestSynchronisedEvent: function () {\n return;\n },\n getAvailableTerms: function () {\n //Use the default list of uberons before we get the list from\n //the api\n let terms = getAvailableTermsForSpecies();\n for (let i = 0; i < terms.length; i++) {\n this.idNamePair[terms[i].id] = terms[i].name;\n }\n if (this.apiLocation) {\n if (this._controller) this._controller.abort();\n this._controller = new AbortController();\n let signal = this._controller.signal;\n fetch(`${this.apiLocation}get-organ-curies`, {\n signal,\n })\n .then(response => response.json())\n .then(data => {\n this._controller = undefined;\n data.uberon.array.forEach(pair => {\n this.idNamePair[pair.id.toUpperCase()] =\n pair.name.charAt(0).toUpperCase() + pair.name.slice(1);\n });\n return;\n });\n }\n },\n flatmapMarkerZoomUpdate() {\n return;\n },\n onResize: function () {\n return;\n },\n startHelp: function () {\n if (this.isInHelp === false) {\n this.helpMode = true;\n window.addEventListener(\"mousedown\", this.endHelp);\n this.isInHelp = true;\n }\n },\n endHelp: function () {\n window.removeEventListener(\"mousedown\", this.endHelp);\n this.helpMode = false;\n setTimeout(() => {\n this.isInHelp = false;\n }, 200);\n },\n },\n data: function () {\n return {\n apiLocation: process.env.VUE_APP_API_LOCATION,\n activeSpecies: \"Rat\",\n scaffoldCamera: undefined,\n mainStyle: {\n height: this.entry.datasetTitle ? \"calc(100% - 30px)\" : \"100%\",\n width: \"100%\",\n bottom: \"0px\",\n },\n helpMode: false,\n idNamePair: {},\n scaffoldLoaded: false,\n isInHelp: false,\n };\n },\n created: function () {\n this.flatmapAPI = undefined;\n this.apiLocation = undefined;\n if (store.state.settings.flatmapAPI)\n this.flatmapAPI = store.state.settings.flatmapAPI;\n if (store.state.settings.sparcApi)\n this.apiLocation = store.state.settings.sparcApi;\n },\n};\n"],"mappings":";;;;;;;;;;AAAA,SACEA,2BAA2B,EAC3BC,oBAAoB,EACpBC,aAAa,EACbC,gBAAgB,QAC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