{"remainingRequest":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/thread-loader/dist/cjs.js!/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":1702265337638},{"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/thread-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:aW1wb3J0IF9yZWdlbmVyYXRvclJ1bnRpbWUgZnJvbSAiL2hvbWUvY21pc3MvSmVua2lucy93b3Jrc3BhY2UvbWFwaW50ZWdyYXRlZHZ1ZXIvbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL3JlZ2VuZXJhdG9yUnVudGltZS5qcyI7CmltcG9ydCBfYXN5bmNUb0dlbmVyYXRvciBmcm9tICIvaG9tZS9jbWlzcy9KZW5raW5zL3dvcmtzcGFjZS9tYXBpbnRlZ3JhdGVkdnVlci9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9lc20vYXN5bmNUb0dlbmVyYXRvci5qcyI7CmltcG9ydCAiY29yZS1qcy9tb2R1bGVzL2VzLmFycmF5LmZpbHRlci5qcyI7CmltcG9ydCAiY29yZ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ogcmVzb3VyY2UsCiAgICAgICAgaW50ZXJuYWxOYW1lOiB1bmRlZmluZWQsCiAgICAgICAgZXZlbnRUeXBlOiB1bmRlZmluZWQKICAgICAgfTsKICAgICAgaWYgKHR5cGUgPT0gIk11bHRpRmxhdG1hcCIgfHwgdHlwZSA9PSAiRmxhdG1hcCIpIHsKICAgICAgICByZXN1bHQuaW50ZXJuYWxOYW1lID0gdGhpcy5pZE5hbWVQYWlyW3Jlc291cmNlLmZlYXR1cmUubW9kZWxzXTsKICAgICAgICBpZiAocmVzb3VyY2UuZXZlbnRUeXBlID09ICJjbGljayIpIHsKICAgICAgICAgIHJlc3VsdC5ldmVudFR5cGUgPSAic2VsZWN0ZWQiOwogICAgICAgICAgaWYgKHJlc291cmNlLmZlYXR1cmUudHlwZSA9PSAibWFya2VyIikgewogICAgICAgICAgICB2YXIgbGFiZWwgPSB0aGlzLmlkTmFtZVBhaXJbcmVzb3VyY2UuZmVhdHVyZS5tb2RlbHNdOwogICAgICAgICAgICB2YXIgaGFyZGNvZGVkQW5ub3RhdGlvbiA9IG1hcmtlclpvb21MZXZlbHMuZmlsdGVyKGZ1bmN0aW9uIChteikgewogICAgICAgICAgICAgIHJldHVybiBtei5pZCA9PT0gcmVzb3VyY2UuZmVhdHVyZS5tb2RlbHM7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoc3RvcmUuZ2V0dGVyc1sic2V0dGluZ3MvaXNGZWF0dXJlZE1hcmtlcklkZW50aWZpZXIiXShyZXNvdXJjZS5mZWF0dXJlLmlkKSkgewogICAgICAgICAgICAgIC8vIEl0IGlzIGEgZmVhdHVyZWQgZGF0YXNldCBzZWFyY2ggZm9yIERPSS4KICAgICAgICAgICAgICByZXR1cm5lZEFjdGlvbiA9IHsKICAgICAgICAgICAgICAgIHR5cGU6ICJTZWFyY2giLAogICAgICAgICAgICAgICAgdGVybTogc3RvcmUuZ2V0dGVyc1sic2V0dGluZ3MvZmVhdHVyZWRNYXJrZXJEb2kiXShyZXNvdXJjZS5mZWF0dXJlLmlkKQogICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0gZWxzZSBpZiAoaGFyZGNvZGVkQW5ub3RhdGlvbi5maWx0ZXIoZnVuY3Rpb24gKGgpIHsKICAgICAgICAgICAgICByZXR1cm4gaC5rZXl3b3JkOwogICAgICAgICAgICB9KS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgLy8gaWYgaXQgbWF0Y2hlcyBvdXIgc3RvcmVkIGtleXdvcmRzLCBpdCBpcyBhIGtleXdvcmQgc2VhcmNoCiAgICAgICAgICAgICAgLy8gS2V5d29yZCBzZWFyY2hlcyBkbyBub3QgY29udGFpbiBsYWJlbHMsIHNvIHN3aXRjaCB0byBrZXl3b3JkIHNlYXJjaCBpZiBubyBsYWJlbCBleGlzdHMKICAgICAgICAgICAgICByZXR1cm5lZEFjdGlvbiA9IHsKICAgICAgICAgICAgICAgIHR5cGU6ICJTZWFyY2giLAogICAgICAgICAgICAgICAgdGVybTogImh0dHA6Ly9wdXJsLm9ib2xpYnJhcnkub3JnL29iby8iICsgcmVzb3VyY2UuZmVhdHVyZS5tb2RlbHMucmVwbGFjZSgiOiIsICJfIikKICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIC8vIEZhY2V0IHNlYXJjaCBvbiBhbmF0b215IGlmIGl0IGlzIG5vdCBhIGtleXdvcmQgc2VhcmNoCiAgICAgICAgICAgICAgcmV0dXJuZWRBY3Rpb24gPSB7CiAgICAgICAgICAgICAgICB0eXBlOiAiRmFjZXQiLAogICAgICAgICAgICAgICAgZmFjZXQ6IGxhYmVsLAogICAgICAgICAgICAgICAgZmFjZXRQcm9wUGF0aDogImFuYXRvbXkub3JnYW4uY2F0ZWdvcnkubmFtZSIsCiAgICAgICAgICAgICAgICB0ZXJtOiAiQW5hdG9taWNhbCBzdHJ1Y3R1cmUiCiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmaXJlUmVzb3VyY2VTZWxlY3RlZCA9IHRydWU7CiAgICAgICAgICAgIGlmICh0eXBlID09ICJNdWx0aUZsYXRtYXAiKSB7CiAgICAgICAgICAgICAgdmFyIGZsYXRtYXAgPSB0aGlzLiRyZWZzLm11bHRpZmxhdG1hcC5nZXRDdXJyZW50RmxhdG1hcCgpLm1hcEltcDsKICAgICAgICAgICAgICBmbGF0bWFwLmNsZWFyU2VhcmNoUmVzdWx0cygpOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgaWYgKHJlc291cmNlLmZlYXR1cmUudHlwZSA9PSAiZmVhdHVyZSIpIHsKICAgICAgICAgICAgLy8gRG8gbm8gb3BlbiBzY2FmZm9sZCBpbiBzeW5jIG1hcAogICAgICAgICAgICBpZiAodGhpcy5zeW5jTW9kZSkgewogICAgICAgICAgICAgIGZpcmVSZXNvdXJjZVNlbGVjdGVkID0gdHJ1ZTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBhY3Rpb24gPSAic2NhZmZvbGQiOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChyZXNvdXJjZS5ldmVudFR5cGUgPT0gIm1vdXNlZW50ZXIiKSB7CiAgICAgICAgICByZXN1bHQuZXZlbnRUeXBlID0gImhpZ2hsaWdodGVkIjsKICAgICAgICAgIGZpcmVSZXNvdXJjZVNlbGVjdGVkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgIH0gZWxzZSBpZiAodHlwZSA9PSAiU2NhZmZvbGQiKSB7CiAgICAgICAgaWYgKHJlc291cmNlICYmIHJlc291cmNlWzBdKSB7CiAgICAgICAgICByZXN1bHQuaW50ZXJuYWxOYW1lID0gcmVzb3VyY2VbMF0uZGF0YS5pZDsKICAgICAgICAgIC8vIEZhY2V0IHNlYXJjaCBpZiBtYXJrZXIgaXMgY2xpY2tlZAogICAgICAgICAgaWYgKHJlc291cmNlWzBdLmRhdGEubGFzdEFjdGlvbk9uTWFya2VyID09PSB0cnVlKSB7CiAgICAgICAgICAgIHJldHVybmVkQWN0aW9uID0gewogICAgICAgICAgICAgIHR5cGU6ICJGYWNldCIsCiAgICAgICAgICAgICAgZmFjZXQ6IGNhcGl0YWxpc2UocmVzb3VyY2VbMF0uZGF0YS5pZCksCiAgICAgICAgICAgICAgZmFjZXRQcm9wUGF0aDogImFuYXRvbXkub3JnYW4uY2F0ZWdvcnkubmFtZSIsCiAgICAgICAgICAgICAgdGVybTogIkFuYXRvbWljYWwgc3RydWN0dXJlIgogICAgICAgICAgICB9OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXN1bHQuZXZlbnRUeXBlID0gInNlbGVjdGVkIjsKICAgICAgICBmaXJlUmVzb3VyY2VTZWxlY3RlZCA9IHRydWU7CiAgICAgICAgYWN0aW9uID0gInNlYXJjaCI7CiAgICAgIH0KICAgICAgaWYgKHJldHVybmVkQWN0aW9uID09PSB1bmRlZmluZWQgJiYgYXVnbWVudGVkKSB7CiAgICAgICAgcmV0dXJuZWRBY3Rpb24gPSBnZXRJbnRlcmFjdGl2ZUFjdGlvbihyZXN1bHQsIGFjdGlvbik7CiAgICAgIH0KICAgICAgaWYgKHJldHVybmVkQWN0aW9uKSBFdmVudEJ1cy4kZW1pdCgiUG9wb3ZlckFjdGlvbkNsaWNrIiwgcmV0dXJuZWRBY3Rpb24pOwogICAgICBpZiAoZmlyZVJlc291cmNlU2VsZWN0ZWQpIHRoaXMuJGVtaXQoInJlc291cmNlLXNlbGVjdGVkIiwgcmVzdWx0KTsKICAgIH0sCiAgICByZXNvdXJjZUhhc0FjdGlvbjogZnVuY3Rpb24gcmVzb3VyY2VIYXNBY3Rpb24ocmVzb3VyY2UpIHsKICAgICAgcmV0dXJuIHJlc291cmNlLnR5cGUgPT09ICJVUkwiIHx8IHJlc291cmNlLnR5cGUgPT09ICJTZWFyY2giIHx8IHJlc291cmNlLnR5cGUgPT09ICJOZXVyb24gU2VhcmNoIiB8fCByZXNvdXJj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b250ZXh0KSB7CiAgICAgICAgICB3aGlsZSAoMSkgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkgewogICAgICAgICAgICBjYXNlIDA6CiAgICAgICAgICAgICAgbmFtZSA9IGRhdGEuaW50ZXJuYWxOYW1lOwogICAgICAgICAgICAgIGlmIChuYW1lID09PSB1bmRlZmluZWQgJiYgZGF0YS5yZXNvdXJjZSkgewogICAgICAgICAgICAgICAgbmFtZSA9IGRhdGEucmVzb3VyY2UubGFiZWw7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGlkID0gdW5kZWZpbmVkOwogICAgICAgICAgICAgIGlmIChkYXRhLnJlc291cmNlICYmIGRhdGEucmVzb3VyY2UucmVzb3VyY2UpIHsKICAgICAgICAgICAgICAgIGlkID0gZGF0YS5yZXNvdXJjZS5yZXNvdXJjZVswXTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKCEodGhpcy5lbnRyeS50eXBlID09PSAiU2NhZmZvbGQiKSkgewogICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDE4OwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIG9iamVjdHMgPSB0aGlzLiRyZWZzLnNjYWZmb2xkLmZpbmRPYmplY3RzV2l0aEdyb3VwTmFtZShuYW1lKTsgLy8gSWYgYSByZWdpb24gaXMgbm90IGZvdW5kIHVzZSBhIGhhcmRjb2RlZCBsaXN0IHRvIGRldGVybWluZQogICAgICAgICAgICAgIC8vIGl0cyBwYXJlbnRzIHJlZ2lvbiBmaXJzdAogICAgICAgICAgICAgIGlmICghKG9iamVjdHMubGVuZ3RoID09PSAwKSkgewogICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDE2OwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGlmICghKGRhdGEucmVzb3VyY2UgJiYgZGF0YS5yZXNvdXJjZS5mZWF0dXJlKSkgewogICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDExOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIG1hdGNoZWQgPSBnZXROZXJ2ZU5hbWVzKGRhdGEucmVzb3VyY2UuZmVhdHVyZS5tb2RlbHMpOwogICAgICAgICAgICAgIGlmICghKG1hdGNoZWQubGVuZ3RoID4gMCkpIHsKICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxMTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KCJyZXR1cm4iLCBtYXRjaGVkKTsKICAgICAgICAgICAgY2FzZSAxMToKICAgICAgICAgICAgICBtYXRjaGVkID0gZ2V0UGFyZW50c1JlZ2lvbihuYW1lKTsKICAgICAgICAgICAgICBpZiAoIW1hdGNoZWQpIHsKICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxNDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KCJyZXR1cm4iLCBtYXRjaGVkKTsKICAgICAgICAgICAgY2FzZSAxNDoKICAgICAgICAgICAgICBpZiAoIShpZCAmJiBkYXRhLmV2ZW50VHlwZSA9PT0gInNlbGVjdGVkIikpIHsKICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxNjsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KCJyZXR1cm4iLCBmZXRjaCgiIi5jb25jYXQodGhpcy5hcGlMb2NhdGlvbiwgImdldC1yZWxhdGVkLXRlcm1zLyIpLmNvbmNhdChpZCkpLnRoZW4oZnVuY3Rpb24gKHJlc3BvbnNlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpOwogICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHsKICAgICAgICAgICAgICAgIGlmIChkYXRhLnViZXJvbi5hcnJheS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgIG5hbWUgPSBkYXRhLnViZXJvbi5hcnJheVswXS5uYW1lLmNoYXJBdCgwKS50b1VwcGVyQ2FzZSgpICsgZGF0YS51YmVyb24uYXJyYXlbMF0ubmFtZS5zbGljZSgxKTsKICAgICAgICAgICAgICAgICAgaWQgPSBkYXRhLnViZXJvbi5hcnJheVswXS5pZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGlkOiBpZCwKICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lCiAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBjYXNlIDE2OgogICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxOTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAxODoKICAgICAgICAgICAgICBpZiAodGhpcy5lbnRyeS50eXBlID09PSAiTXVsdGlGbGF0bWFwIikgewogICAgICAgICAgICAgICAgaWYgKG5hbWUgPT09ICJCbGFkZGVyIikgewogICAgICAgICAgICAgICAgICBuYW1lID0gIlVyaW5hcnkgQmxhZGRlciI7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICBfbWF0Y2hlZCA9IGdldE5lcnZlTmFtZXMobmFtZSk7CiAgICAgICAgICAgICAgICAgIGlmIChfbWF0Y2hlZC5sZW5ndGggPiAwKSBuYW1lID0gX21hdGNoZWRbMF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIDE5OgogICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoInJldHVybiIsIHsKICAgICAgICAgICAgICAgIGlkOiBpZCwKICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUKICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgY2FzZSAyMDoKICAgICAgICAgICAgY2FzZSAiZW5kIjoKICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuc3RvcCgpOwogICAgICAgICAgfQogICAgICAgIH0sIF9jYWxsZWUsIHRoaXMpOwogICAgICB9KSk7CiAgICAgIGZ1bmN0aW9uIGdldE5hbWVBbmRJZEZyb21TeW5jRGF0YShfeCkgewogICAgICAgIHJldHVybiBfZ2V0TmFtZUFuZElkRnJvbVN5bmNEYXRhLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CiAgICAgIH0KICAgICAgcmV0dXJuIGdldE5hbWVBbmRJZEZyb21TeW5jRGF0YTsKICAgIH0oKSwKICAgIGdldERhdGFzZXRBbmF0b215SW5mbzogZnVuY3Rpb24gZ2V0RGF0YXNldEFuYXRvbXlJbmZvKGlkZW50aWZpZXIpIHsKICAgICAgZmV0Y2goIiIuY29uY2F0KHRoaXMuYXBpTG9jYXRpb24sICJkYXRhc2V0X2luZm8vYW5hdG9teT9pZGVudGlmaWVyPSIpLmNvbmNhdChpZGVudGlmaWVyKSkudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHsKICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpOwogICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7CiAgICAgICAgdmFyIHJlc3VsdFBheWxvYWQgPSBkYXRhLnJlc3VsdFswXTsKICAgICAgICB2YXIgbWFya2VyQ3VyaWU7CiAgICAgICAgdHJ5IHsKICAgICAgICAgIG1hcmtlckN1cmllID0gcmVzdWx0UGF5bG9hZC5hbmF0b215Lm9yZ2FuWzBdLmN1cmllOwogICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICBtYXJrZXJDdXJpZSA9IHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgdmFyIG1hcmtlckRvaTsKICAgICAgICB0cnkgewogICAgICAgICAgbWFya2VyRG9pID0gcmVzdWx0UGF5bG9hZC5pdGVtLmN1cmllOwogICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICBtYXJrZXJEb2kgPSB1bmRlZmluZWQ7CiAgICAgICAgfQogICAgICAgIHZhciBtYXJrZXJTcGVjaWVzOwogICAgICAgIHRyeSB7CiAgICAgICAgICB2YXIgaW5kZXggPSAwOwogICAgICAgICAgdmFyIGZvdW5kID0gZmFsc2U7CiAgICAgICAgICB3aGlsZSAoIWZvdW5kICYmIGluZGV4IDwgcmVzdWx0UGF5bG9hZC5vcmdhbmlzbXMuc3ViamVjdC5sZW5ndGgpIHsKICAgICAgICAgICAgdmFyIGVudHJ5ID0gcmVzdWx0UGF5bG9hZC5vcmdhbmlzbXMuc3ViamVjdFtpbmRleF07CiAgICAgICAgICAgIGlmIChlbnRyeS5zcGVjaWVzKSB7CiAgICAgICAgICAgICAgbWFya2VyU3BlY2llcyA9IGVudHJ5LnNwZWNpZXMubmFtZTsKICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaW5kZXggKz0gMTsKICAgICAgICAgIH0KICAgICAgICB9IGNhdGNoIChlcnJvcikgewogICAgICAgICAgbWFya2VyU3BlY2llcyA9IHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgc3RvcmUuY29tbWl0KCJzZXR0aW5ncy91cGRhdGVGZWF0dXJlZE1hcmtlciIsIHsKICAgICAgICAgIGlkZW50aWZpZXI6IGlkZW50aWZpZXIsCiAgICAgICAgICBtYXJrZXI6IG1hcmtlckN1cmllLAogICAgICAgICAgZG9pOiBtYXJrZXJEb2ksCiAgICAgICAgICBzcGVjaWVzOiBtYXJrZXJTcGVjaWVzCiAgICAgICAgfSk7CiAgICAgIH0pOwogICAgfSwKICAgIC8qKgogICAgICogR2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dDIpIHsKICAgICAgICAgIHdoaWxlICgxKSBzd2l0Y2ggKF9jb250ZXh0Mi5wcmV2ID0gX2NvbnRleHQyLm5leHQpIHsKICAgICAgICAgICAgY2FzZSAwOgogICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMjsKICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXROYW1lQW5kSWRGcm9tU3luY0RhdGEoZGF0YSk7CiAgICAgICAgICAgIGNhc2UgMjoKICAgICAgICAgICAgICBpbmZvID0gX2NvbnRleHQyLnNlbnQ7CiAgICAgICAgICAgICAgaWYgKGRhdGEuZXZlbnRUeXBlID09PSAiaGlnaGxpZ2h0ZWQiKSB7CiAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodEZlYXR1cmVzKGluZm8pOwogICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGF0YS5ldmVudFR5cGUgPT09ICJzZWxlY3RlZCIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGlzcGxheVRvb2x0aXAoaW5mbyk7CiAgICAgICAgICAgICAgICAvL3RoaXMuem9vbVRvRmVhdHVyZXMoaW5mbywgdHJ1ZSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIDQ6CiAgICAgICAgICAgIGNhc2UgImVuZCI6CiAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5zdG9wKCk7CiAgICAgICAgICB9CiAgICAgICAgfSwgX2NhbGxlZTIsIHRoaXMpOwogICAgICB9KSk7CiAgICAgIGZ1bmN0aW9uIGhhbmRsZVN5bmNNb3VzZUV2ZW50KF94MikgewogICAgICAgIHJldHVybiBfaGFuZGxlU3luY01vdXNlRXZlbnQuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgfQogICAgICByZXR1cm4gaGFuZGxlU3luY01vdXNlRXZlbnQ7CiAgICB9KCksCiAgICAvKioKICAgICAqIEhhbmRsZSBzeW5jIHBhbiB6b29tIGV2ZW50CiAgICAgKi8KICAgIGhhbmRsZVN5bmNQYW5ab29tRXZlbnQ6IGZ1bmN0aW9uIGhhbmRsZVN5bmNQYW5ab29tRXZlbnQoKSB7CiAgICAgIHJldHVybjsKICAgIH0sCiAgICBoaWdobGlnaHRGZWF0dXJlczogZnVuY3Rpb24gaGlnaGxpZ2h0RmVhdHVyZXMoKSB7CiAgICAgIHJldHVybjsKICAgIH0sCiAgICByZWNlaXZlU3luY2hyb25pc2VkRXZlbnQ6IGZ1bmN0aW9uICgpIHsKICAgICAgdmFyIF9yZWNlaXZlU3luY2hyb25pc2VkRXZlbnQgPSBfYXN5bmNUb0dlbmVyYXRvciggLyojX19QVVJFX18qL19yZWdlbmVyYXRvclJ1bnRpbWUoKS5tYXJrKGZ1bmN0aW9uIF9jYWxsZWUzKGRhdGEpIHsKICAgICAgICB2YXIgaW5mbzsKICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZSgpLndyYXAoZnVuY3Rpb24gX2NhbGxlZTMkKF9jb250ZXh0MykgewogICAgICAgICAgd2hpbGUgKDEpIHN3aXRjaCAoX2NvbnRleHQzLnByZXYgPSBfY29udGV4dDMubmV4dCkgewogICAgICAgICAgICBjYXNlIDA6CiAgICAgICAgICAgICAgaWYgKCEoZGF0YS5wYW5lSW5kZXggIT09IHRoaXMuZW50cnkuaWQpKSB7CiAgICAgICAgICAgICAgICBfY29udGV4dDMubmV4dCA9IDQ7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKGRhdGEuZXZlbnRUeXBlID09ICJwYW5ab29tIikgewogICAgICAgICAgICAgICAgLy90aGlzLmhhbmRsZVN5bmNQYW5ab29tRXZlbnQoZGF0YSk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlU3luY01vdXNlRXZlbnQoZGF0YSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIF9jb250ZXh0My5uZXh0ID0gOTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA0OgogICAgICAgICAgICAgIGlmICghKGRhdGEuZXZlbnRUeXBlID09ICJzZWxlY3RlZCIpKSB7CiAgICAgICAgICAgICAgICBfY29udGV4dDMubmV4dCA9IDk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgX2NvbnRleHQzLm5leHQgPSA3OwogICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldE5hbWVBbmRJZEZyb21TeW5jRGF0YShkYXRhKTsKICAgICAgICAgICAgY2FzZSA3OgogICAgICAgICAgICAgIGluZm8gPSBfY29udGV4dDMuc2VudDsKICAgICAgICAgICAgICB0aGlzLnpvb21Ub0ZlYXR1cmVzKGluZm8sIGZhbHNlKTsKICAgICAgICAgICAgY2FzZSA5OgogICAgICAgICAgICBjYXNlICJlbmQiOgogICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDMuc3RvcCgpOwogICAgICAgICAgfQogICAgICAgIH0sIF9jYWxsZWUzLCB0aGlzKTsKICAgICAgfSkpOwogICAgICBmdW5jdGlvbiByZWNlaXZlU3luY2hyb25pc2VkRXZlbnQoX3gzKSB7CiAgICAgICAgcmV0dXJuIF9yZWNlaXZlU3luY2hyb25pc2VkRXZlbnQuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgfQogICAgICByZXR1cm4gcmVjZWl2ZVN5bmNocm9uaXNlZEV2ZW50OwogICAgfSgpLAogICAgcmVxdWVzdFN5bmNocm9uaXNlZEV2ZW50OiBmdW5jdGlvbiByZXF1ZXN0U3luY2hyb25pc2VkRXZlbnQoKSB7CiAgICAgIHJldHVybjsKICAgIH0sCiAgICBnZXRBdmFpbGFibGVUZXJtczogZnVuY3Rpb24gZ2V0QXZhaWxhYmxlVGVybXMoKSB7CiAgICAgIHZhciBfdGhpczIgPSB0aGlzOwogICAgICAvL1VzZSB0aGUgZGVmYXVsdCBsaXN0IG9mIHViZXJvbnMgYm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gpIiA6ICIxMDAlIiwKICAgICAgICB3aWR0aDogIjEwMCUiLAogICAgICAgIGJvdHRvbTogIjBweCIKICAgICAgfSwKICAgICAgaGVscE1vZGU6IGZhbHNlLAogICAgICBpZE5hbWVQYWlyOiB7fSwKICAgICAgc2NhZmZvbGRMb2FkZWQ6IGZhbHNlLAogICAgICBpc0luSGVscDogZmFsc2UKICAgIH07CiAgfSwKICBjcmVhdGVkOiBmdW5jdGlvbiBjcmVhdGVkKCkgewogICAgdGhpcy5mbGF0bWFwQVBJID0gdW5kZWZpbmVkOwogICAgdGhpcy5hcGlMb2NhdGlvbiA9IHVuZGVmaW5lZDsKICAgIGlmIChzdG9yZS5zdGF0ZS5zZXR0aW5ncy5mbGF0bWFwQVBJKSB0aGlzLmZsYXRtYXBBUEkgPSBzdG9yZS5zdGF0ZS5zZXR0aW5ncy5mbGF0bWFwQVBJOwogICAgaWYgKHN0b3JlLnN0YXRlLnNldHRpbmdzLnNwYXJjQXBpKSB0aGlzLmFwaUxvY2F0aW9uID0gc3RvcmUuc3RhdGUuc2V0dGluZ3Muc3BhcmNBcGk7CiAgfQp9Ow=="},{"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","augmented","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","paneName","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, augmented) {\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.category.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.category.name\",\n term: \"Anatomical structure\",\n };\n }\n }\n result.eventType = \"selected\";\n fireResourceSelected = true;\n action = \"search\";\n }\n if ((returnedAction === undefined) && augmented) {\n returnedAction = getInteractiveAction(result, action);\n }\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 const paneName = store.getters[\"splitFlow/getPaneNameById\"](this.entry.id);\n return paneName !== undefined;\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,QACX,gCAAgC;AACvC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,gBAAgB,MAAM,4CAA4C;AACzE,OAAOC,KAAK,MAAM,UAAU;AAE5B,SAASC,UAAUA,CAACC,IAAI,EAAE;EACxB,OAAOA,IAAI,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGD,IAAI,CAACE,SAAS,CAAC,CAAC,CAAC;AAClD;;AAEA;AACA,eAAe;EACbC,KAAK,EAAE;IACL;AACJ;AACA;AACA;IACIC,KAAK,EAAEC,MAAM;IACbC,OAAO,EAAE;MACPC,IAAI,EAAEC,OAAO;MACbC,OAAO,EAAE;IACX,CAAC;IACDC,YAAY,EAAE;MACZH,IAAI,EAAEC,OAAO;MACbC,OAAO,EAAE;IACX;EACF,CAAC;EACDE,QAAQ,EAAE;IACRC,QAAQ,WAAAA,SAAA,EAAG;MACT,OAAOd,KAAK,CAACe,KAAK,CAACC,SAAS,CAACF,QAAQ;IACvC;EACF,CAAC;EACDG,OAAO,EAAE,SAAAA,QAAA,EAAY;IAAA,IAAAC,KAAA;IACnBpB,QAAQ,CAACqB,GAAG,CAAC,WAAW,EAAE,YAAM;MAC9BD,KAAI,CAACE,SAAS,EAAE;IAClB,CAAC,CAAC;EACJ,CAAC;EACDC,OAAO,EAAE;IACPC,cAAc,EAAE,SAAAA,eAAA,EAAY;MAC1B;IACF,CAAC;IACDC,QAAQ,EAAE,SAAAA,SAAA,EAAY;MACpB,OAAOC,SAAS;IAClB,CAAC;IACDC,OAAO,EAAE,SAAAA,QAAUhB,IAAI,EAAE;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