xiaomianao666

插件名:global_懒人包

Jun 25th, 2023
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_懒人包@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDmh5LkurrkuJPnlKjvvIzlhajnvZHop4bpopHlhY3otLnnoLTop6Pljrvlub/lkYrjgIHlhajnvZHpn7PkuZDnm7TmjqXkuIvovb3jgIHnn6XkuY7lop7lvLrjgIHnn63op4bpopHml6DmsLTljbDkuIvovb3jgIHnmb7luqbnvZHnm5jnm7TmjqXkuIvovb3nrYnlpJrlip/og73lt6XlhbfnrrHvvIzlip/og73lj6/ni6znq4vlvIDlhbPjgILplb/mnJ/mm7TmlrDvvIzmlL7lv4Pkvb/nlKjjgIJ2NgovLyBAbmFtZXNwYWNlIAkgbGFuaGFoYQovLyBAdmVyc2lvbiAgICAgIDYuNy45Ci8vIEBkZXNjcmlwdGlvbiAg6Ieq55So5aSa5Yqf6IO96ISa5pys5bel5YW3566x77yM5a6M5YWo5YWN6LS544CB5peg5bm/5ZGK44CB5peg6ZyA5YWz5rOo5YWs5LyX5Y+377yM6ZuG5ZCI5LqG5LyY6YW344CB54ix5aWH6Im644CB6IW+6K6v44CBQuermShiaWxpYmlsaSnjgIHoipLmnpznrYnlhajnvZHop4bpopEoUEMr56e75Yqo56uvKeWFjei0ueegtOino+WOu+W5v+WRiu+8jOe9keaYk+S6kemfs+S5kOOAgVFR6Z+z5LmQ44CB6YW354uX44CB6YW35oiR44CB6Jm+57Gz44CB6Jy76JyTRk3jgIHojZTmnp1GTeOAgeWWnOmprOaLiembheetiee9keermemfs+S5kOWSjOacieWjsOS5pumfs+mikeWFjeWuouaIt+err+S4i+i9ve+8jOefpeS5juWinuW8uijnn6XkuY7op4bpopHkuIvovb3jgIHljrvlub/lkYrjgIHlhbPplK7or43lsY/olL3jgIHljrvpmaTkvqfovrnmoI/nrYkp77yM6KeG6aK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uYW1lLGN2YWx1ZSxleGRheXMpewogCiAgICAgICAgICAgIHZhciBkID0gbmV3IERhdGUoKTsKIAogICAgICAgICAgICBkLnNldFRpbWUoZC5nZXRUaW1lKCkrKGV4ZGF5cyoyNCo2MCo2MCoxMDAwKSk7CiAKICAgICAgICAgICAgdmFyIGV4cGlyZXMgPSAiZXhwaXJlcz0iK2QudG9HTVRTdHJpbmcoKTsKIAogICAgICAgICAgICBkb2N1bWVudC5jb29raWUgPSBjbmFtZSsiPSIrY3ZhbHVlKyI7ICIrZXhwaXJlczsKICAgICAgICB9CiAKICAgICAgICBmdW5jdGlvbiBnZXRDb29raWUoY25hbWUpewogICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICB2YXIgY2EgPSBkb2N1bWVudC5jb29raWUuc3BsaXQoJzsnKTsKICAgICAgICAgICAgZm9yKHZhciBpPTA7IGk8Y2EubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgaWYgKGMuaW5kZXhPZihuYW1lKT09MCkgeyByZXR1cm4gYy5zdWJzdHJpbmcobmFtZS5sZW5ndGgsYy5sZW5ndGgpOyB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KIAogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnQoZG9tLGRvbUlkKXsKIAogICAgICAgICAgICB2YXIgcm9vdEVsZW1lbnQgPSBkb2N1bWVudC5ib2R5OwogCiAgICAgICAgICAgIHZhciBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChkb20pOwogCiAgICAgICAgICAgIG5ld0VsZW1lbnQuaWQgPSBkb21JZDsKIAogICAgICAgICAgICB2YXIgbmV3RWxlbWVudEh0bWxDb250ZW50ID0gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJycpOwogCiAgICAgICAgICAgIH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2FzdERvbS5zdHlsZS5vcGFjaXR5ID0gJzAnOwogCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyBkb2N1bWVudC5ib2R5LnJlbW92ZUNoaWxkKHRvYXN0RG9tKSB9LCBkICogMTAwMCk7CiAKICAgICAgICAgICAgfSwgZHVyYXRpb24pOwogCiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewogICAgICAgICAgICAvL2NzcwogICAgICAgICAgICBsZXQgcGxheVZpZGVvU3R5bGUgPSBgCiAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4O2N1cnNvcjpwb2ludGVyOwogICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgZGlzcGxheTpibG9jazsKICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkO2xldDowcHg7dG9wOjM2MHB4O3RleHQtYWxpZ246Y2VudGVyO292ZXJmbG93OnZpc2libGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX3dyYXB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjpmaXhlZDtsZWZ0OjQwcHg7dG9wOjM2MHB4OwogICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lewogICAgICAgICAgICAgICAgd2lkdGg6MzIwcHg7CiAgICAgICAgICAgICAgICBoZWlnaHQ6MzE2cHg7CiAgICAgICAgICAgICAgICBvdmVyZmxvdy15OnNjcm9sbDsKICAgICAgICAgICAgICAgIG92ZXJmbG93LXg6aGlkZGVuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICBmbGV4LWZsb3c6IHJvdyB3cmFwOwogICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgbWFyZ2luOjBweDsKIAogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpewogICAgICAgICAgICAgICAgcGFkZGluZzo0cHggMHB4OwogICAgICAgICAgICAgICAgbWFyZ2luOjJweDsKICAgICAgICAgICAgICAgIHdpZHRoOjMwJTsKICAgICAgICAgICAgICAgIGNvbG9yOiNGRkY7CiAgICAgICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MzsKICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6MHB4IDBweCAxMHB4ICNmZmY7CiAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saTpob3ZlcnsKICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwMzM7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX2xpbmVfc2VsZWN0ZWR7CiAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fanh7CiAgICAgICAgICAgICAgICB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ZGVvX2xpbmUnPiI7CiAKICAgICAgICAgICAgcGxheVdyYXBIdG1sICs9IjxkaXY+PHVsIGNsYXNzPSd6aG1fcGxheV92aWRlX2xpbmVfdWwnPiI7CiAKICAgICAgICAgICAgcGxheUxpbmUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJyc7CiAKICAgICAgICAgICAgICAgIGlmKGdldENvb2tpZSgncGxheUxpbmVBY3Rpb24nKSA9PSBpdGVtLnVybCl7CiAKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZD0nemhtX2xpbmVfc2VsZWN0ZWQnOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPWA8bGkgY2xhc3M9J3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSAke3NlbGVjdGVkfScgdXJsPScke2l0ZW0udXJsfScgPiR7aXRlbS5uYW1lfTwvbGk+YDsKIAogICAgICAgICAgICB9KQogCiAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8L2Rpdj48L2Rpdj48L2Rpdj4iOwogCiAgICAgICAgICAgIC8vdGVtcGxhdGU6bm9kZTvmkq3mlL7ljLrln58KIAogICAgICAgICAgICBsZXQgcGxheUp4SHRtbCA9ICI8ZGl2IGNsYXNzPSd6aG1fcGxheV92aWRlb19qeCc+IjsKIAogICAgICAgICAgICBwbGF5SnhIdG1sICs9ICI8aWZyYW1lIGFsbG93dHJhbnNwYXJlbmN5PXRydWUgZnJhbWVib3JkZXI9JzAnIHNjcm9sbGluZz0nbm8nIGFsbG93ZnVsbHNjcmVlbj10cnVlIGFsbG93dHJhbnNwYXJlbmN5PXRydWUgbmFtZT0nanhfcGxheScgc3R5bGU9J2hlaWdodDoxMDAlO3dpZHRoOjEwMCUnIGlkPSdwbGF5SWZyYW1lJz48L2lmcmFtZT48L2Rpdj4iOwogCiAgICAgICAgICAgIC8v5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F0aW9uLmhyZWYubWF0Y2goaXRlbS5tYXRjaCk7CiAKICAgICAgICAgICAgfSkKIAogICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtbG9nbycpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICBsZXQganhWaWRlb1dlYiA9IGp4VmlkZW9EYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICBpZihqeFZpZGVvV2ViLmxlbmd0aCA9PSAwKXsKIAogICAgICAgICAgICAgICAgICAgIHRvYXN0KCfor7flnKjop4bpopHmkq3mlL7pobXngrnlh7vlm77moIcnKTsKIAogICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0ganhWaWRlb1dlYlswXTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZURpdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56aG1fcGxheV92aWRlb193cmFwJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVNob3cgPSBwbGF5TGluZURpdi5zdHlsZS5kaXNwbGF5OwogCiAgICAgICAgICAgICAgICAgICAgcGxheVNob3cgPT0gJ25vbmUnPyBwbGF5TGluZURpdi5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJzpwbGF5TGluZURpdi5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwogCiAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lVGQuZm9yRWFjaChmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpIHpobV9saW5lX3NlbGVjdGVkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldENvb2tpZSgncGxheUxpbmVBY3Rpb24nLHRoaXMuZ2V0QXR0cmlidXRlKCd1cmwnKSwzMCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dXZWJOb2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihub3dOb2RlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93V2ViTm9kZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUlmcmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5SWZyYW1lJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5SWZyYW1lLnNyYz0gaXRlbS5nZXRBdHRyaWJ1dGUoJ3VybCcpK2xvY2F0aW9uLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikee9keermee7k+eCueS4jeWtmOWcqCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvU2VsZWN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLicranhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgIHZpZGVvU2VsZWN0LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICB9KQogCiAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgIGxldCBqeFZpZGVvV2ViID0ganhWaWRlb0RhdGEuZmlsdGVyKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWYubWF0Y2goaXRlbS5tYXRjaCk7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIGlmKGp4VmlkZW9XZWIubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvU2VsZWN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLicranhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvU2VsZWN0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb1NlbGVjdC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coZS50YXJnZXQucGFyZW50Tm9kZS5ocmVmKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1sb2NhdGlvbi5ocmVmOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICB9CiAKICAgICAgICBwbGF5VmlkZW9GdW5jKCk7CiAKICAgIH1lbHNlewogICAgICAgIC8qLS1jb25maWctLSovCiAgICAgICAgdmFyIENvbmZpZyA9ewogCiAgICAgICAgY291cG9uVXJsOndpbmRvdy5sb2NhdGlvbi5ocmVmLAogCiAgICAgICAgY291cG9uSG9zdDp3aW5kb3cubG9jYXRpb24uaG9zdCwKIAogICAgICAgIHdlYlVybDonaHR0cDovL211c2ljLmxpdXpoaWppbi5jbi8nLAogCiAgICAgICAgaWNvblZpcFRvcDozNjAsCiAKICAgICAgICBpY29uVmlwUG9zaXRpb24gOiAnbGVmdCcsCiAKICAgICAgICBpY29uVmlwV2lkdGggOiA0MCwKIAogICAgICAgIGNvdXBvblRpbWVyTnVtIDogMTAwLC8vMTAw5qyh562J5LqOMTDnp5IKIAogICAgICAgIGNvdXB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aWdodCwKICAgICAgICAgICAgdmlkZW9QbGF5TGluZUFkZCwKICAgICAgICAgICAgZHlWaWRlb0Rvd25sb2FkLAogICAgICAgICAgICBrc1ZpZGVvRG93bmxvYWQsCiAgICAgICAgICAgIHhpZ3VhVmlkZW9Eb3dubG9hZCwKICAgICAgICAgICAgYmlsaVZpZGVvRG93bmxvYWQsCiAgICAgICAgICAgIHlvdXR1YmVWaWRlb0Rvd25sb2FkCiAgICAgICAgfSA9IENvbmZpZzsKICAgICAgICAvKi0tbGFuZy0tKi8KICAgICAgICB2YXIgbGFuZyA9IHsKICAgICAgICAgICAgc2V0Oiforr7nva4nLAogICAgICAgICAgICBpY29uUG9zaXRpb246J+Wbvuagh+S9jee9ricsCiAgICAgICAgICAgIHBsYXlWaWRlbzon6KeG6aKR6Kej5p6QJywKICAgICAgICAgICAgcGxheU11c2ljOifpn7PkuZDkuIvovb0nLAogICAgICAgICAgICB6aE5pY2U6J+efpeS5juWinuW8uicsCiAgICAgICAgICAgIHZpZGVvRG93bmxvYWQ6J+inhumikeS4i+i9vScsCiAgICAgICAgICAgIGJhaWR1RG93bmxvYWQ6J+eZvuW6puS4i+i9vScsCiAgICAgICAgICAgIGljb25IZWlnaHQ6J+Wbvuagh+mrmOW6picsCiAgICAgICAgICAgIGljb25XaWR0aDon5Zu+5qCH5aSn5bCPJywKICAgICAgICAgICAgaWNvbkxpbmU6J+awtOW5s+S9jee9ricsCiAgICAgICAgICAgIGljb25XYWl0VGltZTon562J5b6F5pe26Ze0JywKICAgICAgICAgICAgaWNvbkxlZnQ6J+mdoOW3picsCiAgICAgICAgICAgIGljb25SaWdodDon6Z2g5Y+zJywKICAgICAgICAgICAgdGlwSWNvbkhlaWdodDon6buY6K6kMzYwLOW7uuiurjF+NTAwJywKICAgICAgICAgICAgdGlwSWNvbldpZHRoOifpu5jorqQ0MCzlu7rorq4yMH41MCcsCiAgICAgICAgICAgIHRpcEljb25PcGFjaXR5Oifor7floavlhpkwLTEwMOeahOaVtOaVsCcsCiAgICAgICAgICAgIHRpcEVycm9ySWNvbkhlaWdodDonPOWbvuagh+S9jee9rj7kuK3nmoQ85Zu+5qCH6auY5bqmPuW6lOS4ujEwMDDku6XlhoXmraPmlbTmlbDvvIzlu7rorq4xfjUwMCcsCiAgICAgICAgICAgIHRpcEVycm9ySWNvbldpZHRoOic85Zu+5qCH5L2N572uPuS4reeahDzlm77moIflpKflsI8+5bqU5Li6MTAw5Lul5YaF5q2j5pW05pWw77yM5bu66K6uMjB+NTAnLAogICAgICAgICAgICB0aXBFcnJvckljb25PcGFjaXR5OifloavlhpnmlbDlrZfkuI3mraPnoa4nLAogICAgICAgICAgICBzZXRQbGF5VmlkZW86J+ino+aekOiuvue9ricsCiAgICAgICAgICAgIHBsYXlWaWRlb0xpbmVBZGQ6J+ermeWkluino+aekCcsCiAgICAgICAgICAgIHRpcFBsYXlWaWRlb0xpbmVBZGQ6J+ivt+Whq+WFpee6v+i3r+WQjeensOWSjOWcsOWdgO+8jOS4remXtOeUqOWNiuinkumAl+WPt+malOW8gO+8jOavj+e6v+i3r+S4gOihjOOAgicsCiAgICAgICAgICAgIHpoU2V0Oifnn6XkuY7orr7nva4nLAogICAgICAgICAgICB6aFZpZGVvQ2xvc2U6J+Wxj+iUveinhumikScsCiAgICAgICAgICAgIHpoVmlkZW9Eb3dubG9hZDon6KeG6aKR5LiL6L29JywKICAgICAgICAgICAgemhBRENsb3NlOiflsY/olL3lub/lkYonLAogICAgICAgICAgICB6aENsb3NlTGVmdDon5YWz6Zet5L6n6L655qCPJywKICAgICAgICAgICAgemhDaGFuZ2VMaW5rOifpk77mjqXnm7TmjqXot7PovawnLAogICAgICAgICAgICBzcGVjaWFsQ29sdW1uOifmoIforrDmlofnq6AnLAogICAgICAgICAgICB2aWRlb1RpdGxlOifmoIforrDop4bpopEnLAogICAgICAgICAgICB6aEtleXdvcmRDbG9zZTon5bGP6JS95YWz6ZSu6K+NJywKICAgICAgICAgICAgdGlwS2V5d29yZDon6K+36L6T5YWl5YWz6ZSu6K+NLOeUqCIsIuWPt+malOW8gCcsCiAgICAgICAgICAgIGF1dGhvck5hbWVDbG9zZTon5bGP6JS955So5oi3JywKICAgICAgICAgICAgdGlwQXV0aG9yTmFtZTon6K+36L6T5YWl55So5oi35ZCNLOeUqCIsIuWPt+malOW8gCcsCiAgICAgICAgICAgIHlhbnh1YW5DbG9zZTon5bGP6JS955uQ6YCJJywKICAgICAgICAgICAgZHlWaWRlb0Rvd25sb2FkOifmipbpn7PkuIvovb0nLAogICAgICAgICAgICBrc1ZpZGVvRG93bmxvYWQ6J+W/q+aJi+S4i+i9vScsCiAgICAgICAgICAgIHhpZ3VhVmlkZW9Eb3dubG9hZDon6KW/55Oc5LiL6L29JywKICAgICAgICAgICAgYmlsaVZpZGVvRG93bmxvYWQ6J0Lnq5kgKGJpbGliaWxpKSDkuIvovb0nLAogICAgICAgICAgICB5b3V0dWJlVmlkZW9Eb3dubG9hZDoneW91dHViZeS4i+i9vScsCiAgICAgICAgfTsKIAogICAgICAgIC8qLS1kYXRhcy0tKi8KICAgICAgICB2YXIgZGF0YXMgPSB7CiAKICAgICAgICAgICAgZ2V0Q291cG9uOlt7aXNPcGVuOjIyLHdlYjpbCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidGFvYmFvIixub2RlOiIuSl9MaW5rQWRkIixtYXRjaDovaXRlbVwudGFvYmFvXC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToiY291cG9uIixuYW1lOiJ0bWFsbENhb3NoaSIsbm9kZToiI0pfTGlua0J1eSIsbWF0Y2g6L15odHRwcz86XC9cL2NoYW9zaGkuZGV0YWlsLnRtYWxsLmNvbVwvL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidG1hbGxDYW9zaGkiLG5vZGU6Ii5BY3Rpb25zLS1sZWZ0QnV0dG9ucy0tMU0zS2tGNyIsbWF0Y2g6L15odHRwcz86XC9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GliaWxpXC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbWF0Y2g6L15odHRwcz86XC9cL21cLmJpbGliaWxpXC5jb20vfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIudmlkZW8tYXJlYSIsbm9kZVR5cGU6J2NsYXNzJyxtYXRjaDovbVwubWd0dlwuY29tXC9iL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi9tZ3R2XC5jb20vLGFyZWFDbGFzc05hbWU6J2VwaXNvZGUtaXRlbXMgY2xlYXJmaXgnfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbm9kZToiLngtY292ZXItcGxheWJ0bi13cmFwIixub2RlVHlwZTonY2xhc3MnLG1hdGNoOi8udHZcLnNvaHVcLmNvbS99LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIueC1jb3Zlci1wbGF5YnRuLXdyYXAiLG5vZGVUeXBlOidjbGFzcycsbWF0Y2g6L21cLnR2XC5zb2h1XC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbm9kZToiI3BsYXllcldyYXAiLG5vZGVUeXBlOidpZCcsbWF0Y2g6L2ZpbG1cLnNvaHVcLmNvbS99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi90dWRvdVwuY29tL30sCiAKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovbGVcLmNvbS99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsbWF0Y2g6L3BwdHZcLmNvbS99LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsbWF0Y2g6LzE5MDVcLmNvbS99LAogCiAgICAgICAgICAgIF19XSwKIAogICAgICAgICAgICBqeE11c2ljOlt7aXNPcGVuOkdNX2dldFZhbHVlKCdtdXNpY0xpc3QnLCcyMicpLHdlYjpbCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlNdXNpYyIsbmFtZTonbmV0ZWFzZScsbWF0Y2g6L15odHRwcz86XC9cL211c2ljXC4xNjNcLmNvbS8sdGlwOifor7flnKjpn7PkuZDljZXmm7LpobXngrnlh7vlm77moIfkuIvovb0nfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5TXVzaWMiLG5hbWU6J3FxJyxtYXRjaDovXmh0dHBzPzpcL1wveVwucXFcLmNvbS8sdGlwOifor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIzlnKjmkq3mlL7pobXngrnlh7vlm77moIfkuIvovb0nfSwKIAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5TXVzaWMiLG5hbWU6J2t1Z291JyxtYXRjaDova3Vnb3VcLmNvbS8sdGlwOifor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29Iid9LAogCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlNdXNpYyIsbmFtZTona3V3bycsbWF0Y2g6L2t1d29cLmNuLyx0aXA6J+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJ30sCiAKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOid4aW1hbGF5YScsbWF0Y2g6L15odHRwcz86XC9cL3d3d1wueGltYWxheWFcLmNvbS8sdGlwOifor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhL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KICAgICAgICAgICAgICAgIHsibmFtZSI6Ikg4IiwidXJsIjoiaHR0cHM6Ly93d3cuaDhqeC5jb20vamlleGkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiSlkiLCJ1cmwiOiJodHRwczovL2p4LnBsYXllcmp5LmNvbS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLop6PmnpAiLCJ1cmwiOiJodHRwczovL2NrbW92LmNjeWpqZC5jb20vY2ttb3YvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6Kej5p6QbGEiLCJ1cmwiOiJodHRwczovL2FwaS5qaWV4aS5sYS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLogIHmnb8iLCJ1cmwiOiJodHRwczovL3ZpcC5sYW9iYW5kcS5jb20vamlleGkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiTUFPIiwidXJsIjoiaHR0cHM6Ly93d3cubXRvc3ouY29tL20zdTgucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiTTNVOCIsInVybCI6Imh0dHBzOi8vangubTN1OC50di9qaWV4aS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLor7rorq8iLCJ1cmwiOiJodHRwczovL3d3dy5ueGZsdi5jb20vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiT0siLCJ1cmwiOiJodHRwczovL29ranguY2MvP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiUE0iLCJ1cmwiOiJodHRwczovL3d3dy5wbGF5bTN1OC5jbi9qaWV4aS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnm5jlj6QiLCJ1cmwiOiJodHRwczovL3d3dy5wYW5ndWppZXhpLmNjL2ppZXhpLnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuS4g+WTpSIsInVybCI6Imh0dHBzOi8vangubm54di5jbi90di5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJSREhLIiwidXJsIjoiaHR0cHM6Ly9qeC5yZGhrLm5ldC8/dj0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi5Lq65Lq66L+3IiwidXJsIjoiaHR0cHM6Ly9qeC5ibGJvLmNjOjQ0MzMvP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi5oCd5LqRIiwidXJsIjoiaHR0cHM6Ly9qeC5hcDJwLmNuLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuaAneWPpDMiLCJ1cmwiOiJodHRwczovL2pzYXAuYXR0YWtpZHMuY29tLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuWQrOS5kCIsInVybCI6Imh0dHBzOi8vanguZGo2dS5jb20vP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi57u05aSaIiwidXJsIjoiaHR0cHM6Ly9qeC5pdml0by5jbi8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLomb7nsbMiLCJ1cmwiOiJodHRwczovL2p4LnhtZmx2LmNvbS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJZVCIsInVybCI6Imh0dHBzOi8vangueWFuZ3R1LnRvcC8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLkupHnq68iLCJ1cmwiOiJodHRwczovL3NiLjVnc2VvLm5ldC8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLkupHmnpAiLCJ1cmwiOiJodHRwczovL2p4LnlwYXJzZS5jb20vaW5kZXgucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiMDUyMyIsInVybCI6Imh0dHBzOi8vZ28ueWgwNTIzLmNuL3kuY3k/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiIxN+S6kSIsInVybCI6Imh0dHBzOi8vd3d3LjE3MTd5dW4uY29tL2p4L3R5LnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IjE4MCIsInVybCI6Imh0dHBzOi8vanguMDAwMTgwLnRvcC9qeC8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiI0SyIsInVybCI6Imh0dHBzOi8vanguNGtkdi5jb20vP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiODA5MCIsInVybCI6Imh0dHBzOi8vd3d3LjgwOTBnLmNuLz91cmw9IiwibW9iaWxlIjowfQogICAgICAgICAgICBdLAogCiAgICAgICAgICAgIHpoTmljZTpbe2lzT3BlbjpHTV9nZXRWYWx1ZSgnemhpaHVMaXN0JywnMjInKSx3ZWI6WwogICAgICAgICAgICAgICAge2Z1bmNOYW1lOid6aE5pY2UnLG1hdGNoOi9eaHR0cHM/OlwvXC9bYS16XStcLnpoaWh1XC5jb20vfQogICAgICAgICAgICBdfV0sCiAgICAgICAgICAgIHRhb2Jhbzpbe2lzT3BlbjpHTV9nZXRWYWx1ZSgndGFvYmFvJywnMjInKSx3ZWI6WwogICAgICAgICAgICAgICAge2Z1bmNOYW1lOid0YW9iYW9TZWFyY2gnLG1hdGNoOi9ea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Age2NvZGU6NzYsaXNTaGlmdDpmYWxzZSx2YWx1ZTonbCd9LAogICAgICAgICAgICAgICAge2NvZGU6NzYsaXNTaGlmdDp0cnVlLHZhbHVlOidMJ30sCiAgICAgICAgICAgIF0sCiAKICAgICAgICAgICAgZG93bmxvYWRPcHRpb246W3tuYW1lOifnm7TmjqXkuIvovb0nLGlkOid0b0Rvd25sb2FkJ30se25hbWU6J+WkjeWItumTvuaOpScsaWQ6J3RvQ29weSd9LHtuYW1lOifmiZPlvIDmlofku7YnLGlkOid0b0xpbmsnfV0KIAogICAgICAgIH0KIAogICAgICAgIHZhciB7Z2V0Q291cG9uLGp4VmlkZW8sanhNdXNpYyxwbGF5TGluZSx6aE5pY2UsdGFvYmFvLHZpZGVvRG93bmxvYWQsa2V5Q29kZSxkb3dubG9hZE9wdGlvbixiYWlkdX0gPSBkYXRhczsKIAogICAgICAgIC8qLS1DbGFzcy0tKi8KICAgICAgICBjbGFzcyBCYXNlQ2xhc3N7CiAKICAgICAgICAgICAgY29uc3RydWN0b3IoKXsKIAogICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ2ljb25Qb3NpdGlvblNldFBhZ2UnKSAhPSAwKXsKIAogICAgICAgICAgICAgICAgICAgIGljb25WaXBUb3AgPSBHTV9nZXRWYWx1ZSgnaWNvblRvcCcpIHx8IEdNX2dldFZhbHVlKCdpY29uVG9wJykgPT0gMD9HTV9nZXRWYWx1ZSgnaWNvblRvcCcpOmljb25WaXBUb3A7CiAKICAgICAgICAgICAgICAgICAgICBpY29uVmlwUG9zaXRpb24gPSBHTV9nZXRWYWx1ZSgnaWNvblBvc2l0aW9uJyk/R01fZ2V0VmFsdWUoJ2ljb25Qb3NpdGlvbicpOmljb25WaXBQb3NpdGlvbjsKIAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkTGVmdCA9IGljb25WaXBQb3NpdGlvbj09J2xlZnQnPydzZWxlY3RlZCc6Jyc7CiAKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZFJpZ2h0ID0gaWNvblZpcFBvc2l0aW9uPT0ncmlnaHQnPydzZWxlY3RlZCc6Jyc7CiAKICAgICAgICAgICAgICAgICAgICBpY29uVmlwV2lkdGggPSBHTV9nZXRWYWx1ZSgnaWNvbldpZHRoJyk/R01fZ2V0VmFsdWUoJ2ljb25XaWR0aCcpOmljb25WaXBXaWR0aDsKIAogICAgICAgICAgICAgICAgICAgIGljb25XYWl0VGltZSA9IEdNX2dldFZhbHVlKCdpY29uV2FpdFRpbWUnKT9HTV9nZXRWYWx1ZSgnaWNvbldhaXRUaW1lJykqMTAwMDppY29uV2FpdFRpbWU7CiAKICAgICAgICAgICAgICAgICAgICBpY29uVmlwT3BhY2l0eSA9IEdNX2dldFZhbHVlKCdpY29uT3BhY2l0eScpIHx8IEdNX2dldFZhbHVlKCdpY29uT3BhY2l0eScpID09IDA/R01fZ2V0VmFsdWUoJ2ljb25PcGFjaXR5Jyk6aWNvblZpcE9wYWNpdHk7CiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgR01fcmVnaXN0ZXJNZW51Q29tbWFuZCgi6K6+572uIiwgKCkgPT4gdGhpcy5tZW51U2V0KCkpOwogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBtZW51U2V0KCl7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIGxldCBtZW51U2V0U3R5bGUgPSBgCiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1NYXNrewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OTk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiMwMDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogZml4ZWQ7dG9wOiAwO3JpZ2h0OiAwO2JvdHRvbTogMDtsZWZ0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTowLjg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLndyYXAtYm94ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7O3RvcDogNTAlO2xlZnQ6IDUwJTt0cmFuc2Zvcm06IHRyYW5zbGF0ZSgtNTAlLCAtMjAwcHgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6ICM1NTU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNXB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6aGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udDoxNnB4IG51bUZvbnQsUGluZ0ZhbmdTQy1SZWd1bGFyLFRhaG9tYSxNaWNyb3NvZnQgWWFoZWksc2Fucy1zZXJpZiAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6NDAwICFpbXBvcnRhbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBIZWFkewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZjI0NDQzO2hlaWdodDo0MHB4O2NvbG9yOiNmZmY7dGV4dC1hbGlnbjpjZW50ZXI7bGluZS1oZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2V0V3JhcExpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2V0V3JhcExpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNlZWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4ICFpbXBvcnRhbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjEycHggMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAuc2V0V3JhcExpQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBTYXZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOi0ycHg7cmlnaHQ6MTBweDtmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO2JvdHRvbTowcHg7cGFkZGluZzoxMHB4IDIwcHg7d2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDA5O2JhY2tncm91bmQ6I2ZlZjllZjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1mbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzowcHggMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRGb290TGkgbGkgYXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiM1NTU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRGb290TGkgYTpob3ZlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO3RvcDowcHg7bGVmdDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQ6I2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRVbEhlYWR7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUhlYWR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjY2NjOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNXB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjhweCAyMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2VlZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAyO3Bvc2l0aW9uOmFic29sdXRlO3RvcDowcHg7bGVmdDozMDBweDtiYWNrZ3JvdW5kOiNmZmY7d2lkdGg6MzAwcHg7aGVpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlSW5wdXR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUNvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAuY2lyY3VsYXJ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogNDBweDtoZWlnaHQ6IDIwcHg7Ym9yZGVyLXJhZGl1czogMTZweDt0cmFuc2l0aW9uOiAuM3M7Y3Vyc29yOiBwb2ludGVyO2JveC1zaGFkb3c6IDAgMCAzcHggIzk5OSBpbnNldDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAucm91bmQtYnV0dG9uewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDIwcHg7aGVpZ2h0OiAyMHB4Oztib3JkZXItcmFkaXVzOiA1MCU7Ym94LXNoYWRvdzogMCAxcHggNXB4IHJnYmEoMCwwLDAsLjUpO3RyYW5zaXRpb246IC4zcztwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmJhY2t7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IHNvbGlkICNGRkY7IGJvcmRlci13aWR0aDogMCAzcHggM3B4IDA7IGRpc3BsYXk6IGlubGluZS1ibG9jazsgcGFkZGluZzogM3B4O3RyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7ICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7bWFyZ2luLWxlZnQ6MTBweDtjdXJzb3I6cG9pbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudG8tcmlnaHR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDoyMHB4OyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHBhZGRpbmc6IDNweDt0cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpOyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKC00NWRlZyk7Y3Vyc29yOnBvaW50ZXI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFNhdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcjttYXJnaW4tcmlnaHQ6NXB4O21hcmdpbi1ib3R0b206NHB4O2NvbG9yOiNGRkY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOjBweDtsZWZ0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2hlYWRlcnsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE1cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9jb250ZW50ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDI4MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTogc2Nyb2xsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0Ojotd2Via2l0LXNjcm9sbGJhciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoeaVtOS9k+agt+W8jyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCA6IDBweDsgIC8q6auY5a695YiG5Yir5a+55bqU5qiq56uW5rua5Yqo5p2h55qE5bC65a+4Ki8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMXB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLlsI/mlrnlnZcqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1cyAgIDogMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3Q6Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNrIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q5rua5Yqo5p2h6YeM6Z2i6L2o6YGTKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3cgICA6IGluc2V0IDAgMCA1cHggcmdiYSgwLCAwLCAwLCAwLjIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCAgIDogI2VkZWRlZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDEwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0IGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLypib3JkZXItYm90dG9tOjFweCBzb2xpZCAjY2NjOyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjEycHggMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6YmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGxpOmxhc3QtY2hpbGR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOm5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zY3JvbGx7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGwgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHmlbTkvZPmoLflvI8qLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAwcHg7ICAvKumrmOWuveWIhuWIq+WvueW6lOaoquerlua7muWKqOadoeeahOWwuuWvuCovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDFweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLlsI/mlrnlnZcqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1cyAgIDogMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLovajpgZMqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdyAgIDogaW5zZXQgMCAwIDVweCByZ2JhKDAsIDAsIDAsIDAuMik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kICAgOiAjZWRlZGVkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvKi1mb3JtLSovCiAgICAgICAgICAgICAgICAgICAgICAgIDpyb290IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tYmFzZS1jb2xvcjogIzQzNGE1NjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3ItcHJpbWFyeTogI2Y3ZjhmODsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3Itc2Vjb25kYXJ5OiAjZmVmZWZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXByaW1hcnk6ICNjMmMyYzI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLWdyYXktY29sb3Itc2Vjb25kYXJ5OiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXRlcnRpYXJ5OiAjNjc2Zjc5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1hY3RpdmUtY29sb3I6ICMyMjdjOWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLXZhbGlkLWNvbG9yOiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWNvbG9yOiAjZjcyZjQ3OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWljb246IHVybCgiZGF0YTppbWFnZS9zdmcreG1sO2NoYXJzZXQ9dXRmOCwlM0NzdmclMjB4bWxucyUzRCUyMmh0dHAlM0ElMkYlMkZ3d3cudzMub3JnJTJGMjAwMCUyRnN2ZyUyMiUyMHdpZHRoJTNEJTIyMjQlMjIlMjBoZWlnaHQlM0QlMjIyNCUyMiUyMHZpZXdCb3glM0QlMjIwJTIwMCUyMDI0JTIwMjQlMjIlM0UlMjAlM0NwYXRoJTIwZCUzRCUyMk0xMy40MSUyMDEybDQuMy00LjI5YTElMjAxJTIwMCUyMDElMjAwLTEuNDItMS40MkwxMiUyMDEwLjU5bC00LjI5LTQuM2ExJTIwMSUyMDAlMjAwJTIwMC0xLjQyJTIwMS40Mmw0LjMlMjA0LjI5LTQuMyUyMDQuMjlhMSUyMDElMjAwJTIwMCUyMDAlMjAwJTIwMS40MiUyMDElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDBsNC4yOS00LjMlMjA0LjI5JTIwNC4zYTElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDAlMjAxJTIwMSUyMDAlMjAwJTIwMCUyMDAtMS40MnolMjIlMjBmaWxsJTNEJTIyJTIzZjcyZjQ3JTIyJTIwJTJGJTNFJTNDJTJGc3ZnJTNFIik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXQgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMnB4IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjNzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6NTUlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6Oi1tb3otcGxhY2Vob2xkZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLWdyYXktY29sb3Itc2Vjb25kYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTo6cGxhY2Vob2xkZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLWdyYXktY29sb3Itc2Vjb25kYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAqLCA6OmFmdGVyLCA6OmJlZm9yZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGluaXRpYWwgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OmZvY3VzIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTotd2Via2l0LWF1dG9maWxsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tZGVsYXk6IDk5OTlzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fdmFsaWRhdG9yIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtcG9zaXRpb246IHJpZ2h0IDAuNWVtIGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtcmVwZWF0OiBuby1yZXBlYXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLXNpemU6IDEuNWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogLTE7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gKyAudGV4dC1pbnB1dF9fdmFsaWRhdG9yIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtaW1hZ2U6IHZhcigtLWludmFsaWQtaWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3ggewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC41cyBlYXNlLW91dDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjkwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3g6OmFmdGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpIHRyYW5zcGFyZW50IHRyYW5zcGFyZW50IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXN0eWxlOiBzb2xpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci13aWR0aDogNnB4IDRweCAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudDogIiI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46IGF1dG8gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IC03MnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OiAxOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLWxlZnQ6IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IGNhbGMoMWVtICsgMTZweCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTQwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206MnB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5W2RhdGEtaXMtdmFsaWQ9dHJ1ZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHkuZm9jdXMtdmlzaWJsZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHk6LXdlYmtpdC1hdXRvZmlsbCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLWRlbGF5OiA5OTk5czsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1tb3otYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWdyYXktY29sb3ItcHJpbWFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0dGVyLXNwYWNpbmc6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzaXplOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjVzIGVhc2Utb3V0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keTpvbmx5LWNoaWxkIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2l6ZTogdmVydGljYWw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5OmZvY3VzIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWEgLl9kdW1teS1ib3ggewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluLWhlaWdodDogMjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3ctd3JhcDogYnJlYWstd29yZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpc2liaWxpdHk6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaXRlLXNwYWNlOiBwcmUtd3JhcDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdvcmQtd3JhcDogYnJlYWstd29yZDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudG9MZWZ0TW92ZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5pbWF0aW9uOm1vdmVUb0xlZnQgMC41cyBpbmZpbml0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYW5pbWF0aW9uOm1vdmVUb0xlZnQgMC41cyBpbmZpbml0ZTsgLypTYWZhcmkgYW5kIENocm9tZSovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OjE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkczsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIEBrZXlmcmFtZXMgbW92ZVRvTGVmdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBtb3ZlVG9MZWZ0IC8qU2FmYXJpIGFuZCBDaHJvbWUqL3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIC50b1JpZ2h0TW92ZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5pbWF0aW9uOm1vdmVUb1JpZ2h0IDJzIGluZmluaXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hbmltYXRpb246bW92ZVRvUmlnaHQgMnMgaW5maW5pdGU7IC8qU2FmYXJpIGFuZCBDaHJvbWUqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWl0ZXJhdGlvbi1jb3VudDoxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWZpbGwtbW9kZTogZm9yd2FyZHM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgQGtleWZyYW1lcyBtb3ZlVG9SaWdodHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjIwMDBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgbW92ZVRvUmlnaHQgLypTYWZhcmkgYW5kIENocm9tZSovewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgYDsKIAogICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKG1lbnVTZXRTdHlsZSkpOwogCiAgICAgICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKIAogICAgICAgICAgICAgICAgdmFyIHNldExpc3RKc29uPSBbCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5pY29uUG9zaXRpb24sJ3NldExpc3RJRCc6J2ljb25Qb3NpdGlvblNldFBhZ2UnLCdzZXRQYWdlSUQnOidtb3ZpZUljb25TZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5wbGF5VmlkZW8sJ3NldExpc3RJRCc6J21vdmllTGlzdCcsJ3NldFBhZ2VJRCc6J21vdmllVmlkZW9TZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5wbGF5TXVzaWMsJ3NldExpc3RJRCc6J211c2ljTGlzdCcsJ3NldFBhZ2VJRCc6JycsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcuemhOaWNlLCdzZXRMaXN0SUQnOid6aGlodUxpc3QnLCdzZXRQYWdlSUQnOid6aGlodUljb25TZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy52aWRlb0Rvd25sb2FkLCdzZXRMaXN0SUQnOid2aWRlb0Rvd25sb2FkTGlzdCcsJ3NldFBhZ2VJRCc6J3ZpZGVvRG93bmxvYWRTZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5iYWlkdURvd25sb2FkLCdzZXRMaXN0SUQnOidiYWlkdUxpc3QnLCdzZXRQYWdlSUQnOicnLCd0YWtlUGxhY2UnOicwcHgnfSwKICAgICAgICAgICAgICAgIF07CiAKICAgICAgICAgICAgICAgIHZhciB6aGlodU9wdGlvbkpzb24gPSBbCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoVmlkZW9DbG9zZSwnb3B0aW9uSUQnOidyZW1vdmVWaWRlbycsJ2RlZmF1bHQnOicwJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoVmlkZW9Eb3dubG9hZCwnb3B0aW9uSUQnOidkb3dubG9hZFZpZGVvJywnZGVmYXVsdCc6JzIyJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoQURDbG9zZSwnb3B0aW9uSUQnOidyZW1vdmVBRCcsJ2RlZmF1bHQnOicyMid9LAogICAgICAgICAgICAgICAgICAgIHsnb3B0aW9uTmFtZSc6bGFuZy56aENsb3NlTGVmdCwnb3B0aW9uSUQnOidyZW1vdmVSaWdodCcsJ2RlZmF1bHQnOicwJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoQ2hhbmdlTGluaywnb3B0aW9uSUQnOidjaGFuZ2VMaW5rJywnZGVmYXVsdCc6JzIyJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnNwZWNpYWxDb2x1bW4sJ29wdGlvbklEJzonc3BlY2lhbENvbHVtbicsJ2RlZmF1bHQnOjIyfSwKICAgICAgICAgICAgICAgICAgICB7J29wdGlvbk5hbWUnOmxhbmcudmlkZW9UaXRsZSwnb3B0aW9uSUQnOid2aWRlb1RpdGxlJywnZGVmYXVsdCc6MjJ9LAogICAgICAgICAgICAgICAgICAgIHsnb3B0aW9uTmFtZSc6bGFuZy56aEtleXdvcmRDbG9zZSwnb3B0aW9uSUQnOidyZW1vdmVLZXl3b3JkJywnZGVmYXVsdCc6JzAnfSwKICAgICAgICAgICAgICAgICAgICB7J29wdGlvbk5hbWUnOmxhbmcuYXV0aG9yTmFtZUNsb3NlLCdvcHRpb25JRCc6J3JlbW92ZUF1dGhvck5hbWUnLCdkZWZhdWx0JzonMjInfSwKICAgICAgICAgICAgICAgICAgICB7J29wdGlvbk5hbWUnOmxhbmcueWFueHVhbkNsb3NlLCdvcHRpb25JRCc6J3JlbW92ZVlhbnh1YW4nLCdkZWZhdWx0JzonMCd9CiAgICAgICAgICAgICAgICBdOwogCiAgICAgICAgICAgICAgICB2YXIgcGxheVZpZGVvT3B0aW9uSnNvbiA9ewogICAgICAgICAgICAgICAgICAgICdvcHRpb25OYW1lJzpsYW5nLnBsYXlWaWRlb0xpbmVBZGQsCiAgICAgICAgICAgICAgICAgICAgJ29wdGlvbklEJzondmlkZW9QbGF5TGluZUFkZCcsCiAgICAgICAgICAgICAgICAgICAgJ2RlZmF1bHQnOnZpZGVvUGxheUxpbmVBZGQsCiAgICAgICAgICAgICAgICAgICAgJ3RleHRhcmVhJzondmlkZW9QbGF5TGluZUFkZFRleHRhcmVhJywKICAgICAgICAgICAgICAgICAgICAndGV4dGFyZWFJZCc6J3BsYXlWaWRlb0xpbmVUZXh0YXJlYScsCiAgICAgICAgICAgICAgICAgICAgJ3RpcCc6CmDnuq/lh4AxLGh0dHBzOi8vaW0xOTA3LnRvcC8/ang9CkLnq5kxLGh0dHBzOi8vanguanNvbnBsYXllci5jb20vcGxheWVyLz91cmw9CueIseixhixodHRwczovL2p4LmFpZG91ZXIubmV0Lz91cmw9CkJMLGh0dHBzOi8vdmlwLmJsamlleC5jb20vP3Y9CuWGsOixhixodHRwczovL2FwaS5xaWFucWkubmV0L3ZpcC8/dXJsPQrnmb7ln58saHR0cHM6Ly9qeC42MThnLmNvbS8/dXJsPQpDSyxodHRwczovL3d3dy5ja3BsYXllci52aXAvamlleGkvP3VybD0KQ0hvayxodHRwczovL3d3dy5nYWk0LmNvbS8/dXJsPQpja21vdixodHRwczovL3d3dy5ja21vdi52aXAvYXBpLnBocD91cmw9Ckg4LGh0dHBzOi8vd3d3Lmg4anguY29tL2ppZXhpLnBocD91cmw9CkpZLGh0dHBzOi8vangucGxheWVyankuY29tLz91cmw9Cuino+aekCxodHRwczovL2NrbW92LmNjeWpqZC5jb20vY2ttb3YvP3VybD0K6Kej5p6QbGEsaHR0cHM6Ly9hcGkuamlleGkubGEvP3VybD0K6ICB5p2/LGh0dHBzOi8vdmlwLmxhb2JhbmRxLmNvbS9qaWV4aS5waHA/dXJsPQpNQU8saHR0cHM6Ly93d3cubXRvc3ouY29tL20zdTgucGhwP3VybD0KTTNVOCxodHRwczovL2p4Lm0zdTgudHYvamlleGkvP3VybD0K6K+66K6vLGh0dHBzOi8vd3d3Lm54Zmx2LmNvbS8/dXJsPQpPSyxodHRwczovL29ranguY2MvP3VybD0KUE0saHR0cHM6Ly93d3cucGxheW0zdTguY24vamlleGkucGhwP3VybD0K55uY5Y+kLGh0dHBzOi8vd3d3LnBhbmd1amlleGkuY2MvamlleGkucGhwP3VybD0K5LiD5ZOlLGh0dHBzOi8vangubm54di5jbi90di5waHA/dXJsPQpSRE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gICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZlNmQ3Myc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZFNUU1JzsKIAogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gJ2Jsb2NrJzsKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGxpPiI7CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3pobV9zZXRfcGFnZV9jb250ZW50Jz4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPHNwYW4+Iit2aWRlb0Rvd25sb2FkT3B0aW9uSnNvbltpXS5vcHRpb25OYW1lKyI8L3NwYW4+IjsKIAogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0nY2lyY3VsYXInIHN0eWxlPSdiYWNrZ3JvdW5kLWNvbG9yOiIrc3dpdGNoQmFja0NvcmxvcisiJyBpZD0nIit2aWRlb0Rvd25sb2FkT3B0aW9uSnNvbltpXS5vcHRpb25JRCsiJz4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSdyb3VuZC1idXR0b24nIHN0eWxlPSdiYWNrZ3JvdW5kOiAiK2JhY2tDb2xvcisiOyBsZWZ0OiAiK29wdGlvblZhbHVlKyJweDsnPjwvZGl2PiI7CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9ICI8L2Rpdj48L2Rpdj4iOwogCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPC9saT4iOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvdWw+IgogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvZGl2PiIKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fc2V0X3BhZ2UnIGlkPSdtb3ZpZVZpZGVvU2V0UGFnZSc+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J2ljb25TZXRVbEhlYWQnPjxsaSBjbGFzcz0nemhtX3NldF9wYWdlX2hlYWRlcic+PHNwYW4gY2xhc3M9J2JhY2snPjwvc3Bhbj48c3Bhbj4iK2xhbmcuc2V0UGxheVZpZGVvKyI8L3NwYW4+PHNwYW4gIGNsYXNzPSdpY29uU2V0U2F2ZSc+w5c8L2xpPjwvdWw+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J3pobV9zZXRfcGFnZV9saXN0JyBzdHlsZT0nb3ZlcmZsb3cteTp1bnNldCc+IjsKIAogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3Isc3dpdGNoQmFja0NvcmxvcixkaXNwbGF5OwogCiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvblZhbHVlID0gR01fZ2V0VmFsdWUocGxheVZpZGVvT3B0aW9uSnNvbi5vcHRpb25JRCxwbGF5VmlkZW9PcHRpb25Kc29uLmRlZmF1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgaWYob3B0aW9uVmFsdWUgIT0gJzIyJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZmYnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRic7CiAKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZlNmQ3Myc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZFNUU1JzsKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgI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Kc29uLmxlbmd0aDtvcHRpb25OKyspewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGJhY2tDb2xvcixzd2l0Y2hCYWNrQ29ybG9yOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvblZhbHVlID0gR01fZ2V0VmFsdWUoemhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbklELHpoaWh1T3B0aW9uSnNvbltvcHRpb25OXS5kZWZhdWx0KTsKIAogICAgICAgICAgICAgICAgICAgIGlmKG9wdGlvblZhbHVlICE9ICcyMicpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmZmJzsKIAogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZTZkNzMnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaSA+PGRpdiBjbGFzcz0nemhpaHVTZXRQYWdlQ29udGVudCc+PHNwYW4+Iit6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0ub3B0aW9uTmFtZSsiPC9zcGFuPiI7CiAKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2NpcmN1bGFyJyBzdHlsZT0nYmFja2dyb3VuZC1jb2xvcjogIitzd2l0Y2hCYWNrQ29ybG9yKyI7JyBpZD0iK3poaWh1T3B0aW9uSnNvbltvcHRpb25OXS5vcHRpb25JRCsiPjxkaXYgY2xhc3M9J3JvdW5kLWJ1dHRvbicgc3R5bGU9J2JhY2tncm91bmQ6ICIrYmFja0NvbG9yKyI7bGVmdDogIitvcHRpb25WYWx1ZSsicHg7Jz48L2Rpdj48L2Rpdj48L2Rpdj4iOwogCiAgICAgICAgICAgICAgICAgICAgaWYoemhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbklEID09ICdyZW1vdmVLZXl3b3JkJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGtleXdvcmRTaG93OwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdyZW1vdmVLZXl3b3JkJywnMCcpID09ICcyMicpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXl3b3JkU2hvdyA9ICdibG9jayc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXl3b3JkU2hvdyA9ICdub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBzdHlsZT0nbWFyZ2luLXRvcDoxMHB4O2Rpc3BsYXk6IitrZXl3b3JkU2hvdysiO3BhZGRpbmc6NXB4IDBweDsnIGlkPSd6aGlodUtleXdvcmQnPjxzcGFuIGNsYXNzPSd0ZXh0LWlucHV0Jz48aW5wdXQgdmFsdWU9JyIrR01fZ2V0VmFsdWUoJ2lucHV0WmhLZXl3b3JkJywnJykrIicgaWQ9J2lucHV0WmhLZXl3b3JkJyBjbGFzcz0ndGV4dC1pbnB1dF9fYm9keScgcGxhY2Vob2xkZXI9JyIrbGFuZy50aXBLZXl3b3JkKyInIHN0eWxlPSd3aWR0aDo4OCUnPjxzcGFuPjwvZGl2PiI7CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgaWYoemhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbklEID09ICdyZW1vdmVBdXRob3JOYW1lJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGF1dGhvck5hbWVTaG93OwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdyZW1vdmVBdXRob3JOYW1lJywnMjInKSA9PSAnMjInKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0aG9yTmFtZVNob3cgPSAnYmxvY2snOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0aG9yTmFtZVNob3cgPSAnbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgc3R5bGU9J21hcmdpbi10b3A6MTBweDtkaXNwbGF5OiIrYXV0aG9yTmFtZVNob3crIjtwYWRkaW5nOjVweCAwcHg7JyBpZD0nemhpaHVBdXRob3JOYW1lJz48c3BhbiBjbGFzcz0ndGV4dC1pbnB1dCc+PGlucHV0IHZhbHVlPSciK0dNX2dldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScsJycpKyInIGlkPSdpbnB1dFpoQXV0aG9yTmFtZScgY2xhc3M9J3RleHQtaW5wdXRfX2JvZHknIHBsYWNlaG9sZGVyPSciK2xhbmcudGlwQXV0aG9yTmFtZSsiJyBzdHlsZT0nd2lkdGg6ODglJz48c3Bhbj48L2Rpdj4iOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvbGk+IjsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L3VsPiIKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L2Rpdj4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0naWNvblNldFVsSGVhZCc+PGxpIGNsYXNzPSdpY29uU2V0UGFnZUhlYWQnPjxzcGFuPjwvc3Bhbj48c3Bhbj4iK2xhbmcuc2V0KyI8L3NwYW4+PHNwYW4gY2xhc3M9J2ljb25TZXRTYXZlJz7Dlzwvc3Bhbj48L2xpPjwvdWw+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J3NldFdyYXBMaSc+IjsKIAogICAgICAgICAgICAgICAgZm9yKHZhciBzZXROPTA7c2V0TjxzZXRMaXN0SnNvbi5sZW5ndGg7c2V0TisrKXsKIAogICAgICAgICAgICAgICAgICAgIHZhciBsaXN0VmFsdWUgPSBHTV9nZXRWYWx1ZShzZXRMaXN0SnNvbltzZXROXS5zZXRMaXN0SUQsJzIyJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgYmFja0NvbG9yLGFycm93Q29sb3Isc3dpdGNoQmFja0NvcmxvcjsKIAogICAgICAgICAgICAgICAgICAgIGlmKGxpc3RWYWx1ZSAhPSAyMil7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmZmJzsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvcj0gJyNFRUUnOwogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvciA9ICcjQ0NDJzsKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZFNUU1JzsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SnNvbltzZXROXS5zZXRQYWdlSUQgPT0gJycpewogICAgICAgICAgICAgICAgICAgICAgICBhcnJvd0NvbG9yID0gJyNFRUUnOwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGk+PHNwYW4+IitzZXRMaXN0SnNvbltzZXROXS5saXN0TmFtZSsiPC9zcGFuPiI7CiAKICAgICA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0SHRtbCArPSc8L3VsPic7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0nPC9kaXY+JzsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPC9kaXY+IjsKIAogICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3NldE1hc2snKSkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobU1lbnUnKTsKIAogICAgICAgICAgICAgICAgbGV0IHpobU1lbnUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtTWVudScpOwogCiAgICAgICAgICAgICAgICB6aG1NZW51LmlubmVySFRNTCA9IHNldEh0bWw7CiAKICAgICAgICAgICAgICAgIGxldCB0aW1lclpobUljb24gPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1NZW51JykpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXJaaG1JY29uKTsgLy8g5Y+W5raI5a6a5pe25ZmoCiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNpcmN1bGFyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmNpcmN1bGFyJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY2lyY3VsYXIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKF9lKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBidXR0b25TdHlsZSA9IGl0ZW0uY2hpbGRyZW5bMF0uc3R5bGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGVmdCA9IGJ1dHRvblN0eWxlLmxlZnQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gcGFyc2VJbnQobGVmdCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdExlZnRWYWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxlZnQ9PTApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmxlZnQgPSAnMjJweCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUuYmFja2dyb3VuZCA9ICcjZmU2ZDczJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlLmJhY2tncm91bmQ9JyNmZkU1RTUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ubmV4dFNpYmxpbmcgJiYgaXRlbS5uZXh0U2libGluZy5nZXRBdHRyaWJ1dGUoJ2RhdGEnKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0ubmV4dFNpYmxpbmcuc2V0QXR0cmlidXRlKCdzdHlsZScsJ2JvcmRlcjogc29saWQgI2NjYztib3JkZXItd2lkdGg6IDAgM3B4IDNweCAwOycpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0TGVmdFZhbHVlID0gMjI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25TdHlsZS5sZWZ0ID0gJzBweCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUuYmFja2dyb3VuZCA9ICcjZmZmJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlLmJhY2tncm91bmQ9JyNmZmYnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ubmV4dFNpYmxpbmcpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLm5leHRTaWJsaW5nLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCdib3JkZXI6IHNvbGlkICNFRUU7Ym9yZGVyLXdpZHRoOiAwIDNweCAzcHggMDsnKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0TGVmdFZhbHVlID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0TGlzdElEID0gaXRlbS5pZDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlS2V5d29yZCcgJiYgbGlzdExlZnRWYWx1ZT09MjIpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aGlodUtleXdvcmQnKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ICdoZWlnaHQ6MjIwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlS2V5d29yZCcgJiYgbGlzdExlZnRWYWx1ZT09MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1S2V5d29yZCcpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSAnaGVpZ2h0OjE4MHB4JzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SUQgPT0gJ3JlbW92ZUF1dGhvck5hbWUnICYmIGxpc3RMZWZ0VmFsdWU9PTIyKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhpaHVBdXRob3JOYW1lJykuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICdyZW1vdmVBdXRob3JOYW1lJyAmJiBsaXN0TGVmdFZhbHVlPT0wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhpaHVBdXRob3JOYW1lJykuc3R5bGUuZGlzcGxheT0nbm9uZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoc2V0TGlzdElELGxpc3RMZWZ0VmFsdWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b1JpZ2h0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnRvLXJpZ2h0Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdG9SaWdodC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGVmdCA9IGl0ZW0ucHJldmlvdXNTaWJsaW5nLmNoaWxkcmVuWzBdLnN0eWxlLmxlZnQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gcGFyc2VJbnQobGVmdCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsZWZ0ICE9IDIyKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0UGFnZUlEID0gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYWdlSWQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzZXRQYWdlSUQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZUlkLmNsYXNzTmFtZT0naWNvblNldFBhZ2UgdG9MZWZ0TW92ZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+efpeS5juiuvue9ruaaguS9jemrmOW6pgogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0UGFnZUlEPT0nemhpaHVJY29uU2V0UGFnZScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1UYWtlUGxhY2UnKS5zdHlsZT0gYGhlaWdodDo2OHB4YDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+WunuaXtuWbvuagh+mrmOW6pgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldFBhZ2VJRCA9PSAnbW92aWVJY29uU2V0UGFnZScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNpY29uVG9wJykudmFsdWU9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3pobWxvZ28iKS5vZmZzZXRUb3A7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG9CYWNrID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmJhY2snKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB0b0JhY2suZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmVudERvbSA9IGl0ZW0ucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnREb20uY2xhc3NOYW1lPSdpY29uU2V0UGFnZSB0b1JpZ2h0TW92ZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9J2hlaWdodDo0MHB4OycKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXRTYXZlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmljb25TZXRTYXZlJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2F2ZS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywoKT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Ub3AgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblRvcCcpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25PcGFjaXR5PWRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uT3BhY2l0eScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Qb3NpdGlvbiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uUG9zaXRpb24nKS52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uV2lkdGggPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvbldpZHRoJykudmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldhaXRUaW1lID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XYWl0VGltZScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlb0xpbmVUZXh0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlWaWRlb0xpbmVUZXh0YXJlYScpLnZhbHVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9MaW5lTGVmdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2aWRlb1BsYXlMaW5lQWRkJykuY2hpbGRyZW5bMF0uc3R5bGUubGVmdDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dFpoS2V5d29yZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpbnB1dFpoS2V5d29yZCcpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlucHV0QXV0aG9yTmFtZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpbnB1dFpoQXV0aG9yTmFtZScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblRvcCAhPSAnJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMC05XVswLTldezAsMn0kKS8udGVzdChpY29uVG9wKSkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydChsYW5nLnRpcEVycm9ySWNvbkhlaWdodCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uVG9wJyxpY29uVG9wKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpY29uT3BhY2l0eSAhPSAnJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvXig/OjB8WzEtOV1bMC05XT98MTAwKSQvLnRlc3QoaWNvbk9wYWNpdHkpKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KGxhbmcudGlwRXJyb3JJY29uT3BhY2l0eSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uT3BhY2l0eScsaWNvbk9wYWNpdHkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25Qb3NpdGlvbiAhPSAnJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2ljb25Qb3NpdGlvbicsaWNvblBvc2l0aW9uKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpY29uV2FpdFRpbWUgIT0gJycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uV2FpdFRpbWUnLGljb25XYWl0VGltZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvbldpZHRoICE9JycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEoLyheKFsxLTldWzAtOV0/KSQpLy50ZXN0KGljb25XaWR0aCkpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxlcnQobGFuZy50aXBFcnJvckljb25XaWR0aCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uV2lkdGgnLGljb25XaWR0aCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ3ZpZGVvUGxheUxpbmVBZGQnKSA9PSAyMil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGxheVZpZGVvTGluZVRleHQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU9iaiA9IF90aGlzLmdldExpbmUocGxheVZpZGVvTGluZVRleHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsaW5lT2JqLmxlbmd0aD4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdwbGF5VmlkZW9MaW5lVGV4dCcscGxheVZpZGVvTGluZVRleHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydCgn57q/6Lev6L6T5YWl5LiN5q2j56GuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLCcnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ3BsYXlWaWRlb0xpbmVUZXh0JyxwbGF5VmlkZW9MaW5lVGV4dCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaW5wdXRaaEtleXdvcmQgIT0gJycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcsaW5wdXRaaEtleXdvcmQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ2lucHV0WmhLZXl3b3JkJykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kZWxldGVWYWx1ZSgnaW5wdXRaaEtleXdvcmQnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaW5wdXRBdXRob3JOYW1lICE9ICcnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnLGlucHV0QXV0aG9yTmFtZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2RlbGV0ZVZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaXN0b3J5LmdvKDApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblRvcCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Ub3AgPSB0aGlzLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXlsxLTldXGQqJCkvLnRlc3QoaWNvblRvcCkpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywnZmFsc2UnKQogCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2RhdGEtaXMtdmFsaWQnLCd0cnVlJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XaWR0aCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25XaWR0aCA9IHRoaXMudmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEoLyheWzEtOV1cZCokKS8udGVzdChpY29uV2lkdGgpKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZSgnZGF0YS1pcy12YWxpZCcsJ2ZhbHNlJykKIAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywndHJ1ZScpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAvL+iFvuiur+inhumikeW/q+aNt+mUruWGsueqgQogICAgICAgICAgICAgICAgICAgICAgICBpZihjb3Vwb25VcmwubWF0Y2goL3ZcLnFxXC5jb21cL3hcL2NvdmVyLykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYWRkTGluZVRleHQgPWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5VmlkZW9MaW5lVGV4dGFyZWEnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGluZVRleHQuYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnRQb3MgPSBhZGRMaW5lVGV4dC5zZWxlY3Rpb25TdGFydDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRQb3MgPSBhZGRMaW5lVGV4dC5zZWxlY3Rpb25FbmQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhcnRQb3MgPT09IHVuZGVmaW5lZCB8fCBlbmRQb3MgPT09IHVuZGVmaW5lZCkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5Q29kZS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGUua2V5Q29kZSA9PSBpdGVtLmNvZGUgJiYgZS5zaGlmdEtleT09aXRlbS5pc1NoaWZ0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHRWYWx1ZSA9IGFkZExpbmVUZXh0LnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnRWYWx1ZSA9IHRleHRWYWx1ZS5zdWJzdHJpbmcoMCxzdGFydFBvcyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRWYWx1ZSA9IHRleHRWYWx1ZS5zdWJzdHJpbmcoc3RhcnRQb3MpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYWxsVmFsdWUgPSBzdGFydFZhbHVlK2l0ZW0udmFsdWUrZW5kVmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZExpbmVUZXh0LnZhbHVlPWFsbFZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5zZWxlY3Rpb25TdGFydCA9IHN0YXJ0UG9zKzE7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZExpbmVUZXh0LnNlbGVjdGlvbkVuZCA9IGVuZFBvcysxOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgY3JlYXRlRWxlbWVudChkb20sZG9tSWQpewogCiAgICAgICAgICAgICAgICB2YXIgcm9vdEVsZW1lbnQgPSBkb2N1bWVudC5ib2R5OwogCiAgICAgICAgICAgICAgICB2YXIgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoZG9tKTsKIAogICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pZCA9IGRvbUlkOwogCiAgICAgICAgICAgICAgICB2YXIgbmV3RWxlbWVudEh0bWxDb250ZW50ID0gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJycpOwogCiAgICAgICAgICAgICAgICByb290RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50KTsKIAogICAgICAgICAgICAgICAgbmV3RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50SHRtbENvbnRlbnQpOwogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICByZXF1ZXN0KG1ldGhvZCx1cmwsZGF0YSxpc0Nvb2tpZT0nJyl7CiAKICAgICAgICAgICAgICAgIGxldCByZXF1ZXN0ID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7CiAKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSxyZWplY3QpPT57CiAKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0Lm9ucmVhZHlzdGF0ZWNoYW5nZT1mdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlcXVlc3QucmVhZHlTdGF0ZT09NCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlcXVlc3Quc3RhdHVzPT0yMDApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXF1ZXN0LnJlc3BvbnNlVGV4dCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KHJlcXVlc3Quc3RhdHVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5vcGVuKG1ldGhvZCx1cmwpOwogICAgICAgICAgICAgICAgICAgIGlmKGlzQ29va2llKXsKICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC53aXRoQ3JlZGVudGlhbHMgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LnNldFJlcXVlc3RIZWFkZXIoJ0NvbnRlbnQtVHlwZScsICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnKTsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LnNlbmQoZGF0YSk7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHNldENvb2tpZShjbmFtZSxjdmFsdWUsZXhkYXlzKXsKIAogICAgICAgICAgICAgICAgdmFyIGQgPSBuZXcgRGF0ZSgpOwogCiAgICAgICAgICAgICAgICBkLnNldFRpbWUoZC5nZXRUaW1lKCkrKGV4ZGF5cyoyNCo2MCo2MCoxMDAwKSk7CiAKICAgICAgICAgICAgICAgIHZhciBleHBpcmVzID0gImV4cGlyZXM9IitkLnRvR01UU3RyaW5nKCk7CiAKICAgICAgICAgICAgICAgIGRvY3VtZW50LmNvb2tpZSA9IGNuYW1lKyI9IitjdmFsdWUrIjsgIitleHBpcmVzOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0Q29va2llKGNuYW1lKXsKICAgICAgICAgICAgICAgIHZhciBuYW1lID0gY25hbWUgKyAiPSI7CiAgICAgICAgICAgICAgICB2YXIgY2EgPSBkb2N1bWVudC5jb29raWUuc3BsaXQoJzsnKTsKICAgICAgICAgICAgICAgIGZvcih2YXIgaT0wOyBpPGNhLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGMgPSBjYVtpXS50cmltKCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGMuaW5kZXhPZihuYW1lKT09MCkgeyByZXR1cm4gYy5zdWJzdHJpbmcobmFtZS5sZW5ndGgsYy5sZW5ndGgpOyB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gIiI7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBnZXRRdWVyeVN0cmluZyhlKSB7CiAgICAgICAgICAgICAgICB2YXIgdCA9IG5ldyBSZWdFeHAoIihefCYpIiArIGUgKyAiPShbXiZdKikoJnwkKSIpOwogICAgICAgICAgICAgICAgdmFyIGEgPSB3aW5kb3cubG9jYXRpb24uc2VhcmNoLnN1YnN0cigxKS5tYXRjaCh0KTsKICAgICAgICAgICAgICAgIGlmIChhICE9IG51bGwpIHJldHVybiBhWzJdOwogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0VXJsUGFyYW1zKHVybCl7CiAgICAgICAgICAgICAgICBsZXQgcmVnID0gLyhbXj8mKyNdKyk9KFtePyYrI10rKS9nOwogICAgICAgICAgICAgICAgbGV0IG9iaj17fTsKICAgICAgICAgICAgICAgIHVybC5yZXBsYWNlKHJlZywocmVzLCQxLCQyKT0+e29ialskMV09JDJ9KTsKICAgICAgICAgICAgICAgIHJldHVybiBvYmo7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBnZXRMaW5lKHRleHQpewogCiAgICAgICAgICAgICAgICBsZXQgdGV4dEFyciA9IHRleHQuc3BsaXQoJ1xuJyk7CiAKICAgICAgICAgICAgICAgIGlmKHRleHRBcnIubGVuZ3RoID4gMCl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU9iaiA9IFtdOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gL14oLispKGh0dHBzPzpcL1wvLispJC87CiAKICAgICAgICAgICAgICAgICAgICB0ZXh0QXJyLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbSA9IGl0ZW0ucmVwbGFjZSgvXHMqLCovZywnJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWl0ZW0pIHJldHVybiB0cnVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5lTWF0Y2ggPSBpdGVtLm1hdGNoKG1hdGNoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihsaW5lTWF0Y2gpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqLnB1c2goeyduYW1lJzpsaW5lTWF0Y2hbMV0uc3Vic3RyaW5nKDAsNCksJ3VybCc6bGluZU1hdGNoWzJdfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVPYmo9W107CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIHJldHVybiBsaW5lT2JqOwogCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBzdGF0aWMgZ2V0RWxlbWVudChjc3MsYWxsPScnKXsKIAogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGxldCBudW0gPSAwOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBudW0rKwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb207CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoYWxsID09IGZhbHNlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihjc3MpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGRvbSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChjc3MpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20ubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGRvbSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG51bT09MjApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICB9LDMwMCkKIAogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHN0YXRpYyB0b2FzdChtc2csZHVyYXRpb24pewogCiAgICAgICAgICAgICAgICBkdXJhdGlvbj1pc05hTihkdXJhdGlvbik/MzAwMDpkdXJhdGlvbjsKIAogICAgICAgICAgICAgICAgbGV0IHRvYXN0RG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAKICAgICAgICAgICAgICAgIHRvYXN0RG9tLmlubmVySFRNTCA9IG1zZzsKIAogICAgICAgICAgICAgICAgLy90b2FzdERvbS5zdHlsZS5jc3NUZXh0PSJ3aWR0aDogNjAlO21pbi13aWR0aDogMTUwcHg7b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vY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQodG9hc3REb20pIH0sIGQgKiAxMDAwKTsKIAogICAgICAgICAgICAgICAgfSwgZHVyYXRpb24pOwogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy9jcmVhdGUgemhtTG9nb0ljb24KICAgICAgICAgICAgemhtTG9nbygpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogCiAgICAgICAgICAgICAgICBsZXQgc29ydERpdiA9IGljb25WaXBQb3NpdGlvbj09J2xlZnQnPydyb3cnOidyb3ctcmV2ZXJzZSc7CiAKICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9TdHlsZSA9IGAKICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4OwogICAgICAgICAgICAgICAgICAgY3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTsKICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOyR7aWNvblZpcFBvc2l0aW9ufTo1cHg7dG9wOiR7aWNvblZpcFRvcH1weDsKICAgICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6dmlzaWJsZTsKICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ZmxleDsKICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOiR7c29ydERpdn07CiAgICAgICAgICAgICAgICAgICB3aWR0aDphdXRvOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX3dyYXB7CiAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuaWNvbkxvZ297CiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eToke2ljb25WaXBPcGFjaXR5LzEwMH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZXsKICAgICAgICAgICAgICAgICAgIHdpZHRoOjMyMHB4OwogICAgICAgICAgICAgICAgICAgaGVpZ2h0OjMxNnB4OwogICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTpzY3JvbGw7CiAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy14OmhpZGRlbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICBmbGV4LWZsb3c6IHJvdyB3cmFwOwogICAgICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGl7CiAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjRweCAwcHg7CiAgICAgICAgICAgICAgICAgICBtYXJnaW46MnB4OwogICAgICAgICAgICAgICAgICAgd2lkdGg6MzAlOwogICAgICAgICAgICAgICAgICAgY29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZjI0NDQzOwogICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzowcHggMHB4IDEwcHggI2ZmZjsKICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGk6aG92ZXJ7CiAgICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xpbmVfc2VsZWN0ZWR7CiAgICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19qeHsKICAgICAgICAgICAgICAgICAgIHdpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OwogICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO3RvcDowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBgOwogCiAgICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHBsYXlWaWRlb1N0eWxlKSk7CiAKICAgICAgICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKIAogICAgICAgICAgICAgICAgIGxldCBwbGF5V3JhcEh0bWwgPSAiPGRpdiBocmVmPSdqYXZhc2NyaXB0OnZvaWQoMCknIHRhcmdldD0nX2JsYW5rJyBzdHlsZT0nJyBjbGFzcz0ncGxheUJ1dHRvbiB6aG1fcGxheV92aWRvZV9pY29uJyBpZD0nemhtbG9nbyc+IjsKIAogICAgICAgICAgICAgICAgIHBsYXlXcmF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XJuOwogCiAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25tb3VzZWRvd24gPSBmdW5jdGlvbihldmVudCl7CiAKICAgICAgICAgICAgICAgICAgICAgaWYoZXZlbnQud2hpY2g9PTMpcmV0dXJuIGZhbHNlOy8v5bGP6JS95Y+z6ZSuCiAKICAgICAgICAgICAgICAgICAgICAgbGV0IHNlZG93blRvcCA9IHpobUxvZ29EcmFnLm9mZnNldFRvcDsKIAogICAgICAgICAgICAgICAgICAgICBsZXQgemhtTG9nb0ljb25IZWlnaHQgPSB6aG1Mb2dvSWNvbi5vZmZzZXRIZWlnaHQ7CiAKICAgICAgICAgICAgICAgICAgICAgbGV0IGJvdHRvbVNwYWNlID0gMTA7CiAKICAgICAgICAgICAgICAgICAgICAgaWYoZXZlbnQudGFyZ2V0LmNsYXNzTmFtZSAhPSAnaWNvbkxvZ28nKXJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAvL2xldCBzaGlmdFggPSBldmVudC5jbGllbnRYIC0gemhtTG9nb0RyYWcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkubGVmdDsKICAgICAgICAgICAgICAgICAgICAgbGV0IHNoaWZ0eCA9IDU7CiAKICAgICAgICAgICAgICAgICAgICAgbGV0IHNoaWZ0WSA9IGV2ZW50LmNsaWVudFktemhtTG9nb0RyYWcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkudG9wOwogCiAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnBvc2l0aW9uID0gJ2ZpeGVkJzsKIAogICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS56SW5kZXggPSA5OTk5OTk5OwogCiAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kKHpobUxvZ29EcmFnKTsKIAogICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBvbk1vdXNlTW92ZShldmVudCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgIC8vemhtTG9nb0RyYWcuc3R5bGUubGVmdCA9IHBhZ2VYIC0gc2hpZnRYICsgJ3B4JzsKICAgICAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLmxlZnQgPSAnNXB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodCAtIHpobUxvZ29JY29uSGVpZ2h0LWJvdHRvbVNwYWNlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGV2ZW50LnBhZ2VZLXNoaWZ0WTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgeSA9IE1hdGgubWluKE1hdGgubWF4KDAsIHkpLCBoZWlnaHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS50b3AgPSB5KydweCc7CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgLy/lnKhtb3VzZW1vdmXkuovku7bkuIrnp7vliqjlm77moIcKICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJyxvbk1vdXNlTW92ZSk7CiAgICAgICAgICAgICAgICAgICAgIC8v5p2+5byA5LqL5Lu2CiAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50Lm9ubW91c2V1cCA9IGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaWNvblRvcCcsemhtTG9nb0RyYWcub2Zmc2V0VG9wKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJywgb25Nb3VzZU1vdmUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5vbm1vdXNldXAgPSBudWxsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVpZ2h0ID0gemhtTG9nb0RyYWcub2Zmc2V0VG9wK3pobUxvZ29JY29uSGVpZ2h0K2JvdHRvbVNwYWNlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1Mb2dvRHJhZy5vZmZzZXRUb3AgPCAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnRvcCA9JzBweCc7CiAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHdpbmRvdy5pbm5lckhlaWdodCA8IGhlaWdodCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS50b3AgPXdpbmRvdy5pbm5lckhlaWdodC16aG1Mb2dvSWNvbkhlaWdodC1ib3R0b21TcGFjZSsncHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAvL2NsaWNr5LqL5Lu25aSE55CGCiAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2godHlwZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd2aWRlbyc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1Mb2dvRHJhZy5vZmZzZXRUb3A9PXNlZG93blRvcCAmJiB3ZWIubGVuZ3RoID09IDAgJiYgemhtTG9nb0RyYWcub2Zmc2V0VG9wPjAgJiYgd2luZG93LmlubmVySGVpZ2h0ID4gaGVpZ2h0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor7flnKjop4bpopHmkq3mlL7pobXngrnlh7vlm77moIcnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ211c2ljJzoKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1Mb2dvRHJhZy5vZmZzZXRUb3A9PXNlZG93blRvcCAmJiBlLnRhcmdldC5jbGFzc05hbWUgPT0gJ2ljb25Mb2dvJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJywgb25Nb3VzZU1vdmUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3pobUxvZ29EcmFnLm9ubW91c2V1cCA9IG51bGw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtdXNpY1VybERhdGEgPSBbCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC9tdXNpY1wuMTYzXC5jb21cLyNcLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDovXmh0dHBzPzpcL1wveVwubXVzaWNcLjE2M1wuY29tXC9tXC8oPzpzb25nfGRqKVw/aWQvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL211c2ljXC4xNjNcLmNvbVwvKD86c29uZ3xkailcP2lkL30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC95XC5xcVwuY29tXC9uXC9yeXFxXC9wbGF5ZXIvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L2t1Z291XC5jb20vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L2t1d29cLmNuL30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC93d3dcLnhpbWFsYXlhXC5jb20vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG11c2ljVXJsID0gbXVzaWNVcmxEYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihtdXNpY1VybC5sZW5ndGg9PTApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KHdlYlswXS50aXApOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2god2ViWzBdLm5hbWUpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25ldGVhc2UnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXRlYXNlRnVuKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3FxJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFGdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAna3Vnb3UnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrdWdvdUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdrdXdvJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga3V3b0Z1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd4aW1hbGF5YSc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhpbWFsYXlhRnVuKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBuZXRlYXNlRnVuKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsUGFyYW1zID0gX3RoaXMuZ2V0VXJsUGFyYW1zKGxvY2F0aW9uLmhyZWYpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsUGFyYW1zLmlkID09IHVuZGVmaW5lZCkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ldGVhc2VVcmxFbmNvZGUgPSBlbmNvZGVVUklDb21wb25lbnQoJ2h0dHBzOi8vbXVzaWMuMTYzLmNvbS9zb25nP2lkPScrdXJsUGFyYW1zLmlkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvcGVuVXJsID0gd2ViVXJsKyI/aWQ9Iit1cmxQYXJhbXMuaWQrIiZ0eXBlPW5ldGVhc2UiCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihvcGVuVXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBxcUZ1bigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHFxU29uZ01hdGNoOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnBsYXllcl9tdXNpY19faW5mbyIpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxcVNvbmdNYXRjaCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5ZXJfbXVzaWNfX2luZm8iKS5jaGlsZE5vZGVzWzBdLmhyZWYubWF0Y2goL3NvbmdEZXRhaWxcLyhcUyopXD8vKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNzaW1fc29uZ19pbmZvIikpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxU29uZ01hdGNoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3NpbV9zb25nX2luZm8iKS5jaGlsZE5vZGVzWzBdLmhyZWYubWF0Y2goL3NvbmdcLyhcUyopLmh0bWwvKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxU29uZ01hdGNoID0gJyc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXFxU29uZ01hdGNoWzFdKXtjb25zb2xlLmxvZygn5rKh5pyJ6I635Y+W5Yiw5q2M5puySUQnKTsgcmV0dXJufTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpb0xpbmsgPSBlbmNvZGVVUklDb21wb25lbnQoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiYXVkaW8iKS5zcmMpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz9pZD0nK3FxU29uZ01hdGNoWzFdKycmdHlwZT1xcSZwbGF5VXJsPScrYXVkaW9MaW5rOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4ob3BlblVybCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24ga3Vnb3VGdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpb01vZHVsZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhdWRpb01vZHVsZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXVkaW9Nb2R1bGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhdWRpb01vZHVsZScpLnN0eWxlPSdib3R0b206MHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3Nob3dIaWRlX3BsYXliYXInKS5jbGFzc05hbWUgPSAnaWNvbiBzaG93LXBsYXliYXItYnRuJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJywyMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGt1d29GdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5Q29udHJvbCcpLnN0eWxlPSdib3R0b206MHB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24geGltYWxheWFGdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54bS1wbGF5ZXInKS5zdHlsZT0nYm90dG9tOjBweCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJywyMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAneW91dHViZSc6CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICB9OwogCiAgICAgICAgICAgICAgICAgfTsKIAogICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLm9uZHJhZ3N0YXJ0ID0gZnVuY3Rpb24oKXsKICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgIC8v5LiL6L29CiAgICAgICAgICAgIHN0YXRpYyBMUl9kb3dubG9hZCh1cmwsZmlsZW5hbWUpewogCiAgICAgICAgICAgICAgICBsZXQgdWEgPSBuYXZpZ2F0b3IudXNlckFnZW50LnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyh1YS5tYXRjaCgvdmVyc2lvblwvKFtcZC5dKykuKnNhZmFyaS8pKTsKIAogICAgICAgICAgICAgICAgaWYodWEubWF0Y2goL3ZlcnNpb25cLyhbXGQuXSspLipzYWZhcmkvKSl7CiAKICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3Blbih1cmwpOwogCiAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKHVybCxmaWxlbmFtZSk7CiAgICAgICAgICAgICAgICB9CiAKIAogICAgICAgICAgICB9CiAKICAgICAgICB9CiAKICAgICAgICBjbGFzcyBDb3Vwb25DbGFzcyBleHRlbmRzIEJhc2VDbGFzc3sKIAogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogCiAgICAgICAgICAgICAgICBzdXBlcigpOwogCiAgICAgICAgICAgICAgICB0aGlzLmRpdkVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJkaXYiKTsKIAogICAgICAgICAgICAgICAgdGhpcy5kaXZFbGVtZW50LmlkPSd6aG1fZGl2X3MnOwogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGFvYmFvKCl7CiAKICAgICAgICAgICAgICAgIGxldCBub2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI0pfanVWYWxpZCcpOwogCiAgICAgICAgICAgICAgICBub2RlLnN0eWxlPSdvdmVyZmxvdzppbmhlcml0OycKIAogICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9ICd6aG1fdGFiX3Rhb2Jhbyc7CiAKICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q291cG9uSW5mbyhub2RlLGNsYXNzTmFtZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdG1hbGwoKXsKIAogICAgICAgICAgICAgICAgbGV0IG5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuQWN0aW9ucy0tbGVmdEJ1dHRvbnMtLTFNM0trRjcnKT9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuQWN0aW9ucy0tbGVmdEJ1dHRvbnMtLTFNM0trRjcnKTpkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjSl9MaW5rQnV5JykucGFyZW50Tm9kZTsKIAogICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9ICd6aG1fdGFiX3RtYWxsJzsKIAogICAgICAgICAgICAgICAgdGhpcy5nZXRDb3Vwb25JbmZvKG5vZGUsY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0bWFsbENhb3NoaSgpewogCiAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5BY3Rpb25zLS1sZWZ0QnV0dG9ucy0tMU0zS2tGNycpP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5BY3Rpb25zLS1sZWZ0QnV0dG9ucy0tMU0zS2tGNycpOmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNKX0xpbmtCdXknKS5wYXJlbnROb2RlOwogCiAgICAgICAgICAgICAgICBsZXQgY2xhc3NOYW1lID0gJ3pobV90YWJfdG1hbGwnOwogCiAgICAgICAgICAgICAgICB0aGlzLmdldENvdXBvbkluZm8obm9kZSxjbGFzc05hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRtYWxsT3RoZXIoKXsKIAogICAgICAgICAgICAgICAgbGV0IG5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG0tbXNnLWJveCcpOwogCiAgICAgICAgICAgICAgICBsZXQgY2xhc3NOYW1lID0gJ3pobV90YWJfdG1hbGwnOwogCiAgICAgICAgICAgICAgICB0aGlzLmdldENvdXBvbkluZm8obm9kZSxjbGFzc05hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGpkKCl7CiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpPT57CiAKICAgICAgICAgICAgICAgICAgICBsZXQgamRHb29kc0lkID0gY291cG9uVXJsLm1hdGNoKC9qZFwuKGhrfGNvbSlcLyhcUyopLmh0bWwvKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBub2RlPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjY2hvb3NlLWJ0bnMnKTsKIAogICAgICAgICAgICAgICAgICAgIG5vZGUuYmVmb3JlKHRoaXMuZGl2RWxlbWVudCk7CiAKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcXVlc3QoJ2dldCcsYGh0dHBzOi8vYXBpLnR5cGVjaHJvbWUuY29tL2luZGV4X2pkX25ldy5waHA/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6aG1fbW9uZXkiIHN0eWxlPSdtYXJnaW4tdG9wOjdweDsnPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fYW1vdW50X21vbmV5Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leV9zaWduIiBzdHlsZT0nbWFyZ2luLXRvcDotMTBweDsnPsKlPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fbW9uZXlfbnVtIj4ke2l0ZW0uZGlzY291bnR9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fY29uZGl0aW9uIj7mu6Eke2l0ZW0ucXVvdGF95YWD5Y+v55SoPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX3RpbWUiIHN0eWxlPSdtYXJnaW4tdG9wOjEwcHg7Jz4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX3Rlcm0iPuacieaViOacnzwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fZGF0ZSI+JHtpdGVtLmVuZFRpbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jaXJjbGUiIHN0eWxlPSJyaWdodDo0NHB4OyI+PC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9saW5rX2NvdXBvbiIgc3R5bGU9InBhZGRpbmc6MHB4IDE2cHggMHB4IDE2cHg7Ij4KICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJ6aG1fZ2V0X2xpbmtfdGV4dCIgc3R5bGU9ImxldHRlci1zcGFjaW5nOiAxMHB4O2ZvbnQtc2l6ZToxNnB4O21hcmdpbi10b3A6MTBweDsiIGhyZWY9IiR7aXRlbS5jb3Vwb25fbGlua30iIHRhcmdldD0nX2JsYW5rJyByZWw9J25vb3BlbmVyIG5vcmVmZXJyZXIgbm9mb2xsb3cnIHN0eWxlPSJtYXJnaW4tbGVmdDoxNnB4O3dpZHRoOjM0cHg7Ij7pooblj5Y8L2E+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICAgIGAKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobV9kaXZfcycpLmlubmVySFRNTCA9IGh0bWw7CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAKIAogICAgICAgICAgICAgICAgfSxjb3Vwb25XYWl0VGltZSkKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGdldENvdXBvbkluZm8obm9kZSxjbGFzc05hbWUpewogCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpPT57CiAKICAgICAgICAgICAgICAgICAgICBsZXQgZ29vZHNfaWQgPSB0aGlzLmdldFF1ZXJ5U3RyaW5nKCdpZCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoIWdvb2RzX2lkKXtjb25zb2xlLmxvZygnZ29vZHNfaWQnKTtyZXR1cm59OwogCiAgICAgICAgICAgICAgICAgICAgaWYoY2xhc3NOYW1lID09ICd6aG1fdGFiX3Rhb2JhbycpewogCiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDEpJykuYmVmb3JlKHRoaXMuZGl2RWxlbWVudCk7CiAKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5iZWZvcmUodGhpcy5kaXZFbGVtZW50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gIDwvZGl2PgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NvbnRlbnQiPgogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9hbW91bnRfbW9uZXkiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX21vbmV5X3NpZ24iPsKlPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fbW9uZXlfbnVtIj4ke3Jlc3AueW91aHVpcXVhbn08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jb25kaXRpb24iPiR7cmVzcC5jb3Vwb25faW5mb308L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGltZSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV90ZXJtIj7mnInmlYjmnJ88L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2RhdGUiPiR7cmVzcC5jb3Vwb25fZW5kX3RpbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jaXJjbGUiPjwvZGl2PgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fbGlua19jb3Vwb24iIHN0eWxlPSJtYXJnaW4tcmlnaHQ6Ij4KICAgICAgICAgICAgPGEgY2xhc3M9InpobV9nZXRfbGlua190ZXh0IiBvbmNsaWNrPSJ3aW5kb3cub3BlbignaHR0cHM6Ly9hcGkudHlwZWNocm9tZS5jb20vY29kZS5waHA/bGluaz0ke3Jlc3AuY29kZV91cmx9JykiPueCueWHu+mihuWPljwvYT4KICAgICAgICAgICAgPGRpdiBpZD0idGJxcmNvZGUiIGNsYXNzPSJ6aG1fcXJjb2RlIj48L2Rpdj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICAgICAgYDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1fZGl2X3MnKS5pbm5lckhUTUw9aHRtbDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHFyY29kZSA9IG5ldyBRUkNvZGUoInRicXJjb2RlIiwgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiA2NywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDY3LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yRGFyayA6ICIjMTIxMjEyIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvckxpZ2h0IDogIiNmZmZmZmYiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcnJlY3RMZXZlbCA6IFFSQ29kZS5Db3JyZWN0TGV2ZWwuTQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFyY29kZS5tYWtlQ29kZShyZXNwLmNvZGVfdXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkFjdGlvbnMtLXJvb3QtLWh3RXVqZ2MnKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuQWN0aW9ucy0tcm9vdC0taHdFdWpnYycpLnN0eWxlPSJwb3NpdGlvbjp1bnNldCI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9LGNvdXBvbldhaXRUaW1lKTsKICAgICAgICAgICAgfQogCiAgICAgICAgfQogCiAgICAgICAgY2xhc3MgUGxheVZpZGVvQ2xhc3MgZXh0ZW5kcyBCYXNlQ2xhc3N7CiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CiAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB9CiAKICAgICAgICB9CiAKICAgICAgICBjbGFzcyBQbGF5TXVzaWNDbGFzcyBleHRlbmRzIEJhc2VDbGFzc3sKICAgICAgICAgICAgY29uc3RydWN0b3IoKXsKICAgICAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICB4bWx5Q3JlYXRlQ2hlY2tib3goKXsKIAogICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdGxpID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnNvdW5kLWxpc3QgdWwgbGknKTsKIAogICAgICAgICAgICAgICAgc291bmRMaXN0bGkuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBjaGVja2JveGVkID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdpbnB1dCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoY2hlY2tib3hlZCl7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy50ZXh0Jyk7CiAKICAgICAgICAgICAgICAgICAgICBpZighdGl0bGUpewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfTsKIAogICAgICAgICAgICAgICAgICAgIHRpdGxlLnN0eWxlID0gIndpZHRoOjM2MHB4IjsKIAogICAgICAgICAgICAgICAgICAgIGxldCBzcmMgPSB0aXRsZS5xdWVyeVNlbGVjdG9yKCdhJykuZ2V0QXR0cmlidXRlKCdocmVmJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgZmlyc3REb20gPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5pY29uLXdyYXBwZXInKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dERvbSA9IGZpcnN0RG9tLmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgIGlucHV0RG9tLnN0eWxlPSAnbWluLXdpZHRoOiAwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgIGlucHV0RG9tLmlubmVySFRNTCA9ICI8aW5wdXQgdHlwZT0nY2hlY2tib3gnIG5hbWU9J3pobUNoZWNrYm94JyB2YWx1ZT0iK3NyYysiICBjbGFzcz0nemhtQ2hlY2tib3gnPiI7CiAKICAgICAgICAgICAgICAgICAgICBmaXJzdERvbS5iZWZvcmUoaW5wdXREb20pOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgIH0KICAgICAgICB9CiAKICAgICAgICBjbGFzcyBaaENsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CiAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNob3dTcGVjaWFsQ29sdW1uKCl7CiAKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vd3d3LnpoaWh1LmNvbS8nKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBjYXJkUmVjb21tZW5kID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkZlZWQnKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGNhcmRSZWNvbW1lbmQubGVuZ3RoID4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBjYXJkUmVjb21tZW5kLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnNwZWNpYWxDb2x1bW4nKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighZGF0YVpvcClyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gZGF0YVpvcC5jYXJkLmNvbnRlbnQudHlwZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAnUG9zdCcpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+YScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTmFtZSA9ICdzcGVjaWFsQ29sdW1uIEJ1dHRvbiBWb3RlQnV0dG9uIFZvdGVCdXR0b24tLXVwJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnbGluZS1oZWlnaHQ6MjBweDtwYWRkaW5nOjBweCA1cHg7bWFyZ2luLXJpZ2h0OjVweDtib3JkZXItcmFkaXVzOjJweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pbm5lclRleHQgPSAn5paH56ugJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLmJlZm9yZShuZXdFbGVtZW50KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwcz86XC9cL3d3dy56aGlodS5jb21cL3NlYXJjaC8pKXsKICAgICAgICAgICAgICAgICAgICBsZXQgbj0wOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjYXJkU2VhcmNoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLlNlYXJjaFJlc3VsdC1DYXJkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrPjYwMCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNhcmRTZWFyY2gubGVuZ3RoID4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRTZWFyY2guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnNwZWNpYWxDb2x1bW4nKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRhdGFab3ApcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBkYXRhWm9wLmNhcmQuY29udGVudC50eXBlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAnUG9zdCcpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5zcGFuPmRpdj5hJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuY2xhc3NOYW1lID0gJ3NwZWNpYWxDb2x1bW4gQnV0dG9uIFZvdGVCdXR0b24gVm90ZUJ1dHRvbi0tdXAnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnbGluZS1oZWlnaHQ6MjBweDtwYWRkaW5nOjBweCA1cHg7bWFyZ2luLXJpZ2h0OjVweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuaW5uZXJUZXh0ID0gJ+aWh+eroCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUuYmVmb3JlKG5ld0VsZW1lbnQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBzaG93VmlkZW9UaXRsZSgpewogCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vJyl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgY2FyZFJlY29tbWVuZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5GZWVkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihjYXJkUmVjb21tZW5kLmxlbmd0aCA+MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY2FyZFJlY29tbWVuZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJy52aWRlb1RpdGxlJykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRhdGFab3ApcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGFzVmlkZW8gPSBkYXRhWm9wLmNhcmQuaGFzX3ZpZGVvOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihoYXNWaWRlbyA9PSB0cnVlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5kaXY+YScpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5kaXY+YScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+YScpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5zcGFuPmEnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5jbGFzc05hbWUgPSAndmlkZW9UaXRsZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LnN0eWxlID0gJ2JhY2tncm91bmQ6IHJnYmEoMjU1LCAxMzEsIDg2LCAwLjEyKTtjb2xvcjogcmdiKDI1NSwgNzMsIDEyKTtsaW5lLWhlaWdodDoyMHB4O3BhZGRpbmc6MXB4IDZweDttYXJnaW4tcmlnaHQ6NXB4O2JvcmRlci1yYWRpdXM6MnB4O2ZvbnQtc2l6ZToxNHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlubmVyVGV4dCA9ICfop4bpopEnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUuYmVmb3JlKG5ld0VsZW1lbnQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKIAogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lcj0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2FyZFNlYXJjaCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5TZWFyY2hSZXN1bHQtQ2FyZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKz42MDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBpZihjYXJkU2VhcmNoLmxlbmd0aCA+MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXJkU2VhcmNoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJy52aWRlb1RpdGxlJykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkYXRhWm9wKXJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gZGF0YVpvcC5jYXJkLmNvbnRlbnQudHlwZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGUgPT0gJ1p2aWRlbycgKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+c3Bhbj5kaXY+YScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF0aXRsZSlyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdidXR0b24nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTmFtZSA9ICd2aWRlb1RpdGxlJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LnN0eWxlID0gJ2JhY2tncm91bmQ6IHJnYmEoMjU1LCAxMzEsIDg2LCAwLjEyKTtjb2xvcjogcmdiKDI1NSwgNzMsIDEyKTtsaW5lLWhlaWdodDoyMHB4O3BhZGRpbmc6MXB4IDZweDttYXJnaW4tcmlnaHQ6NXB4O2JvcmRlci1yYWRpdXM6MnB4O2ZvbnQtc2l6ZToxNHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pbm5lclRleHQgPSAn6KeG6aKRJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKIAogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlVmlkZW8oKXsKIAogICAgICAgICAgICAgICAgbGV0IGNhcmQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuRmVlZCcpOwogCiAgICAgICAgICAgICAgICBjYXJkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvID0gZGF0YVpvcC5jYXJkLmNvbnRlbnQudmlkZW9faWQ7CiAKICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5wYXJlbnROb2RlLnN0eWxlPSdkaXNwbGF5Om5vbmU7JzsKIAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVBRCgpewogCiAgICAgICAgICAgICAgICBsZXQgemhIaWRlQUQgPSBgLlBjLWNhcmQsLlBjLXdvcmR7ZGlzcGxheTpub25lICFpbXBvcnRhbnQ7fS5Ub3BzdG9yeUl0ZW0tLWFkdmVydENhcmR7ZGlzcGxheTpub25lICFpbXBvcnRhbnR9YDsKIAogICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHpoSGlkZUFEKSk7CiAKICAgICAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgZG93bmxvYWRWaWRlbygpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzOlwvXC93d3dcLnpoaWh1XC5jb21cL3p2aWRlb1wvLisvKSl7CiAKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnpobURvd25sb2FkJykpcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBidXR0b24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuX2UyOTZwZycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGJ1dHRvbi5sZW5ndGg8MilyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkQnV0ID0gYnV0dG9uWzFdLmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZighZG93bmxvYWRCdXQucXVlcnlTZWxlY3RvcignLl8xdGc4b2lyJykpcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkQnV0LnF1ZXJ5U2VsZWN0b3IoJy5fMXRnOG9pcicpLmlubmVyVGV4dD0n5LiL6L29JzsKIAogICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5zZXRBdHRyaWJ1dGUoJ2lkJywnZG93bmxvYWRWaWRlbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblsxXS5iZWZvcmUoZG93bmxvYWRCdXQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNkb3dubG9hZFZpZGVvJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWRlb0lkOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuWlZpZGVvLXBsYXllcicpKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6VmlkZW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuWlZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9EYXRhID0gSlNPTi5wYXJzZSh6VmlkZW8uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvSWQgPSB2aWRlb0RhdGEuY2FyZC5jb250ZW50LnZpZGVvX2lkOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1VybCA9IHdpbmRvdy5sb2NhdGlvbi5ocmVmOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvT2JqID0gdmlkZW9Vcmwuc3BsaXQoJz8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvSWQgPSB2aWRlb09ialswXS5zcGxpdCgnLycpLnBvcCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9JZCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquiOt+WPluinhumikWlkJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aERvd25sb2FkKHZpZGVvSWQpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfSwyMDAwKTsKIAogICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdET01Ob2RlSW5zZXJ0ZWQnLChlKSA9PiB7CiAKICAgICAgICAgICAgICAgICAgICBpZighZS5yZWxhdGVkTm9kZS5xdWVyeVNlbGVjdG9yKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICB2YXIgcGxheUJhciA9IGUucmVsYXRlZE5vZGUucXVlcnlTZWxlY3RvcignOnNjb3BlID4gZGl2Omxhc3QtY2hpbGQgPiBkaXY6Zmlyc3QtY2hpbGQgPiBkaXY6bnRoLW9mLXR5cGUoMiknKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKCFwbGF5QmFyIHx8IHBsYXlCYXIucXVlcnlTZWxlY3RvcignLnpobURvd25sb2FkJykpIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgIGlmKHBsYXlCYXIuY2xhc3NOYW1lICE9ICdjc3MtMTk5cXg3bScpcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5QnV0PSBwbGF5QmFyLnBhcmVudE5vZGUucXVlcnlTZWxlY3RvcignLl8xYzFjdnVnJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlCdXRMaSA9IHBsYXlCdXQucXVlcnlTZWxlY3RvcignOnNjb3BlID4gZGl2Omxhc3QtY2hpbGQgPiBkaXY6Zmlyc3QtY2hpbGQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZighcGxheUJ1dExpKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRvd25sb2FkQnV0ID0gcGxheUJ1dExpLmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5jbGFzc05hbWUgPSBwbGF5QnV0TGkuY2xhc3NOYW1lICsgJyB6aG1Eb3dubG9hZCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRvd25sb2FkQnV0LnF1ZXJ5U2VsZWN0b3IoJy5fMXRnOG9pcicpKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRCdXQucXVlcnlTZWxlY3RvcignLl8xdGc4b2lyJykuaW5uZXJUZXh0PSfkuIvovb0nOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlCdXRMaS5iZWZvcmUoZG93bmxvYWRCdXQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkQnV0LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkZW9JZDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gZ2V0VmlkZW9EYXRhKGRvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyZW50RG9tID0gZG9tLnBhcmVudE5vZGUKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcmVudERvbS5jbGFzc05hbWUgJiYgcGFyZW50RG9tLmNsYXNzTmFtZT09J0ZlZWQnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhwYXJlbnREb20uY2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9EYXRhID0gSlNPTi5wYXJzZShwYXJlbnREb20uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0lkID0gdmlkZW9EYXRhLmNhcmQuY29udGVudC52aWRlb19pZDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRWaWRlb0RhdGEocGFyZW50RG9tKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0VmlkZW9EYXRhKHBsYXlCdXQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKHZpZGVvSWQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9JZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq6I635Y+W6KeG6aKRaWQnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpoRG93bmxvYWQodmlkZW9JZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIH0sMTAwMCk7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgZnVuY3Rpb24gemhEb3dubG9hZCh2aWRlb0lkKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAnaHR0cHM6Ly9sZW5zLnpoaWh1LmNvbS9hcGkvdjQvdmlkZW9zLycrdmlkZW9JZDsKIAogICAgICAgICAgICAgICAgICAgIF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5wbGF5bGlzdCAhPSB1bmRlZmluZWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheV91cmwgPSBkYXRhLnBsYXlsaXN0LkxELnBsYXlfdXJsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9OYW1lID0gdmlkZW9JZCsiLm1wNCI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHBsYXlfdXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLkxSX2Rvd25sb2FkKHBsYXlfdXJsLHZpZGVvTmFtZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5LiL6L295aSx6LSl77yBJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlUmlnaHQoKXsKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3d1wuemhpaHVcLmNvbVwvcGVvcGxlXC8uKi8pKXsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGxldCB6aEZ1bGxTY3JlZW4gPSBgLkdsb2JhbFNpZGVCYXIge2Rpc3BsYXk6IG5vbmUgIWltcG9ydGFudDt9CiAgICAgICAgICAgICAgICAgICAgLmNzcy0xcXl5dGo3e2Rpc3BsYXk6IG5vbmUgIWltcG9ydGFudDt9CiAgICAgICAgICAgICAgICAgICAgLlF1ZXN0aW9uLXNpZGVDb2x1bW57ZGlzcGxheTpub25lICFpbXBvcnRhbnR9CiAgICAgICAgICAgICAgICAgICAgLlRvcHN0b3J5LW1haW5Db2x1bW57d2lkdGg6MTAwJSAhaW1wb3J0YW50fQogICAgICAgICAgICAgICAgICAgIC5RdWVzdGlvbi1tYWluQ29sdW1ue3dpZHRoOjEwMDBweCAhaW1wb3J0YW50fQogICAgICAgICAgICAgICAgICAgIC5jc3MtY2F6ZzQ4e21hcmdpbjogMHB4IDE2cHggMHB4IDBweCAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuUXVlc3Rpb25XYWl0aW5nLW1haW5Db2x1bW57d2lkdGg6MTAwJSAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuY3NzLTFqNWQzbGx7cGFkZGluZy1sZWZ0OjEwcHg7fQogICAgICAgICAgICAgICAgICAgIC5jc3MteWhqd29le2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbiAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuQXV0aG9ySW5mb3ttYXgtd2lkdGg6MTAwMHB4ICFpbXBvcnRhbnQ7fTsKICAgICAgICAgICAgICAgICAgICBgOwogICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHpoRnVsbFNjcmVlbikpOwogCiAgICAgICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjaGFuZ2VMaW5rKCl7CiAKICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCd0YXJnZXQnKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0gdGhpcy5nZXRVcmxQYXJhbXMoY291cG9uVXJsKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKG9iai50YXJnZXQgPT0gdW5kZWZpbmVkKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRlY29kZVVSSUNvbXBvbmVudChvYmoudGFyZ2V0KTsKIAogICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bGluazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVLZXl3b3JkKCl7CiAKICAgICAgICAgICAgICAgIHZhciBHTUtleXdvcmQgPSBHTV9nZXRWYWx1ZSgnaW5wdXRaaEtleXdvcmQnLCcwJyk7CiAKICAgICAgICAgICAgICAgIGlmKEdNS2V5d29yZCA9PSAnMCcgfHwgR01LZXl3b3JkID09ICcnKSByZXR1cm47CiAKICAgICAgICAgICAgICAgIGxldCBrZXl3b3JkID0gR01LZXl3b3JkLnNwbGl0KCcsJyk7CiAKICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkNvbnRlbnRJdGVtJyk7CiAKICAgICAgICAgICAgICAgIGtleXdvcmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQuZm9yRWFjaChmdW5jdGlvbih2YWx1ZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKHZhbHVlLmdldEF0dHJpYnV0ZSgnZGF0YS16b3AnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YVpvcCAmJiBkYXRhWm9wLnRpdGxlLmluZGV4T2YoaXRlbSkgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbUNhcmQgPSB2YWx1ZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1DYXJkQ2xhc3M9IGl0ZW1DYXJkLmNsYXNzTmFtZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbUNhcmRDbGFzcy5pbmRleE9mKCdUb3BzdG9yeUl0ZW0taXNSZWNvbW1lbmQnKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtQ2FyZC5zdHlsZT0nZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlQXV0aG9yTmFtZSgpewogCiAgICAgICAgICAgICAgICB2YXIgR01BdXRob3JOYW1lID0gR01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJywnMCcpOwogCiAgICAgICAgICAgICAgICBpZihHTUF1dGhvck5hbWUgPT0gJzAnIHx8IEdNQXV0aG9yTmFtZSA9PSAnJykgcmV0dXJuOwogCiAgICAgICAgICAgICAgICBsZXQgYXV0aG9yTmFtZSA9IEdNQXV0aG9yTmFtZS5zcGxpdCgnLCcpOwogCiAgICAgICAgICAgICAgICAvL+aQnOe0oumhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKIAogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdXNlckxpbmsgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ2FyZCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYodXNlckxpbmsubGVuZ3RoID4gNSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdXNlckxpbmsuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdiJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGF1dGhvci5pbm5lclRleHQpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobj4zMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuKys7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMTAwKQogCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+WbnuetlOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvcXVlc3Rpb25cLy4qLykpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1Eb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuTGlzdC1pdGVtJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihpdGVtRG9tLmxlbmd0aD4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtRG9tLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuQ29udGVudEl0ZW0nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoY29udGVudC5nZXRBdHRyaWJ1dGUoJ2RhdGEtem9wJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGRhdGFab3AuYXV0aG9yTmFtZSkgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v562J5L2g5Zue562U6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vcXVlc3Rpb24vd2FpdGluZycpewogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBxdWVzdGlvbkxpc3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuanNOYXZpZ2FibGUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihxdWVzdGlvbkxpc3QubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVzdGlvbkxpc3QuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3JEb21UZXh0ID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuY3NzLXRuc2F4aCcpLmlubmVyVGV4dDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvckRvbVRleHQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3IgPSBhdXRob3JEb21UZXh0LnJlcGxhY2UoJyInLCcnKS5yZXBsYWNlKCfnmoTmj5Dpl64nLCcnKS5yZXBsYWNlKC8oXlxzKyl8KFxzKyQpL2csJycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvcil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvck5hbWUuaW5kZXhPZihhdXRob3IpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGU9J2Rpc3BsYXk6bm9uZTsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMzAwKQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/mjqjojZDpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vd3d3LnpoaWh1LmNvbS8nKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkNvbnRlbnRJdGVtJyk7CiAKICAgICAgICAgICAgICAgICAgICBjb250ZW50LmZvckVhY2goZnVuY3Rpb24odmFsdWUpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZSh2YWx1ZS5nZXRBdHRyaWJ1dGUoJ2RhdGEtem9wJykpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvck5hbWUuaW5kZXhPZihkYXRhWm9wLmF1dGhvck5hbWUpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1DYXJkID0gdmFsdWUucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW1DYXJkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1DYXJkLnN0eWxlPSdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgICAgIGxldCB0aW1lckNsb3NlQXV0aG9yID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBjb21tZW50RG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkNvbW1lbnRzLWNvbnRhaW5lcicpP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5Db21tZW50cy1jb250YWluZXInKTpkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY3NzLTM0cG9kcicpOwogCiAgICAgICAgICAgICAgICAgICAgLy9sZXQgY29tbWVudEJveCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5jc3MtMzRwb2RyJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihjb21tZW50RG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29tbWVudExpID0gY29tbWVudERvbS5xdWVyeVNlbGVjdG9yQWxsKCcuY3NzLTFmcm45M3g+ZGl2PmRpdicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvbW1lbnRMaVswXS5jbGFzc05hbWU9PSdjc3MtMTk0djczbScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21tZW50TGkuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb21tZW50QXV0aG9yTmFtZURvbSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLmNzcy0xcmQwaDZmJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29tbWVudEF1dGhvck5hbWUgPSBjb21tZW50QXV0aG9yTmFtZURvbS5pbm5lclRleHQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3JOYW1lLmluZGV4T2YoY29tbWVudEF1dGhvck5hbWUpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHJlbW92ZVlhbnh1YW4oKXsKIAogICAgICAgICAgICAgICAgLy/lm57nrZTpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3dy56aGlodS5jb21cL3F1ZXN0aW9uXC8uKi8pKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBpdGVtRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkxpc3QtaXRlbScpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoaXRlbURvbS5sZW5ndGg+MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbURvbS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tT3JkaW5hcnlMYWJlbC1jb250ZW50Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvbnRlbnQgJiYgY29udGVudC5pbm5lclRleHQuaW5kZXhPZign55uQ6YCJJykgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBsZXQgYW5zd2VyQ2FyZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5BbnN3ZXJDYXJkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihhbnN3ZXJDYXJkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGFuc3dlckNhcmQucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tT3JkaW5hcnlMYWJlbC1jb250ZW50Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudCAmJiBjb250ZW50LmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgIknKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuc3dlckNhcmQuc3R5bGUgPSAnZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAvL+aQnOe0oumhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewogCiAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gMDsKIAogICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2FyZExpc3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ2FyZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNhcmRMaXN0Lmxlbmd0aCA+IDUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZExpc3QuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuS2ZlQ29sbGVjdGlvbi1QY0NvbGxlZ2VDYXJkLXR5cGUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGUgJiYgdHlwZS5pbm5lclRleHQuaW5kZXhPZign55uQ6YCJ5LiT5qCPJykgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdiJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yWWFueHVhbiA9IFsn5pWF5LqL5qGj5qGI5bGAJywgJ+ebkOmAieaOqOiNkCcsICfnm5DpgInnp5Hmma4nLCAn55uQ6YCJ5oiQ6ZW/6K6h5YiSJywgJ+efpeS5juebkOmAieS8muWRmCcsICfnn6XkuY7nm5DpgInliJvkvZzogIUnLCAn55uQ6YCJ5b+D55CGJywgJ+ebkOmAieWBpeW6t+W/heS/ruivvicsICfnm5DpgInlpYflppnnianor60nLCAn55uQ6YCJ55Sf5rS76aaGJywgJ+ebkOmAieiBjOWcuicsICfnm5DpgInmloflrabnlITpgIknLCAn55uQ6YCJ5L2c6ICF5bCP566h5a62JywgJ+ebkOmAieWNmueJqemmhicsICfnm5DpgInngrnph5EnLCAn55uQ6YCJ5rWL6K+E5a6kJywgJ+ebkOmAieenkeaKgOWJjeayvycsICfnm5DpgInkvJrlkZjnsr7lk4EnLCAn5Y6G5Y+y546v5ri46K6wJ107CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3IgJiYgYXV0aG9yWWFueHVhbi5pbmRleE9mKGF1dGhvci5pbm5lclRleHQpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobnVtPjMwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bSsrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9LDEwMCkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAvL+aOqOiNkOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ29udGVudEl0ZW0nKTsKIAogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tT3JkaW5hcnlMYWJlbC1jb250ZW50Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudCAmJiBjb250ZW50LmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgIknKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAKICAgICAgICAgICAgY2xvc2VBdXRob3IoKXsKICAgICAgICAgICAgICAgIC8v6YCa6L+H5a6a5pe25Zmo6I635Y+WCiAKICAgICAgICAgICAgICAgIGxldCB0aW1lckNsb3NlQXV0aG9yID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCB6aG1DbG9zZUF1dGhvckJ1dHRvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1DbG9zZUF1dGhvckJ1dHRvbicpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoemhtQ2xvc2VBdXRob3JCdXR0b24pcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvckluZm8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY3NzLTFyYXNhbXInKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvckluZm8pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1c2VyTmFtZUluZm8gPSBhdXRob3JJbmZvLnF1ZXJ5U2VsZWN0b3IoJy5Vc2VyTGluaycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVzZXJOYW1lSW5mbyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1c2VyTGlua0luZm8gPSB1c2VyTmFtZUluZm8ucXVlcnlTZWxlY3RvcignLlVzZXJMaW5rLWxpbmsnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvck5hbWVMaW5rID0gdXNlckxpbmtJbmZvLmlubmVyVGV4dDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IEdNQXV0aG9yTmFtZSA9IEdNX2dldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yQXJyYXkgPSBHTUF1dGhvck5hbWU/R01BdXRob3JOYW1lLnNwbGl0KCcsJyk6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBidXR0b25DbG9zZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25DbG9zZS5pbm5lckhUTUwgPSBhdXRob3JBcnJheS5pbmRleE9mKGF1dGhvck5hbWVMaW5rKSAhPSAtMT8n5bey5bGP6JS9Jzon5bGP6JS955So5oi3JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uQ2xvc2Uuc3R5bGUgPSBidXR0b25DbG9zZS5pbm5lckhUTUwgPT0gJ+W3suWxj+iUvSc/J3Bvc2l0aW9uOmFic29sdXRlO3JpZ2h0OjEwcHg7YmFja2dyb3VuZC1jb2xvcjojZmYyZTRkO2JvcmRlci1jb2xvcjojZmYyZTRkJzoncG9zaXRpb246YWJzb2x1dGU7cmlnaHQ6MTBweCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvbkNsb3NlLmNsYXNzTmFtZT0nQnV0dG9uIEZvbGxvd0J1dHRvbiBGRWZVcmRmTUlLcFFESkRxa2p0ZSBCdXR0b24tLXByaW1hcnkgQnV0dG9uLS1ibHVlIGVwTUpsMGxGUXVZYkM3anJ3cl9vIEptWXpha3k3TUVQTUZjSkRMTk1HJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uQ2xvc2Uuc2V0QXR0cmlidXRlKCdpZCcsJ3pobUNsb3NlQXV0aG9yQnV0dG9uJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXJOYW1lSW5mby5hcHBlbmRDaGlsZChidXR0b25DbG9zZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXJOYW1lSW5mby5wYXJlbnROb2RlLnN0eWxlPSdsaW5lLWhlaWdodDozNXB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uQ2xvc2UuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtQXV0aG9yTmFtZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGJ1dHRvbkNsb3NlLmlubmVySFRNTD09J+W3suWxj+iUvScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8YXV0aG9yQXJyYXkubGVuZ3RoO2krKyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvckFycmF5W2ldID09IGF1dGhvck5hbWVMaW5rKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF1dGhvckFycmF5LnNwbGljZShpLDEpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUF1dGhvck5hbWUgPSBhdXRob3JBcnJheS50b1N0cmluZygpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQXV0aG9yTmFtZT0gR01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJyk/R01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJykrJywnK2F1dGhvck5hbWVMaW5rOmF1dGhvck5hbWVMaW5rOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScsemhtQXV0aG9yTmFtZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncmVtb3ZlQXV0aG9yTmFtZScsJzIyJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25DbG9zZS5pbm5lckhUTUwgPSBidXR0b25DbG9zZS5pbm5lckhUTUwgPT0gJ+W3suWxj+iUvSc/J+Wxj+iUveeUqOaItyc6J+W3suWxj+iUvSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25DbG9zZS5zdHlsZSA9IGJ1dHRvbkNsb3NlLmlubmVySFRNTCA9PSAn5bey5bGP6JS9Jz8ncG9zaXRpb246YWJzb2x1dGU7cmlnaHQ6MTBweDtiYWNrZ3JvdW5kLWNvbG9yOiNmZjJlNGQ7Ym9yZGVyLWNvbG9yOiNmZjJlNGQnOidwb3NpdGlvbjphYnNvbHV0ZTtyaWdodDoxMHB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICB9CiAKICAgICAgICB9CiAKICAgICAgICBjbGFzcyBWaWRlb0Rvd25sb2FkQ2xhc3MgZXh0ZW5kcyBCYXNlQ2xhc3N7CiAKICAgICAgICAgICAgY29uc3RydWN0b3IoKXsKIAogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGR5VmlkZW9Eb3dubG9hZCgpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy54Zy12aWRlby1jb250YWluZXInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9Eb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZzTmF2ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmZ1eV93bWN0Om50aC1vZi10eXBlKDUpJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCd2c2RldGFpbCcpICE9IC0xKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfnu7zoibrmoI/nm67lhbPpl63kuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVEeVZpZGVvRG93bmxvYWQoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9QbGF5RG9tQWxsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgndmlkZW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9JbmRleCA9IHZpZGVvUGxheURvbUFsbC5sZW5ndGg+MT92aWRlb1BsYXlEb21BbGwubGVuZ3RoLTI6dmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0xOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1BsYXlEb20gPSB2aWRlb1BsYXlEb21BbGxbdmlkZW9JbmRleF07CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy9sZXQgdmlkZW9QbGF5RG9tID0gdmlkZW9QbGF5RG9tQWxsLmxlbmd0aD4xP3ZpZGVvUGxheURvbUFsbFt2aWRlb1BsYXlEb21BbGwubGVuZ3RoLTJdOnZpZGVvUGxheURvbUFsbFt2aWRlb1BsYXlEb21BbGwubGVuZ3RoLTFdOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvUGxheURvbS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIuaSreaUvue7k+adnyIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b1BsYXkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueGctc3dpdGNoLWNoZWNrZWQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5q2j5Zyo5LiL6L296K+356iN5L6vJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmZvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLlB6OHQybWVQJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWxlbmFtZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaW5mby5sZW5ndGg+MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYWNjb3VudCA9IGluZm9bdmlkZW9JbmRleF0uaW5uZXJUZXh0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sZXQgdGl0bGVBcnIgPSBpbmZvW3ZpZGVvSW5kZXgqMisxXS5pbm5lclRleHQuc3BsaXQoJyMnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2dCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy54aERvcGNRXycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdnRbdmlkZW9JbmRleF0uaW5uZXJUZXh0LnNwbGl0KCcjJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlbmFtZSA9IHRpdGxlWzBdP3RpdGxlWzBdK2FjY291bnQ6dGl0bGVbMV0rYWNjb3VudCsnLm1wNCc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZW5hbWUgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKSsnLm1wNCcKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQodmlkZW9QbGF5RG9tLmNoaWxkcmVuWzBdLnNyYyxmaWxlbmFtZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5bey5aSN5Yi25Yiw5Ymq6LS05p2/Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldENsaXBib2FyZCh2aWRlb1BsYXlEb20uY2hpbGRyZW5bMF0uc3JjKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKHZpZGVvUGxheURvbS5jaGlsZHJlblswXS5zcmMpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigid2hlZWwiLGdldENvbnRyb2xzKTsKIAogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihlLmNvZGU9PSdBcnJvd0Rvd24nIHx8IGUuY29kZT09J0Fycm93VXAnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGluc2VydGVkRG9tKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJ3ZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ0RPTU5vZGVJbnNlcnRlZCcsKGUpID0+IHsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0ZWREb20oKTsKIAogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZ2V0Q29udHJvbHMpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjcmVhdGVEeVZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgbGV0IGNvbnRyb2xBbGwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcueGctcmlnaHQtZ3JpZCcpOwogCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBjb250cm9sQWxsLmxlbmd0aD4xP2NvbnRyb2xBbGxbY29udHJvbEFsbC5sZW5ndGgtMl06Y29udHJvbEFsbFtjb250cm9sQWxsLmxlbmd0aC0xXTsKIAogICAgICAgICAgICAgICAgbGV0IHZpZGVvRG93bmxvYWREb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtRG91eWluRG93bmxvYWQnKTsKIAogICAgICAgICAgICAgICAgaWYodmlkZW9Eb3dubG9hZERvbSl7CiAKICAgICAgICAgICAgICAgICAgICB2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUpOwogCiAgICAgICAgICAgICAgICAgICAgLy92aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUucGFyZW50Tm9kZS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5wYXJlbnROb2RlKQogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBsZXQgcGxheVNldGluZyA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1wbGF5YmFjay1zZXR0aW5nJyk7CiAKICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZERvbSA9IHBsYXlTZXRpbmcuY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5zdHlsZT0nbWFyZ2luLXJpZ2h0OjIwcHg7JzsKIAogICAgICAgICAgICAgICAgLy9sZXQgZG93bmxvYWRUZXh0ID0gZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignZGl2OmZpcnN0LWNoaWxkID4gc3BhbjpmaXJzdC1jaGlsZCcpOwogCiAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRUZXh0ID0gZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignZGl2OmZpcnN0LWNoaWxkJyk7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5zdHlsZSA9ICdmb250LXNpemU6MTJweDtmb250LXdlaWdodDo0MDA7JzsKIAogICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnaWQnLCd6aG1Eb3V5aW5Eb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICBsZXQgZGV0YWlsID0gY29udHJvbHMucXVlcnlTZWxlY3RvcigneGctaWNvbjpudGgtb2YtdHlwZSgxKScpLmNoaWxkcmVuWzBdOwogCiAgICAgICAgICAgICAgICBsZXQgbGlua1VybCA9IGRldGFpbC5nZXRBdHRyaWJ1dGUoJ2hyZWYnKT9kZXRhaWwuZ2V0QXR0cmlidXRlKCdocmVmJyk6bG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgaWYobGlua1VybC5pbmRleE9mKCd3d3cuZG91eWluLmNvbScpPT0tMSl7CiAKICAgICAgICAgICAgICAgICAgICBsaW5rVXJsPScvL3d3dy5kb3V5aW4uY29tJytsaW5rVXJsOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBkb3dubG9hZFRleHQuc2V0QXR0cmlidXRlKCdkYXRhLXVybCcsbGlua1VybCk7CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5yZW1vdmVBdHRyaWJ1dGUoJ3RhcmdldCcpOwogCiAgICAgICAgICAgICAgICBkb3dubG9hZFRleHQuc2V0QXR0cmlidXRlKCdocmVmJywnamF2YXNjcmlwdDp2b2lkKDApOycpOwogCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5vbm1vdXNlb3Zlcj1mdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uY2xhc3NOYW1lPSd4Z3BsYXllci1wbGF5YmFjay1zZXR0aW5nIHNsaWRlLXNob3cnOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLm9ubW91c2VvdXQ9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLmNsYXNzTmFtZT0neGdwbGF5ZXItcGxheWJhY2stc2V0dGluZyc7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZEh0bWwgPSAnJzsKIAogICAgICAgICAgICAgICAgZG93bmxvYWRPcHRpb24uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkSHRtbCArPSBgPGRpdiBjbGFzcz0ieGdwbGF5ZXItcGxheXJhdGlvLWl0ZW0gJHtpdGVtLmlkfSIgaWQ9IiR7aXRlbS5pZH0iPiR7aXRlbS5uYW1lfTwvZGl2PmA7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1wbGF5cmF0aW8td3JhcCcpLmlubmVySFRNTCA9IGRvd25sb2FkSHRtbDsKIAogICAgICAgICAgICAgICAgZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignLnhncGxheWVyLXNsaWRlcicpLnN0eWxlPSd3aWR0aDo2MHB4IGltcG9ydGFudDsnOwogCiAgICAgICAgICAgICAgICBsZXQgYXV0b1BsYXkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueGdwbGF5ZXItYXV0b3BsYXktc2V0dGluZycpOwogCiAgICAgICAgICAgICAgICBhdXRvUGxheS5hZnRlcihkb3dubG9hZERvbSk7CiAKICAgICAgICAgICAgICAgIGxldCBkaXZEb20gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKIAogICAgICAgICAgICAgICAgZGl2RG9tLnN0eWxlPSJwb3NpdGlvbjogYWJzb2x1dGU7ei1pbmRleDotOTk5O2hlaWdodDo4MHB4O3dpZHRoOjQwcHg7bWFyZ2luLXRvcDotODBweDsiCiAKICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLmFwcGVuZENoaWxkKGRpdkRvbSk7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGtzVmlkZW9Eb3dubG9hZCgpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tQXJyID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5wbGF5ZXItdmlkZW8nLDEpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb0RvbUFycil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IHZpZGVvRG9tQXJyLmxlbmd0aD4yP3ZpZGVvRG9tQXJyWzFdOnZpZGVvRG9tQXJyWzBdOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJykubWF0Y2goL15ibG9iLykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2Jsb2Lop4bpopHml6Dms5XkuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVLc1ZpZGVvRG93bmxvYWQodmlkZW9Eb20pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ3BsYXlpbmcnLGZ1bmN0aW9uKCl7IC8v5pKt5pS+5LitCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+5LitIik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ2VuZGVkJyxmdW5jdGlvbigpeyAvL+e7k+adnwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdXRvLXdhcnBwZXInKS5nZXRBdHRyaWJ1dGUoJ2F1dG9wbGF5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dG9QbGF5KXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGZhbHNlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Eb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ato+WcqOS4i+i9veivt+eojeS+rycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVRpbWVUb3RhbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy50b3RhbCcpLmlubmVyVGV4dDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlY29uZCA9IHBsYXlUaW1lVG90YWwubWF0Y2goLyguKyk6KC4rKS8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2Vjb25kVG90YWwgPSBzZWNvbmRbMV0qNjArcGFyc2VJbnQoc2Vjb25kWzJdKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFVcmwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtS3NEb3dubG9hZCcpLmdldEF0dHJpYnV0ZSgnZGF0YS11cmwnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFjY291bnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucHJvZmlsZS11c2VyLW5hbWUtdGl0bGUnKT9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucHJvZmlsZS11c2VyLW5hbWUtdGl0bGUnKS5pbm5lclRleHQ6ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmZlZWQtYXV0aG9yJykuaW5uZXJUZXh0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8taW5mby10aXRsZScpP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1pbmZvLXRpdGxlJykuaW5uZXJUZXh0Om5ldyBEYXRlKCkuZ2V0VGltZSgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9GaWxlTmFtZSA9IChhY2NvdW50ICYmIHRpdGxlKT9hY2NvdW50KyctJyt0aXRsZSsnLm1wNCc6bmV3IERhdGUoKS5nZXRUaW1lKCkrJy5tcDQnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQoZGF0YVVybCx2aWRlb0ZpbGVOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0NvcHknKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflt7LlpI3liLbliLDliarotLTmnb8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJykpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0xpbmsnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKIAogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigid2hlZWwiLGdldENvbnRyb2xzKTsKIAogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihlLmNvZGU9PSdBcnJvd0Rvd24nIHx8IGUuY29kZT09J0Fycm93VXAnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9KQogCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGNyZWF0ZUtzVmlkZW9Eb3dubG9hZCh2aWRlb0RvbSl7CiAKICAgICAgICAgICAgICAgIGxldCBtYXRjaCA9IC9eaHR0cHM/OlwvXC93d3dcLmt1YWlzaG91XC5jb21cLyguKykvOwogCiAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IGxvY2F0aW9uLmhyZWYubWF0Y2gobWF0Y2gpOwogCiAgICAgICAgICAgICAgICBpZighcmVzcCB8fCAocmVzcFsxXS5pbmRleE9mKCdzaG9ydC12aWRlbycpID09IC0xICYmIHJlc3BbMV0uaW5kZXhPZigndmlkZW8nKSA9PS0xICYmIHJlc3BbMV0uaW5kZXhPZignbmV3LXJlY28nKSA9PSAtMSkpewogCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjeS4jeaYr+inhumikeaSreaUvumhtScpO3JldHVybjsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgaWYocmVzcFsxXS5pbmRleE9mKCdzaG9ydC12aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJBcmVhID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWNvbnRhaW5lci1wbGF5ZXInKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJBcmVhV2lkdGggPSBwbGF5ZXJBcmVhLnN0eWxlLndpZHRoLm1hdGNoKC8oLispcHgvKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJCYXJQcm9ncmVzcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5ZXItYmFyLXByb2dyZXNzJyk7CiAKICAgICAgICAgICAgICAgICAgICBwbGF5ZXJCYXJQcm9ncmVzcy5zdHlsZS53aWR0aCA9IHBsYXllckFyZWFXaWR0aFsxXS0zMjArJ3B4JzsKIAogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lVG90YWwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG90YWwnKTsKIAogICAgICAgICAgICAgICAgICAgIHRpbWVUb3RhbC5zdHlsZS5yaWdodD0nMTgwcHgnOwogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucmlnaHQnKTsKIAogICAgICAgICAgICAgICAgbGV0IHZpZGVvRG93bmxvYWREb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtS3NEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICBpZih2aWRlb0Rvd25sb2FkRG9tKXsKIAogICAgICAgICAgICAgICAgICAgIHZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tKTsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgbGV0IGRldGFpbERvbSA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSgxKScpOwogCiAgICAgICAgICAgICAgICBsZXQgeGdJY29uID0gZGV0YWlsRG9tLmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgbGV0IGxpbmtVcmwgP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AgICAgICAgICAgZGV0YWlsRG9tLmJlZm9yZSh4Z0ljb24pOwogCiAgICAgICAgICAgICAgICByZXR1cm47CiAKICAgICAgICAgICAgICAgIC8v6YeN5p6E5pKt5pS+5pON5L2c5oyJ6ZKuCiAKICAgICAgICAgICAgICAgIGxldCB6aG1Lc0J1dHRvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0J1dHRvbicpOwogCiAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKHpobUtzQnV0dG9uKTsKIAogICAgICAgICAgICAgICAgaWYoemhtS3NCdXR0b24pewogCiAgICAgICAgICAgICAgICAgICAgLy96aG1Lc0J1dHRvbi5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobUtzQnV0dG9uKTsKIAogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgbGV0IGJ1dHRvbkljb24gPSBkZXRhaWxEb20uY2xvbmVOb2RlKHRydWUpOwogICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhidXR0b25JY29uKTsKICAgICAgICAgICAgICAgIGJ1dHRvbkljb24uc2V0QXR0cmlidXRlKCdpZCcsJ3pobUtzQnV0dG9uJyk7CiAKICAgICAgICAgICAgICAgIGxldCBidXR0b25JY29uSW1nID0gYnV0dG9uSWNvbi5xdWVyeVNlbGVjdG9yKCcudW5tdXRlZC1pY29uJyk7CiAKICAgICAgICAgICAgICAgIGlmKGJ1dHRvbkljb25JbWcpewogICAgICAgICAgICAgICAgICAgIGJ1dHRvbkljb25JbWcuc3R5bGUgPSAnYmFja2dyb3VuZDogdXJsKGh0dHBzOi8vczItMTA2MjMua3dpbWdzLmNvbS91ZGF0YS9wa2cvY2xvdWRjZG4vaW1nL3BsYXllci1zZXR0aW5nLmFkMWY1Y2U4LnN2Zykgbm8tcmVwZWF0JzsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgZGV0YWlsRG9tLmFmdGVyKGJ1dHRvbkljb24pOwogCiAgICAgICAgICAgICAgICBsZXQgcGxTbGlkZXIgPSBidXR0b25JY29uLnF1ZXJ5U2VsZWN0b3IoJy5wbC1zbGlkZXInKTsKIAogICAgICAgICAgICAgICAgcGxTbGlkZXIuc3R5bGU9J3dpZHRoOmF1dG87cGFkZGluZzoxMHB4IDEwcHggMjVweCAxMHB4Oyc7CiAKICAgICAgICAgICAgICAgIHBsU2xpZGVyLmlubmVySFRNTCA9ICIiOwogCiAgICAgICAgICAgICAgICBsZXQgYnV0dG9uRm91ciA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSg0KScpOwogCiAgICAgICAgICAgICAgICBidXR0b25Gb3VyLnN0eWxlLm1hcmdpbj0nMHB4JzsKIAogICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXktc2V0dGluZy1jb250YWluZXInKTsKIAogICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewogICAgICAgICAgICAgICAgICAgIGF1dG9QbGF5LnN0eWxlLm1hcmdpbj0nMHB4IDQwcHggMHB4IDBweCc7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGxldCBidXR0b25GaXZlID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDUpJyk7CiAKICAgICAgICAgICAgICAgIGlmKGJ1dHRvbkZpdmUpewogCiAgICAgICAgICAgICAgICAgICAgYnV0dG9uRml2ZS5zdHlsZS5tYXJnaW49JzE1cHggMHB4JzsKIAogICAgICAgICAgICAgICAgICAgIGJ1dHRvbkZpdmUub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLXJvdGF0ZS10b29sdGlwJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRvb2xUaXApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9vbFRpcC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRvb2xUaXApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAKICAgICAgICAgICAgICAgICAgICAgICAgfSwzMCkKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIHBsU2xpZGVyLmFwcGVuZENoaWxkKGJ1dHRvbkZpdmUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IGJ1dHRvblNpeCA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSg2KScpOwogCiAgICAgICAgICAgICAgICBpZihidXR0b25TaXgpewogCiAgICAgICAgICAgICAgICAgICAgYnV0dG9uU2l4LnN0eWxlLm1hcmdpbj0nMTVweCAwcHgnOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRvb2xUaXAgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3dhaS1wbGF5ZXItZnVsbHNjcmVlbi10b29sdGlwJyk7CiAKICAgICAgICAgICAgICAgICAgICBidXR0b25TaXgub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLWZ1bGxzY3JlZW4tdG9vbHRpcCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0b29sVGlwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvb2xUaXAucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh0b29sVGlwKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0sMzApCiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBwbFNsaWRlci5hcHBlbmRDaGlsZChidXR0b25TaXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcGxTbGlkZXIuYXBwZW5kQ2hpbGQoYnV0dG9uRm91cik7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHhpZ3VhVmlkZW9Eb3dubG9hZCgpewogCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJ3ZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlWGlndWFWaWRlb0Rvd25sb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgR01feG1saHR0cFJlcXVlc3QoewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJnZXQiLAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdodHRwOi8vNDcuOTkuMTU4LjExOC92aWRlby1jcmFjay92Mi9wYXJzZT9jb250ZW50PScrZW5jb2RlVVJJQ29tcG9uZW50KGxvY2F0aW9uLmhyZWYpLAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiAnJywKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogeydBY2NlcHQnOiAndGV4dC9wbGFpbiwgdGV4dC9odG1sLGFwcGxpY2F0aW9uL2pzb24nfSwKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgb25sb2FkOiBmdW5jdGlvbihyZXMpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzLnN0YXR1cz09MjAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzLnJlc3BvbnNlVGV4dCkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9TcmMgPSAnJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPT0gMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9TcmMgPSByZXNwLmRhdGEudXJsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvVGl0bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW9UaXRsZSBoMScpLmlubmVyVGV4dDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0F1dGhvciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdXRob3JfX3VzZXJOYW1lJykudGl0bGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ato+WcqOS4i+i9veivt+eojeS+rycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLkxSX2Rvd25sb2FkKHZpZGVvU3JjLHZpZGVvVGl0bGUrJ0AnK3ZpZGVvQXV0aG9yKycubXA0Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvQ29weScpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvU3JjKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeS4jeiDveWkjeWItuWcsOWdgCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W3suWkjeWItuWIsOWJqui0tOadvycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHZpZGVvU3JjKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0xpbmsnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHkuI3og73nm7TmjqXmiZPlvIAnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9TcmMpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNsYXNzTmFtZSA9PSAneGdwbGF5ZXItY29udHJvbC1pdGVtIGNvbnRyb2xfcGxheW5leHQgY29tbW9uLWNvbnRyb2wtaXRlbScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9iakxpbmsgPSB7fTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaHJlZil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsuaHJlZiA9IGl0ZW0uaHJlZj9pdGVtLmhyZWY6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsudGFyZ2V0ID0gaXRlbS50YXJnZXQ/aXRlbS50YXJnZXQ6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG9iakxpbmsuaHJlZiAmJiBvYmpMaW5rLnRhcmdldCAhPSAnX2JsYW5rJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IG9iakxpbmsuaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgb25lcnJvciA6IGZ1bmN0aW9uKGVycil7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2Vycm9yJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJykuYWRkRXZlbnRMaXN0ZW5lcignZW5kZWQnLGZ1bmN0aW9uKCl7IC8v57uT5p2fCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7nu5PmnZ8iKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sNTUwMCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjcmVhdGVYaWd1YVZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgbGV0IHJpZ2h0R3JpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54Zy1yaWdodC1ncmlkJyk7CiAKICAgICAgICAgICAgICAgIGxldCBwbGF5Q29udHJvbCA9IHJpZ2h0R3JpZC5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoMiknKTsKIAogICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBwbGF5Q29udHJvbC5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgIGxldCBlbnRyeT0gY29udHJvbC5xdWVyeVNlbGVjdG9yKCc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KICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIHBvcG92ZXIuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW91dD1mdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgcG9wb3Zlci5zdHlsZS5kaXNwbGF5PSdub25lJzsKIAogICAgICAgICAgICAgICAgfQogCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGJpbGlWaWRlb0Rvd25sb2FkKCl7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByaWdodENvbnRyb2wgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnNxdWlydGxlLWNvbnRyb2xsZXItd3JhcC1yaWdodCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighcmlnaHRDb250cm9sKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJpbGliaWxpLXBsYXllci12aWRlby1idG4tcXVhbGl0eScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbU90aGVyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoZG9tT3RoZXIpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkT3RoZXIoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrPjMwKWNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy9fdGhpcy5jcmVhdGVCaWxpVmlkZW9Eb3dubG9hZCgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lclpobUljb24gPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBbe25hbWU6J3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonYndwX3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonLmJpbGliaWxpLXBsYXllci12aWRlbycsdHlwZTonY2xhc3MnfV07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7aTx2aWRlb0RvbS5sZW5ndGg7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IHZpZGVvRG9tW2ldLnR5cGUgPT0gJ2RvbSc/ZG9jdW1lbnQucXVlcnlTZWxlY3Rvcih2aWRlb0RvbVtpXS5uYW1lKTpkb2N1bWVudC5xdWVyeVNlbGVjdG9yKHZpZGVvRG9tW2ldLm5hbWUpLmZpcnN0Q2hpbGQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvL+WPlua2iOWumuaXtuWZqAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLmFkZEV2ZW50TGlzdGVuZXIoJ3BsYXknLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7lvIDlp4siKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uYWRkRXZlbnRMaXN0ZW5lcignZW5kZWQnLGZ1bmN0aW9uKCl7IC8v57uT5p2fCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaWxpRG93bmxvYWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhiaWxpRG93bmxvYWQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmlsaURvd25sb2FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoYmlsaURvd25sb2FkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uYWRkRXZlbnRMaXN0ZW5lcigncGF1c2UnLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pqC5YGcIik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2xvc2VJY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJpbGktbWluaS1jbG9zZS1pY29uJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjbG9zZUljb24pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY2xvc2VJY29uKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZUljb24uY2xpY2soKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5wbGF5KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDUwKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgIH07CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCl7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRJY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGlEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoZG93bmxvYWRJY29uKXsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4i+i9veaMiemSruW3suWtmOWcqCcpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHF1YWxpdHkgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnNxdWlydGxlLXF1YWxpdHktd3JhcCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFxdWFsaXR5KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gcXVhbGl0eS5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHF1YWxpdHkuYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b0ljb25Eb20gPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLmJpbGliaWxpLXBsYXllci12aWRlby1idG4tcXVhbGl0eScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFhdXRvSWNvbkRvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gYXV0b0ljb25Eb20uY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc3R5bGU9J21hcmdpbi1yaWdodDoyMHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnVpLXNlbGVjdC1yZXN1bHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnVpLXNlbGVjdC1yZXN1bHQnKS5zZXRBdHRyaWJ1dGUoJ2lkJywnYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0ljb25Eb20uYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemhtemdouS4jeaYr+inhumikeaIlueVquWJpycpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnZpZCA9ICcnLGF2aWQ9Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF2LWxpbmsnKS5pbm5lclRleHQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKVw/Lyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcmFtc1sxXS5pbmRleE9mKCdhdicpICE9LTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXZpZCA9IHBhcmFtc1sxXS5yZXBsYWNlKCdhdicsJycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBwYXJhbXNbMV0uc3Vic3RyaW5nKHBhcmFtc1sxXS5sZW5ndGgtMSk9PScvJz9wYXJhbXNbMV0uc3Vic3RyaW5nKDAscGFyYW1zWzFdLmxlbmd0aC0xKTpwYXJhbXNbMV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5b2T5YmN6aG16Z2i5peg5rOV5LiL6L29Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWJ2aWQgJiYgIWF2aWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq6I635Y+WYnZpZOaIlmF2aWQnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9idmlkPSIrYnZpZCsiJmFpZD0iK2F2aWQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVyaSA9IF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNwID0gSlNPTi5wYXJzZShyZXN1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPCAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR5L+h5oGv5o6l5Y+j6L+U5Zue5pWw5o2u6ZSZ6K+vJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mAiembhmNpZAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gX3RoaXMuZ2V0UXVlcnlTdHJpbmcoJ3AnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNpZCA9ICcnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYWdlSWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLnBhZ2VzW3BhZ2VJZC0xXS5jaWQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLmNpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coY2lkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvcGxheWVyL3BsYXl1cmw/YXZpZD0nK3Jlc3AuZGF0YS5haWQrJyZjaWQ9JytjaWQrJyZxbj0xMTInOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gX3RoaXMucmVxdWVzdCgnZ2V0JyxsaW5rKS50aGVuKChyZXN1bHQpPT57CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuY29kZSA8IDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR5Zyw5Z2A5o6l5Y+j6L+U5Zue5pWw5o2u6ZSZ6K+vJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZFVybCA9IGRhdGEuZGF0YS5kdXJsWzBdLnVybDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vR01fZG93bmxvYWQoZG93bmxvYWRVcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oZG93bmxvYWRVcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkT3RoZXIoKXsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZEljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CiAKICAgICAgICAgICAgICAgICAgICBpZihkb3dubG9hZEljb24pewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5LiL6L295oyJ6ZKu5bey5a2Y5ZyoJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXVhbGl0eSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuc3F1aXJ0bGUtcXVhbGl0eS13cmFwJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXF1YWxpdHkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBxdWFsaXR5LmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5zcXVpcnRsZS12aWRlby1xdWFsaXR5LXRleHQnKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHF1YWxpdHkuYmVmb3JlKGNvbnRyb2wpOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b0ljb25Eb20gPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWF1dG9JY29uRG9tKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBhdXRvSWNvbkRvbS5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zdHlsZT0nbWFyZ2luLXJpZ2h0OjIwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1yZXN1bHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktbWVudScpLnNldEF0dHJpYnV0ZSgnaWQnLCdiaWxpRG93bmxvYWQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWVudUl0ZW1zID0gY29udHJvbC5xdWVyeVNlbGVjdG9yQWxsKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktbWVudS1pdGVtJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbWVudUl0ZW1zLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhVmFsdWUgPSBpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS1WYWx1ZScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhVmFsdWUgIT0gMTYgJiYgZGF0YVZhbHVlICE9IDgwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChpdGVtKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICBhdXRvSWNvbkRvbS5iZWZvcmUoY29udHJvbCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5vbm1vdXNlb3Zlcj0oKT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1tZW51Jykuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLm9ubW91c2VvdXQ9KCk9PnsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1tZW51Jykuc3R5bGUuZGlzcGxheT0nbm9uZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemhtemdouS4jeaYr+inhumikeaIlueVquWJpycpO3JldHVybjsKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJpbGlEYXRhVmFsdWUgPSBlLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKT9lLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKTonJzsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZighYmlsaURhdGFWYWx1ZSlyZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ2aWQgPSAnJyxhdmlkPScnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdi1saW5rJykuaW5uZXJUZXh0OwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZigndmlkZW8nKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dVcmwgPSBsb2NhdGlvbi5ocmVmLnNwbGl0KCc/Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSBub3dVcmxbMF0ubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKS8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYXJhbXNbMV0uaW5kZXhPZignYXYnKSAhPS0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2aWQgPSBwYXJhbXNbMV0ucmVwbGFjZSgnYXYnLCcnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gcGFyYW1zWzFdLnN1YnN0cmluZyhwYXJhbXNbMV0ubGVuZ3RoLTEpPT0nLyc/cGFyYW1zWzFdLnN1YnN0cmluZygwLHBhcmFtc1sxXS5sZW5ndGgtMSk6cGFyYW1zWzFdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W9k+WJjemhtemdouaXoOazleS4i+i9vScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFidmlkICYmICFhdmlkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquiOt+WPlmJ2aWTmiJZhdmlkJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YnZpZD0iK2J2aWQrIiZhaWQ9IithdmlkOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmkgPSBfdGhpcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzcC5jb2RlIDwgMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeS/oeaBr+aOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/pgInpm4ZjaWQKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VJZCA9IF90aGlzLmdldFF1ZXJ5U3RyaW5nKCdwJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaWQgPSAnJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFnZUlkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHJlc3AuZGF0YS5wYWdlc1twYWdlSWQtMV0uY2lkOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHJlc3AuZGF0YS5jaWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3BsYXllci9wbGF5dXJsP2F2aWQ9JytyZXNwLmRhdGEuYWlkKycmY2lkPScrY2lkKycmcW49JytiaWxpRGF0YVZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gX3RoaXMucmVxdWVzdCgnZ2V0JyxsaW5rLCcnLHRydWUpLnRoZW4oKHJlc3VsdCk9PnsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5jb2RlIDwgMCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHlnLDlnYDmjqXlj6Pov5Tlm57mlbDmja7plJnor68nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkVXJsID0gZGF0YS5kYXRhLmR1cmxbMF0udXJsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9HTV9kb3dubG9hZChkb3dubG9hZFVybCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3Blbihkb3dubG9hZFVybCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgeW91dHViZVZpZGVvRG93bmxvYWQoKXsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3dcLnlvdXR1YmVcLmNvbVwvKHdhdGNoXD92PS4rfHNob3J0c1wvLispLyk7CiAKICAgICAgICAgICAgICAgICAgICBpZih1cmwpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB5b3V0dWJlSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoeW91dHViZUljb24pewogICAgICAgICAgICAgICAgICAgICAgICAgICAgeW91dHViZUljb24uc3R5bGUub3BhY2l0eT0xOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy56aG1Mb2dvKCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlXcmFwSHRtbCA9ICI8ZGl2IGNsYXNzPSd6aG1fcGxheV92aWRlb19saW5lJz4iOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8dWwgY2xhc3M9J3pobV9wbGF5X3ZpZGVfbGluZV91bCc+IjsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUxpbmUgPSBbCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bmFtZTon5LiL6L2957q/6LevMScsdXJsOidodHRwczovL3poLnNhdmVmcm9tLm5ldC8xNzYvI3VybD0nfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot68yJyx1cmw6J2h0dHBzOi8vbXlkb3duZG93bi5jb20veTIjJ30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bmFtZTon5LiL6L2957q/6LevMycsdXJsOidodHRwczovL3d3dy55dGRvd25may5jb20vc2VhcmNoP3VybD0nfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot680Jyx1cmw6J2h0dHBzOi8veW91dC5jb20vdmlkZW8vP3VybD0nfQogICAgICAgICAgICAgICAgICAgICAgICBdOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPWA8bGkgY2xhc3M9J3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScgdXJsPScke2l0ZW0udXJsfScgPiR7aXRlbS5uYW1lfTwvbGk+YDsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8L3VsPjwvZGl2PiI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtbG9nbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZURvbSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lRG9tLmNsYXNzTmFtZSA9ICdwbGF5TGluZURpdiB6aG1fcGxheV92aWRlb193cmFwJzsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZURvbS5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lRG9tLmlubmVySFRNTCA9IHBsYXlXcmFwSHRtbDsKIAogICAgICAgICAgICAgICAgICAgICAgICB6aG1QbGF5LmFwcGVuZENoaWxkKHBsYXlMaW5lRG9tKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUxpbmVUZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5wbGF5TGluZVRkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oaXRlbS5nZXRBdHRyaWJ1dGUoJ3VybCcpK2xvY2F0aW9uLmhyZWYpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlCdXR0b24nKS5vbm1vdXNlb3Zlcj0oKT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW91dD0oKT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdub25lJzsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuemhtTG9nb0RyYWcoJ3lvdXR1YmUnLCcnKTsKIAogICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1JY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUljb24nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1JY29uKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtSWNvbi5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobUljb24pOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtbG9nbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoemhtbG9nbyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vemhtbG9nby5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobWxvZ28pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1sb2dvLnN0eWxlLm9wYWNpdHk9MDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9LDUwMCkKIAogICAgICAgICAgICB9CiAgICAgICAgfQogCiAgICAgICAgdmFyIGFsbFdlYiA9IFsuLi5nZXRDb3Vwb24sLi4uanhWaWRlbywuLi5qeE11c2ljLC4uLnpoTmljZSwuLi50YW9iYW8sLi4udmlkZW9Eb3dubG9hZCwuLi5iYWlkdV07CiAKICAgICAgICB2YXIgbm93V2ViPVtdOwogCiAgICAgICAgYWxsV2ViLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgaWYoaXRlbS5pc09wZW4gPT0gMCkgcmV0dXJuIHRydWU7CiAKICAgICAgICAgICAgaXRlbS53ZWIuZm9yRWFjaChmdW5jdGlvbih2YWwpewogCiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gbG9jYXRpb24uaHJlZi5tYXRjaCh2YWwubWF0Y2gpOwogCiAgICAgICAgICAgICAgICBpZihyZXN1bHQpewogCiAgICAgICAgICAgICAgICAgICAgbm93V2ViLnB1c2godmFsKTsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KQogCiAgICAgICAgfSkKIAogICAgICAgIGlmKG5vd1dlYi5sZW5ndGg9PTApewogCiAgICAgICAgICAgIGxldCBiYXNlQ2xhc3MgPSBuZXcgQmFzZUNsYXNzKCk7CiAKICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieWMuemFjeivpee9keermeaIluivpeaooeWdl+W3suWFs+mXrScpO3JldHVybjsKICAgICAgICB9CiAKICAgICAgICBub3dXZWIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICBzd2l0Y2goaXRlbS5mdW5jTmFtZSl7CiAgICAgICAgICAgICAgICBjYXNlICdjb3Vwb24nOgogCiAgICAgICAgICAgICAgICAgICAgY291cG9uRnVuYyhpdGVtKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ3BsYXlWaWRlbyc6CiAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvRnVuYygpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAncGxheU11c2ljJzoKICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNGdW5jKGl0ZW0pOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnemhOaWNlJzoKICAgICAgICAgICAgICAgICAgICB6aE5pY2VGdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdiYWlkdSc6CiAgICAgICAgICAgICAgICAgICAgdmFyIGJhc2VDbGFzcyA9IG5ldyBCYXNlQ2xhc3M7CiAgICAgICAgICAgICAgICAgICAgYmFpZHVGdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICd2aWRlb0Rvd25sb2FkJzoKIAogICAgICAgICAgICAgICAgICAgIHZhciB2aWRlb0Rvd25sb2FkQ2xhc3MgPSBuZXcgVmlkZW9Eb3dubG9hZENsYXNzKCk7CiAKICAgICAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0gaXRlbTsKIAogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaXNXZWJPcGVuID09IDApewogCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGl0ZW0ubmFtZSsn5bey5YWz6ZetJyk7cmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb3dubG9hZENsYXNzW25vd05hbWVdKCk7CiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgICAgIGNhc2UgJ3Rhb2Jhb1NlYXJjaCc6CiAgICAgICAgICAgICAgICAgICAgdGFvYmFvU2VhcmNoRnVuYyhpdGVtKQogICAgICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICB9CiAKICAgICAgICB9KQogCiAgICAgICAgZnVuY3Rpb24gY291cG9uRnVuYyhpdGVtKXsKIAogICAgICAgICAgICB2YXIgY291cG9uQ2xhc3MgPSBuZXcgQ291cG9uQ2xhc3MoKTsKIAogICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0gaXRlbTsKIAogICAgICAgICAgICB2YXIgY291cG9uU3R5bGUgPWAKICAgICAgICAgICAgICAgICAgICBodG1sewogICAgICAgICAgICAgICAgICAgIC0tcmlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAtLWxlZnQ6MTAwJTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fY291cG9uewogICAgICAgICAgICAgICAgICAgIHdpZHRoOmZpdC1jb250ZW50OwogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczpmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tYm90dG9tOjE1cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xlZnR7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpyb3c7CiAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OmZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IHJpZ2h0IHRvcCwgdHJhbnNwYXJlbnQgOHB4LCNmZmYgMCkgdG9wIGxlZnQgL3ZhcigtLXJpZ2h0KSA1MSUgbm8tcmVwZWF0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgcmlnaHQgYm90dG9tLCB0cmFuc3BhcmVudCA4cHgsICNmZmYgMCkgYm90dG9tIGxlZnQgL3ZhcigtLXJpZ2h0KSA1MSUgbm8tcmVwZWF0OwogICAgICAgICAgICAgICAgICAgIGZpbHRlcjogZHJvcC1zaGFkb3coMnB4IDJweCAzcHggIzg4OCk7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0Ojg0cHg7CiAgICAgICAgICAgICAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1faW1nX2ljb257CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzo0cHggMHB4IDBweCA1cHg7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXJpZ2h0OjVweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1faW1nX2ljb24gaW1newogICAgICAgICAgICAgICAgICAgIHdpZHRoOjQ3cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2NvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpjb2x1bW47CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXJpZ2h0OiAxOHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9tb25leXsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fYW1vdW50X21vbmV5ewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX21vbmV5X3NpZ257CiAgICAgICAgICAgICAgICAgICAgY29sb3I6I2YyMzAzMDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6IEFyaWFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9tb25leV9udW17CiAgICAgICAgICAgICAgICAgICAgY29sb3I6I2YyMzAzMDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MzZweDsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogMnB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9jb25kaXRpb257CiAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZiMGYzYTsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmNGVjOwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6NXB4OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiA1cHg7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoycHggNXB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxMnB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV90aW1lewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6IC01cHg7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoycHggNHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV90ZXJtewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmYjBmM2E7CiAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI2ZiMGYzYTsKICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOjJweDsKICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4IDRweDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTJweDsKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDE4cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2RhdGV7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1sZWZ0OjhweDsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9jaXJjbGV7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogI2ZiMGYzYSB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBZ0FBQUFJQ0FZQUFBREVENzZMQUFBQUNYQklXWE1BQUFzU0FBQUxFZ0hTM1g3OEFBQUF6VWxFUVZRWWxTM05NVW9EUVJpRzRYY211OWxBWEJRYnErMUNDcXVjd3NiT08zZ0FTMjloNFFtOGdSZElNS1ZnbFFWQkZpU0ZqWUtCcVdaMmQvN1BJdllQUEU2U01DSHZjRDhIdUx6QlVzSUtEeVk4QU40UlUrSjkvOG5IOG9MWUozd1djaHhCakpIdFprTjFmc2JwOW9tdmh6djZjY0RqUUpMYXRsWFhkWklrNWF3a0tWemRLazlXOGdCRlVWRFhOUUEyakpUQTdHU09tUjJMcG1rSUlXQTU0NnNwdk81d0wyOVF6M0dTQkJDSG5ud0l6TzRmMGZNYVlvS3kvQWNtOEE2K2Z4a1gxNUFOcWltWThRZW1DbTkyMHIxYVVBQUFBQUJKUlU1RXJrSmdnZz09KSByZXBlYXQteTsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tdG9wOjEwcHg7CiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwcHg7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjY2cHg7CiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgIHJpZ2h0Ojk3cHg7CiAgICAgICAgICAgICAgICAgICAgei1pbmRleDoyOwogICAgICAgICAgICAgICAgICAgIGZpbHRlcjpub25lOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9saW5rX2NvdXBvbnsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczpjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgZmlsdGVyOiBkcm9wLXNoYWRvdygycHggMnB4IDNweCAjODg4KTsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IGxlZnQgdG9wLCB0cmFuc3BhcmVudCA4cHgsICNmYjA1M2EgMCkgdG9wIHJpZ2h0IC92YXIoLS1sZWZ0KSA1MCUgbm8tcmVwZWF0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgbGVmdCBib3R0b20sIHRyYW5zcGFyZW50IDhweCwgI2ZiMDUzYSAwKSBib3R0b20gcmlnaHQgL3ZhcigtLWxlZnQpIDUwJSBuby1yZXBlYXQ7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiA4NHB4OwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4IDZweCAwcHggNHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9nZXRfbGlua190ZXh0ewogICAgICAgICAgICAgICAgICAgIGN1cnNvcjpwb2ludGVyOwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6IDBweDsKICAgICAgICAgICAgICAgICAgICB3cml0aW5nLW1vZGU6dmVydGljYWwtbHI7CiAgICAgICAgICAgICAgICAgICAgbGV0dGVyLXNwYWNpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgIGNvbG9yOiAjZmZmICFpbXBvcnRhbnQ7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6Ik1pY3Jvc29mdCBZYUhlaSI7CiAgICAgICAgICAgICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOm5vbmU7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCBsZWZ0IHRvcCwgdHJhbnNwYXJlbnQgOHB4LCAjZmIwNTNhIDApIHRvcCByaWdodCAvdmFyKC0tbGVmdCkgNTAlIG5vLXJlcGVhdCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IGxlZnQgYm90dG9tLCB0cmFuc3BhcmVudCA4cHgsICNmYjA1M2EgMCkgYm90dG9tIHJpZ2h0IC92YXIoLS1sZWZ0KSA1MCUgbm8tcmVwZWF0OwogCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2dldF9saW5rX3RleHQ6aG92ZXJ7CiAgICAgICAgICAgICAgICB0ZXh0LWRlY29yYXRpb246bm9uZTsKICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OjgwMDsKICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiJNaWNyb3NvZnQgWWFIZWkiOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9xcmNvZGV7CiAgICAgICAgICAgICAgICAgICAgYm9yZGVyOjNweCBzb2xpZCAjZmZmOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGA7CiAKICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKGNvdXBvblN0eWxlKSk7CiAKICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAKICAgICAgICAgICAgbGV0IG49MDsKIAogICAgICAgICAgICBsZXQgY291cG9uVGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICBuKys7CiAKICAgICAgICAgICAgICAgIGxldCBwYWdlTm9kZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iobm93Tm9kZSkKIAogICAgICAgICAgICAgICAgaWYocGFnZU5vZGUpewogCiAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChjb3Vwb25UaW1lcik7CiAKICAgICAgICAgICAgICAgICAgICBjb3Vwb25DbGFzc1tub3dOYW1lXSgpOwogCiAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgIGlmKG49PWNvdXBvblRpbWVyTnVtKSBjbGVhckludGVydmFsKGNvdXBvblRpbWVyKTsKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICB9LDEwMCkKICAgICAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewogCiAgICAgICAgICAgIHZhciBwbGF5VmlkZW9DbGFzcyA9IG5ldyBQbGF5VmlkZW9DbGFzcygpOwogCiAgICAgICAgICAgIHBsYXlWaWRlb0NsYXNzLnpobUxvZ28oKTsKIAogICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnKSl7CiAKICAgICAgICAgICAgICAgIGxldCBsaW5lT2JqID0gcGxheVZpZGVvQ2xhc3MuZ2V0TGluZShHTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnKSk7CiAKICAgICAgICAgICAgICAgIGlmKGxpbmVPYmopewogCiAgICAgICAgICAgICAgICAgICAgcGxheUxpbmUgPSBsaW5lT2JqCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIC8vdGVtcGxhdGU6aWNvbixwbGF5TGluZTsKICAgICAgICAgICAgbGV0IHBsYXlXcmFwSHRtbCA9ICI8ZGl2IGNsYXNzPSd6aG1fcGxheV92aWRlb19saW5lJz4iOwogCiAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8ZGl2Pjx1bCBjbGFzcz0nemhtX3BsYXlfdmlkZV9saW5lX3VsJz4iOwogCiAgICAgICAgICAgIHBsYXlMaW5lLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZCA9ICcnOwogCiAgICAgICAgICAgICAgICBpZihwbGF5VmlkZW9DbGFzcy5nZXRDb29raWUoJ3BsYXlMaW5lQWN0aW9uJykgPT0gaXRlbS51cmwpewogCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSAnemhtX2xpbmVfc2VsZWN0ZWQnOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPWA8bGkgY2xhc3M9J3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSAke3NlbGVjdGVkfScgdXJsPScke2l0ZW0udXJsfScgPiR7aXRlbS5uYW1lfTwvbGk+YDsKIAogICAgICAgICAgICB9KQogCiAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSAiPC9kaXY+IjsKIAogICAgICAgICAgICBsZXQgemhtUGxheSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1sb2dvJyk7CiAKICAgICAgICAgICAgbGV0IHBsYXlMaW5lRG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAKICAgICAgICAgICAgcGxheUxpbmVEb20uY2xhc3NOYW1lID0gJ3BsYXlMaW5lRGl2IHpobV9wbGF5X3ZpZGVvX3dyYXAnOwogCiAgICAgICAgICAgIHBsYXlMaW5lRG9tLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7CiAKICAgICAgICAgICAgcGxheUxpbmVEb20uaW5uZXJIVE1MID0gcGxheVdyYXBIdG1sOwogCiAgICAgICAgICAgIHpobVBsYXkuYXBwZW5kQ2hpbGQocGxheUxpbmVEb20pOwogCiAgICAgICAgICAgIC8vdGVtcGxhdGU6bm9kZTvmkq3mlL7ljLrln58KIAogICAgICAgICAgICBsZXQgcGxheUp4SHRtbCA9ICI8ZGl2IGNsYXNzPSd6aG1fcGxheV92aWRlb19qeCc+IjsKIAogICAgICAgICAgICBwbGF5SnhIdG1sICs9ICI8aWZ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AogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheUJ1dHRvbicpLm9ubW91c2VvdXQ9KCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8v6YCJ5oup57q/6Lev6Kej5p6Q5pKt5pS+CiAKICAgICAgICAgICAgICAgIHZhciBwbGF5TGluZVRkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnBsYXlMaW5lVGQnKTsKIAogICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSB6aG1fbGluZV9zZWxlY3RlZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlWaWRlb0NsYXNzLnNldENvb2tpZSgncGxheUxpbmVBY3Rpb24nLHRoaXMuZ2V0QXR0cmlidXRlKCd1cmwnKSwzMCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ3ZpZGVvUGxheUxpbmVBZGQnKSAhPSAyMil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dXZWJOb2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihub3dOb2RlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93V2ViTm9kZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUlmcmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5SWZyYW1lJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5SWZyYW1lLnNyYz0gaXRlbS5nZXRBdHRyaWJ1dGUoJ3VybCcpK2xvY2F0aW9uLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikee9keermee7k+eCueS4jeWtmOWcqCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihpdGVtLmdldEF0dHJpYnV0ZSgndXJsJykrbG9jYXRpb24uaHJlZik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAvKi0t54m55q6K5aSE55CGLS0qLwogICAgICAgICAgICAgICAgLy/kvJjphbfljrvlub/lkYoKICAgICAgICAgICAgICAgIGlmKG5vd05vZGU9PSIjcGxheWVyIil7CiAKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlrQWQgPSB5b3VrdUFkLmxhc3RDaGlsZDsKIAogICAgICAgICAgICAgICAgICAgICAgICB5a0FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoeWtBZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1kYXNoYm9hcmQtMCcpLnN0eWxlPSdkaXNwbGF5OmZsZXgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8tbGF5ZXIgdmlkZW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW8ucGxheSgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy/mmoLlgZwKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1wbGF5LWljb24tMCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8tbGF5ZXIgdmlkZW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrJTIgPT0gMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5wYXVzZSgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW8uYWRkRXZlbnRMaXN0ZW5lcigndGltZXVwZGF0ZScsZnVuY3Rpb24oKXsgLy/mkq3mlL7ml7bpl7TmlLnlj5gKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB5a0FkID0geW91a3VBZC5sYXN0Q2hpbGQ7CiAKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeWtBZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5a0FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoeWtBZCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5rdWktZGFzaGJvYXJkLTAnKS5zdHlsZT0nZGlzcGxheTpmbGV4JzsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQub25rZXlkb3duID0gZnVuY3Rpb24oZXZlbnQpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhldmVudC5rZXlDb2RlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1sYXllciB2aWRlbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihldmVudC5rZXlDb2RlPT0zOSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5jdXJyZW50VGltZSA9IHZpZGVvLmN1cnJlbnRUaW1lICsgNTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZXZlbnQua2V5Q29kZT09MzcpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPSB2aWRlby5jdXJyZW50VGltZSAtIDU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSwzMDAwKQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/niLHlpYfoibrljrvlub/lkYoKICAgICAgICAgICAgICAgIGlmKG5vd05vZGU9PSIjZmxhc2hib3giKXsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnNraXBwYWJsZS1hZnRlcicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbS5jbGljaygpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMzAwMCkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAvL+iFvuiur+WOu3ZpcOW8ueeqlwogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXItY29udGFpbmVyIil7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbiA9IDA7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKyA8IDEwMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYW5lbFRpcFZpcCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wYW5lbC1vdmVybGF5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhbmVsVGlwVmlwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhbmVsVGlwVmlwLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMTAwKQogCiAKIAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v5LmQ6KeG6YCJ6ZuG5aSE55CGCiAgICAgICAgICAgICAgICBpZihub3dOb2RlID09ICIjbGVfcGxheWJveCIpewogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBqQmxvY2sgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcual9ibG9jaycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFqQmxvY2spIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGk9MDtpPGpCbG9jay5sZW5ndGg7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvSWQgPSBqQmxvY2tbaV0uZ2V0QXR0cmlidXRlKCdkYXRhLXZpZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGBodHRwczovL3d3dy5sZS5jb20vcHR2L3ZwbGF5LyR7dmlkZW9JZH0uaHRtbGA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpCbG9ja1tpXS5maXJzdENoaWxkLnNldEF0dHJpYnV0ZSgnaHJlZicsbGluayk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8vQuermeWkp+S8muWRmHVybOWkhOeQhu+8jOmhtemdomNsYXNz5LiN5LiA6Ie0CiAgICAgICAgICAgICAgICBpZihub3dOb2RlID09ICIucGxheWVyLWNvbnRhaW5lciIpewogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheWVyLWNvbnRhaW5lcicpICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jb250YWluZXInKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd05vZGUgPSAnLnBsYXllci1tYXNrJzsKIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93Tm9kZSA9ICcuYnB4LXBsYXllci1jb250YWluZXInOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8q6IW+6K6v6KeG6aKR54K55Ye75YW25a6D6KeG6aKR6Lez6L2sKi8KICAgICAgICAgICAgICAgIGlmKG5vd05hbWU9PSdxcVBDJyl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgZmlndXJlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmZpZ3VyZScpOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpZ3VyZURldGFpbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5maWd1cmVfZGV0YWlsJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdEl0ZW0gPSBbLi4uZmlndXJlLC4uLmZpZ3VyZURldGFpbF07CiAKICAgICAgICAgICAgICAgICAgICBpZihsaXN0SXRlbS5sZW5ndGggPiAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsaXN0SXRlbS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSB0aGlzLmdldEF0dHJpYnV0ZSgnaHJlZicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobGluayl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGxpbms7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvU2VsZWN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLicranhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvU2VsZWN0Lmxlbmd0aD09MCl7Y29uc29sZS5sb2coJ+ivpee9keermeaSreaUvuWMuuexu+WQjeaUueWPmCcpO3JldHVybjt9CiAKICAgICAgICAgICAgICAgICAgICB2aWRlb1NlbGVjdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmPWxvY2F0aW9uLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSwyMDAwKTsKICAgICAgICAgICAgfQogCiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gcGxheU11c2ljRnVuYygpewogCiAgICAgICAgICAgIGlmKHNlbGYuZnJhbWVFbGVtZW50ICYmIHNlbGYuZnJhbWVFbGVtZW50LnRhZ05hbWUgPT0gIklGUkFNRSIpewogCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICB2YXIgcGxheU11c2ljQ2xhc3MgPSBuZXcgUGxheU11c2ljQ2xhc3MoKTsKIAogICAgICAgICAgICB2YXIgbXVzaWNJZCA9IE1hdGguY2VpbChNYXRoLnJhbmRvbSgpKjEwMDAwMDAwMCk7CiAKICAgICAgICAgICAgLy9uZXRlYXNlIOi3r+eUseS4pOasoe+8jOmcgOmHjeWumuS5iQogICAgICAgICAgICB2YXIgbmV3VXJsID0gbG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICBsZXQganhNdXNpY1dlYiA9IGp4TXVzaWNbMF0ud2ViLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgcmV0dXJuIG5ld1VybC5tYXRjaChpdGVtLm1hdGNoKTsKIAogICAgICAgICAgICB9KQogCiAgICAgICAgICAgIGlmKGp4TXVzaWNXZWIubGVuZ3RoKXsKIAogICAgICAgICAgICAgICAgbGV0IHRpbWVyWmhtSWNvbiA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUljb24nKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvLyDlj5bmtojlrprml7blmagKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihqeE11c2ljV2ViWzBdLm5hbWU9PSdrdXdvJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmljb24tYmFyX2ljb25fZG93bmxvYWRfJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbiA9IGNvbnRyb2wuY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5jbGFzc05hbWUgPSAnJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24uc3R5bGU9J21hcmdpbi1sZWZ0OjEwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24uaW5uZXJIVE1MID0gIjxhIHN0eWxlPSdmb250LXNpemU6MTBweDt3aGl0ZS1zcGFjZTogbm93cmFwO2N1cnNvcjpwb2ludGVyO2NvbG9yOiM1NTU7JyBpZD0na3V3b0Rvd25sb2FkJz7kuIvovb08L2E+IjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9scyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5jb2xfcicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbHMuYmVmb3JlKGljb24pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2t1d29Eb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpb1NyYyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImF1ZGlvIikuc3JjOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb25nTmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5jb250cm9sIC5zb25nX25hbWUnKS50aXRsZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJ0aXN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmNvbnRyb2wgLmFydGlzdCcpLnRpdGxlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZChhdWRpb1NyYyxzb25nTmFtZSsnLScrYXJ0aXN0KycubXAzJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDIwMDApCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBpZihqeE11c2ljV2ViWzBdLm5hbWU9PSd4aW1hbGF5YScpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mkq3mlL7lmajliJvlu7rkuIvovb1pY29uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHhtQ29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueG0tcGxheWVyLW9wcmF0aW9ucycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSB4bUNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2E6bnRoLW9mLXR5cGUoMiknKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uID0gY29udHJvbC5jbG9uZU5vZGUodHJ1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uLmlubmVySFRNTCA9ICI8c3BhbiBzdHlsZT0nZm9udC1zaXplOjEwcHg7d2hpdGUtc3BhY2U6IG5vd3JhcDtjdXJzb3I6cG9pbnRlcjtjb2xvcjojRkZGOycgaWQ9J3hpbWFEb3dubG9hZCc+5LiL6L29PC9zcGFuPiI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4bUNvbnRyb2xzLnN0eWxlPSdwb3NpdGlvbjogcmVsYXRpdmU7bWFyZ2luLWxlZnQ6LTIwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54bS1wbGF5ZXItcHJvZ3Jlc3MnKS5zdHlsZS53aWR0aD0nNDUwcHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhtLXBsYXllci1wbGF5dGltZScpLnN0eWxlPSdwb3NpdGlvbjogYWJzb2x1dGU7cmlnaHQ6NDBweDsnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeG1Db250cm9scy5wcmVwZW5kKGljb24pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5pKt5pS+5Zmo5LiL6L295LqL5Lu2CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3hpbWFEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmbVRpdGxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmZtLXRpdGxlJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZtVGl0bGVNYXRjaCA9IGZtVGl0bGUuaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3XC54aW1hbGF5YVwuY29tXC9zb3VuZFwvKFxTKikkLyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwczovL21vYmlsZS54aW1hbGF5YS5jb20vbW9iaWxlLXBsYXlwYWdlL3RyYWNrL3YzL2Jhc2VJbmZvLycrbmV3IERhdGUoKS5nZXRUaW1lKCkrJz9kZXZpY2U9d2ViJnRyYWNrSWQ9JytmbVRpdGxlTWF0Y2hbMV07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MucmVxdWVzdCgnZ2V0Jyx1cmwpLnRoZW4oKHJlc3VsdCk9PnsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VXJsID0gZGF0YS50cmFja0luZm8ucGxheVVybExpc3RbMV0udXJsOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyMSA9IHBsYXlVcmwucmVwbGFjZUFsbCgnLScsJysnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjIgPSBzdHIxLnJlcGxhY2VBbGwoJ18nLCcvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBudW0gPSBzdHIyLmxlbmd0aCU0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihudW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyMiArPSAnPT09PScuc3Vic3RyKG51bSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkZWNyeXB0ZWQgPSBDcnlwdG9KUy5BRVMuZGVjcnlwdCh7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaXBoZXJ0ZXh0OiBDcnlwdG9KUy5lbmMuQmFzZTY0LnBhcnNlKHN0cjIpCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIENyeXB0b0pTLmVuYy5IZXgucGFyc2UoImFhYWQzZTRmZDU0MGIwZjc5ZGNhOTU2MDZlNzJiZjkzIiksIHsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGU6IENyeXB0b0pTLm1vZGUuRUNCLAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coZGVjcnlwdGVkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGVjcnlwdGVkKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZChkZWNyeXB0ZWQsZGF0YS50cmFja0luZm8udGl0bGUrJy5tcDMnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ino+WvhuWcsOWdgOWksei0pScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/pobXpnaLliJfooajliJvlu7rmibnph4/kuIvovb0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmxNYXRjaCA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwczpcL1wvd3d3LnhpbWFsYXlhLmNvbVwvYWxidW1cL1swLTldKy8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVybE1hdGNoKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhbmNob3Jfc291bmRfbGlzdCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzb3VuZExpc3QpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdEhlYWQgPSBzb3VuZExpc3QucXVlcnlTZWxlY3RvcignLmhlYWQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb3VuZExpc3RIZWFkVGl0bGUgPSBzb3VuZExpc3RIZWFkLnF1ZXJ5U2VsZWN0b3IoJy5zb3J0JykubGFzdENoaWxkOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJhdGNoRG93bmxvYWREb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmF0Y2hEb3dubG9hZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWJhdGNoRG93bmxvYWREb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gW3tuYW1lOifmibnph4/kuIvovb0nLGlkOidiYXRjaERvd25sb2FkJ30se25hbWU6J+mHjee9ricsaWQ6J3Jlc2V0J30se25hbWU6J+WFqOmAiScsaWQ6J3NlbGVjdEFsbCd9XTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gc291bmRMaXN0SGVhZFRpdGxlLmNsb25lTm9kZSh0cnVlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zZXRBdHRyaWJ1dGUoJ2lkJyxpdGVtLmlkKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5pbm5lclRleHQgPSBpdGVtLm5hbWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdW5kTGlzdEhlYWRUaXRsZS5hZnRlcihjb250cm9sKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5iZWZvcmUoIiB8ICIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzZWxlY3RBbGwnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94ID0gc291bmRMaXN0LnF1ZXJ5U2VsZWN0b3JBbGwoImlucHV0W25hbWU9J3pobUNoZWNrYm94J10iKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpdGVtLmNoZWNrZWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uY2hlY2tlZD10cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcmVzZXQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94ID0gc291bmRMaXN0LnF1ZXJ5U2VsZWN0b3JBbGwoImlucHV0W25hbWU9J3pobUNoZWNrYm94J10iKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uY2hlY2tlZCA9IGZhbHNlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5q2j5bqP5YCS5bqP5LqL5Lu2CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdW5kTGlzdEhlYWQucXVlcnlTZWxlY3RvcignLnNvcnQnKS5maXJzdENoaWxkLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwyMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdW5kTGlzdEhlYWRUaXRsZS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMjAwMCkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmF0Y2hEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL0Jhc2VDbGFzcy50b2FzdCgn5bey5LiL6L2977yM6K+356iN5YCZJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1DaGVja2JveCA9IHNvdW5kTGlzdC5xdWVyeVNlbGVjdG9yQWxsKCJpbnB1dFtuYW1lPSd6aG1DaGVja2JveCddIik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUNoZWNrYm94LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNoZWNrZWQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzY3JNYXRjaCA9IGl0ZW0udmFsdWUubWF0Y2goL1wvc291bmRcLyhbMC05XSspLyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwczovL21vYmlsZS54aW1hbGF5YS5jb20vbW9iaWxlLXBsYXlwYWdlL3RyYWNrL3YzL2Jhc2VJbmZvLycrbmV3IERhdGUoKS5nZXRUaW1lKCkrJz9kZXZpY2U9d2ViJnRyYWNrSWQ9JytzY3JNYXRjaFsxXTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IEpTT04ucGFyc2UocmVzdWx0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlVcmwgPSBkYXRhLnRyYWNrSW5mby5wbGF5VXJsTGlzdFsxXS51cmw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdHIxID0gcGxheVVybC5yZXBsYWNlQWxsKCctJywnKycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyMiA9IHN0cjEucmVwbGFjZUFsbCgnXycsJy8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG51bSA9IHN0cjIubGVuZ3RoJTQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG51bSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIyICs9ICc9PT09Jy5zdWJzdHIobnVtKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlY3J5cHRlZCA9IENyeXB0b0pTLkFFUy5kZWNyeXB0KHsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpcGhlcnRleHQ6IENyeXB0b0pTLmVuYy5CYXNlNjQucGFyc2Uoc3RyMikKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgQ3J5cHRvSlMuZW5jLkhleC5wYXJzZSgiYWFhZDNlNGZkNTQwYjBmNzlkY2E5NTYwNmU3MmJmOTMiKSwgewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5FQ0IsCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBDcnlwdG9KUy5wYWQuUGtjczcKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkudG9TdHJpbmcoQ3J5cHRvSlMuZW5jLlV0ZjgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGRlY3J5cHRlZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRlY3J5cHRlZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQoZGVjcnlwdGVkLGRhdGEudHJhY2tJbmZvLnRpdGxlKycubXAzJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop6Plr4blnLDlnYDlpLHotKUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94PSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuemhtQ2hlY2tib3gnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUNoZWNrYm94Lmxlbmd0aCA9PSAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+e/u+mhteS6i+S7tgogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VCYXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGFnaW5hdGlvbi1wYWdlJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYWdlQmFyKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlQmFyLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwyMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+i3s+mhteS6i+S7tgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYWdlTGluayA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2J1dHRvblt0eXBlPXN1Ym1pdF0nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhZ2VMaW5rKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlTGluay5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq5Yy56YWN5Yiw5YiX6KGo5Zyw5Z2AJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sNTAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+WFqOWxgOeCueWHu+S6i+S7tgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9iakxpbmsgPSB7fTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaHJlZil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsuaHJlZiA9IGl0ZW0uaHJlZj9pdGVtLmhyZWY6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsudGFyZ2V0ID0gaXRlbS50YXJnZXQ/aXRlbS50YXJnZXQ6Jyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG9iakxpbmsuaHJlZiAmJiBvYmpMaW5rLnRhcmdldCAhPSAnX2JsYW5rJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IG9iakxpbmsuaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoanhNdXNpY1dlYlswXS5uYW1lPT0na3Vnb3UnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFEb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCdhJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFEb20uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhT2JqID0gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGFvYmonKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFPYmopewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0ucmVtb3ZlQXR0cmlidXRlKCdkYXRhb2JqJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zZXRBdHRyaWJ1dGUoJ3RhcmdldCcsJ19ibGFuaycpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGRhdGFPYmopOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY291cG9uVXJsLmluZGV4T2YoJ21peHNvbmcnKSE9LTEgfHwgY291cG9uVXJsLmluZGV4T2YoJ3NvbmcnKSAhPSAtMSB8fCBjb3Vwb25VcmwuaW5kZXhPZignc2hhcmUnKSAhPSAtMSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZvbHVtZURvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2b2x1bWUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWREb20gPSB2b2x1bWVEb20uY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLnJlbW92ZUF0dHJpYnV0ZSgnaWQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5zdHlsZT0nbWFyZ2luLXRvcDozMHB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5pbm5lckhUTUwgPSAiPGEgc3R5bGU9J2NvbG9yOiNmZmY7Zm9udC1zaXplOjEwcHg7d2hpdGUtc3BhY2U6bm93cmFwO2N1cnNvcjpwb2ludGVyOycgaWQ9J2t1Z291RG93bmxvYWQnIGphdmFzY3JpcHQ6dm9pZCgwKTs+5LiL6L29PC9hPiI7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9sdW1lRG9tLmJlZm9yZShkb3dubG9hZERvbSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9sdW1lRG9tLnN0eWxlPSdsZWZ0OjUwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjbW9kZScpLnN0eWxlPSdtYXJnaW4tbGVmdDo5MHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BiX2Rvd25sb2FkJykuc3R5bGU9J21hcmdpbi1sZWZ0OjEzMHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BiX3NoYXJlJykuc3R5bGU9J21hcmdpbi1sZWZ0OjE3MHB4Oyc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2xpc3QnKS5zdHlsZT0ncmlnaHQ6LTIwcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcja3Vnb3VEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjbXlBdWRpbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW9TcmMgPSBhdWRpby5nZXRBdHRyaWJ1dGUoJ3NyYycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2luZ2VyTmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5zaW5nZXJOYW1lJykudGl0bGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb25nTmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzb25nTmFtZVRlbXAnKS50aXRsZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLkxSX2Rvd25sb2FkKGF1ZGlvU3JjLHNvbmdOYW1lKyctJytzaW5nZXJOYW1lLnN1YnN0cigwLHNpbmdlck5hbWUubGVuZ3RoLTEpKycubXAzJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNvdXBvblVybCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICBpZihqeE11c2ljV2ViWzBdLm5hbWU9PSduZXRlYXNlJyAmJiBsb2NhdGlvbi5ocmVmID09ICdodHRwczovL211c2ljLjE2My5jb20vc3QvZG93bmxvYWQnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtSWNvbicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MuemhtTG9nbygpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy56aG1Mb2dvRHJhZygnbXVzaWMnLGp4TXVzaWNXZWIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0saWNvbldhaXRUaW1lKTsKIAogICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXlEb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtSWNvbicpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoemhtUGxheURvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgemhtUGxheURvbS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobVBsYXlEb20pOwogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemfs+mikee9keWdgOayoeaciea3u+WKoOWMuemFjeaIluWMuemFjemUmeivrycpOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICB9CiAKICAgICAgICBmdW5jdGlvbiB6aE5pY2VGdW5jKCl7CiAKICAgICAgICAgICAgdmFyIHpoQ2xhc3MgPSBuZXcgWmhDbGFzcygpOwogCiAgICAgICAgICAgIC8v5YWz6Zet55m75b2V5by55qGGCiAgICAgICAgICAgIChhc3luYyBmdW5jdGlvbigpewogCiAgICA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ICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgd2luZG93Lm9ubG9hZD1mdW5jdGlvbigpewogICAgICAgICAgICAgICAgemhEYXRhLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5pc09wZW49PTIyICYmIGl0ZW0ub25sb2FkPT0xKXsKICAgICAgICAgICAgICAgICAgICAgICAgemhDbGFzc1tpdGVtLmZ1bmNdKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfQogICAgICAgICAgICB3aW5kb3cub25zY3JvbGwgPSBmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcDsKIAogICAgICAgICAgICAgICAgaWYoc2Nyb2xsVG9wID4gMjAwKXsKIAogICAgICAgICAgICAgICAgICAgIHpoRGF0YS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmlzT3Blbj09MjIgJiYgaXRlbS5pc09uc2Nyb2xsPT0xKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhDbGFzc1tpdGVtLmZ1bmNdKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfQogCiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gdGFvYmFvU2VhcmNoRnVuYyhpdGVtKXsKIAogICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICBsZXQgdGFvYmFvSWNvbkRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0YW9iYW9JY29uU2VsZWN0Jyk7CiAKICAgICAgICAgICAgICAgIGxldCBiYXNlQ2xhc3MgPSBuZXcgQmFzZUNsYXNzKCk7CiAKICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJUbWFsbCA9IGJhc2VDbGFzcy5nZXRRdWVyeVN0cmluZygnZmlsdGVyX3RpYW5tYW8nKTsKIAogICAgICAgICAgICAgICAgaWYoIXRhb2Jhb0ljb25Eb20pewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpbHRlcnMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuZmlsdGVycyA+YScpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoZmlsdGVycy5sZW5ndGg+MCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxmaWx0ZXJzLmxlbmd0aDtpKyspewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVZhbHVlID0gZmlsdGVyc1tpXS5nZXRBdHRyaWJ1dGUoJ2RhdGEtdmFsdWUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YVZhbHVlID09ICd0bWFsbCcpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhkYXRhVmFsdWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRhb2Jhb0RvbSA9IGZpbHRlcnNbaV0uY2xvbmVOb2RlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnF1ZXJ5U2VsZWN0b3IoJy50ZXh0JykuaW5uZXJUZXh0PSfmt5jlrp0nOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnNldEF0dHJpYnV0ZSgnaWQnLCd0YW9iYW9JY29uU2VsZWN0Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9Eb20uc2V0QXR0cmlidXRlKCdkYXRhLXZhbHVlJywndGFvYmFvJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihmaWx0ZXJUbWFsbD09J3Rhb2JhbycpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9Eb20uc2V0QXR0cmlidXRlKCdkYXRhLWFjdGlvbicsJ3JlbW92ZScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9Eb20uY2xhc3NOYW1lPSdmaWx0ZXIgaWNvbi10YWcgSl9BamF4IGljb24taG92ZXInOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9Eb20ucmVtb3ZlQXR0cmlidXRlKCdkYXRhLWFjdGlvbicpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9Eb20uY2xhc3NOYW1lPSdmaWx0ZXIgaWNvbi10YWcgSl9BamF4JzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzW2ldLmJlZm9yZSh0YW9iYW9Eb20pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvSWNvbkRvbS5zZXRBdHRyaWJ1dGUoJ2RhdGEtYWN0aW9uJywncmVtb3ZlJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0ljb25Eb20uY2xhc3NOYW1lPSdmaWx0ZXIgaWNvbi10YWcgSl9BamF4IGljb24taG92ZXInOwogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9JY29uRG9tLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvSWNvbkRvbS5jbGFzc05hbWU9J2ZpbHRlciBpY29uLXRhZyBKX0FqYXgnOwogICAgICAgICAgICAgICAgICAgIH0KIAogCiAgICAgICAgICAgICAgICB9CiAKIAogCiAgICAgICAgICAgICAgICBpZihmaWx0ZXJUbWFsbD09J3Rhb2JhbycpewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGdvb2RzTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5pdGVtcyA+IC5pdGVtJyk7CiAKICAgICAgICAgICAgICAgICAgICBnb29kc0xpc3QuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbkxpQ2xhc3MgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5pY29ucz5saT5hPnNwYW4nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2xhc3NOYW1lVG09WydpY29uLXNlcnZpY2UtdGlhbm1hbycsJ2ljb24tc2VydmljZS10aWFubWFvZ3VvamknXTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihpY29uTGlDbGFzcyAmJiBjbGFzc05hbWVUbS5pbmRleE9mKGljb25MaUNsYXNzLmNsYXNzTmFtZSkgIT0gLTEpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlPSdkaXNwbGF5Om5vbmU7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgLy9jbGVhckludGVydmFsKHRpbWVyKTsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgIH0sNTAwKQogCiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gYmFpZHVGdW5jKCl7CiAgICAgICAgbGV0IHB0ID0gJycsIHNlbGVjdExpc3QgPSBbXSwgcGFyYW1zID0ge30sIG1vZGUgPSAnJywgd2lkdGggPSA4MDAsIHBhbiA9IHt9LCBjb2xvciA9ICcnLAogICAgICAgIGRvYyA9ICQoZG9jdW1lbnQpLCBwcm9ncmVzcyA9IHt9LCByZXF1ZXN0ID0ge30sIGlucyA9IHt9LCBpZG0gPSB7fTsKICAgICAgICBjb25zdCB2ZXJzaW9uID0gJzYuMC4zJzsKICAgICAgICBjb25zdCBhdXRob3IgPSAnR3JlYXN5Rm9yayc7CiAgICAgICAgY29uc3QgbmFtZSA9ICfnvZHnm5jnm7Tpk77kuIvovb3liqnmiYsnOwogICAgICAgIGNvbnN0IGN1c3RvbUNsYXNzID0gewogICAgICAgIHBvcHVwOiAncGwtcG9wdXAnLAogICAgICAgIGhlYWRlcjogJ3BsLWhlYWRlcicsCiAgICAgICAgdGl0bGU6ICdwbC10aXRsZScsCiAgICAgICAgY2xvc2VCdXR0b246ICdwbC1jbG9zZScsCiAgICAgICAgY29udGVudDogJ3BsLWNvbnRlbnQnLAogICAgICAgIGlucHV0OiAncGwtaW5wdXQnLAogICAgICAgIGZvb3RlcjogJ3BsLWZvb3RlcicKICAgIH07CiAKICAgIGNvbnN0IHRlcm1pbmFsVHlwZSA9IHsKICAgICAgICB3YzogIldpbmRvd3MgQ01EIiwKICAgICAgICB3cDogIldpbmRvd3MgUG93ZXJTaGVsbCIsCiAgICAgICAgbHQ6ICJMaW51eCDnu4jnq68iLAogICAgICAgIGxzOiAiTGludXggU2hlbGwiLAogICAgICAgIG10OiAiTWFjT1Mg57uI56uvIiwKICAgIH07CiAKICAgIGxldCB0b2FzdCA9IFN3YWwubWl4aW4oewogICAgICAgIHRvYXN0OiB0cnVlLAogICAgICAgIHBvc2l0aW9uOiAndG9wJywKICAgICAgICBzaG93Q29uZmlybUJ1dHRvbjogZmFsc2UsCiAgICAgICAgdGltZXI6IDM1MDAsCiAgICAgICAgdGltZXJQcm9ncmVzc0JhcjogZmFsc2UsCiAgICAgICAgZGlkT3BlbjogKHRvYXN0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlZW50ZXInLCBTd2FsLnN0b3BUaW1lcik7CiAgICAgICAgICAgIHRvYXN0LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlbGVhdmUnLCBTd2FsLnJlc3VtZVRpbWVyKTsKICAgICAgICB9CiAgICB9KTsKIAogICAgY29uc3QgbWVzc2FnZSA9IHsKICAgICAgICBzdWNjZXNzOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3N1Y2Nlc3MnfSk7CiAgICAgICAgfSwKICAgICAgICBlcnJvcjogKHRleHQpID0+IHsKICAgICAgICAgICAgdG9hc3QuZmlyZSh7dGl0bGU6IHRleHQsIGljb246ICdlcnJvcid9KTsKICAgICAgICB9LAogICAgICAgIHdhcm5pbmc6ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnd2FybmluZyd9KTsKICAgICAgICB9LAogICAgICAgIGluZm86ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnaW5mbyd9KTsKICAgICAgICB9LAogICAgICAgIHF1ZXN0aW9uOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3F1ZXN0aW9uJ30pOwogICAgICAgIH0KICAgIH07CiAKICAgIGxldCBiYXNlID0gewogCiAgICAgICAgZ2V0Q29va2llKG5hbWUpIHsKICAgICAgICAgICAgbGV0IGFyciA9IGRvY3VtZW50LmNvb2tpZS5yZXBsYWNlKC9ccy9nLCAiIikuc3BsaXQoJzsnKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDAsIGwgPSBhcnIubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgICAgICAgICBsZXQgdGVtcEFyciA9IGFycltpXS5zcGxpdCgnPScpOwogICAgICAgICAgICAgICAgaWYgKHRlbXBBcnJbMF0gPT09IG5hbWUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHRlbXBBcnJbMV0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICB9LAogCiAgICAgICAgaXNUeXBlKG9iaikgewogICAgICAgICAgICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKG9iaikucmVwbGFjZSgvXlxbb2JqZWN0ICguKylcXSQvLCAnJDEnKS50b0xvd2VyQ2FzZSgpOwogICAgICAgIH0sCiAKICAgICAgICBnZXRWYWx1ZShuYW1lKSB7CiAgICAgICAgICAgIHJldHVybiBHTV9nZXRWYWx1ZShuYW1lKTsKICAgICAgICB9LAogCiAgICAgICAgc2V0VmFsdWUobmFtZSwgdmFsdWUpIHsKICAgICAgICAgICAgR01fc2V0VmFsdWUobmFtZSwgdmFsdWUpOwogICAgICAgIH0sCiAKICAgICAgICBnZXRTdG9yYWdlKGtleSkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UobG9jYWxTdG9yYWdlLmdldEl0ZW0oa2V5KSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhbFN0b3JhZ2UuZ2V0SXRlbShrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgfSwKIAogICAgICAgIHNldFN0b3JhZ2Uoa2V5LCB2YWx1ZSkgewogICAgICAgICAgICBpZiAodGhpcy5pc1R5cGUodmFsdWUpID09PSAnb2JqZWN0JyB8fCB0aGlzLmlzVHlwZSh2YWx1ZSkgPT09ICdhcnJheScpIHsKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhbFN0b3JhZ2Uuc2V0SXRlbShrZXksIEpTT04uc3RyaW5naWZ5KHZhbHVlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGxvY2FsU3RvcmFnZS5zZXRJdGVtKGtleSwgdmFsdWUpOwogICAgICAgIH0sCiAKICAgICAgICBzZXRDbGlwYm9hcmQodGV4dCkgewogICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodGV4dCwgJ3RleHQnKTsKICAgICAgICB9LAogCiAgICAgICAgZShzdHIpIHsKICAgICAgICAgICAgcmV0dXJuIGJ0b2EodW5lc2NhcGUoZW5jb2RlVVJJQ29tcG9uZW50KHN0cikpKTsKICAgICAgICB9LAogCiAgICAgICAgZChzdHIpIHsKICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChlc2NhcGUoYXRvYihzdHIpKSk7CiAgICAgICAgfSwKIAogICAgICAgIGdldEV4dGVuc2lvbihuYW1lKSB7CiAgICAgICAgICAgIGNvbnN0IHJlZyA9IC8oPyFcLilcdyskLzsKICAgICAgICAgICAgaWYgKHJlZy50ZXN0KG5hbWUpKSB7CiAgICAgICAgICAgICAgICBsZXQgbWF0Y2ggPSBuYW1lLm1hdGNoKHJlZyk7CiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hbMF0udG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKIAogICAgICAgIHNpemVGb3JtYXQodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlID09PSArdmFsdWUpIHsKICAgICAgICAgICAgICAgIGxldCB1bml0ID0gWyJCIiwgIktCIiwgIk1CIiwgIkdCIiwgIlRCIiwgIlBCIiwgIkVCIiwgIlpCIiwgIllCIl07CiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBNYXRoLmZsb29yKE1hdGgubG9nKHZhbHVlKSAvIE1hdGgubG9nKDEwMjQpKTsKICAgICAgICAgICAgICAgIGxldCBzaXplID0gdmFsdWUgLyBNYXRoLnBvdygxMDI0LCBpbmRleCk7CiAgICAgICAgICAgICAgICBzaXplID0gc2l6ZS50b0ZpeGVkKDEpOwogICAgICAgICAgICAgICAgcmV0dXJuIHNpemUgKyB1bml0W2luZGV4XTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKIAogICAgICAgIHNvcnRCeU5hbWUoYXJyKSB7CiAgICAgICAgICAgIGNvbnN0IGhhbmRsZSA9ICgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAoYSwgYikgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHAxID0gYS5maWxlbmFtZSA/IGEuZmlsZW5hbWUgOiBhLnNlcnZlcl9maWxlbmFtZTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBwMiA9IGIuZmlsZW5hbWUgPyBiLmZpbGVuYW1lIDogYi5zZXJ2ZXJfZmlsZW5hbWU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHAxLmxvY2FsZUNvbXBhcmUocDIsICJ6aC1DTiIpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgYXJyLnNvcnQoaGFuZGxlKCkpOwogICAgICAgIH0sCiAKICAgICAgICBibG9iRG93bmxvYWQoYmxvYiwgZmlsZW5hbWUpIHsKICAgICAgICAgICAgaWYgKGJsb2IgaW5zdGFuY2VvZiBCbG9iKSB7CiAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSBVUkwuY3JlYXRlT2JqZWN0VVJMKGJsb2IpOwogICAgICAgICAgICAgICAgY29uc3QgYSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2EnKTsKICAgICAgICAgICAgICAgIGEuaHJlZiA9IHVybDsKICAgICAgICAgICAgICAgIGEuZG93bmxvYWQgPSBmaWxlbmFtZTsKICAgICAgICAgICAgICAgIGEuY2xpY2soKTsKICAgICAgICAgICAgICAgIFVSTC5yZXZva2VPYmplY3RVUkwodXJsKTsKICAgICAgICAgICAgfQogICAgICAgIH0sCiAKICAgICAgICBwb3N0KHVybCwgZGF0YSwgaGVhZGVycywgdHlwZSkgewogICAgICAgICAgICBpZiAodGhpcy5pc1R5cGUoZGF0YSkgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5zdHJpbmdpZnkoZGF0YSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJQT1NUIiwgdXJsLCBoZWFkZXJzLCBkYXRhLAogICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlVHlwZTogdHlwZSB8fCAnanNvbicsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPT09ICdibG9iJyA/IHJlc29sdmUocmVzKSA6IHJlc29sdmUocmVzLnJlc3BvbnNlIHx8IHJlcy5yZXNwb25zZVRleHQpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25lcnJvcjogKGVycikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCiAKICAgICAgICBnZXQodXJsLCBoZWFkZXJzLCB0eXBlLCBleHRyYSkgewogICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICAgICAgICAgICAgbGV0IHJlcXVlc3RPYmogPSBHTV94bWxodHRwUmVxdWVzdCh7CiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAiR0VUIiwgdXJsLCBoZWFkZXJzLAogICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlVHlwZTogdHlwZSB8fCAnanNvbicsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXMuc3RhdHVzID09PSAyMDQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3RPYmouYWJvcnQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkbVtleHRyYS5pbmRleF0gPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSAnYmxvYicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5zdGF0dXMgPT09IDIwMCAmJiBiYXNlLmJsb2JEb3dubG9hZChyZXMucmVzcG9uc2UsIGV4dHJhLmZpbGVuYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzLnJlc3BvbnNlIHx8IHJlcy5yZXNwb25zZVRleHQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbnByb2dyZXNzOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleHRyYSAmJiBleHRyYS5maWxlbmFtZSAmJiBleHRyYS5pbmRleCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzLnRvdGFsID4gMCA/IHByb2dyZXNzW2V4dHJhLmluZGV4XSA9IChyZXMubG9hZGVkICogMTAwIC8gcmVzLnRvdGFsKS50b0ZpeGVkKDIpIDogcHJvZ3Jlc3NbZXh0cmEuaW5kZXhdID0gMC4wMDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25sb2Fkc3RhcnQoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhICYmIGV4dHJhLmZpbGVuYW1lICYmIGV4dHJhLmluZGV4ICYmIChyZXF1ZXN0W2V4dHJhLmluZGV4XSA9IHJlcXVlc3RPYmopOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25lcnJvcjogKGVycikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCiAKICAgICAgICBnZXRGaW5hbFVybCh1cmwsIGhlYWRlcnMpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgICAgIGxldCByZXF1ZXN0T2JqID0gR01feG1saHR0cFJlcXVlc3QoewogICAgICAgICAgICAgICAgICAgIG1ldGhvZDogIkdFVCIsIHVybCwgaGVhZGVycywKICAgICAgICAgICAgICAgICAgICBvbmxvYWQ6IChyZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXMuZmluYWxVcmwpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25lcnJvcjogKGVycikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCiAKICAgICAgICBhZGRTdHlsZShpZCwgdGFnLCBjc3MpIHsKICAgICAgICAgICAgdGFnID0gdGFnIHx8ICdzdHlsZSc7CiAgICAgICAgICAgIGxldCBkb2MgPSBkb2N1bWVudCwgc3R5bGVEb20gPSBkb2MuZ2V0RWxlbWVudEJ5SWQoaWQpOwogICAgICAgICAgICBpZiAoc3R5bGVEb20pIHJldHVybjsKICAgICAgICAgICAgbGV0IHN0eWxlID0gZG9jLmNyZWF0ZUVsZW1lbnQodGFnKTsKICAgICAgICAgICAgc3R5bGUucmVsID0gJ3N0eWxlc2hlZXQnOwogICAgICAgICAgICBzdHlsZS5pZCA9IGlkOwogICAgICAgICAgICB0YWcgPT09ICdzdHlsZScgPyBzdHlsZS5pbm5lckhUTUwgPSBjc3MgOiBzdHlsZS5ocmVmID0gY3NzOwogICAgICAgICAgICBkb2MuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXS5hcHBlbmRDaGlsZChzdHlsZSk7CiAgICAgICAgfSwKIAogICAgICAgIGZpbmRSZWFjdChkb20sIHRyYXZlcnNlVXAgPSAwKSB7CiAgICAgICAgICAgIGNvbnN0IGtleSA9IE9iamVjdC5rZXlzKGRvbSkuZmluZChrZXkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGtleS5zdGFydHNXaXRoKCJfX3JlYWN0RmliZXIkIikKICAgICAgICAgICAgICAgICAgICB8fCBrZXkuc3RhcnRzV2l0aCgiX19yZWFjdEludGVybmFsSW5zdGFuY2UkIik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBjb25zdCBkb21GaWJlciA9IGRvbVtrZXldOwogICAgICAgICAgICBpZiAoZG9tRmliZXIgPT0gbnVsbCkgcmV0dXJuIG51bGw7CiAKICAgICAgICAgICAgaWYgKGRvbUZpYmVyLl9jdXJyZW50RWxlbWVudCkgewogICAgICAgICAgICAgICAgbGV0IGNvbXBGaWJlciA9IGRvbUZpYmVyLl9jdXJyZW50RWxlbWVudC5fb3duZXI7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRyYXZlcnNlVXA7IGkrKykgewogICAgICAgICAgICAgICAgICAgIGNvbXBGaWJlciA9IGNvbXBGaWJlci5fY3VycmVudEVsZW1lbnQuX293bmVyOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBGaWJlci5faW5zdGFuY2U7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjb25zdCBHZXRDb21wRmliZXIgPSBmaWJlciA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcGFyZW50RmliZXIgPSBmaWJlci5yZXR1cm47CiAgICAgICAgICAgICAgICB3aGlsZSAodHlwZW9mIHBhcmVudEZpYmVyLnR5cGUgPT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnRGaWJlcjsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgbGV0IGNvbXBGaWJlciA9IEdldENvbXBGaWJlcihkb21GaWJlcik7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdHJhdmVyc2VVcDsgaSsrKSB7CiAgICAgICAgICAgICAgICBjb21wRmliZXIgPSBHZXRDb21wRmliZXIoY29tcEZpYmVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29tcEZpYmVyLnN0YXRlTm9kZSB8fCBjb21wRmliZXI7CiAgICAgICAgfSwKIAogICAgICAgIGluaXREZWZhdWx0Q29uZmlnKCkgewogICAgICAgICAgICBsZXQgdmFsdWUgPSBbewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX2RvbWFpbicsCiAgICAgICAgICAgICAgICB2YWx1ZTogJ2h0dHA6Ly9sb2NhbGhvc3QnCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3JwY19wb3J0JywKICAgICAgICAgICAgICAgIHZhbHVlOiAnMTY4MDAnCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3JwY19wYXRoJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnL2pzb25ycGMnCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3JwY190b2tlbicsCiAgICAgICAgICAgICAgICB2YWx1ZTogJycKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX2RpcicsCiAgICAgICAgICAgICAgICB2YWx1ZTogJ0Q6JwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ190ZXJtaW5hbF90eXBlJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnd2MnCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3RoZW1lX2NvbG9yJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnIzA5QUFGRicKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfaW5pdF9jb2RlJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnJwogICAgICAgICAgICB9XTsKIAogICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKCh2KSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLmdldFZhbHVlKHYubmFtZSkgPT09IHVuZGVmaW5lZCAmJiBiYXNlLnNldFZhbHVlKHYubmFtZSwgdi52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCiAKICAgICAgICBzaG93U2V0dGluZygpIHsKICAgICAgICAgICAgbGV0IGRvbSA9ICcnLCBidG4gPSAnJywKICAgICAgICAgICAgICAgIGNvbG9yTGlzdCA9IFsnIzA5QUFGRicsICcjY2MzMjM1JywgJyM1MjZlZmEnLCAnIzUxOGMxNycsICcjZWQ5NDRiJywgJyNmOTY5YTUnLCAnI2JjYTI4MCddOwogICAgICA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ICAgICAgIE9iamVjdC5rZXlzKHRlcm1pbmFsVHlwZSkuZm9yRWFjaChrID0+IHsKICAgICAgICAgICAgICAgIGRvbSArPSBgPG9wdGlvbiB2YWx1ZT0iJHtrfSIgJHtiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3Rlcm1pbmFsX3R5cGUnKSA9PT0gayA/ICdzZWxlY3RlZCcgOiAnJ30+JHt0ZXJtaW5hbFR5cGVba119PC9vcHRpb24+YDsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvbSArPSBgPC9zZWxlY3Q+PC9sYWJlbD5gOwogICAgICAgICAgICBkb20gKz0gYDxsYWJlbCBjbGFzcz0icGwtc2V0dGluZy1sYWJlbCI+PGRpdiBjbGFzcz0icGwtbGFiZWwiPuS4u+mimOminOiJsjwvZGl2PiA8ZGl2IGNsYXNzPSJwbC1jb2xvciI+JHtidG59PGRpdj48L2xhYmVsPmA7CiAgICAgICAgICAgIGRvbSA9ICc8ZGl2PicgKyBkb20gKyAnPC9kaXY+JzsKIAogICAgICAgICAgICBTd2FsLmZpcmUoewogICAgICAgICAgICAgICAgdGl0bGU6ICfliqnmiYvphY3nva4nLAogICAgICAgICAgICAgICAgaHRtbDogZG9tLAogICAgICAgICAgICAgICAgaWNvbjogJ2luZm8nLAogICAgICAgICAgICAgICAgc2hvd0Nsb3NlQnV0dG9uOiB0cnVlLAogICAgICAgICAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IGZhbHNlLAogICAgICAgICAgICAgICAgZm9vdGVyOiBwYW4uZm9vdGVyLAogICAgICAgICAgICB9KS50aGVuKCgpID0+IHsKICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3VjY2Vzcygn6K6+572u5oiQ5Yqf77yBJyk7CiAgICAgICAgICAgICAgICBoaXN0b3J5LmdvKDApOwogICAgICAgICAgICB9KTsKIAogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1jb2xvcicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3RoZW1lX2NvbG9yJywgZS50YXJnZXQuZGF0YXNldC5jb2xvcik7CiAgICAgICAgICAgICAgICBtZXNzYWdlLnN1Y2Nlc3MoJ+iuvue9ruaIkOWKn++8gScpOwogICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignaW5wdXQnLCAnLmxpc3RlbmVyLWRvbWFpbicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1wb3J0JywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BvcnQnLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1wYXRoJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BhdGgnLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci10b2tlbicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicsIGUudGFyZ2V0LnZhbHVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignaW5wdXQnLCAnLmxpc3RlbmVyLWRpcicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19kaXInLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NoYW5nZScsICcubGlzdGVuZXItdGVybWluYWwnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ190ZXJtaW5hbF90eXBlJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgcmVnaXN0ZXJNZW51Q29tbWFuZCgpIHsKICAgICAgICAgICAgR01fcmVnaXN0ZXJNZW51Q29tbWFuZCgn4pqZ77iPIOiuvue9ricsICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc2hvd1NldHRpbmcoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwKIAogICAgICAgIGNyZWF0ZVRpcCgpIHsKICAgICAgICAgICAgJCgnYm9keScpLmFwcGVuZCgnPGRpdiBjbGFzcz0icGwtdG9vbHRpcCI+PC9kaXY+Jyk7CiAKICAgICAgICAgICAgZG9jLm9uKCdtb3VzZWVudGVyIG1vdXNlbGVhdmUnLCAnLmxpc3RlbmVyLXRpcCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZS50eXBlID09PSAnbW91c2VlbnRlcicpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSBlLmN1cnJlbnRUYXJnZXQuaW5uZXJUZXh0OwogICAgICAgICAgICAgICAgICAgIGxldCBzaXplID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQuc2l6ZTsKICAgICAgICAgICAgICAgICAgICBsZXQgdGlwID0gYCR7ZmlsZW5hbWV9PHNwYW4gc3R5bGU9Im1hcmdpbi1sZWZ0OiAxMHB4O2NvbG9yOiAjZjU2YzZjOyI+JHtzaXplfTwvc3Bhbj5gOwogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5jc3Moe29wYWNpdHk6ICcwLjUnfSk7CiAgICAgICAgICAgICAgICAgICAgJCgnLnBsLXRvb2x0aXAnKS5odG1sKHRpcCkuY3NzKHsKICAgICAgICAgICAgICAgICAgICAgICAgJ2xlZnQnOiBlLnBhZ2VYICsgMTAgKyAncHgnLAogICAgICAgICAgICAgICAgICAgICAgICAndG9wJzogZS5wYWdlWSAtIGUuY3VycmVudFRhcmdldC5vZmZzZXRUb3AgPiAxNCA/IGUucGFnZVkgKyAncHgnIDogZS5wYWdlWSArIDIwICsgJ3B4JwogICAgICAgICAgICAgICAgICAgIH0pLnNob3coKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLmNzcyh7b3BhY2l0eTogJzEnfSk7CiAgICAgICAgICAgICAgICAgICAgJCgnLnBsLXRvb2x0aXAnKS5oaWRlKDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9LAogCiAgICAgICAgY3JlYXRlTG9hZGluZygpIHsKICAgICAgICAgICAgcmV0dXJuICQoJzxkaXYgY2xhc3M9InBsLWxvYWRpbmciPjxkaXYgY2xhc3M9InBsLWxvYWRpbmctYm94Ij48ZGl2PjxkaXY+PC9kaXY+PGRpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj4nKTsKICAgICAgICB9LAogCiAgICAgICAgY3JlYXRlRG93bmxvYWRJZnJhbWUoKSB7CiAgICAgICAgICAgIGxldCAkZGl2ID0gJCgnPGRpdiBzdHlsZT0icGFkZGluZzowO21hcmdpbjowO2Rpc3BsYXk6YmxvY2siPjwvZGl2PicpOwogICAgICAgICAgICBsZXQgJGlmcmFtZSA9ICQoJzxpZnJhbWUgc3JjPSJqYXZhc2NyaXB0OjsiIGlkPSJkb3dubG9hZElmcmFtZSIgc3R5bGU9ImRpc3BsYXk6bm9uZSI+PC9pZnJhbWU+Jyk7CiAgICAgICAgICAgICRkaXYuYXBwZW5kKCRpZnJhbWUpOwogICAgICAgICAgICAkKCdib2R5JykuYXBwZW5kKCRkaXYpOwogICAgICAgIH0sCiAKICAgICAgICBnZXRNaXJyb3JMaXN0KGxpbmssIG1pcnJvciwgdGhyZWFkID0gMikgewogICAgICAgICAgICBsZXQgaG9zdCA9IG5ldyBVUkwobGluaykuaG9zdDsKICAgICAgICAgICAgbGV0IG1pcnJvcnMgPSBbXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtaXJyb3IubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgdGhyZWFkOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbSA9IGxpbmsucmVwbGFjZShob3N0LCBtaXJyb3JbaV0pICsgJyYnLnJlcGVhdChqKTsKICAgICAgICAgICAgICAgICAgICBtaXJyb3JzLnB1c2goaXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG1pcnJvcnMuam9pbignXG4nKTsKICAgICAgICB9LAogCiAgICAgICAgYWRkUGFuTGlua2VyU3R5bGUoKSB7CiAgICAgICAgICAgIGNvbG9yID0gYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ190aGVtZV9jb2xvcicpOwogICAgICAgICAgICBsZXQgY3NzID0gYAogICAgICAgICAgICBib2R5Ojotd2Via2l0LXNjcm9sbGJhciB7IGRpc3BsYXk6IG5vbmUgfQogICAgICAgICAgICA6Oi13ZWJraXQtc2Nyb2xsYmFyIHsgd2lkdGg6IDZweDsgaGVpZ2h0OiAxMHB4IH0KICAgICAgICAgICAgOjotd2Via2l0LXNjcm9sbGJhci10cmFjayB7IGJvcmRlci1yYWRpdXM6IDA7IGJhY2tncm91bmQ6IG5vbmUgfQogICAgICAgICAgICA6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iIHsgYmFja2dyb3VuZC1jb2xvcjogcmdiYSg4NSw4NSw4NSwuNCkgfQogICAgICA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gICAgYWxsb3dPdXRzaWRlQ2xpY2s6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uVGV4dDogJ+egtOinoycKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5pc0Rpc21pc3NlZCAmJiByZXN1bHQuZGlzbWlzcyA9PT0gJ2Nsb3NlJykgcmV0dXJuOwogICAgICAgICAgICAgICAgaWYgKHBhbi5udW0gPT0gcGFuLm51bSkgewogICAgICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfaW5pdF9jb2RlJywgcGFuLm51bSk7CiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdWNjZXNzKCLmmpflj7fmraPnoa4iKTsKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgICAgICAgICB9LCAxNTAwKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYXdhaXQgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6Iuaal+WPt+S4jeato+ehriIsCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICLmmpflj7fkuI3mraPnoa4iLAogICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uVGV4dDogJ+mHjeaWsOi+k+WFpScsCiAgICAgICAgICAgICAgICAgICAgICAgIGltYWdlVXJsOiBwYW4uaW1nLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMuaW5pdERpYWxvZygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgIH07CiAKICAgIGxldCBiYWlkdSA9IHsKIAogICAgICAgIF9nZXRFeHRyYSgpIHsKICAgICAgICAgICAgbGV0IHNlS2V5ID0gZGVjb2RlVVJJQ29tcG9uZW50KGJhc2UuZ2V0Q29va2llKCdCRENMTkQnKSk7CiAgICAgICAgICAgIHJldHVybiAneycgKyAnInNla2V5IjoiJyArIHNlS2V5ICsgJyInICsgIn0iOwogICAgICAgIH0sCiAKICAgICAgICBfZ2V0U3VybCgpIHsKIAogICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwcz86XC9cLy4rXC5iYWlkdVwuY29tXC8oc1wvfHN1cmw9KSguKylcPy8pOwogCiAgICAgICAgICAgICAgICBpZiAocmVzcCkgewogICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2cocmVzcFsyXSwncmVzcCcpOwogICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzcFsyXTsKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAKICAgICAgICB9LAogCiAgICAgICAgX2dldEZpZExpc3QoKSB7CiAgICAgICAgICAgIGxldCBmaWRsaXN0ID0gW107CiAgICAgICAgICAgIHNlbGVjdExpc3QuZm9yRWFjaCh2ID0+IHsKICAgICAgICAgICAgICAgIGlmICgrdi5pc2RpciA9PT0gMSkgcmV0dXJuOwogICAgICAgICAgICAgICAgZmlkbGlzdC5wdXNoKHYuZnNfaWQpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuICdbJyArIGZpZGxpc3QgKyAnXSc7CiAgICAgICAgfSwKIAogICAgICAgIF9yZXNldERhdGEoKSB7CiAgICAgICAgICAgIHByb2dyZXNzID0ge307CiAgICAgICAgICAgICQuZWFjaChyZXF1ZXN0LCAoa2V5KSA9PiB7CiAgICAgICAgICAgICAgICAocmVxdWVzdFtrZXldKS5hYm9ydCgpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgJC5lYWNoKGlucywgKGtleSkgPT4gewogICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNba2V5XSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZG0gPSB7fTsKICAgICAgICAgICAgaW5zID0ge307CiAgICAgICAgICAgIHJlcXVlc3QgPSB7fTsKICAgICAgICB9LAogCiAgICAgICAgc2V0QkRVU1MoKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBHTV9jb29raWUgJiYgR01fY29va2llKCdsaXN0Jywge25hbWU6ICdCRFVTUyd9LCAoY29va2llcywgZXJyb3IpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhc2Uuc2V0U3RvcmFnZSgiYmFpZHV5dW5QbHVnaW5fQkRVU1MiLCB7QkRVU1M6IGNvb2tpZXNbMF0udmFsdWV9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICB9CiAgICAgICAgfSwKIAogICAgICAgIGdldEJEVVNTKCkgewogICAgICAgICAgICBsZXQgYmFpZHV5dW5QbHVnaW5fQkRVU1MgPSBiYXNlLmdldFN0b3JhZ2UoJ2JhaWR1eXVuUGx1Z2luX0JEVVNTJykgPyBiYXNlLmdldFN0b3JhZ2UoJ2JhaWR1eXVuUGx1Z2luX0JEVVNTJykgOiAneyJiYWlkdXl1blBsdWdpbl9CRFVTUyI6IiJ9JzsKICAgICAgICAgICAgcmV0dXJuIGJhaWR1eXVuUGx1Z2luX0JEVVNTLkJEVVNTIHx8ICcnOwogICAgICAgIH0sCiAKICAgICAgICBjb252ZXJ0TGlua1RvQXJpYShsaW5rLCBmaWxlbmFtZSwgdWEpIHsKICAgICAgICAgICAgbGV0IEJEVVNTID0gdGhpcy5nZXRCRFVTUygpOwogICAgICAgICAgICBpZiAoISFCRFVTUykgewogICAgICAgICAgICAgICAgZmlsZW5hbWUgPSBmaWxlbmFtZS5yZXBsYWNlKCcgJywgJ18nKTsKICAgICAgICAgICAgICAgIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQoYGFyaWEyYyAiJHtsaW5rfSIgLS1vdXQgIiR7ZmlsZW5hbWV9IiAtLWhlYWRlciAiVXNlci1BZ2VudDogJHt1YX0iIC0taGVhZGVyICJDb29raWU6IEJEVVNTPSR7QkRVU1N9ImApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBsaW5rOiBwYW4uYXNzaXN0YW50LAogICAgICAgICAgICAgICAgdGV4dDogcGFuLmluaXRbNV0KICAgICAgICAgICAgfTsKICAgICAgICB9LAogCiAgICAgICAgY29udmVydExpbmtUb0JDKGxpbmssIGZpbGVuYW1lLCB1YSkgewogICAgICAgICAgICBsZXQgQkRVU1MgPSB0aGlzLmdldEJEVVNTKCk7CiAgICAgICAgICAgIGlmICghIUJEVVNTKSB7CiAgICAgICAgICAgICAgICBsZXQgY29va2llID0gYEJEVVNTPSR7QkRVU1N9YDsKICAgICAgICAgICAgICAgIGxldCBiYyA9IGBBQS8ke2VuY29kZVVSSUNvbXBvbmVudChmaWxlbmFtZSl9Lz91cmw9JHtlbmNvZGVVUklDb21wb25lbnQobGluayl9JmNvb2tpZT0ke2VuY29kZVVSSUNvbXBvbmVudChjb29raWUpfSZ1c2VyX2FnZW50PSR7ZW5jb2RlVVJJQ29tcG9uZW50KHVhKX1aWmA7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGBiYzovL2h0dHAvJHtiYXNlLmUoYmMpfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBsaW5rOiBwYW4uYXNzaXN0YW50LAogICAgICAgICAgICAgICAgdGV4dDogcGFuLmluaXRbNV0KICAgICAgICAgICAgfTsKICAgICAgICB9LAogCiAgICAgICAgY29udmVydExpbmtUb0N1cmwobGluaywgZmlsZW5hbWUsIHVhKSB7CiAgICAgICAgICAgIGxldCBCRFVTUyA9IHRoaXMuZ2V0QkRVU1MoKTsKICAgICAgICAgICAgaWYgKCEhQkRVU1MpIHsKICAgICAgICAgICAgICAgIGxldCB0ZXJtaW5hbCA9IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfdGVybWluYWxfdHlwZScpOwogICAgICAgICAgICAgICAgZmlsZW5hbWUgPSBmaWxlbmFtZS5yZXBsYWNlKCcgJywgJ18nKTsKICAgICAgICAgICAgICAgIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQoYCR7dGVybWluYWwgIT09ICd3cCcgPyAnY3VybCcgOiAnY3VybC5leGUnfSAtTCAiJHtsaW5rfSIgLS1vdXRwdXQgIiR7ZmlsZW5hbWV9IiAtQSAiJHt1YX0iIC1iICJCRFVTUz0ke0JEVVNTfSJgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbGluazogcGFuLmFzc2lzdGFudCwKICAgICAgICAgICAgICAgIHRleHQ6IHBhbi5pbml0WzVdCiAgICAgICAgICAgIH07CiAgICAgICAgfSwKIAogICAgICAgIGFkZFBhZ2VMaXN0ZW5lcigpIHsKICAgICAgICAgICAgZnVuY3Rpb24gX2ZhY3RvcnkoZSkgewogICAgICAgICAgICAgICAgbGV0IHRhcmdldCA9ICQoZS50YXJnZXQpOwogICAgICAgICAgICAgICAgbGV0IGl0ZW0gPSB0YXJnZXQucGFyZW50cygnLnBsLWl0ZW0nKTsKICAgICAgICAgICAgICAgIGxldCBsaW5rID0gaXRlbS5maW5kKCcucGwtaXRlbS1saW5rJyk7CiAgICAgICAgICAgICAgICBsZXQgcHJvZ3Jlc3MgPSBpdGVtLmZpbmQoJy5wbC1pdGVtLXByb2dyZXNzJyk7CiAgICAgICAgICAgICAgICBsZXQgdGlwID0gaXRlbS5maW5kKCcucGwtaXRlbS10aXAnKTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgaXRlbSwgbGluaywgcHJvZ3Jlc3MsIHRpcCwgdGFyZ2V0LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGZ1bmN0aW9uIF9yZXNldChpKSB7CiAgICAgICAgICAgICAgICBpbnNbaV0gJiYgY2xlYXJJbnRlcnZhbChpbnNbaV0pOwogICAgICAgICAgICAgICAgcmVxdWVzdFtpXSAmJiByZXF1ZXN0W2ldLmFib3J0KCk7CiAgICAgICAgICAgICAgICBwcm9ncmVzc1tpXSA9IDA7CiAgICAgICAgICAgICAgICBpZG1baV0gPSBmYWxzZTsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGRvYy5vbignbW91c2VlbnRlciBtb3VzZWxlYXZlIGNsaWNrJywgJy5wbC1idXR0b24uZy1kcm9wZG93bi1idXR0b24nLCAoZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGUudHlwZSA9PT0gJ21vdXNlbGVhdmUnKSB7CiAgICAgICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLnJlbW92ZUNsYXNzKCdidXR0b24tb3BlbicpOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkuYWRkQ2xhc3MoJ2J1dHRvbi1vcGVuJyk7CiAgICAgICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLmZpbmQoJy5wbC1kcm9wZG93bi1tZW51Jykuc2hvdygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdtb3VzZWxlYXZlJywgJy5wbC1idXR0b24uZy1kcm9wZG93bi1idXR0b24gLnBsLWRyb3Bkb3duLW1lbnUnLCAoZSkgPT4gewogICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLmhpZGUoKTsKICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcucGwtYnV0dG9uLW1vZGUnLCAoZSkgPT4gewogICAgICAgICAgICAgICAgbW9kZSA9IGUudGFyZ2V0LmRhdGFzZXQubW9kZTsKICAgICAgICAgICAgICAgIFN3YWwuc2hvd0xvYWRpbmcoKTsKICAgICAgICAgICAgICAgIHRoaXMuZ2V0UENTTGluaygpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItbGluay1hcGknLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIGxldCAkd2lkdGggPSBvLml0ZW0uZmluZCgnLnBsLXByb2dyZXNzLWlubmVyJyk7CiAgICAgICAgICAgICAgICBsZXQgJHRleHQgPSBvLml0ZW0uZmluZCgnLnBsLXByb2dyZXNzLWlubmVyLXRleHQnKTsKICAgICAgICAgICAgICAgIGxldCBmaWxlbmFtZSA9IG8ubGlua1swXS5kYXRhc2V0LmZpbGVuYW1lOwogICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gby5saW5rWzBdLmRhdGFzZXQuaW5kZXg7CiAgICAgICAgICAgICAgICBfcmVzZXQoaW5kZXgpOwogICAgICAgICAgICAgICAgYmFzZS5nZXQoby5saW5rWzBdLmRhdGFzZXQubGluaywgeyJVc2VyLUFnZW50IjogcGFuLnVhfSwgJ2Jsb2InLCB7ZmlsZW5hbWUsIGluZGV4fSk7CiAgICAgICAgICAgICAgICBpbnNbaW5kZXhdID0gc2V0SW50ZXJ2YWwoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIGxldCBwcm9nID0gK3Byb2dyZXNzW2luZGV4XSB8fCAwOwogICAgICAgICAgICAgICAgICAgIGxldCBpc0lETSA9IGlkbVtpbmRleF0gfHwgZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzSURNKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ubGluay50ZXh0KCflt7LmiJDlip/llKTotbdJRE3vvIzor7fmn6XnnItJRE3kuIvovb3moYbvvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iikuc2hvdygpOwogICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGluc1tpbmRleF0pOwogICAgICAgICAgICAgICAgICAgICAgICBpZG1baW5kZXhdID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgby5saW5rLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgby50aXAuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBvLnByb2dyZXNzLnNob3coKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHdpZHRoLmNzcygnd2lkdGgnLCBwcm9nICsgJyUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRleHQudGV4dChwcm9nICsgJyUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByb2cgPT09IDEwMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNbaW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzW2luZGV4XSA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLml0ZW0uZmluZCgnLnBsLXByb2dyZXNzLXN0b3AnKS5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLml0ZW0uZmluZCgnLnBsLXByb2dyZXNzLXRpcCcpLmh0bWwoJ+S4i+i9veWujOaIkO+8jOato+WcqOW8ueWHuua1j+iniOWZqOS4i+i9veahhu+8gScpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwgNTAwKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXJldHJ5JywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBvLnRpcC5oaWRlKCk7CiAgICAgICAgICAgICAgICBvLmxpbmsuc2hvdygpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItaG93JywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBvLmxpbmtbMF0uZGF0YXNldC5pbmRleDsKICAgICAgICAgICAgICAgIGlmIChyZXF1ZXN0W2luZGV4XSkgewogICAgICAgICAgICAgICAgICAgIHJlcXVlc3RbaW5kZXhdLmFib3J0KCk7CiAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNbaW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICBvLnByb2dyZXNzLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLnRpcC5zaG93KCk7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXN0b3AnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IG8ubGlua1swXS5kYXRhc2V0LmluZGV4OwogICAgICAgICAgICAgICAgaWYgKHJlcXVlc3RbaW5kZXhdKSB7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdFtpbmRleF0uYWJvcnQoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGluc1tpbmRleF0pOwogICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLnByb2dyZXNzLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLmxpbmsuc2hvdygwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWJhY2snLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgIG8ubGluay5zaG93KCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1saW5rLWFyaWEsIC5saXN0ZW5lci1jb3B5LWFsbCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICBpZiAoIWUudGFyZ2V0LmRhdGFzZXQubGluaykgewogICAgICAgICAgICAgICAgICAgICQoZS50YXJnZXQpLnJlbW92ZUNsYXNzKCdsaXN0ZW5lci1jb3B5LWFsbCcpLmFkZENsYXNzKCdwbC1idG4tZGFuZ2VyJykuaHRtbChgJHtwYW4uaW5pdFs1XX3wn5GJPGEgaHJlZj0iJHtwYW4uYXNzaXN0YW50fSIgdGFyZ2V0PSJfYmxhbmsiIGNsYXNzPSJwbC1hIj7ngrnlh7vmraTlpITlronoo4U8L2E+8J+RiGApOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBiYXNlLnNldENsaXBib2FyZChkZWNvZGVVUklDb21wb25lbnQoZS50YXJnZXQuZGF0YXNldC5saW5rKSk7CiAgICAgICAgICAgICAgICAgICAgJChlLnRhcmdldCkudGV4dCgn5aSN5Yi25oiQ5Yqf77yM5b+r5Y6757KY6LS05ZCn77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItbGluay1ycGMnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IHRhcmdldCA9ICQoZS5jdXJyZW50VGFyZ2V0KTsKICAgICAgICAgICAgICAgIHRhcmdldC5maW5kKCcuaWNvbicpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgdGFyZ2V0LmZpbmQoJy5wbC1sb2FkaW5nJykucmVtb3ZlKCk7CiAgICAgICAgICAgICAgICB0YXJnZXQucHJlcGVuZChiYXNlLmNyZWF0ZUxvYWRpbmcoKSk7CiAgICAgICAgICAgICAgICBsZXQgcmVzID0gYXdhaXQgdGhpcy5zZW5kTGlua1RvUlBDKGUuY3VycmVudFRhcmdldC5kYXRhc2V0LmZpbGVuYW1lLCBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldC5saW5rKTsKICAgICAgICAgICAgICAgIGlmIChyZXMgPT09ICdzdWNjZXNzJykgewogICAgICAgICAgICAgICAgICAgICQoJy5saXN0ZW5lci1ycGMtdGFzaycpLnNob3coKTsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQucmVtb3ZlQ2xhc3MoJ3BsLWJ0bi1kYW5nZXInKS5odG1sKCflj5HpgIHmiJDlip/vvIzlv6vljrvnnIvnnIvlkKfvvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iik7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PT0gJ2Fzc2lzdGFudCcpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQuYWRkQ2xhc3MoJ3BsLWJ0bi1kYW5nZXInKS5odG1sKGAke3Bhbi5pbml0WzVdffCfkYk8YSBocmVmPSIke3Bhbi5hc3Npc3RhbnR9IiB0YXJnZXQ9Il9ibGFuayIgY2xhc3M9InBsLWEiPueCueWHu+atpOWkhOWuieijhTwvYT7wn5GIYCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRhcmdldC5hZGRDbGFzcygncGwtYnRuLWRhbmdlcicpLnRleHQoJ+WPkemAgeWksei0pe+8jOivt+ajgOafpeaCqOeahFJQQ+mFjee9ruS/oeaBr++8gScpLmFuaW1hdGUoe29wYWNpdHk6ICcwLjUnfSwgInNsb3ciKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXNlbmQtcnBjJywgKGUpID0+IHsKICAgICAgICAgICAgICAgICQoJy5saXN0ZW5lci1saW5rLXJwYycpLmNsaWNrKCk7CiAgICAgICAgICAgICAgICAkKGUudGFyZ2V0KS50ZXh0KCflj5HpgIHlrozmiJDvvIzlj5HpgIHnu5Pmnpzop4HkuIrmlrnmjInpkq7vvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1vcGVuLXNldHRpbmcnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNob3dTZXR0aW5nKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1ycGMtdGFzaycsICgpID0+IHsKICAgICAgICAgICAgICAgIGxldCBycGMgPSBKU09OLnN0cmluZ2lmeSh7CiAgICAgICAgICAgICAgICAgICAgZG9tYWluOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nKSwKICAgICAgICAgICAgICAgICAgICBwb3J0OiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19wb3J0JyksCiAgICAgICAgICAgICAgICB9KSwgdXJsID0gYCR7cGFuLmR9Lz9ycGM9JH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vcjogJHtjb2xvcn07Zm9udC1zaXplOiAxNHB4OyBwYWRkaW5nOiA4cHggMTZweDsgYm9yZGVyOiBub25lOyI+PGkgY2xhc3M9InUtaWNvbiB1LWljb24tZG93bmxvYWQiPjwvaT48c3Bhbj7kuIvovb3liqnmiYs8L3NwYW4+PC9idXR0b24+PC9kaXY+YCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHB0ID09PSAnc2hhcmUnKSAkdG9vbFdyYXAgPSAkKHBhbi5idG4uc2hhcmUpOwogICAgICAgICAgICAkdG9vbFdyYXAucHJlcGVuZCgkYnV0dG9uKTsKICAgICAgICAgICAgJGJ1dHRvbi5jbGljaygoKSA9PiBiYXNlLmluaXREaWFsb2coKSk7CiAgICAgICAgfSwKIAogICAgICAgIGFzeW5jIGdldFBDU0xpbmsoKSB7CiAgICAgICAgICAgIHNlbGVjdExpc3QgPSB0aGlzLmdldFNlbGVjdGVkTGlzdCgpOwogICAgICAgICAgICBsZXQgZmlkTGlzdCA9IHRoaXMuX2dldEZpZExpc3QoKSwgdXJsLCByZXM7CiAKICAgICAgICAgICAgaWYgKHB0ID09PSAnaG9tZScgfHwgcHQgPT09ICdtYWluJykgewogICAgICAgICAgICAgICAgaWYgKHNlbGVjdExpc3QubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muivt+WFiOWLvumAieimgeS4i+i9veeahOaWh+S7tu+8gScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGZpZExpc3QubGVuZ3RoID09PSAyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muivt+aJk+W8gOaWh+S7tuWkueWQjuWLvumAieaWh+S7tu+8gScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZmlkTGlzdCA9IGVuY29kZVVSSUNvbXBvbmVudChmaWRMaXN0KTsKICAgICAgICAgICAgICAgIHVybCA9IGAke3Bhbi5wY3NbMF19JmZzaWRzPSR7ZmlkTGlzdH1gOwogICAgICAgICAgICAgICAgcmVzID0gYXdhaXQgYmFzZS5nZXQodXJsLCB7IlVzZXItQWdlbnQiOiBwYW4udWF9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocHQgPT09ICdzaGFyZScpIHsKICAgICAgICAgICAgICAgIHRoaXMuZ2V0U2hhcmVEYXRhKCk7CiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0TGlzdC5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6K+35YWI5Yu+6YCJ6KaB5LiL6L2955qE5paH5Lu277yBJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZmlkTGlzdC5sZW5ndGggPT09IDIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6K+35omT5byA5paH5Lu25aS55ZCO5Yu+6YCJ5paH5Lu277yBJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIXBhcmFtcy5zaWduKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGAke3Bhbi5wY3NbMl19JnN1cmw9JHtwYXJhbXMuc3VybH0mbG9naWQ9JHtwYXJhbXMubG9naWR9YDsKICAgICAgICAgICAgICAgICAgICBsZXQgciA9IGF3YWl0IGJhc2UuZ2V0KHVybCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHIuZXJybm8gPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnNpZ24gPSByLmRhdGEuc2lnbjsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnRpbWVzdGFtcCA9IHIuZGF0YS50aW1lc3RhbXA7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRpYWxvZyA9IGF3YWl0IFN3YWwuZmlyZSh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdpbmZvJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBg5o+Q56S677ya6K+35bCG5paH5Lu2PHNwYW4gY2xhc3M9InRhZy1kYW5nZXIiPlvkv53lrZjliLDnvZHnm5hdPC9zcGFuPvCfkYnliY3lvoA8c3BhbiBjbGFzcz0idGFnLWRhbmdlciI+W+aIkeeahOe9keebmF08L3NwYW4+5Lit5LiL6L2977yBYCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICfngrnlh7vkv53lrZgnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246ICd0b3AnLAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRpYWxvZy5pc0NvbmZpcm1lZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgJCgnLnRvb2xzLXNoYXJlLXNhdmUtaGInKVswXS5jbGljaygpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIXBhcmFtcy5iZHN0b2tlbikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7flhYjnmbvlvZXnvZHnm5jvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxldCBmb3JtRGF0YSA9IG5ldyBGb3JtRGF0YSgpOwogICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCdlbmNyeXB0JywgcGFyYW1zLmVuY3J5cHQpOwogICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCdwcm9kdWN0JywgcGFyYW1zLnByb2R1Y3QpOwogICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCd1aycsIHBhcmFtcy51ayk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ3ByaW1hcnlpZCcsIHBhcmFtcy5wcmltYXJ5aWQpOwogICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCdmaWRfbGlzdCcsIGZpZExpc3QpOwogICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCdsb2dpZCcsIHBhcmFtcy5sb2dpZCk7CiAgICAgICAgICAgICAgICBwYXJhbXMuc2hhcmVUeXBlID09PSAnc2VjcmV0JyA/IGZvcm1EYXRhLmFwcGVuZCgnZXh0cmEnLCBwYXJhbXMuZXh0cmEpIDogJyc7CiAgICAgICAgICAgICAgICB1cmwgPSBgJHtwYW4ucGNzWzFdfSZzaWduPSR7cGFyYW1zLnNpZ259JnRpbWVzdGFtcD0ke3BhcmFtcy50aW1lc3RhbXB9YDsKICAgICAgICAgICAgICAgIHJlcyA9IGF3YWl0IGJhc2UucG9zdCh1cmwsIGZvcm1EYXRhLCB7IlVzZXItQWdlbnQiOiBwYW4udWF9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocmVzLmVycm5vID09PSAwKSB7CiAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHRoaXMuZ2VuZXJhdGVEb20ocmVzLmxpc3QpOwogICAgICAgICAgICAgICAgdGhpcy5zaG93TWFpbkRpYWxvZyhwYW5bbW9kZV1bMF0sIGh0bWwsIHBhblttb2RlXVsxXSk7CiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmVycm5vID09PSAxMTIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJrpobXpnaLov4fmnJ/vvIzor7fliLfmlrDph43or5XvvIEnKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muiOt+WPluS4i+i9vemTvuaOpeWksei0pe+8geivt+WIt+aWsOe9kemhteWQjumHjeivle+8gScpOwogICAgICAgICAgICB9CiAgICAgICAgfSwKIAogICAgICAgIGdlbmVyYXRlRG9tKGxpc3QpIHsKICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSAnPGRpdiBjbGFzcz0icGwtbWFpbiI+JzsKICAgICAgICAgICAgbGV0IGFsaW5rQWxsVGV4dCA9ICcnOwogICAgICAgICAgICBiYXNlLnNvcnRCeU5hbWUobGlzdCk7CiAgICAgICAgICAgIGxpc3QuZm9yRWFjaCgodiwgaSkgPT4gewogICAgICAgICAgICAgICAgaWYgKHYuaXNkaXIgPT09IDEpIHJldHVybjsKICAgICAgICAgICAgICAgIGxldCBmaWxlbmFtZSA9IHYuc2VydmVyX2ZpbGVuYW1lIHx8IHYuZmlsZW5hbWU7CiAgICAgICAgICAgICAgICBsZXQgZXh0ID0gYmFzZS5nZXRFeHRlbnNpb24oZmlsZW5hbWUpOwogICAgICAgICAgICAgICAgbGV0IHNpemUgPSBiYXNlLnNpemVGb3JtYXQodi5zaXplKTsKICAgICAgICAgICAgICAgIGxldCBkbGluayA9IHYuZGxpbms7CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2FwaScpIHsKICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3MtaW5uZXItdGV4dCI+MCU8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InBsLXByb2dyZXNzLXN0b3AgbGlzdGVuZXItc3RvcCI+5Y+W5raI5LiL6L29PC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGwtcHJvZ3Jlc3MtdGlwIj7mnKrlj5HnjrBJRE3vvIzkvb/nlKjoh6rluKbmtY/op4jlmajkuIvovb08L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwbC1wcm9ncmVzcy1ob3cgbGlzdGVuZXItaG93Ij7lpoLkvZXllKTotbdJRE3vvJ88L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+PC9kaXY+YDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChtb2RlID09PSAnYXJpYScpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgYWxpbmsgPSB0aGlzLmNvbnZlcnRMaW5rVG9BcmlhKGRsaW5rLCBmaWxlbmFtZSwgcGFuLnVhKTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChhbGluaykgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgKz0gYDxkaXYgY2xhc3M9InBsLWl0ZW0iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLWl0ZW0tbmFtZSBsaXN0ZW5lci10aXAiIGRhdGEtc2l6ZT0iJHtzaXplfSI+JHtmaWxlbmFtZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBjbGFzcz0icGwtaXRlbS1saW5rIHBsLWEiIHRhcmdldD0iX2JsYW5rIiBocmVmPSIke2FsaW5rLmxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2YXJpYTJj6ZO+5o6lIiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rLmxpbmt9Ij4ke2RlY29kZVVSSUNvbXBvbmVudChhbGluay50ZXh0KX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgYWxpbmtBbGxUZXh0ICs9IGFsaW5rICsgJ1xyXG4nOwogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIGxpc3RlbmVyLWxpbmstYXJpYSIgaHJlZj0iJHthbGlua30iIHRpdGxlPSLngrnlh7vlpI3liLZhcmlhMmPpk77mjqUiIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7YWxpbmt9Ij4ke2RlY29kZVVSSUNvbXBvbmVudChhbGluayl9PC9hPiA8L2Rpdj5gOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChtb2RlID09PSAncnBjJykgewogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgKz0gYDxkaXYgY2xhc3M9InBsLWl0ZW0iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLWl0ZW0tbmFtZSBsaXN0ZW5lci10aXAiIGRhdGEtc2l6ZT0iJHtzaXplfSI+JHtmaWxlbmFtZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPSJwbC1pdGVtLWxpbmsgbGlzdGVuZXItbGluay1ycGMgcGwtYnRuLXByaW1hcnkgcGwtYnRuLWluZm8iIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7ZGxpbmt9Ij48ZW0gY2xhc3M9Imljb24gaWNvbi1kZXZpY2UiPjwvZW0+PHNwYW4gc3R5bGU9Im1hcmdpbi1sZWZ0OiA1cHg7Ij7mjqjpgIHliLAgUlBDIOS4i+i9veWZqDwvc3Bhbj48L2J1dHRvbj48L2Rpdj5gOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdjdXJsJykgewogICAgICAgICAgICAgICAgICAgIGxldCBhbGluayA9IHRoaXMuY29udmVydExpbmtUb0N1cmwoZGxpbmssIGZpbGVuYW1lLCBwYW4udWEpOwogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgKGFsaW5rKSA9PT0gJ29iamVjdCcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSIgdGFyZ2V0PSJfYmxhbmsiIGhyZWY9IiR7YWxpbmsubGlua30iIHRpdGxlPSLngrnlh7vlpI3liLZjdXJs6ZO+5o6lIiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rLmxpbmt9Ij4ke2RlY29kZVVSSUNvbXBvbmVudChhbGluay50ZXh0KX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgYWxpbmtBbGxUZXh0ICs9IGFsaW5rICsgJ1xyXG4nOwogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIGxpc3RlbmVyLWxpbmstYXJpYSIgaHJlZj0iJHthbGlua30iIHRpdGxlPSLngrnlh7vlpI3liLZjdXJs6ZO+5o6lIiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmspfTwvYT4gPC9kaXY+YDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2JjJykgewogICAgICAgICAgICAgICAgICAgIGxldCBhbGluayA9IHRoaXMuY29udmVydExpbmtUb0JDKGRsaW5rLCBmaWxlbmFtZSwgcGFuLnVhKTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChhbGluaykgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgKz0gYDxkaXYgY2xhc3M9InBsLW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ub25lIj7mn6XnnIvkuIvovb3ku7vliqE8L2J1dHRvbj48L2Rpdj5gOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChtb2RlID09PSAnY3VybCcpCiAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1leHRyYSI+PGJ1dHRvbiBjbGFzcz0icGwtYnRuLXByaW1hcnkgbGlzdGVuZXItY29weS1hbGwiIGRhdGEtbGluaz0iJHthbGlua0FsbFRleHR9Ij7lpI3liLblhajpg6jpk77mjqU8L2J1dHRvbj48YnV0dG9uIGNsYXNzPSJwbC1idG4tcHJpbWFyeSBwbC1idG4td2FybmluZyBsaXN0ZW5lci1vcGVuLXNldHRpbmciIHN0eWxlPSJtYXJnaW4tbGVmdDogMTBweDsiPuiuvue9rue7iOerr+exu+Wei++8iOW9k+WJjeS4uu+8miR7dGVybWluYWxUeXBlW2Jhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfdGVybWluYWxfdHlwZScpXX3vvIk8L2J1dHRvbj48L2Rpdj5gOwogICAgICAgICAgICByZXR1cm4gY29udGVudDsKICAgICAgICB9LAogCiAgICAgICAgYXN5bmMgc2VuZExpbmtUb1JQQyhmaWxlbmFtZSwgbGluaykgewogICAgICAgICAgICBsZXQgcnBjID0gewogICAgICAgICAgICAgICAgZG9tYWluOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nKSwKICAgICAgICAgICAgICAgIHBvcnQ6IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BvcnQnKSwKICAgICAgICAgICAgICAgIHBhdGg6IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BhdGgnKSwKICAgICAgICAgICAgICAgIHRva2VuOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicpLAogICAgICAgICAgICAgICAgZGlyOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19kaXInKSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgbGV0IEJEVVNTID0gdGhpcy5nZXRCRFVTUygpOwogICAgICAgICAgICBpZiAoIUJEVVNTKSByZXR1cm4gJ2Fzc2lzdGFudCc7CiAKICAgICAgICAgICAgbGV0IHVybCA9IGAke3JwYy5kb21haW59OiR7cnBjLnBvcnR9JHtycGMucGF0aH1gOwogICAgICAgICAgICBsZXQgcnBjRGF0YSA9IHsKICAgICAgICAgICAgICAgIGlkOiBuZXcgRGF0ZSgpLmdldFRpbWUoKSwKICAgICAgICAgICAgICAgIGpzb25ycGM6ICcyLjAnLAogICAgICAgICAgICAgICAgbWV0aG9kOiAnYXJpYTIuYWRkVXJpJywKICAgICAgICAgICAgICAgIHBhcmFtczogW2B0b2tlbjoke3JwYy50b2tlbn1gLCBbbGlua10sIHsKICAgICAgICAgICAgICAgICAgICBkaXI6IHJwYy5kaXIsCiAgICAgICAgICAgICAgICAgICAgb3V0OiBmaWxlbmFtZSwKICAgICAgICAgICAgICAgICAgICBoZWFkZXI6IFtgVXNlci1BZ2VudDogJHtwYW4udWF9YCwgYENvb2tpZTogQkRVU1M9JHtCRFVTU31gXQogICAgICAgICAgICAgICAgfV0KICAgICAgICAgICAgfTsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIGxldCByZXMgPSBhd2FpdCBiYXNlLnBvc3QodXJsLCBycGNEYXRhLCB7IlVzZXItQWdlbnQiOiBwYW4udWF9LCAnJyk7CiAgICAgICAgICAgICAgICBpZiAocmVzLnJlc3VsdCkgcmV0dXJuICdzdWNjZXNzJzsKICAgICAgICAgICAgICAgIHJldHVybiAnZmFpbCc7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiAnZmFpbCc7CiAgICAgICAgICAgIH0KICAgICAgICB9LAogCiAgICAgICAgZ2V0U2VsZWN0ZWRMaXN0KCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuIHJlcXVpcmUoJ3N5c3RlbS1jb3JlOmNvbnRleHQvY29udGV4dC5qcycpLmluc3RhbmNlRm9yU3lzdGVtLmxpc3QuZ2V0U2VsZWN0ZWQoKTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy53cC1zLWNvcmUtcGFuJykuX192dWVfXy5zZWxlY3RlZExpc3Q7CiAgICAgICAgICAgIH0KICAgICAgICB9LAogCiAgICAgICAgZ2V0TG9naWQoKSB7CiAgICAgICAgICAgIGxldCB1dCA9IHJlcXVpcmUoInN5c3RlbS1jb3JlOmNvbnRleHQvY29udGV4dC5qcyIpLmluc3RhbmNlRm9yU3lzdGVtLnRvb2xzLmJhc2VTZXJ2aWNlOwogICAgICAgICAgICByZXR1cm4gdXQuYmFzZTY0RW5jb2RlKGJhc2UuZ2V0Q29va2llKCJCQUlEVUlEIikpOwogICAgICAgIH0sCiAKICAgICAgICBnZXRTaGFyZURhdGEoKSB7CiAgICAgICAgICAgIGxldCByZXMgPSBsb2NhbHMuZHVtcCgpOwogICAgICAgICAgICBwYXJhbXMuc2hhcmVUeXBlID0gJ3NlY3JldCc7CiAgICAgICAgICAgIHBhcmFtcy5zaWduID0gJyc7CiAgICAgICAgICAgIHBhcmFtcy50aW1lc3RhbXAgPSAnJzsKICAgICAgICAgICAgcGFyYW1zLmJkc3Rva2VuID0gcmVzLmJkc3Rva2VuLnZhbHVlOwogICAgICAgICAgICBwYXJhbXMuY2hhbm5lbCA9ICdjaHVubGVpJzsKICAgICAgICAgICAgcGFyYW1zLmNsaWVudHR5cGUgPSAwOwogICAgICAgICAgICBwYXJhbXMud2ViID0gMTsKICAgICAgICAgICAgcGFyYW1zLmFwcF9pZCA9IDI1MDUyODsKICAgICAgICAgICAgcGFyYW1zLmVuY3J5cHQgPSAwOwogICAgICAgICAgICBwYXJhbXMucHJvZHVjdCA9ICdzaGFyZSc7CiAgICAgICAgICAgIHBhcmFtcy5sb2dpZCA9IHRoaXMuZ2V0TG9naWQoKTsKICAgICAgICAgICAgcGFyYW1zLnByaW1hcnlpZCA9IHJlcy5zaGFyZWlkLnZhbHVlOwogICAgICAgICAgICBwYXJhbXMudWsgPSByZXMuc2hhcmVfdWsudmFsdWU7CiAgICAgICAgICAgIHBhcmFtcy5zaGFyZVR5cGUgPT09ICdzZWNyZXQnICYmIChwYXJhbXMuZXh0cmEgPSB0aGlzLl9nZXRFeHRyYSgpKTsKICAgICAgICAgICAgcGFyYW1zLnN1cmwgPSB0aGlzLl9nZXRTdXJsKCk7CiAgICAgICAgfSwKIAogICAgICAgIGRldGVjdFBhZ2UoKSB7CiAgICAgICAgICAgIGxldCBwYXRoID0gbG9jYXRpb24ucGF0aG5hbWU7CiAgICAgICAgICAgIGlmICgvXlwvZGlza1wvaG9tZS8udGVzdChwYXRoKSkgcmV0dXJuICdob21lJzsKICAgICAgICAgICAgaWYgKC9eXC9kaXNrXC9tYWluLy50ZXN0KHBhdGgpKSByZXR1cm4gJ21haW4nOwogICAgICAgICAgICBpZiAoL15cLyhzfHNoYXJlKVwvLy50ZXN0KHBhdGgpKSByZXR1cm4gJ3NoYXJlJzsKICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKIAogICAgICAgIHNob3dNYWluRGlhbG9nKHRpdGxlLCBodG1sLCBmb290ZXIpIHsKICAgICAgICAgICAgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgIHRpdGxlLAogICAgICAgICAgICAgICAgaHRtbCwKICAgICAgICAgICAgICAgIGZvb3RlciwKICAgICAgICAgICAgICAgIGFsbG93T3V0c2lkZUNsaWNrOiBmYWxzZSwKICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiBmYWxzZSwKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAndG9wJywKICAgICAgICAgICAgICAgIHdpZHRoLAogICAgICAgICAgICAgICAgcGFkZGluZzogJzE1cHggMjBweCA1cHgnLAogICAgICAgICAgICAgICAgY3VzdG9tQ2xhc3MsCiAgICAgICAgICAgIH0pLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcmVzZXREYXRhKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCiAKICAgICAgICBhc3luYyBpbml0UGFuTGlua2VyKCkgewogICAgICAgICAgICBiYXNlLmluaXREZWZhdWx0Q29uZmlnKCk7CiAgICAgICAgICAgIGJhc2UuYWRkUGFuTGlua2VyU3R5bGUoKTsKICAgICAgICAgICAgcHQgPSB0aGlzLmRldGVjdFBhZ2UoKTsKICAgICAgICAgICAgbGV0IHJlcyA9IGF3YWl0IGJhc2UucG9zdAogICAgICAgICAgICAoYGh0dHBzOi8vYXBpLnlvdXhpYW9ob3UuY29tL2NvbmZpZz92ZXI9JHt2ZXJzaW9ufSZhPSR7YXV0aG9yfWAsIHt9LCB7fSwgJ3RleHQnKTsKICAgICAgICAgICAgcGFuID0gSlNPTi5wYXJzZShiYXNlLmQocmVzKSk7CiAgICAgICAgICAgIE9iamVjdC5mcmVlemUgJiYgT2JqZWN0LmZyZWV6ZShwYW4pOwogICAgICAgICAgICBjb25zb2xlLmxvZyhwYW4pOwogICAgICAgICAgICBwYW4ubnVtID09PSBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX2luaXRfY29kZScpID8gdGhpcy5hZGRCdXR0b24oKSA6IHRoaXMuYWRkSW5pdEJ1dHRvbigpOwogICAgICAgICAgICBiYXNlLmNyZWF0ZVRpcCgpOwogICAgICAgICAgICBiYXNlLnJlZ2lzdGVyTWVudUNvbW1hbmQoKTsKICAgICAgICB9CiAgICB9OwogCiAgICBsZXQgbWFpbiA9IHsKICAgICAgICBpbml0KCkgewogICAgICAgICAgICBpZiAoLyhwYW58eXVuKS5iYWlkdS5jb20vLnRlc3QobG9jYXRpb24uaG9zdCkpIHsKICAgICAgICAgICAgICAgIGJhaWR1LmluaXRQYW5MaW5rZXIoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH07CiAKICAgIG1haW4uaW5pdCgpOwogICAgfQogICAgfQp9KSgpOw==
Add Comment
Please, Sign In to add comment