xiaomianao666

插件名:global_懒人专用,全网VIP视频免费破解去广告、全网音乐直接下载、知乎增

Apr 20th, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_懒人专用,全网VIP视频免费破解去广告、全网音乐直接下载、知乎增@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDmh5LkurrkuJPnlKjvvIzlhajnvZFWSVDop4bpopHlhY3otLnnoLTop6Pljrvlub/lkYrjgIHlhajnvZHpn7PkuZDnm7TmjqXkuIvovb3jgIHnn6XkuY7lop7lvLrjgIHnn63op4bpopHml6DmsLTljbDkuIvovb3jgIHnmb7luqbnvZHnm5jnm7TmjqXkuIvovb3nrYnlpJrlip/og73lt6XlhbfnrrHvvIzlip/og73lj6/ni6znq4vlvIDlhbPjgILplb/mnJ/mm7TmlrDvvIzmlL7lv4Pkvb/nlKjjgIJ2NgovLyBAbmFtZXNwYWNlIAkgbGFuaGFoYQovLyBAdmVyc2lvbiAgICAgIDYuNy40Ci8vIEBkZXNjcmlwdGlvbiAg6Ieq55So5aSa5Yqf6IO96ISa5pys5bel5YW3566x77yM5a6M5YWo5YWN6LS544CB5peg5bm/5ZGK44CB5peg6ZyA5YWz5rOo5YWs5LyX5Y+377yM6ZuG5ZCI5LqG5LyY6YW344CB54ix5aWH6Im644CB6IW+6K6v44CBQuermShiaWxpYmlsaSnjgIHoipLmnpznrYnlhajnvZFWSVDop4bpopEoUEMr56e75Yqo56uvKeWFjei0ueegtOino+WOu+W5v+WRiu+8jOe9keaYk+S6kemfs+S5kOOAgVFR6Z+z5LmQ44CB6YW354uX44CB6YW35oiR44CB6Jm+57Gz44CB6Jy76JyTRk3jgIHojZTmnp1GTeOAgeWWnOmprOaLiembheetiee9keermemfs+S5kOWSjOacieWjsOS5pumfs+mikeWFjeWuouaIt+err+S4i+i9ve+8jOefpeS5juWinuW8uijnn6XkuY7op4bpopHkuIvovb3j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nBsYXllci5jb20vcGxheWVyLz91cmw9In0sCiAgICAgICAgICAgIHsibmFtZSI6IueIseixhiIsInVybCI6Imh0dHBzOi8vanguYWlkb3Vlci5uZXQvP3VybD0ifSwKICAgICAgICAgICAgeyJuYW1lIjoiQ0hvayIsInVybCI6Imh0dHBzOi8vd3d3LmdhaTQuY29tLz91cmw9In0sCiAgICAgICAgICAgIHsibmFtZSI6Ik9LIiwidXJsIjoiaHR0cHM6Ly9va2p4LmNjLz91cmw9In0sCiAgICAgICAgICAgIHsibmFtZSI6IlJESEsiLCJ1cmwiOiJodHRwczovL2p4LnJkaGsubmV0Lz92PSJ9LAogICAgICAgICAgICB7Im5hbWUiOiLkurrkurrov7ciLCJ1cmwiOiJodHRwczovL2p4LmJsYm8uY2M6NDQzMy8/dXJsPSJ9LAogICAgICAgICAgICB7Im5hbWUiOiLmgJ3lj6QzIiwidXJsIjoiaHR0cHM6Ly9qc2FwLmF0dGFraWRzLmNvbS8/dXJsPSJ9LAogICAgICAgICAgICB7Im5hbWUiOiLlkKzkuZAiLCJ1cmwiOiJodHRwczovL2p4LmRqNnUuY29tLz91cmw9In0sCiAgICAgICAgXTsKCiAgICAgICAgbGV0IHVzZVdlYiA9IFsnbS5iaWxpYmlsaS5jb20nLCd5b3VrdS5jb20nLCd3d3cueW91a3UuY29tJywnbS55b3VrdS5jb20nLCdtLnYucXEuY29tJywnbS5pcWl5aS5jb20nLCdtLm1ndHYuY29tJywnbS50di5zb2h1LmNvbScsJ20uMTkwNS5jb20nLCdtLnBwdHYuY29tJywnbS5sZS5jb20nXTsKCiAgICAgICAgaWYodXNlV2ViLmluZGV4T2YobG9jYXRpb24uaG9zdCkgPT0gLTEpewogICAgICAgICAgICBjb25zb2xlLmxvZygn5LiN5piv5bqU55So572R56uZJyk7cmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gc2V0Q29va2llKGNuYW1lLGN2YWx1ZSxleGRheXMpewoKICAgICAgICAgICAgdmFyIGQgPSBuZXcgRGF0ZSgpOwoKICAgICAgICAgICAgZC5zZXRUaW1lKGQuZ2V0VGltZSgpKyhleGRheXMqMjQqNjAqNjAqMTAwMCkpOwoKICAgICAgICAgICAgdmFyIGV4cGlyZXMgPSAiZXhwaXJlcz0iK2QudG9HTVRTdHJpbmcoKTsKCiAgICAgICAgICAgIGRvY3VtZW50LmNvb2tpZSA9IGNuYW1lKyI9IitjdmFsdWUrIjsgIitleHBpcmVzOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gZ2V0Q29va2llKGNuYW1lKXsKICAgICAgICAgICAgdmFyIG5hbWUgPSBjbmFtZSArICI9IjsKICAgICAgICAgICAgdmFyIGNhID0gZG9jdW1lbnQuY29va2llLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgIGZvcih2YXIgaT0wOyBpPGNhLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIgYyA9IGNhW2ldLnRyaW0oKTsKICAgICAgICAgICAgICAgIGlmIChjLmluZGV4T2YobmFtZSk9PTApIHsgcmV0dXJuIGMuc3Vic3RyaW5nKG5hbWUubGVuZ3RoLGMubGVuZ3RoKTsgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAiIjsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnQoZG9tLGRvbUlkKXsKCiAgICAgICAgICAgIHZhciByb290RWxlbWVudCA9IGRvY3VtZW50LmJvZHk7CgogICAgICAgICAgICB2YXIgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoZG9tKTsKCiAgICAgICAgICAgIG5ld0VsZW1lbnQuaWQgPSBkb21JZDsKCiAgICAgICAgICAgIHZhciBuZXdFbGVtZW50SHRtbENvbnRlbnQgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnJyk7CgogICAgICAgICAgICByb290RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50KTsKCiAgICA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Z1bmN0aW9uKCkgeyBkb2N1bWVudC5ib2R5LnJlbW92ZUNoaWxkKHRvYXN0RG9tKSB9LCBkICogMTAwMCk7CgogICAgICAgICAgICB9LCBkdXJhdGlvbik7CgogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewogICAgICAgICAgICAvL2NzcwogICAgICAgICAgICBsZXQgcGxheVZpZGVvU3R5bGUgPSBgCiAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4O2N1cnNvcjpwb2ludGVyOwogICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgZGlzcGxheTpibG9jazsKICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkO2xldDowcHg7dG9wOjM2MHB4O3RleHQtYWxpZ246Y2VudGVyO292ZXJmbG93OnZpc2libGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX3dyYXB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjpmaXhlZDtsZWZ0OjQwcHg7dG9wOjM2MHB4OwogICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lewogICAgICAgICAgICAgICAgd2lkdGg6MzIwcHg7CiAgICAgICAgICAgICAgICBoZWlnaHQ6MzE2cHg7CiAgICAgICAgICAgICAgICBvdmVyZmxvdy15OnNjcm9sbDsKICAgICAgICAgICAgICAgIG92ZXJmbG93LXg6aGlkZGVuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICBmbGV4LWZsb3c6IHJvdyB3cmFwOwogICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgbWFyZ2luOjBweDsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGl7CiAgICAgICAgICAgICAgICBwYWRkaW5nOjRweCAwcHg7CiAgICAgICAgICAgICAgICBtYXJnaW46MnB4OwogICAgICAgICAgICAgICAgd2lkdGg6MzAlOwogICAgICAgICAgICAgICAgY29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZjI0NDQzOwogICAgICAgICAgICAgICAgYm94LXNoYWRvdzowcHggMHB4IDEwcHggI2ZmZjsKICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpOmhvdmVyewogICAgICAgICAgICAgICAgY29sb3I6IzI2MDAzMzsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZjYzBjMAogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fbGluZV9zZWxlY3RlZHsKICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwMzM7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2p4ewogICAgICAgICAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgei1pbmRle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kKCiAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgbGV0IGp4VmlkZW9XZWIgPSBqeFZpZGVvRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGggPT0gMCl7CgogICAgICAgICAgICAgICAgICAgIHRvYXN0KCfor7flnKjop4bpopHmkq3mlL7pobXngrnlh7vlm77moIcnKTsKCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgdmFyIHtmdW5jTmFtZSxtYXRjaDpub3dNYXRjaCxub2RlOm5vd05vZGUsbmFtZTpub3dOYW1lfSA9IGp4VmlkZW9XZWJbMF07CgogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZURpdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56aG1fcGxheV92aWRlb193cmFwJyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5U2hvdyA9IHBsYXlMaW5lRGl2LnN0eWxlLmRpc3BsYXk7CgogICAgICAgICAgICAgICAgICAgIHBsYXlTaG93ID09ICdub25lJz8gcGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheSA9ICdibG9jayc6cGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheSA9ICdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwoKICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lVGQuZm9yRWFjaChmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSB6aG1fbGluZV9zZWxlY3RlZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldENvb2tpZSgncGxheUxpbmVBY3Rpb24nLHRoaXMuZ2V0QXR0cmlidXRlKCd1cmwnKSwzMCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1dlYk5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd1dlYk5vZGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5SWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlJZnJhbWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheUlmcmFtZS5zcmM9IGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR572R56uZ57uT54K55LiN5a2Y5ZyoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9TZWxlY3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuJytqeFZpZGVvV2ViWzBdLmFyZWFDbGFzc05hbWUpOwoKICAgICAgICAgICAgICAgICAgICB2aWRlb1NlbGVjdC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CgogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1sb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQoKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgbGV0IGp4VmlkZW9XZWIgPSBqeFZpZGVvRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGg+MCl7CgogICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1NlbGVjdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy4nK2p4VmlkZW9XZWJbMF0uYXJlYUNsYXNzTmFtZSk7CgogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvU2VsZWN0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvU2VsZWN0LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGUudGFyZ2V0LnBhcmVudE5vZGUuaHJlZik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmPWxvY2F0aW9uLmhyZWY7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQoKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICB9LDEwMDApCgogICAgICAgIH0KCiAgICAgICAgcGxheVZpZGVvRnVuYygpOwoKICAgIH1lbHNlewogICAgICAgIC8qLS1jb25maWctLSovCiAgICAgICAgdmFyIENvbmZpZyA9ewoKICAgICAgICBjb3Vwb25Vcmw6d2luZG93LmxvY2F0aW9uLmhyZWYsCgogICAgICAgIGNvdXBvbkhvc3Q6d2luZG93LmxvY2F0aW9uLmhvc3QsCgogICAgICAgIHdlYlVybDonaHR0cDovL211c2ljLmxpdXpoaWppbi5jbi8nLAoKICAgICAgICBpY29uVmlwVG9wOjM2MCwKCiAgICAgICAgaWNvblZpcFBvc2l0aW9uIDogJ2xlZnQnLAoKICAgICAgICBpY29uVmlwV2lkdGggOiA0MCwKCiAgICAgICAgY291cG9uVGltZXJOdW0gOiAxMDAsLy8xMDDmrKHnrYnkuo4xMOenkgoKICAgICAgICBjb3Vwb25XYWl0VGltZSA6IDEwMCwKCiAgICAgICAgaWNvbldhaXRUaW1lIDogMTAwLAoKICAgICAgICBpY29uVmlwT3BhY2l0eToxMDAsCgogICAgIC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wKICAgICAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkLAogICAgICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZCwKICAgICAgICAgICAgeW91dHViZVZpZGVvRG93bmxvYWQKICAgICAgICB9ID0gQ29uZmlnOwogICAgICAgIC8qLS1sYW5nLS0qLwogICAgICAgIHZhciBsYW5nID0gewogICAgICAgICAgICBzZXQ6J+iuvue9ricsCiAgICAgICAgICAgIGljb25Qb3NpdGlvbjon5Zu+5qCH5L2N572uJywKICAgICAgICAgICAgcGxheVZpZGVvOifop4bpopHop6PmnpAnLAogICAgICAgICAgICBwbGF5TXVzaWM6J+mfs+S5kOS4i+i9vScsCiAgICAgICAgICAgIHpoTmljZTon55+l5LmO5aKe5by6JywKICAgICAgICAgICAgdmlkZW9Eb3dubG9hZDon6KeG6aKR5LiL6L29JywKICAgICAgICAgICAgYmFpZHVEb3dubG9hZDon55m+5bqm5LiL6L29JywKICAgICAgICAgICAgaWNvbkhlaWdodDon5Zu+5qCH6auY5bqmJywKICAgICAgICAgICAgaWNvbldpZHRoOiflm77moIflpKflsI8nLAogICAgICAgICAgICBpY29uTGluZTon5rC05bmz5L2N572uJywKICAgICAgICAgICAgaWNvbldhaXRUaW1lOifnrYnlvoXml7bpl7QnLAogICAgICAgICAgICBpY29uTGVmdDon6Z2g5bemJywKICAgICAgICAgICAgaWNvblJpZ2h0OifpnaDlj7MnLAogICAgICAgICAgICB0aXBJY29uSGVpZ2h0Oifpu5jorqQzNjAs5bu66K6uMX41MDAnLAogICAgICAgICAgICB0aXBJY29uV2lkdGg6J+m7mOiupDQwLOW7uuiurjIwfjUwJywKICAgICAgICAgICAgdGlwSWNvbk9wYWNpdHk6J+ivt+Whq+WGmTAtMTAw55qE5pW05pWwJywKICAgICAgICAgICAgdGlwRXJyb3JJY29uSGVpZ2h0Oic85Zu+5qCH5L2N572uPuS4reeahDzlm77moIfpq5jluqY+5bqU5Li6MTAwMOS7peWGheato+aVtOaVsO+8jOW7uuiurjF+NTAwJywKICAgICAgICAgICAgdGlwRXJyb3JJY29uV2lkdGg6Jzzlm77moIfkvY3nva4+5Lit55qEPOWbvuagh+Wkp+Wwjz7lupTkuLoxMDDku6XlhoXmraPmlbTmlbDvvIzlu7rorq4yMH41MCcsCiAgICAgICAgICAgIHRpcEVycm9ySWNvbk9wYWNpdHk6J+Whq+WGmeaVsOWtl+S4jeato+ehricsCiAgICAgICAgICAgIHNldFBsYXlWaWRlbzon6Kej5p6Q6K6+572uJywKICAgICAgICAgICAgcGxheVZpZGVvTGluZUFkZDon56uZ5aSW6Kej5p6QJywKICAgICAgICAgICAgdGlwUGxheVZpZGVvTGluZUFkZDon6K+35aGr5YWl57q/6Lev5ZCN56ew5ZKM5Zyw5Z2A77yM5Lit6Ze055So5Y2K6KeS6YCX5Y+36ZqU5byA77yM5q+P57q/6Lev5LiA6KGM44CCJywKICAgICAgICAgICAgemhTZXQ6J+efpeS5juiuvue9ricsCiAgICAgICAgICAgIHpoVmlkZW9DbG9zZTon5bGP6JS96KeG6aKRJywKICAgICAgICAgICAgemhWaWRlb0Rvd25sb2FkOifop4bpopHkuIvovb0nLAogICAgICAgICAgICB6aEFEQ2xvc2U6J+Wxj+iUveW5v+WRiicsCiAgICAgICAgICAgIHpoQ2xvc2VMZWZ0OiflhbPpl63kvqfovrnmoI8nLAogICAgICAgICAgICB6aENoYW5nZUxpbms6J+mTvuaOpeebtOaOpei3s+i9rCcsCiAgICAgICAgICAgIHNwZWNpYWxDb2x1bW46J+agh+iusOaWh+eroCcsCiAgICAgICAgICAgIHZpZGVvVGl0bGU6J+agh+iusOinhumikScsCiAgICAgICAgICAgIHpoS2V5d29yZENsb3NlOiflsY/olL3lhbPplK7or40nLAogICAgICAgICAgICB0aXBLZXl3b3JkOifor7fovpPlhaXlhbPplK7or40s55SoIiwi5Y+36ZqU5byAJywKICAgICAgICAgICAgYXV0aG9yTmFtZUNsb3NlOiflsY/olL3nlKjmiLcnLAogICAgICAgICAgICB0aXBBdXRob3JOYW1lOifor7fovpPlhaXnlKjmiLflkI0s55SoIiwi5Y+36ZqU5byAJywKICAgICAgICAgICAgeWFueHVhbkNsb3NlOiflsY/olL3nm5DpgIknLAogICAgICAgICAgICBkeVZpZGVvRG93bmxvYWQ6J+aKlumfs+S4i+i9vScsCiAgICAgICAgICAgIGtzVmlkZW9Eb3dubG9hZDon5b+r5omL5LiL6L29JywKICAgICAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkOifopb/nk5zkuIvovb0nLAogICAgICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZDonQuermSAoYmlsaWJpbGkpIOS4i+i9vScsCiAgICAgICAgICAgIHlvdXR1YmVWaWRlb0Rvd25sb2FkOid5b3V0dWJl5LiL6L29JywKICAgICAgICB9OwoKICAgICAgICAvKi0tZGF0YXMtLSovCiAgICAgICAgdmFyIGRhdGFzID0gewoKICAgICAgICAgICAgZ2V0Q291cG9uOlt7aXNPcGVuOjIyLHdlYjpbCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidGFvYmFvIixub2RlOiIuSl9MaW5rQWRkIixtYXRjaDovaXRlbVwudGFvYmFvXC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToiY291cG9uIixuYW1lOiJ0bWFsbENhb3NoaSIsbm9kZToiI0pfTGlua0J1eSIsbWF0Y2g6L15odHRwcz86XC9cL2NoYW9zaGkuZGV0YWlsLnRtYWxsLmNvbVwvL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidG1hbGxDYW9zaGkiLG5vZGU6Ii5BY3Rpb25zLS1sZWZ0QnV0dG9ucy0tMU0zS2tGNyIsbWF0Y2g6L15odHRwcz86XC9cL2NoYW9zaGkuZGV0YWlsLnRtYWxsLmNvbVwvL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidG1hbGwiLG5vZGU6Ii5CYXNpY0NvbnRlbnQtLWF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BsYXlWaWRlbyIsIG5vZGU6Ii52aWRlby1hcmVhIixub2RlVHlwZTonY2xhc3MnLG1hdGNoOi9tXC5tZ3R2XC5jb21cL2IvfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbWF0Y2g6L21ndHZcLmNvbS8sYXJlYUNsYXNzTmFtZTonZXBpc29kZS1pdGVtcyBjbGVhcmZpeCd9LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIueC1jb3Zlci1wbGF5YnRuLXdyYXAiLG5vZGVUeXBlOidjbGFzcycsbWF0Y2g6Ly50dlwuc29odVwuY29tL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG5vZGU6Ii54LWNvdmVyLXBsYXlidG4td3JhcCIsbm9kZVR5cGU6J2NsYXNzJyxtYXRjaDovbVwudHZcLnNvaHVcLmNvbS99LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjcGxheWVyV3JhcCIsbm9kZVR5cGU6J2lkJyxtYXRjaDovZmlsbVwuc29odVwuY29tL30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBtYXRjaDovdHVkb3VcLmNvbS99LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovbGVcLmNvbS99LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovcHB0dlwuY29tL30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLG1hdGNoOi8xOTA1XC5jb20vfSwKCiAgICAgICAgICAgIF19XSwKCiAgICAgICAgICAgIGp4TXVzaWM6W3tpc09wZW46R01fZ2V0VmFsdWUoJ211c2ljTGlzdCcsJzIyJyksd2ViOlsKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOiduZXRlYXNlJyxtYXRjaDovXmh0dHBzPzpcL1wvbXVzaWNcLjE2M1wuY29tLyx0aXA6J+ivt+WcqOmfs+S5kOWNleabsumhteeCueWHu+Wbvuagh+S4i+i9vSd9LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOidxcScsbWF0Y2g6L15odHRwcz86XC9cL3lcLnFxXC5jb20vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM5Zyo5pKt5pS+6aG154K55Ye75Zu+5qCH5LiL6L29J30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5TXVzaWMiLG5hbWU6J2t1Z291JyxtYXRjaDova3Vnb3VcLmNvbS8sdGlwOifor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29Iid9LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOidrdXdvJyxtYXRjaDova3V3b1wuY24vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInfSwKCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlNdXNpYyIsbmFtZToneGltYWxheWEnLG1hdGNoOi9eaHR0cHM/OlwvXC93d3dcLnhpbWFsYXlhXC5jb20vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInfQogICAgICAgICAgICBdfV0sCgogICAgICAgICAgICBwbGF5TGluZTpbCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnuq/lh4AxIiwidXJsIjoiaHR0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p4LnBsYXllcmp5LmNvbS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLop6PmnpAiLCJ1cmwiOiJodHRwczovL2NrbW92LmNjeWpqZC5jb20vY2ttb3YvP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6Kej5p6QbGEiLCJ1cmwiOiJodHRwczovL2FwaS5qaWV4aS5sYS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLogIHmnb8iLCJ1cmwiOiJodHRwczovL3ZpcC5sYW9iYW5kcS5jb20vamlleGkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiTUFPIiwidXJsIjoiaHR0cHM6Ly93d3cubXRvc3ouY29tL20zdTgucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiTTNVOCIsInVybCI6Imh0dHBzOi8vangubTN1OC50di9qaWV4aS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLor7rorq8iLCJ1cmwiOiJodHRwczovL3d3dy5ueGZsdi5jb20vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiT0siLCJ1cmwiOiJodHRwczovL29ranguY2MvP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiUE0iLCJ1cmwiOiJodHRwczovL3d3dy5wbGF5bTN1OC5jbi9qaWV4aS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnm5jlj6QiLCJ1cmwiOiJodHRwczovL3d3dy5wYW5ndWppZXhpLmNjL2ppZXhpLnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuS4g+WTpSIsInVybCI6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NX2dldFZhbHVlKCdpY29uV2FpdFRpbWUnKSoxMDAwOmljb25XYWl0VGltZTsKCiAgICAgICAgICAgICAgICAgICAgaWNvblZpcE9wYWNpdHkgPSBHTV9nZXRWYWx1ZSgnaWNvbk9wYWNpdHknKSB8fCBHTV9nZXRWYWx1ZSgnaWNvbk9wYWNpdHknKSA9PSAwP0dNX2dldFZhbHVlKCdpY29uT3BhY2l0eScpOmljb25WaXBPcGFjaXR5OwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBHTV9yZWdpc3Rlck1lbnVDb21tYW5kKCLorr7nva4iLCAoKSA9PiB0aGlzLm1lbnVTZXQoKSk7CgogICAgICAgICAgICB9CgogICAgICAgICAgICBtZW51U2V0KCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICBsZXQgbWVudVNldFN0eWxlID0gYAogICAgICAgICAgICAgICAgICAgICAgICAuemhtTWFza3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojMDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO3RvcDogMDtyaWdodDogMDtib3R0b206IDA7bGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6MC44OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC53cmFwLWJveHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOzt0b3A6IDUwJTtsZWZ0OiA1MCU7dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgLTIwMHB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAzMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiAjNTU1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OmhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6MTZweCBudW1Gb250LFBpbmdGYW5nU0MtUmVndWxhcixUYWhvbWEsTWljcm9zb2Z0IFlhaGVpLHNhbnMtc2VyaWYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OjQwMCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MztoZWlnaHQ6NDBweDtjb2xvcjojZmZmO3RleHQtYWxpZ246Y2VudGVyO2xpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuc2V0V3JhcExpQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBTYXZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOi0ycHg7cmlnaHQ6MTBweDtmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO2JvdHRvbTowcHg7cGFkZGluZzoxMHB4IDIwcHg7d2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDA5O2JhY2tncm91bmQ6I2ZlZjllZjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweCAycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTJweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBsaSBhewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IzU1NTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBhOmhvdmVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOjBweDtsZWZ0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFVsSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE1cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlTGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUxpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6OHB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OjEwMDAwMDAwMDI7cG9zaXRpb246YWJzb2x1dGU7dG9wOjBweDtsZWZ0OjMwMHB4O2JhY2tncm91bmQ6I2ZmZjt3aWR0aDozMDBweDtoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VJbnB1dHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXggIWltcG9ydGFudDtqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlTGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTogc2Nyb2xsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXggIWltcG9ydGFudDtqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLmNpcmN1bGFyewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDQwcHg7aGVpZ2h0OiAyMHB4O2JvcmRlci1yYWRpdXM6IDE2cHg7dHJhbnNpdGlvbjogLjNzO2N1cnNvcjogcG9pbnRlcjtib3gtc2hhZG93OiAwIDAgM3B4ICM5OTkgaW5zZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnJvdW5kLWJ1dHRvbnsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAyMHB4O2hlaWdodDogMjBweDs7Ym9yZGVyLXJhZGl1czogNTAlO2JveC1zaGFkb3c6IDAgMXB4IDVweCByZ2JhKDAsMCwwLC41KTt0cmFuc2l0aW9uOiAuM3M7cG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5iYWNrewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiBzb2xpZCAjRkZGOyBib3JkZXItd2lkdGg6IDAgM3B4IDNweCAwOyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHBhZGRpbmc6IDNweDt0cmFuc2Zvcm06IHJvdGF0ZSgxMzVkZWcpOyAgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgxMzVkZWcpO21hcmdpbi1sZWZ0OjEwcHg7Y3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRvLXJpZ2h0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6MjBweDsgZGlzcGxheTogaW5saW5lLWJsb2NrOyBwYWRkaW5nOiAzcHg7dHJhbnNmb3JtOiByb3RhdGUoLTQ1ZGVnKTsgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpO2N1cnNvcjpwb2ludGVyOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFNhdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcjttYXJnaW4tcmlnaHQ6NXB4O21hcmdpbi1ib3R0b206NHB4O2NvbG9yOiNGRkY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOjBweDtsZWZ0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2hlYWRlcnsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE1cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9jb250ZW50ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDI4MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTogc2Nyb2xsOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3Q6Oi13ZWJraXQtc2Nyb2xsYmFyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q5rua5Yqo5p2h5pW05L2T5qC35byPKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoIDogMHB4OyAgLyrpq5jlrr3liIbliKvlr7nlupTmqKrnq5bmu5rliqjmnaHnmoTlsLrlr7gqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoemHjOmdouWwj+aWueWdlyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzICAgOiAycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdDo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLovajpgZMqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdyAgIDogaW5zZXQgMCAwIDVweCByZ2JhKDAsIDAsIDAsIDAuMik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kICAgOiAjZWRlZGVkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3QgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7Ki8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MTJweCAyMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTpibG9jazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNlZWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgbGk6bGFzdC1jaGlsZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206bm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2Nyb2xsOjotd2Via2l0LXNjcm9sbGJhciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoeaVtOS9k+agt+W8jyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCA6IDBweDsgIC8q6auY5a695YiG5Yir5a+55bqU5qiq56uW5rua5Yqo5p2h55qE5bC65a+4Ki8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMXB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2Nyb2xsOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoemHjOmdouWwj+aWueWdlyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzICAgOiAycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2Nyb2xsOjotd2Via2l0LXNjcm9sbGJhci10cmFjayB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoemHjOmdoui9qOmBkyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93ICAgOiBpbnNldCAwIDAgNXB4IHJnYmEoMCwgMCwgMCwgMC4yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQgICA6ICNlZGVkZWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAxMHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8qLWZvcm0tKi8KICAgICAgICAgICAgICAgICAgICAgICAgOnJvb3QgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1iYXNlLWNvbG9yOiAjNDM0YTU2OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS13aGl0ZS1jb2xvci1wcmltYXJ5OiAjZjdmOGY4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS13aGl0ZS1jb2xvci1zZWNvbmRhcnk6ICNmZWZlZmU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QyeiUyMiUyMGZpbGwlM0QlMjIlMjNmNzJmNDclMjIlMjAlMkYlM0UlM0MlMkZzdmclM0UiKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE2cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByaWdodDowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OiAwOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1tb3otYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWdyYXktY29sb3ItcHJpbWFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAzcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEuN2VtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiAycHggMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuM3M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDo1NSU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTotbXMtaW5wdXQtcGxhY2Vob2xkZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLWdyYXktY29sb3Itc2Vjb25kYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTo6LW1vei1wbGFjZWhvbGRlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OjpwbGFjZWhvbGRlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICosIDo6YWZ0ZXIsIDo6YmVmb3JlIHsKICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5pdGlhbCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5W2RhdGEtaXMtdmFsaWRdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPXRydWVdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6Zm9jdXMgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRsaW5lOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5Oi13ZWJraXQtYXV0b2ZpbGwgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1kZWxheTogOTk5OXM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X192YWxpZGF0b3IgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1wb3NpdGlvbjogcmlnaHQgMC41ZW0gY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtc2l6ZTogMS41ZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OiAtMTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSArIC50ZXh0LWlucHV0X192YWxpZGF0b3IgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1pbWFnZTogdmFyKC0taW52YWxpZC1pY29uKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbmhlcml0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjVzIGVhc2Utb3V0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6OTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveDo6YWZ0ZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSkgdHJhbnNwYXJlbnQgdHJhbnNwYXJlbnQgdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItc3R5bGU6IHNvbGlkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXdpZHRoOiA2cHggNHB4IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3R0b206IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiAiIjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjogYXV0byAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByaWdodDogLTcycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6IDE7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1tb3otYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWdyYXktY29sb3ItcHJpbWFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAzcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEuN2VtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctbGVmdDogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1yaWdodDogY2FsYygxZW0gKyAxNnB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxNDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLXRvcDoycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLWJvdHRvbToycHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keS5mb2N1cy12aXNpYmxlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keTotd2Via2l0LWF1dG9maWxsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tZGVsYXk6IDk5OTlzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLW1vei1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tZ3JheS1jb2xvci1wcmltYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udDogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXR0ZXItc3BhY2luZzogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNpemU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuNXMgZWFzZS1vdXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5Om9ubHktY2hpbGQgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzaXplOiB2ZXJ0aWNhbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHk6Zm9jdXMgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRsaW5lOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keVtkYXRhLWlzLXZhbGlkPXRydWVdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhIC5fZHVtbXktYm94IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbi1oZWlnaHQ6IDI0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXdyYXA6IGJyZWFrLXdvcmQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aXNpYmlsaXR5OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRvTGVmdE1vdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuaW1hdGlvbjptb3ZlVG9MZWZ0IDAuNXMgaW5maW5pdGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjptb3ZlVG9MZWZ0IDAuNXMgaW5maW5pdGU7IC8qU2FmYXJpIGFuZCBDaHJvbWUqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWl0ZXJhdGlvbi1jb3VudDoxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWZpbGwtbW9kZTogZm9yd2FyZHM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIEBrZXlmcmFtZXMgbW92ZVRvTGVmdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIG1vdmVUb0xlZnQgLypTYWZhcmkgYW5kIENocm9tZSovewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDoyMDBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAudG9SaWdodE1vdmV7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuaW1hdGlvbjptb3ZlVG9SaWdodCAycyBpbmZpbml0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYW5pbWF0aW9uOm1vdmVUb1JpZ2h0IDJzIGluZmluaXRlOyAvKlNhZmFyaSBhbmQgQ2hyb21lKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6MTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIEBrZXlmcmFtZXMgbW92ZVRvUmlnaHR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB7bGVmdDoyMDAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgbW92ZVRvUmlnaHQgLypTYWZhcmkgYW5kIENocm9tZSovewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgYDsKCiAgICAgICAgICAgICAgICBkb21TdHlsZSAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUobWVudVNldFN0eWxlKSk7CgogICAgICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CgogICAgICAgICAgICAgICAgdmFyIHNldExpc3RKc29uPSBbCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5pY29uUG9zaXRpb24sJ3NldExpc3RJRCc6J2ljb25Qb3NpdGlvblNldFBhZ2UnLCdzZXRQYWdlSUQnOidtb3ZpZUljb25TZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5wbGF5VmlkZW8sJ3NldExpc3RJRCc6J21vdmllTGlzdCcsJ3NldFBhZ2VJRCc6J21vdmllVmlkZW9TZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy5wbGF5TXVzaWMsJ3NldExpc3RJRCc6J211c2ljTGlzdCcsJ3NldFBhZ2VJRCc6JycsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcuemhOaWNlLCdzZXRMaXN0SUQnOid6aGlodUxpc3QnLCdzZXRQYWdlSUQnOid6aGlodUljb25TZXRQYWdlJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICAgICAgeydsaXN0TmFtZSc6bGFuZy52aWRlb0Rvd25sb2FkLCdzZXRMaXN0SUQnOid2aWRlb0Rvd25sb2FkTGlzdCcsJ3NldFBhZ2VJR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vVGl0bGUnLCdkZWZhdWx0JzoyMn0sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoS2V5d29yZENsb3NlLCdvcHRpb25JRCc6J3JlbW92ZUtleXdvcmQnLCdkZWZhdWx0JzonMCd9LAogICAgICAgICAgICAgICAgICAgIHsnb3B0aW9uTmFtZSc6bGFuZy5hdXRob3JOYW1lQ2xvc2UsJ29wdGlvbklEJzoncmVtb3ZlQXV0aG9yTmFtZScsJ2RlZmF1bHQnOicyMid9LAogICAgICAgICAgICAgICAgICAgIHsnb3B0aW9uTmFtZSc6bGFuZy55YW54dWFuQ2xvc2UsJ29wdGlvbklEJzoncmVtb3ZlWWFueHVhbicsJ2RlZmF1bHQnOicwJ30KICAgICAgICAgICAgICAgIF07CgogICAgICAgICAgICAgICAgdmFyIHBsYXlWaWRlb09wdGlvbkpzb24gPXsKICAgICAgICAgICAgICAgICAgICAnb3B0aW9uTmFtZSc6bGFuZy5wbGF5VmlkZW9MaW5lQWRkLAogICAgICAgICAgICAgICAgICAgICdvcHRpb25JRCc6J3ZpZGVvUGxheUxpbmVBZGQnLAogICAgICAgICAgICAgICAgICAgICdkZWZhdWx0Jzp2aWRlb1BsYXlMaW5lQWRkLAogICAgICAgICAgICAgICAgICAgICd0ZXh0YXJlYSc6J3ZpZGVvUGxheUxpbmVBZGRUZXh0YXJlYScsCiAgICAgICAgICAgICAgICAgICAgJ3RleHRhcmVhSWQnOidwbGF5VmlkZW9MaW5lVGV4dGFyZWEnLAogICAgICAgICAgICAgICAgICAgICd0aXAnOgpg57qv5YeAMSxodHRwczovL2ltMTkwNy50b3AvP2p4PQpC56uZMSxodHRwczovL2p4Lmpzb25wbGF5ZXIuY29tL3BsYXllci8/dXJsPQrniLHosYYsaHR0cHM6Ly9qeC5haWRvdWVyLm5ldC8/dXJsPQpCTCxodHRwczovL3ZpcC5ibGppZXguY29tLz92PQrlhrDosYYsaHR0cHM6Ly9hcGkucWlhbnFpLm5ldC92aX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lb0Rvd25sb2FkKyI8L3NwYW4+PHNwYW4gIGNsYXNzPSdpY29uU2V0U2F2ZSc+w5c8L2xpPjwvdWw+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0nemhtX3NldF9wYWdlX2xpc3QnPiI7CgogICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTx2aWRlb0Rvd25sb2FkT3B0aW9uSnNvbi5sZW5ndGg7aSsrKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGJhY2tDb2xvcixzd2l0Y2hCYWNrQ29ybG9yLGRpc3BsYXk7CgogICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb25WYWx1ZSA9IEdNX2dldFZhbHVlKHZpZGVvRG93bmxvYWRPcHRpb25Kc29uW2ldLm9wdGlvbklELHZpZGVvRG93bmxvYWRPcHRpb25Kc29uW2ldLmRlZmF1bHQpOwoKICAgICAgICAgICAgICAgICAgICBpZihvcHRpb25WYWx1ZSAhPSAnMjInKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmZmJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRic7CgogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gJ25vbmUnOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CgogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gJ2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaT4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3pobV9zZXRfcGFnZV9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ICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0nemhtX3NldF9wYWdlX2xpc3QnIHN0eWxlPSdvdmVyZmxvdy15OnVuc2V0Jz4iOwoKICAgICAgICAgICAgICAgICAgICBsZXQgYmFja0NvbG9yLHN3aXRjaEJhY2tDb3Jsb3IsZGlzcGxheTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvblZhbHVlID0gR01fZ2V0VmFsdWUocGxheVZpZGVvT3B0aW9uSnNvbi5vcHRpb25JRCxwbGF5VmlkZW9PcHRpb25Kc29uLmRlZmF1bHQpOwoKICAgICAgICAgICAgICAgICAgICBpZihvcHRpb25WYWx1ZSAhPSAnMjInKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmZmJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRic7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZTZkNzMnOwoKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZFNUU1JzsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaT4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3pobV9zZXRfcGFnZV9jb250ZW50Jz4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9ICI8c3BhbiBjbGFzcz0ncGxheVZpZGVvT3B0aW9uTmFtZSc+IitwbGF5VmlkZW9PcHRpb25Kc29uLm9wdGlvbk5hbWUrIjwvc3Bhbj4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2NpcmN1bGFyJyBzdHlsZT0nYmFja2dyb3VuZC1jb2xvcjoiK3N3aXRjaEJhY2tDb3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yZWE+IjsKCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8L2Rpdj48L2Rpdj48L2xpPiI7CgogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPC91bD4iCgogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPC9kaXY+IgoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3poaWh1U2V0UGFnZScgaWQ9J3poaWh1SWNvblNldFBhZ2UnPiI7CgogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHVsIGNsYXNzPSdpY29uU2V0VWxIZWFkJz48bGkgY2xhc3M9J2ljb25TZXRQYWdlSGVhZCc+PHNwYW4gY2xhc3M9J2JhY2snPjwvc3Bhbj48c3Bhbj4iK2xhbmcuemhTZXQrIjwvc3Bhbj48c3BhbiAgY2xhc3M9J2ljb25TZXRTYXZlJz7DlzwvbGk+PC91bD4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0nemhtX3NldF9wYWdlX2xpc3QnIHN0eWxlPSdoZWlnaHQ6MzAwcHgnPiI7CgogICAgICAgICAgICAgICAgZm9yKHZhciBvcHRpb25OPTA7b3B0aW9uTjx6aGlodU9wdGlvbkpzb24ubGVuZ3RoO29wdGlvbk4rKyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3Isc3dpdGNoQmFja0NvcmxvcjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvblZhbHVlID0gR01fZ2V0VmFsdWUoemhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbklELHpoaWh1T3B0aW9uSnNvbltvcHRpb25OXS5kZWZhdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgaWYob3B0aW9uVmFsdWUgIT0gJzIyJyl7CgogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGkgPjxkaXYgY2xhc3M9J3poaWh1U2V0UGFnZUNvbnRlbnQnPjxzcGFuPiIremhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbk5hbWUrIjwvc3Bhbj4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2NpcmN1bGFyJyBzdHlsZT0nYmFja2dyb3VuZC1jb2xvcjogIitzd2l0Y2hCYWNrQ29ybG9yKyI7JyBpZD0iK3poaWh1T3B0aW9uSnNvbltvcHRpb25OXS5vcHRpb25JRCsiPjxkaXYgY2xhc3M9J3JvdW5kLWJ1dHRvbicgc3R5bGU9J2JhY2tncm91bmQ6ICIrYmFja0NvbG9yKyI7bGVmdDogIitvcHRpb25WYWx1ZSsicHg7Jz48L2Rpdj48L2Rpdj48L2Rpdj4iOwoKICAgICAgICAgICAgICAgICAgICBpZih6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0ub3B0aW9uSUQgPT0gJ3JlbW92ZUtleXdvcmQnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBrZXl3b3JkU2hvdzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdyZW1vdmVLZXl3b3JkJywnMCcpID09ICcyMicpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXdvcmRTaG93ID0gJ2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5d29yZFNob3cgPSAnbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBzdHlsZT0nbWFyZ2luLXRvcDoxMHB4O2Rpc3BsYXk6IitrZXl3b3JkU2hvdysiO3BhZGRpbmc6NXB4IDBweDsnIGlkPSd6aGlodUtleXdvcmQnPjxzcGFuIGNsYXNzPSd0ZXh0LWlucHV0Jz48aW5wdXQgdmFsdWU9JyIrR01fZ2V0VmFsdWUoJ2lucHV0WmhLZXl3b3JkJywnJykrIicgaWQ9J2lucHV0WmhLZXl3b3JkJyBjbGFzcz0ndGV4dC1pbnB1dF9fYm9keScgcGxhY2Vob2xkZXI9JyIrbGFuZy50aXBLZXl3b3JkKyInIHN0eWxlPSd3aWR0aDo4OCUnPjxzcGFuPjwvZGl2PiI7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZih6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0ub3B0aW9uSUQgPT0gJ3JlbW92ZUF1dGhvck5hbWUnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdXRob3JOYW1lU2hvdzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdyZW1vdmVBdXRob3JOYW1lJywnMjInKSA9PSAnMjInKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdXRob3JOYW1lU2hvdyA9ICdibG9jayc7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF1dGhvck5hbWVTaG93ID0gJ25vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgc3R5bGU9J21hcmdpbi10b3A6MTBweDtkaXNwbGF5OiIrYXV0aG9yTmFtZVNob3crIjtwYWRkaW5nOjVweC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mFsdWUgIT0gMjIpewogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CiAgICAgICAgICAgICAgICAgICAgICAgIGFycm93Q29sb3I9ICcjRUVFJzsKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZGJzsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvciA9ICcjQ0NDJzsKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoQmFja0NvcmxvciA9ICcjRkZFNUU1JzsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RKc29uW3NldE5dLnNldFBhZ2VJRCA9PSAnJyl7CiAgICAgICAgICAgICAgICAgICAgICAgIGFycm93Q29sb3IgPSAnI0VFRSc7CiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaT48c3Bhbj4iK3NldExpc3RKc29uW3NldE5dLmxpc3ROYW1lKyI8L3NwYW4+IjsKCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSdzZXRXcmFwTGlDb250ZW50Jz4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2NpcmN1bGFyJyBpZD0nIitzZXRMaXN0SnNvbltzZXROXS5zZXRMaXN0SUQrIicgc3R5bGU9J2JhY2tncm91bmQtY29sb3I6ICIrc3dpdGNoQmFja0NvcmxvcisiOyc+PGRpdiBjbGFzcz0ncm91bmQtYnV0dG9uJyBzdHlsZT0nYmFja2dyb3VuZDogIitiYWNrQ29sb3IrIjtsZWZ0OiAiK2xpc3RWYWx1ZSsicHgnPjwvZGl2PjwvZGl2PiI7CgogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHNwYW4gY2xhc3M9J3RvLXJpZ2h0JyBkYXRhPSciK3NldExpc3RKc29uW3NldE5dLnNldFBhZ2VJRCsiJyB0YWtlUGxhY2U9JyIrc2V0TGlzdEpzb25bc2V0Tl0udGFrZVBsYWNlKyInIHN0eWxlPSdib3JkZXI6IHNvbGlkICIrYXJyb3dDb2xvcisiOyBib3JkZXItd2lkdGg6IDAgM3B4IDNweCAwOyc+PC9zcGFuPjwvZGl2PjwvbGk+IjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvdWw+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgc3R5bGU9J2hlaWdodDo0MHB4OycgaWQ9J3pobVRha2VQbGFjZSc+PC9kaXY+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2ljb25TZXRGb290JyBzdHlsZT0nJz4iOwoKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHVsIGNsYXNzPSdpY29uU2V0Rm9vdExpJz4iOwoKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGxpPjwvbGk+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9JzwvdWw+JzsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9JzwvZGl2Pic7CgogICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPC9kaXY+IjsKCiAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjc2V0TWFzaycpKSByZXR1cm47CgogICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVFbGVtZW50KCdkaXYnLCd6aG1NZW51Jyk7CgogICAgICAgICAgICAgICAgbGV0IHpobU1lbnUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtTWVudScpOwoKICAgICAgICAgICAgICAgIHpobU1lbnUuaW5uZXJIVE1MID0gc2V0SHRtbDsKCiAgICAgICAgICAgICAgICBsZXQgdGltZXJaaG1JY29uID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1NZW51JykpewoKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvLyDlj5bmtojlrprml7blmagKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaXJjdWxhciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5jaXJjdWxhcicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgY2lyY3VsYXIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24oX2UpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnV0dG9uU3R5bGUgPSBpdGVtLmNoaWxkcmVuWzBdLnN0eWxlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGVmdCA9IGJ1dHRvblN0eWxlLmxlZnQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwYXJzZUludChsZWZ0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RMZWZ0VmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxlZnQ9PTApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUubGVmdCA9ICcyMnB4JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmJhY2tncm91bmQgPSAnI2ZlNmQ3Myc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlLmJhY2tncm91bmQ9JyNmZkU1RTUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5uZXh0U2libGluZyAmJiBpdGVtLm5leHRTaWJsaW5nLmdldEF0dHJpYnV0ZSgnZGF0YScpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLm5leHRTaWJsaW5nLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCdib3JkZXI6IHNvbGlkICNjY2M7Ym9yZGVyLXdpZHRoOiAwIDNweCAzcHggMDsnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0TGVmdFZhbHVlID0gMjI7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUubGVmdCA9ICcwcHgnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUuYmFja2dyb3VuZCA9ICcjZmZmJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUuYmFja2dyb3VuZD0nI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLm5leHRTaWJsaW5nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLm5leHRTaWJsaW5nLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCdib3JkZXI6IHNvbGlkICNFRUU7Ym9yZGVyLXdpZHRoOiAwIDNweCAzcHggMDsnKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdExlZnRWYWx1ZSA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0TGlzdElEID0gaXRlbS5pZDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICdyZW1vdmVLZXl3b3JkJyAmJiBsaXN0TGVmdFZhbHVlPT0yMil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhpaHVLZXl3b3JkJykuc3R5bGUuZGlzcGxheT0nYmxvY2snOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ICdoZWlnaHQ6MjIwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICdyZW1vdmVLZXl3b3JkJyAmJiBsaXN0TGVmdFZhbHVlPT0wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aGlodUtleXdvcmQnKS5zdHlsZS5kaXNwbGF5PSdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSAnaGVpZ2h0OjE4MHB4JzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlQXV0aG9yTmFtZScgJiYgbGlzdExlZnRWYWx1ZT09MjIpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1QXV0aG9yTmFtZScpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SUQgPT0gJ3JlbW92ZUF1dGhvck5hbWUnICYmIGxpc3RMZWZ0VmFsdWU9PTApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1QXV0aG9yTmFtZScpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoc2V0TGlzdElELGxpc3RMZWZ0VmFsdWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b1JpZ2h0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnRvLXJpZ2h0Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICB0b1JpZ2h0LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGVmdCA9IGl0ZW0ucHJldmlvdXNTaWJsaW5nLmNoaWxkcmVuWzBdLnN0eWxlLmxlZnQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwYXJzZUludChsZWZ0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobGVmdCAhPSAyMikgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0UGFnZUlEID0gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VJZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNldFBhZ2VJRCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2VJZC5jbGFzc05hbWU9J2ljb25TZXRQYWdlIHRvTGVmdE1vdmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+efpeS5juiuvue9ruaaguS9jemrmOW6pgoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRQYWdlSUQ9PSd6aGlodUljb25TZXRQYWdlJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9IGBoZWlnaHQ6NjhweGA7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+WunuaXtuWbvuagh+mrmOW6pgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldFBhZ2VJRCA9PSAnbW92aWVJY29uU2V0UGFnZScpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2ljb25Ub3AnKS52YWx1ZT1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjemhtbG9nbyIpLm9mZnNldFRvcDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRvQmFjayA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5iYWNrJyk7CgogICAgICAgICAgICAgICAgICAgICAgICB0b0JhY2suZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24oZSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJlbnREb20gPSBpdGVtLnBhcmVudE5vZGUucGFyZW50Tm9kZS5wYXJlbnROb2RlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnREb20uY2xhc3NOYW1lPSdpY29uU2V0UGFnZSB0b1JpZ2h0TW92ZSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1UYWtlUGxhY2UnKS5zdHlsZT0naGVpZ2h0OjQwcHg7JwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNldFNhdmUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuaWNvblNldFNhdmUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFNhdmUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywoKT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvblRvcCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uVG9wJykudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uT3BhY2l0eT1kb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvbk9wYWNpdHknKS52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Qb3NpdGlvbiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uUG9zaXRpb24nKS52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25XaWR0aCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uV2lkdGgnKS52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25XYWl0VGltZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uV2FpdFRpbWUnKS52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlb0xpbmVUZXh0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlWaWRlb0xpbmVUZXh0YXJlYScpLnZhbHVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9MaW5lTGVmdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2aWRlb1BsYXlMaW5lQWRkJykuY2hpbGRyZW5bMF0uc3R5bGUubGVmdDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlucHV0WmhLZXl3b3JkID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2lucHV0WmhLZXl3b3JkJykudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dEF1dGhvck5hbWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaW5wdXRaaEF1dGhvck5hbWUnKS52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblRvcCAhPSAnJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXlswLTldWzAtOV17MCwyfSQpLy50ZXN0KGljb25Ub3ApKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxlcnQobGFuZy50aXBFcnJvckljb25IZWlnaHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2ljb25Ub3AnLGljb25Ub3ApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvbk9wYWNpdHkgIT0gJycpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvXig/OjB8WzEtOV1bMC05XT98MTAwKSQvLnRlc3QoaWNvbk9wYWNpdHkpKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxlcnQobGFuZy50aXBFcnJvckljb25PcGFjaXR5KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uT3BhY2l0eScsaWNvbk9wYWNpdHkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblBvc2l0aW9uICE9ICcnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uUG9zaXRpb24nLGljb25Qb3NpdGlvbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpY29uV2FpdFRpbWUgIT0gJycpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2ljb25XYWl0VGltZScsaWNvbldhaXRUaW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25XaWR0aCAhPScnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEoLyheKFsxLTldWzAtOV0/KSQpLy50ZXN0KGljb25XaWR0aCkpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydChsYW5nLnRpcEVycm9ySWNvbldpZHRoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uV2lkdGgnLGljb25XaWR0aCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgndmlkZW9QbGF5TGluZUFkZCcpID09IDIyKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBsYXlWaWRlb0xpbmVUZXh0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU9iaiA9IF90aGlzLmdldExpbmUocGxheVZpZGVvTGluZVRleHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxpbmVPYmoubGVuZ3RoPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLHBsYXlWaWRlb0xpbmVUZXh0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydCgn57q/6Lev6L6T5YWl5LiN5q2j56GuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ3BsYXlWaWRlb0xpbmVUZXh0JywnJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLHBsYXlWaWRlb0xpbmVUZXh0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGlucHV0WmhLZXl3b3JkICE9ICcnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcsaW5wdXRaaEtleXdvcmQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kZWxldGVWYWx1ZSgnaW5wdXRaaEtleXdvcmQnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGlucHV0QXV0aG9yTmFtZSAhPSAnJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnLGlucHV0QXV0aG9yTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJykpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2RlbGV0ZVZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblRvcCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvblRvcCA9IHRoaXMudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMS05XVxkKiQpLy50ZXN0KGljb25Ub3ApKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywnZmFsc2UnKQoKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2RhdGEtaXMtdmFsaWQnLCd0cnVlJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XaWR0aCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldpZHRoID0gdGhpcy52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXlsxLTldXGQqJCkvLnRlc3QoaWNvbldpZHRoKSkpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZSgnZGF0YS1pcy12YWxpZCcsJ2ZhbHNlJykKCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywndHJ1ZScpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgLy/ohb7orq/op4bpopHlv6vmjbfplK7lhrLnqoEKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY291cG9uVXJsLm1hdGNoKC92XC5xcVwuY29tXC94XC9jb3Zlci8pKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYWRkTGluZVRleHQgPWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5VmlkZW9MaW5lVGV4dGFyZWEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0UG9zID0gYWRkTGluZVRleHQuc2VsZWN0aW9uU3RhcnQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRQb3MgPSBhZGRMaW5lVGV4dC5zZWxlY3Rpb25FbmQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGFydFBvcyA9PT0gdW5kZWZpbmVkIHx8IGVuZFBvcyA9PT0gdW5kZWZpbmVkKSByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleUNvZGUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGUua2V5Q29kZSA9PSBpdGVtLmNvZGUgJiYgZS5zaGlmdEtleT09aXRlbS5pc1NoaWZ0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dFZhbHVlID0gYWRkTGluZVRleHQudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0VmFsdWUgPSB0ZXh0VmFsdWUuc3Vic3RyaW5nKDAsc3RhcnRQb3MpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRWYWx1ZSA9IHRleHRWYWx1ZS5zdWJzdHJpbmcoc3RhcnRQb3MpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhbGxWYWx1ZSA9IHN0YXJ0VmFsdWUraXRlbS52YWx1ZStlbmRWYWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC52YWx1ZT1hbGxWYWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5zZWxlY3Rpb25TdGFydCA9IHN0YXJ0UG9zKzE7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGluZVRleHQuc2VsZWN0aW9uRW5kID0gZW5kUG9zKzE7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgY3JlYXRlRWxlbWVudChkb20sZG9tSWQpewoKICAgICAgICAgICAgICAgIHZhciByb290RWxlbWVudCA9IGRvY3VtZW50LmJvZHk7CgogICAgICAgICAgICAgICAgdmFyIG5ld0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGRvbSk7CgogICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pZCA9IGRvbUlkOwoKICAgICAgICAgICAgICAgIHZhciBuZXdFbGVtZW50SHRtbENvbnRlbnQgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnJyk7CgogICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuYXBwZW5kQ2hpbGQobmV3RWxlbWVudCk7CgogICAgICAgICAgICAgICAgbmV3RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50SHRtbENvbnRlbnQpOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmVxdWVzdChtZXRob2QsdXJsLGRhdGEsaXNDb29raWU9JycpewoKICAgICAgICAgICAgICAgIGxldCByZXF1ZXN0ID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5vbnJlYWR5c3RhdGVjaGFuZ2U9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlcXVlc3QucmVhZHlTdGF0ZT09NCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVxdWVzdC5zdGF0dXM9PTIwMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVxdWVzdC5yZXNwb25zZVRleHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QocmVxdWVzdC5zdGF0dXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5vcGVuKG1ldGhvZCx1cmwpOwogICAgICAgICAgICAgICAgICAgIGlmKGlzQ29va2llKXsKICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC53aXRoQ3JlZGVudGlhbHMgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LnNldFJlcXVlc3RIZWFkZXIoJ0NvbnRlbnQtVHlwZScsICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnKTsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LnNlbmQoZGF0YSk7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHNldENvb2tpZShjbmFtZSxjdmFsdWUsZXhkYXlzKXsKCiAgICAgICAgICAgICAgICB2YXIgZCA9IG5ldyBEYXRlKCk7CgogICAgICAgICAgICAgICAgZC5zZXRUaW1lKGQuZ2V0VGltZSgpKyhleGRheXMqMjQqNjAqNjAqMTAwMCkpOwoKICAgICAgICAgICAgICAgIHZhciBleHBpcmVzID0gImV4cGlyZXM9IitkLnRvR01UU3RyaW5nKCk7CgogICAgICAgICAgICAgICAgZG9jdW1lbnQuY29va2llID0gY25hbWUrIj0iK2N2YWx1ZSsiOyAiK2V4cGlyZXM7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGdldENvb2tpZShjbmFtZSl7CiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICAgICAgdmFyIGNhID0gZG9jdW1lbnQuY29va2llLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgICAgICBmb3IodmFyIGk9MDsgaTxjYS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjLmluZGV4T2YobmFtZSk9PTApIHsgcmV0dXJuIGMuc3Vic3RyaW5nKG5hbWUubGVuZ3RoLGMubGVuZ3RoKTsgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CgogICAgICAgICAgICBnZXRRdWVyeVN0cmluZyhlKSB7CiAgICAgICAgICAgICAgICB2YXIgdCA9IG5ldyBSZWdFeHAoIihefCYpIiArIGUgKyAiPShbXiZdKikoJnwkKSIpOwogICAgICAgICAgICAgICAgdmFyIGEgPSB3aW5kb3cubG9jYXRpb24uc2VhcmNoLnN1YnN0cigxKS5tYXRjaCh0KTsKICAgICAgICAgICAgICAgIGlmIChhICE9IG51bGwpIHJldHVybiBhWzJdOwogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CgogICAgICAgICAgICBnZXRVcmxQYXJhbXModXJsKXsKICAgICAgICAgICAgICAgIGxldCByZWcgPSAvKFtePyYrI10rKT0oW14/JisjXSspL2c7CiAgICAgICAgICAgICAgICBsZXQgb2JqPXt9OwogICAgICAgICAgICAgICAgdXJsLnJlcGxhY2UocmVnLChyZXMsJDEsJDIpPT57b2JqWyQxXT0kMn0pOwogICAgICAgICAgICAgICAgcmV0dXJuIG9iajsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZ2V0TGluZSh0ZXh0KXsKCiAgICAgICAgICAgICAgICBsZXQgdGV4dEFyciA9IHRleHQuc3BsaXQoJ1xuJyk7CgogICAgICAgICAgICAgICAgaWYodGV4dEFyci5sZW5ndGggPiAwKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVPYmogPSBbXTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gL14oLispKGh0dHBzPzpcL1wvLispJC87CgogICAgICAgICAgICAgICAgICAgIHRleHRBcnIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0gPSBpdGVtLnJlcGxhY2UoL1xzKiwqL2csJycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWl0ZW0pIHJldHVybiB0cnVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVNYXRjaCA9IGl0ZW0ubWF0Y2gobWF0Y2gpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYobGluZU1hdGNoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqLnB1c2goeyduYW1lJzpsaW5lTWF0Y2hbMV0uc3Vic3RyaW5nKDAsNCksJ3VybCc6bGluZU1hdGNoWzJdfSk7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqPVtdOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGluZU9iajsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHN0YXRpYyBnZXRFbGVtZW50KGNzcyl7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG51bSA9IDA7CgogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBudW0rKwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoY3NzKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShkb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtPT0yMCl7Y2xlYXJJbnRlcnZhbCh0aW1lcik7cmVzb2x2ZShmYWxzZSk7fQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0sMzAwKQoKICAgICAgICAgICAgICAgICAgICB9KQoKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHN0YXRpYyB0b2FzdChtc2csZHVyYXRpb24pewoKICAgICAgICAgICAgICAgIGR1cmF0aW9uPWlzTmFOKGR1cmF0aW9uKT8zMDAwOmR1cmF0aW9uOwoKICAgICAgICAgICAgICAgIGxldCB0b2FzdERvbSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwoKICAgICAgICAgICAgICAgIHRvYXN0RG9tLmlubmVySFRNTCA9IG1zZzsKCiAgICAgICAgICAgICAgICAvL3RvYXN0RG9tLnN0eWxlLmNzc1RleHQ9IndpZHRoOiA2MCU7bWluLXdpZHRoOiAxNTBweDtvcGFjaXR5OiAwLjc7aGVpZ2h0OiAzMHB4O2NvbG9yOiByZ2IoMjU1LCAyNTUsIDI1NSk7bGluZS1oZWlnaHQ6IDMwcHg7dGV4d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9uKTsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy9jcmVhdGUgemhtTG9nb0ljb24KICAgICAgICAgICAgemhtTG9nbygpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgbGV0IHNvcnREaXYgPSBpY29uVmlwUG9zaXRpb249PSdsZWZ0Jz8ncm93Jzoncm93LXJldmVyc2UnOwoKICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9TdHlsZSA9IGAKICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4OwogICAgICAgICAgICAgICAgICAgY3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTsKICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOyR7aWNvblZpcFBvc2l0aW9ufTo1cHg7dG9wOiR7aWNvblZpcFRvcH1weDsKICAgICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6dmlzaWJsZTsKICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ZmxleDsKICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOiR7c29ydERpdn07CiAgICAgICAgICAgICAgICAgICB3aWR0aDphdXRvOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX3dyYXB7CiAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuaWNvbkxvZ297CiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eToke2ljb25WaXBPcGFjaXR5LzEwMH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZXsKICAgICAgICAgICAgICAgICAgIHdpZHRoOjMyMHB4OwogICAgICAgICAgICAgICAgICAgaGVpZ2h0OjMxNnB4OwogICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTpzY3JvbGw7CiAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy14OmhpZGRlbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICBmbGV4LWZsb3c6IHJvdyB3cmFwOwogICAgICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saXsKICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6NHB4IDBweDsKICAgICAgICAgICAgICAgICAgIG1hcmdpbjoycHg7CiAgICAgICAgICAgICAgICAgICB3aWR0aDozMCU7CiAgICAgICAgICAgICAgICAgICBjb2xvcjojRkZGOwogICAgICAgICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7CiAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmMjQ0NDM7CiAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OjBweCAwcHggMTBweCAjZmZmOwogICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saTpob3ZlcnsKICAgICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwMzM7CiAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbGluZV9zZWxlY3RlZHsKICAgICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwMzM7CiAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fanh7CiAgICAgICAgICAgICAgICAgICB3aWR0aDoxMDAlOwogICAgICAgICAgICAgICAgICAgaGVpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTsKICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTt0b3A6MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYDsKCiAgICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHBsYXlWaWRlb1N0eWxlKSk7CgogICAgICAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwoKICAgICAgICAgICAgICAgICBsZXQgcGxheVdyYXBIdG1sID0gIjxkaXYgaHJlZj0namF2YXNjcmlwdDp2b2lkKDApJyB0YXJnZXQ9J19ibGFuaycgc3R5bGU9JycgY2xhc3M9J3BsYXlCdXR0b24gemhtX3BsYXlfdmlkb2VfaWNvbicgaWQ9J3pobWxvZ28nPiI7CgogICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSAiPGltZyBjbGFzcz0naWNvbkxvZ28nIHN0eWxlPSd3aWR0aDoiK2ljb25WaXBXaWR0aCsicHg7aGVpZ2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E51d1VWOFFTNnlYaXhYTGV4Rk5OdDdWUU1Gb2tkZ0REdy93MEFPcVU2SkF3d3cwa0JmMzVaaGZoZVJRaVk5WXhBd2VFc0J3aVVvOFVHRUxFeGNMRXd4NmwraHp4eTRLOFZJRVFpelE1d0hMYVpCaFFBQWgvaFZOWVdSbElIZHBkR2dnVTJOeVpXVnVWRzlIYVdZQU93PT0nPiIKCiAgICAgICAgICAgICAgICAgcGxheVdyYXBIdG1sICs9ICI8ZGl2PiI7CgogICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKCiAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtSWNvbicpOwoKICAgICAgICAgICAgICAgICB6aG1QbGF5LmlubmVySFRNTCA9IHBsYXlXcmFwSHRtbDsKCiAgICAgICAgICAgICB9CiAgICAgICAgICAgICAvL+W3pumUruaMieS4i+aLluWKqAogICAgICAgICAgICAgLy90eXBlOuagueaNruS4jeWQjOexu+Wei++8jOWkhOeQhuWbvuagh+WNleWHu+S6i+WKoQogICAgICAgICAgICAgemhtTG9nb0RyYWcodHlwZSx3ZWIpewoKICAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgICAgICB2YXLCoHpobUxvZ29EcmFnPWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiN6aG1sb2dvIik7CgogICAgICAgICAgICAgICAgIHZhciB6aG1Mb2dvSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5pY29uTG9nbyIpOwoKICAgICAgICAgICAgICAgICBpZighemhtTG9nb0RyYWcgfHwgIXpobUxvZ29JY29uKXJldHVybjsKCiAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25tb3VzZWRvd24gPSBmdW5jdGlvbihldmVudCl7CgogICAgICAgICAgICAgICAgICAgICBpZihldmVudC53aGljaD09MylyZXR1cm4gZmFsc2U7Ly/lsY/olL3lj7PplK4KCiAgICAgICAgICAgICAgICAgICAgIGxldCBzZWRvd25Ub3AgPSB6aG1Mb2dvRHJhZy5vZmZzZXRUb3A7CgogICAgICAgICAgICAgICAgICAgICBsZXQgemhtTG9nb0ljb25IZWlnaHQgPSB6aG1Mb2dvSWNvbi5vZmZzZXRIZWlnaHQ7CgogICAgICAgICAgICAgICAgICAgICBsZXQgYm90dG9tU3BhY2UgPSAxMDsKCiAgICAgICAgICAgICAgICAgICAgIGlmKGV2ZW50LnRhcmdldC5jbGFzc05hbWUgIT0gJ2ljb25Mb2dvJylyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAvL2xldMKgc2hpZnRYwqA9wqBldmVudC5jbGllbnRYwqAtwqB6aG1Mb2dvRHJhZy5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5sZWZ0OwogICAgICAgICAgICAgICAgICAgICBsZXQgc2hpZnR4ID0gNTsKCiAgICAgICAgICAgICAgICAgICAgIGxldMKgc2hpZnRZID0gZXZlbnQuY2xpZW50WS16aG1Mb2dvRHJhZy5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS50b3A7CgogICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS5wb3NpdGlvbsKgPcKgJ2ZpeGVkJzsKCiAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnpJbmRleMKgPcKgOTk5OTk5OTsKCiAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kKHpobUxvZ29EcmFnKTsKCiAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uwqBvbk1vdXNlTW92ZShldmVudCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgLy96aG1Mb2dvRHJhZy5zdHlsZS5sZWZ0wqA9wqBwYWdlWMKgLcKgc2hpZnRYwqArwqAncHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUubGVmdMKgPcKgJzVweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodCAtIHpobUxvZ29JY29uSGVpZ2h0LWJvdHRvbVNwYWNlOwoKICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB5ID0gZXZlbnQucGFnZVktc2hpZnRZOwoKICAgICAgICAgICAgICAgICAgICAgICAgIHkgPSBNYXRoLm1pbihNYXRoLm1heCgwLCB5KSwgaGVpZ2h0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS50b3AgPSB5KydweCc7CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgLy/lnKhtb3VzZW1vdmXkuovku7bkuIrnp7vliqjlm77moIcKICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJyxvbk1vdXNlTW92ZSk7CiAgICAgICAgICAgICAgICAgICAgIC8v5p2+5byA5LqL5Lu2CiAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50Lm9ubW91c2V1cCA9IGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uVG9wJyx6aG1Mb2dvRHJhZy5vZmZzZXRUb3ApOwoKICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlbW92ZScswqBvbk1vdXNlTW92ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25tb3VzZXVwwqA9wqBudWxsOwoKICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWlnaHQgPSB6aG1Mb2dvRHJhZy5vZmZzZXRUb3AremhtTG9nb0ljb25IZWlnaHQrYm90dG9tU3BhY2U7CgogICAgICAgICAgICAgICAgICAgICAgICAgaWYoemhtTG9nb0RyYWcub2Zmc2V0VG9wIDwgMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnRvcCA9JzBweCc7CiAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgaWYod2luZG93LmlubmVySGVpZ2h0IDwgaGVpZ2h0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUudG9wID13aW5kb3cuaW5uZXJIZWlnaHQtemhtTG9nb0ljb25IZWlnaHQtYm90dG9tU3BhY2UrJ3B4JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAvL2NsaWNr5LqL5Lu25aSE55CGCiAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2godHlwZSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3ZpZGVvJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcD09c2Vkb3duVG9wICYmIHdlYi5sZW5ndGggPT0gMCAmJiB6aG1Mb2dvRHJhZy5vZmZzZXRUb3A+MCAmJiB3aW5kb3cuaW5uZXJIZWlnaHQgPiBoZWlnaHQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+35Zyo6KeG6aKR5pKt5pS+6aG154K55Ye75Zu+5qCHJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ211c2ljJzoKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcD09c2Vkb3duVG9wICYmIGUudGFyZ2V0LmNsYXNzTmFtZSA9PSAnaWNvbkxvZ28nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2RvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlbW92ZScswqBvbk1vdXNlTW92ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy96aG1Mb2dvRHJhZy5vbm1vdXNldXDCoD3CoG51bGw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG11c2ljVXJsRGF0YSA9IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL211c2ljXC4xNjNcLmNvbVwvI1wvKD86c29uZ3xkailcP2lkL30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC95XC5tdXNpY1wuMTYzXC5jb21cL21cLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDovXmh0dHBzPzpcL1wvbXVzaWNcLjE2M1wuY29tXC8oPzpzb25nfGRqKVw/aWQvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL3lcLnFxXC5jb21cL25cL3J5cXFcL3BsYXllci99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDova3Vnb3VcLmNvbS99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDova3V3b1wuY24vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL3d3d1wueGltYWxheWFcLmNvbS99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtdXNpY1VybCA9IG11c2ljVXJsRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXVzaWNVcmwubGVuZ3RoPT0wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KHdlYlswXS50aXApOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHdlYlswXS5uYW1lKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICduZXRlYXNlJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV0ZWFzZUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdxcSc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxRnVuKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2t1Z291JzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga3Vnb3VGdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAna3V3byc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt1d29GdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAneGltYWxheWEnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4aW1hbGF5YUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBuZXRlYXNlRnVuKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmxQYXJhbXMgPSBfdGhpcy5nZXRVcmxQYXJhbXMobG9jYXRpb24uaHJlZik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVybFBhcmFtcy5pZCA9PSB1bmRlZmluZWQpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ldGVhc2VVcmxFbmNvZGUgPSBlbmNvZGVVUklDb21wb25lbnQoJ2h0dHBzOi8vbXVzaWMuMTYzLmNvbS9zb25nP2lkPScrdXJsUGFyYW1zLmlkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz91cmw9JytuZXRlYXNlVXJsRW5jb2RlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihvcGVuVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gcXFGdW4oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHFxU29uZ01hdGNoOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikuY2hpbGROb2Rlc1swXS5ocmVmLm1hdGNoKC9zb25nRGV0YWlsXC8oXFMqKVw/Lyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNzaW1fc29uZ19pbmZvIikpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjc2ltX3NvbmdfaW5mbyIpLmNoaWxkTm9kZXNbMF0uaHJlZi5tYXRjaCgvc29uZ1wvKFxTKikuaHRtbC8pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxU29uZ01hdGNoID0gJyc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighcXFTb25nTWF0Y2hbMV0pe2NvbnNvbGUubG9nKCfmsqHmnInojrflj5bliLDmrYzmm7JJRCcpOyByZXR1cm59OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW9MaW5rID0gZW5jb2RlVVJJQ29tcG9uZW50KGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImF1ZGlvIikuc3JjKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz9pZD0nK3FxU29uZ01hdGNoWzFdKycmdHlwZT1xcSZwbGF5VXJsPScrYXVkaW9MaW5rOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihvcGVuVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24ga3Vnb3VGdW4oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvTW9kdWxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2F1ZGlvTW9kdWxlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1ZGlvTW9kdWxlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhdWRpb01vZHVsZScpLnN0eWxlPSdib3R0b206MHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjc2hvd0hpZGVfcGxheWJhcicpLmNsYXNzTmFtZSA9ICdpY29uIHNob3ctcGxheWJhci1idG4nOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29IicsMjAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24ga3V3b0Z1bigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheUNvbnRyb2wnKS5zdHlsZT0nYm90dG9tOjBweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhpbWFsYXlhRnVuKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54bS1wbGF5ZXInKS5zdHlsZT0nYm90dG9tOjBweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3lvdXR1YmUnOgoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgfTsKCiAgICAgICAgICAgICAgICAgfTsKCiAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25kcmFnc3RhcnTCoD3CoGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgIHJldHVybsKgZmFsc2U7CiAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAvL+S4i+i9vQogICAgICAgICAgICBzdGF0aWMgTFJfZG93bmxvYWQodXJsLGZpbGVuYW1lKXsKCiAgICAgICAgICAgICAgICBsZXQgdWEgPSBuYXZpZ2F0b3IudXNlckFnZW50LnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyh1YS5tYXRjaCgvdmVyc2lvblwvKFtcZC5dKykuKnNhZmFyaS8pKTsKCiAgICAgICAgICAgICAgICBpZih1YS5tYXRjaCgvdmVyc2lvblwvKFtcZC5dKykuKnNhZmFyaS8pKXsKCiAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odXJsKTsKCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQodXJsLGZpbGVuYW1lKTsKICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICB9CgogICAgICAgIH0KCiAgICAgICAgY2xhc3MgQ291cG9uQ2xhc3MgZXh0ZW5kcyBCYXNlQ2xhc3N7CgogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewoKICAgICAgICAgICAgICAgIHN1cGVyKCk7CgogICAgICAgICAgICAgICAgdGhpcy5kaXZFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7CgogICAgICA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oJyNKX0xpbmtCdXknKS5wYXJlbnROb2RlOwoKICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSAnemhtX3RhYl90bWFsbCc7CgogICAgICAgICAgICAgICAgdGhpcy5nZXRDb3Vwb25JbmZvKG5vZGUsY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0bWFsbE90aGVyKCl7CgogICAgICAgICAgICAgICAgbGV0IG5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG0tbXNnLWJveCcpOwoKICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSAnemhtX3RhYl90bWFsbCc7CgogICAgICAgICAgICAgICAgdGhpcy5nZXRDb3Vwb25JbmZvKG5vZGUsY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBqZCgpewogICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+ewoKICAgICAgICAgICAgICAgICAgICBsZXQgamRHb29kc0lkID0gY291cG9uVXJsLm1hdGNoKC9qZFwuKGhrfGNvbSlcLyhcUyopLmh0bWwvKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG5vZGU9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNjaG9vc2UtYnRucycpOwoKICAgICAgICAgICAgICAgICAgICBub2RlLmJlZm9yZSh0aGlzLmRpdkVsZW1lbnQpOwoKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcXVlc3QoJ2dldCcsYGh0dHBzOi8vYXBpLnR5cGVjaHJvbWUuY29tL2luZGV4X2pkX25ldy5waHA/Z29vZHNfaWQ9JHtqZEdvb2RzSWRbMl19YCkudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3A9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sPScnOwoKICAgICAgICAgICAgICAgICAgICAgICAgcmVzcC5mb3JFYWNoKGZ1b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iBjbGFzcz0iemhtX21vbmV5X3NpZ24iIHN0eWxlPSdtYXJnaW4tdG9wOi0xMHB4Oyc+wqU8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leV9udW0iPiR7aXRlbS5kaXNjb3VudH08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jb25kaXRpb24iPua7oSR7aXRlbS5xdW90YX3lhYPlj6/nlKg8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGltZSIgc3R5bGU9J21hcmdpbi10b3A6MTBweDsnPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGVybSI+5pyJ5pWI5pyfPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9kYXRlIj4ke2l0ZW0uZW5kVGltZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NpcmNsZSIgc3R5bGU9InJpZ2h0OjQ0cHg7Ij48L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2xpbmtfY291cG9uIiBzdHlsZT0icGFkZGluZzowcHggMTZweCAwcHggMTZweDsiPgogICAgICAgICAgICAgICAgPGEgY2xhc3M9InpobV9nZXRfbGlua190ZXh0IiBzdHlsZT0ibGV0dGVyLXNwYWNpbmc6IDEwcHg7Zm9udC1zaXplOjE2cHg7bWFyZ2luLXRvcDoxMHB4OyIgaHJlZj0iJHtpdGVtLmNvdXBvbl9saW5rfSIgdGFyZ2V0PSdfYmxhbmsnIHJlbD0nbm9vcGVuZXIgbm9yZWZlcnJlciBub2ZvbGxvdycgc3R5bGU9Im1hcmdpbi1sZWZ0OjE2cHg7d2lkdGg6MzRweDsiPumihuWPljwvYT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICAgICAgYAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1fZGl2X3MnKS5pbm5lckhUTUwgPSBodG1sOwoKICAgICAgICAgICAgICAgICAgICB9KQoKCgogICAgICAgICAgICAgICAgfSxjb3Vwb25XYWl0VGltZSkKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZ2V0Q291cG9uSW5mbyhub2RlLGNsYXNzTmFtZSl7CgogICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+ewoKICAgICAgICAgICAgICAgICAgICBsZXQgZ29vZHNfaWQgPSB0aGlzLmdldFF1ZXJ5U3RyaW5nKCdpZCcpOwoKICAgICAgICAgICAgICAgICAgICBpZighZ29vZHNfaWQpe2NvbnNvbGUubG9nKCdnb29kc19pZCcpO3JldHVybn07CgogICAgICAgICAgICAgICAgICAgIGlmKGNsYXNzTmFtZSA9PSAnemhtX3RhYl90YW9iYW8nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDEpJykuYmVmb3JlKHRoaXMuZGl2RWxlbWVudCk7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICBub2RlLmJlZm9yZSh0aGlzLmRpdkVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXF1ZXN0KCdnZXQnLGBodHRwczovL2FwaS50eXBlY2hyb21lLmNvbS9pbmRleF9uZXcucGhwP2dvb2RzX2lkPSR7Z29vZHNfaWR9YCkudGhlbigocmVzdWx0KT0+ewoKICA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gICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX21vbmV5X251bSI+JHtyZXNwLnlvdWh1aXF1YW59PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fY29uZGl0aW9uIj4ke3Jlc3AuY291cG9uX2luZm99PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX3RpbWUiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGVybSI+5pyJ5pWI5pyfPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9kYXRlIj4ke3Jlc3AuY291cG9uX2VuZF90aW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fY2lyY2xlIj48L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2xpbmtfY291cG9uIiBzdHlsZT0ibWFyZ2luLXJpZ2h0OiI+CiAgICAgICAgICAgIDxhIGNsYXNzPSJ6aG1fZ2V0X2xpbmtfdGV4dCI+5omr56CB6aKG5Y+WPC9hPgogICAgICAgICAgICA8ZGl2IGlkPSJ0YnFyY29kZSIgY2xhc3M9InpobV9xcmNvZGUiPjwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L2Rpdj4KICAgICAgICBgOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobV9kaXZfcycpLmlubmVySFRNTD1odG1sOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBxcmNvZGUgPSBuZXcgUVJDb2RlKCJ0YnFyY29kZSIsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogNjcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiA2NywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvckRhcmsgOiAiIzEyMTIxMiIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3JMaWdodCA6ICIjZmZmZmZmIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3JyZWN0TGV2ZWwgOiBRUkNvZGUuQ29ycmVjdExldmVsLk0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFyY29kZS5tYWtlQ29kZShyZXNwLmNvZGVfdXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuQWN0aW9ucy0tcm9vdC0taHdFdWpnYycpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkFjdGlvbnMtLXJvb3QtLWh3RXVqZ2MnKS5zdHlsZT0icG9zaXRpb246dW5zZXQiOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9LGNvdXBvbldhaXRUaW1lKTsKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGNsYXNzIFBsYXlWaWRlb0NsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGNsYXNzIFBsYXlNdXNpY0NsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgeG1seUNyZWF0ZUNoZWNrYm94KCl7CgogICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdGxpID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnNvdW5kLWxpc3QgdWwgbGknKTsKCiAgICAgICAgICAgICAgICBzb3VuZExpc3RsaS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICBsZXQgY2hlY2tib3hlZCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignaW5wdXQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoY2hlY2tib3hlZCl7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLnRleHQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgICAgIHRpdGxlLnN0eWxlID0gIndpZHRoOjM2MHB4IjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHNyYyA9IHRpdGxlLnF1ZXJ5U2VsZWN0b3IoJ2EnKS5nZXRBdHRyaWJ1dGUoJ2hyZWYnKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0RG9tID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuaWNvbi13cmFwcGVyJyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dERvbSA9IGZpcnN0RG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgaW5wdXREb20uc3R5bGU9ICdtaW4td2lkdGg6IDBweDsnOwoKICAgICAgICAgICAgICAgICAgICBpbnB1dERvbS5pbm5lckhUTUwgPSAiPGlucHV0IHR5cGU9J2NoZWNrYm94JyBuYW1lPSd6aG1DaGVja2JveCcgdmFsdWU9IitzcmMrIiAgY2xhc3M9J3pobUNoZWNrYm94Jz4iOwoKICAgICAgICAgICAgICAgICAgICBmaXJzdERvbS5iZWZvcmUoaW5wdXREb20pOwoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBjbGFzcyBaaENsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewoKICAgICAgICAgICAgY29uc3RydWN0b3IoKXsKICAgICAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2hvd1NwZWNpYWxDb2x1bW4oKXsKCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vJyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBjYXJkUmVjb21tZW5kID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkZlZWQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoY2FyZFJlY29tbWVuZC5sZW5ndGggPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgY2FyZFJlY29tbWVuZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnNwZWNpYWxDb2x1bW4nKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRhdGFab3ApcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gZGF0YVpvcC5jYXJkLmNvbnRlbnQudHlwZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlID09ICdQb3N0Jyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5zcGFuPmEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdidXR0b24nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5jbGFzc05hbWUgPSAnc3BlY2lhbENvbHVtbiBCdXR0b24gVm90ZUJ1dHRvbiBWb3RlQnV0dG9uLS11cCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnbGluZS1oZWlnaHQ6MjBweDtwYWRkaW5nOjBweCA1cHg7bWFyZ2luLXJpZ2h0OjVweDtib3JkZXItcmFkaXVzOjJweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlubmVyVGV4dCA9ICfmlofnq6AnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9zZWFyY2gvKSl7CiAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNhcmRTZWFyY2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuU2VhcmNoUmVzdWx0LUNhcmQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKz42MDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNhcmRTZWFyY2gubGVuZ3RoID4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXJkU2VhcmNoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnNwZWNpYWxDb2x1bW4nKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkYXRhWm9wKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBkYXRhWm9wLmNhcmQuY29udGVudC50eXBlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlID09ICdQb3N0Jyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+c3Bhbj5kaXY+YScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTmFtZSA9ICdzcGVjaWFsQ29sdW1uIEJ1dHRvbiBWb3RlQnV0dG9uIFZvdGVCdXR0b24tLXVwJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnbGluZS1oZWlnaHQ6MjBweDtwYWRkaW5nOjBweCA1cHg7bWFyZ2luLXJpZ2h0OjVweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pbm5lclRleHQgPSAn5paH56ugJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLmJlZm9yZShuZXdFbGVtZW50KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfQoKCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2hvd1ZpZGVvVGl0bGUoKXsKCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vJyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBjYXJkUmVjb21tZW5kID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkZlZWQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoY2FyZFJlY29tbWVuZC5sZW5ndGggPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgY2FyZFJlY29tbWVuZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUnKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRhdGFab3ApcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNWaWRlbyA9IGRhdGFab3AuY2FyZC5oYXNfdmlkZW87CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzVmlkZW8gPT0gdHJ1ZSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPmRpdj5hJykpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+ZGl2PmEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+YScpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+YScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuY2xhc3NOYW1lID0gJ3ZpZGVvVGl0bGUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LnN0eWxlID0gJ2JhY2tncm91bmQ6IHJnYmEoMjU1LCAxMzEsIDg2LCAwLjEyKTtjb2xvcjogcmdiKDI1NSwgNzMsIDEyKTtsaW5lLWhlaWdodDoyMHB4O3BhZGRpbmc6MXB4IDZweDttYXJnaW4tcmlnaHQ6NXB4O2JvcmRlci1yYWRpdXM6MnB4O2ZvbnQtc2l6ZToxNHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuaW5uZXJUZXh0ID0gJ+inhumikSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLmJlZm9yZShuZXdFbGVtZW50KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwcz86XC9cL3d3dy56aGlodS5jb21cL3NlYXJjaC8pKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNhcmRTZWFyY2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuU2VhcmNoUmVzdWx0LUNhcmQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKz42MDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNhcmRTZWFyY2gubGVuZ3RoID4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXJkU2VhcmNoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUnKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkYXRhWm9wKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBkYXRhWm9wLmNhcmQuY29udGVudC50eXBlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlID09ICdadmlkZW8nICl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+c3Bhbj5kaXY+YScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTmFtZSA9ICd2aWRlb1RpdGxlJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuc3R5bGUgPSAnYmFja2dyb3VuZDogcmdiYSgyNTUsIDEzMSwgODYsIDAuMTIpO2NvbG9yOiByZ2IoMjU1LCA3MywgMTIpO2xpbmUtaGVpZ2h0OjIwcHg7cGFkZGluZzoxcHggNnB4O21hcmdpbi1yaWdodDo1cHg7Ym9yZGVyLXJhZGl1czoycHg7Zm9udC1zaXplOjE0cHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuaW5uZXJUZXh0ID0gJ+inhumikSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVWaWRlbygpewoKICAgICAgICAgICAgICAgIGxldCBjYXJkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkZlZWQnKTsKCiAgICAgICAgICAgICAgICBjYXJkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZShpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CgogICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IGRhdGFab3AuY2FyZC5jb250ZW50LnZpZGVvX2lkOwoKICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnBhcmVudE5vZGUuc3R5bGU9J2Rpc3BsYXk6bm9uZTsnOwoKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVBRCgpewoKICAgICAgICAgICAgICAgIGxldCB6aEhpZGVBRCA9IGAuUGMtY2FyZCwuUGMtd29yZHtkaXNwbGF5Om5vbmUgIWltcG9ydGFudDt9LlRvcHN0b3J5SXRlbS0tYWR2ZXJ0Q2FyZHtkaXNwbGF5Om5vbmUgIWltcG9ydGFudH1gOwoKICAgICAgICAgICAgICAgIGRvbVN0eWxlIC5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSh6aEhpZGVBRCkpOwoKICAgICAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwoKICAgICAgICAgICAgfQogICAgICAgICAgICBkb3dubG9hZFZpZGVvKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwczpcL1wvd3d3XC56aGlodVwuY29tXC96dmlkZW9cLy4rLykpewoKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuemhtRG93bmxvYWQnKSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ1dHRvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5fZTI5NnBnJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihidXR0b24ubGVuZ3RoPDIpcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkQnV0ID0gYnV0dG9uWzFdLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkb3dubG9hZEJ1dC5xdWVyeVNlbGVjdG9yKCcuXzF0ZzhvaXInKSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5xdWVyeVNlbGVjdG9yKCcuXzF0ZzhvaXInKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5zZXRBdHRyaWJ1dGUoJ2lkJywnZG93bmxvYWRWaWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uWzFdLmJlZm9yZShkb3dubG9hZEJ1dCk7CgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjZG93bmxvYWRWaWRlbycpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWRlb0lkOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5aVmlkZW8tcGxheWVyJykpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgelZpZGVvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLlpWaWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9EYXRhID0gSlNPTi5wYXJzZSh6VmlkZW8uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9JZCA9IHZpZGVvRGF0YS5jYXJkLmNvbnRlbnQudmlkZW9faWQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1VybCA9IHdpbmRvdy5sb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9PYmogPSB2aWRlb1VybC5zcGxpdCgnPycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0lkID0gdmlkZW9PYmpbMF0uc3BsaXQoJy8nKS5wb3AoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9JZCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquiOt+WPluinhumikWlkJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpoRG93bmxvYWQodmlkZW9JZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0sMjAwMCk7CgogICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ0RPTU5vZGVJbnNlcnRlZCcsKGUpID0+IHsKCiAgICAgICAgICAgICAgICAgICAgaWYoIWUucmVsYXRlZE5vZGUucXVlcnlTZWxlY3RvcikgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICB2YXIgcGxheUJhciA9IGUucmVsYXRlZE5vZGUucXVlcnlTZWxlY3RvcignOnNjb3BlID4gZGl2Omxhc3QtY2hpbGQgPiBkaXY6Zmlyc3QtY2hpbGQgPiBkaXY6bnRoLW9mLXR5cGUoMiknKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIXBsYXlCYXIgfHwgcGxheUJhci5xdWVyeVNlbGVjdG9yKCcuemhtRG93bmxvYWQnKSkgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICBpZihwbGF5QmFyLmNsYXNzTmFtZSAhPSAnY3NzLTE5OXF4N20nKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlCdXQ9IHBsYXlCYXIucGFyZW50Tm9kZS5xdWVyeVNlbGVjdG9yKCcuXzFjMWN2dWcnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5QnV0TGkgPSBwbGF5QnV0LnF1ZXJ5U2VsZWN0b3IoJzpzY29wZSA+IGRpdjpsYXN0LWNoaWxkID4gZGl2OmZpcnN0LWNoaWxkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighcGxheUJ1dExpKSByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB2YXIgZG93bmxvYWRCdXQgPSBwbGF5QnV0TGkuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRCdXQuY2xhc3NOYW1lID0gcGxheUJ1dExpLmNsYXNzTmFtZSArICcgemhtRG93bmxvYWQnOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWRvd25sb2FkQnV0LnF1ZXJ5U2VsZWN0b3IoJy5fMXRnOG9pcicpKSByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5xdWVyeVNlbGVjdG9yKCcuXzF0ZzhvaXInKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5QnV0TGkuYmVmb3JlKGRvd25sb2FkQnV0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkQnV0LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWRlb0lkOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldFZpZGVvRGF0YShkb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyZW50RG9tID0gZG9tLnBhcmVudE5vZGUKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyZW50RG9tLmNsYXNzTmFtZSAmJiBwYXJlbnREb20uY2xhc3NOYW1lPT0nRmVlZCcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocGFyZW50RG9tLmNsYXNzTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9EYXRhID0gSlNPTi5wYXJzZShwYXJlbnREb20uZ2V0QXR0cmlidXRlKCdkYXRhLXphLWV4dHJhLW1vZHVsZScpKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvSWQgPSB2aWRlb0RhdGEuY2FyZC5jb250ZW50LnZpZGVvX2lkOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldFZpZGVvRGF0YShwYXJlbnREb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0VmlkZW9EYXRhKHBsYXlCdXQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2codmlkZW9JZCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvSWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq6I635Y+W6KeG6aKRaWQnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhEb3dubG9hZCh2aWRlb0lkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0sMTAwMCk7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZnVuY3Rpb24gemhEb3dubG9hZCh2aWRlb0lkKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICdodHRwczovL2xlbnMuemhpaHUuY29tL2FwaS92NC92aWRlb3MvJyt2aWRlb0lkOwoKICAgICAgICAgICAgICAgICAgICBfdGhpcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhLnBsYXlsaXN0ICE9IHVuZGVmaW5lZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlfdXJsID0gZGF0YS5wbGF5bGlzdC5MRC5wbGF5X3VybDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9OYW1lID0gdmlkZW9JZCsiLm1wNCI7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocGxheV91cmwpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZChwbGF5X3VybCx2aWRlb05hbWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfkuIvovb3lpLHotKXvvIEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlUmlnaHQoKXsKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3d1wuemhpaHVcLmNvbVwvcGVvcGxlXC8uKi8pKXsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbGV0IHpoRnVsbFNjcmVlbiA9IGAuR2xvYmFsU2lkZUJhciB7ZGlzcGxheTogbm9uZSAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuY3NzLTFxeXl0ajd7ZGlzcGxheTogbm9uZSAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuUXVlc3Rpb24tc2lkZUNvbHVtbntkaXNwbGF5Om5vbmUgIWltcG9ydGFudH0KICAgICAgICAgICAgICAgICAgICAuVG9wc3RvcnktbWFpbkNvbHVtbnt3aWR0aDoxMDAlICFpbXBvcnRhbnR9CiAgICAgICAgICAgICAgICAgICAgLlF1ZXN0aW9uLW1haW5Db2x1bW57d2lkdGg6MTAwMHB4ICFpbXBvcnRhbnR9CiAgICAgICAgICAgICAgICAgICAgLmNzcy1jYXpnNDh7bWFyZ2luOiAwcHggMTZweCAwcHggMHB4ICFpbXBvcnRhbnQ7fQogICAgICAgICAgICAgICAgICAgIC5RdWVzdGlvbldhaXRpbmctbWFpbkNvbHVtbnt3aWR0aDoxMDAlICFpbXBvcnRhbnQ7fQogICAgICAgICAgICAgICAgICAgIC5jc3MtMWo1ZDNsbHtwYWRkaW5nLWxlZnQ6MTBweDt9CiAgICAgICAgICAgICAgICAgICAgLmNzcy15aGp3b2V7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuICFpbXBvcnRhbnQ7fQogICAgICAgICAgICAgICAgICAgIC5BdXRob3JJbmZve21heC13aWR0aDoxMDAwcHggIWltcG9ydGFudDt9OwogICAgICAgICAgICAgICAgICAgIGA7CiAgICAgICAgICAgICAgICBkb21TdHlsZSAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoemhGdWxsU2NyZWVuKSk7CgogICAgICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2hhbmdlTGluaygpewoKICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCd0YXJnZXQnKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB0aGlzLmdldFVybFBhcmFtcyhjb3Vwb25VcmwpOwoKICAgICAgICAgICAgICAgICAgICBpZihvYmoudGFyZ2V0ID09IHVuZGVmaW5lZCkgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRlY29kZVVSSUNvbXBvbmVudChvYmoudGFyZ2V0KTsKCiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1saW5rOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlbW92ZUtleXdvcmQoKXsKCiAgICAgICAgICAgICAgICB2YXIgR01LZXl3b3JkID0gR01fZ2V0VmFsdWUoJ2lucHV0WmhLZXl3b3JkJywnMCcpOwoKICAgICAgICAgICAgICAgIGlmKEdNS2V5d29yZCA9PSAnMCcgfHwgR01LZXl3b3JkID09ICcnKSByZXR1cm47CgogICAgICAgICAgICAgICAgbGV0IGtleXdvcmQgPSBHTUtleXdvcmQuc3BsaXQoJywnKTsKCiAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5Db250ZW50SXRlbScpOwoKICAgICAgICAgICAgICAgIGtleXdvcmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgY29udGVudC5mb3JFYWNoKGZ1bmN0aW9uKHZhbHVlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhWm9wID0gSlNPTi5wYXJzZSh2YWx1ZS5nZXRBdHRyaWJ1dGUoJ2RhdGEtem9wJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YVpvcCAmJiBkYXRhWm9wLnRpdGxlLmluZGV4T2YoaXRlbSkgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdGVtQ2FyZCA9IHZhbHVlLnBhcmVudE5vZGUucGFyZW50Tm9kZS5wYXJlbnROb2RlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdGVtQ2FyZENsYXNzPSBpdGVtQ2FyZC5jbGFzc05hbWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbUNhcmRDbGFzcy5pbmRleE9mKCdUb3BzdG9yeUl0ZW0taXNSZWNvbW1lbmQnKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1DYXJkLnN0eWxlPSdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlbW92ZUF1dGhvck5hbWUoKXsKCiAgICAgICAgICAgICAgICB2YXIgR01BdXRob3JOYW1lID0gR01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJywnMCcpOwoKICAgICAgICAgICAgICAgIGlmKEdNQXV0aG9yTmFtZSA9PSAnMCcgfHwgR01BdXRob3JOYW1lID09ICcnKSByZXR1cm47CgogICAgICAgICAgICAgICAgbGV0IGF1dGhvck5hbWUgPSBHTUF1dGhvck5hbWUuc3BsaXQoJywnKTsKCiAgICAgICAgICAgICAgICAvL+aQnOe0oumhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewoKICAgICAgICAgICAgICAgICAgICBsZXQgbj0wOwoKICAgICAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBsZXQgdXNlckxpbmsgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ2FyZCcpOwoKICAgICAgICAgICAgICAgICAgICBpZih1c2VyTGluay5sZW5ndGggPiA1KXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgdXNlckxpbmsuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3IgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2InKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvcil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGF1dGhvci5pbm5lclRleHQpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihuPjMwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4rKzsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9LDEwMCkKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+WbnuetlOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvcXVlc3Rpb25cLy4qLykpewoKICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbURvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5MaXN0LWl0ZW0nKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoaXRlbURvbS5sZW5ndGg+MCl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtRG9tLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5Db250ZW50SXRlbScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvbnRlbnQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoY29udGVudC5nZXRBdHRyaWJ1dGUoJ2RhdGEtem9wJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3JOYW1lLmluZGV4T2YoZGF0YVpvcC5hdXRob3JOYW1lKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/nrYnkvaDlm57nrZTpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vd3d3LnpoaWh1LmNvbS9xdWVzdGlvbi93YWl0aW5nJyl7CgogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBxdWVzdGlvbkxpc3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuanNOYXZpZ2FibGUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHF1ZXN0aW9uTGlzdC5sZW5ndGg+MCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlc3Rpb25MaXN0LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3JEb21UZXh0ID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuY3NzLXRuc2F4aCcpLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yRG9tVGV4dCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gYXV0aG9yRG9tVGV4dC5yZXBsYWNlKCciJywnJykucmVwbGFjZSgn55qE5o+Q6ZeuJywnJykucmVwbGFjZSgvKF5ccyspfChccyskKS9nLCcnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvcil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGF1dGhvcikgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlPSdkaXNwbGF5Om5vbmU7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9LDMwMCkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v5o6o6I2Q6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vJyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkNvbnRlbnRJdGVtJyk7CgogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQuZm9yRWFjaChmdW5jdGlvbih2YWx1ZSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UodmFsdWUuZ2V0QXR0cmlidXRlKCdkYXRhLXpvcCcpKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvck5hbWUuaW5kZXhPZihkYXRhWm9wLmF1dGhvck5hbWUpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbUNhcmQgPSB2YWx1ZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtQ2FyZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1DYXJkLnN0eWxlPSdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICAgICAgbGV0IHRpbWVyQ2xvc2VBdXRob3IgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBsZXQgY29tbWVudERvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5Db21tZW50cy1jb250YWluZXInKT9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuQ29tbWVudHMtY29udGFpbmVyJyk6ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmNzcy0zNHBvZHInKTsKCiAgICAgICAgICAgICAgICAgICAgLy9sZXQgY29tbWVudEJveCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5jc3MtMzRwb2RyJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGNvbW1lbnREb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbW1lbnRMaSA9IGNvbW1lbnREb20ucXVlcnlTZWxlY3RvckFsbCgnLmNzcy0xZnJuOTN4PmRpdj5kaXYnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvbW1lbnRMaVswXS5jbGFzc05hbWU9PSdjc3MtMTk0djczbScpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1lbnRMaS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29tbWVudEF1dGhvck5hbWVEb20gPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5jc3MtMXJkMGg2ZicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29tbWVudEF1dGhvck5hbWUgPSBjb21tZW50QXV0aG9yTmFtZURvbS5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvck5hbWUuaW5kZXhPZihjb21tZW50QXV0aG9yTmFtZSkgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmVtb3ZlWWFueHVhbigpewoKICAgICAgICAgICAgICAgIC8v5Zue562U6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9xdWVzdGlvblwvLiovKSl7CgogICAgICAgICAgICAgICAgICAgIGxldCBpdGVtRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkxpc3QtaXRlbScpOwoKICAgICAgICAgICAgICAgICAgICBpZihpdGVtRG9tLmxlbmd0aD4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Eb20uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tT3JkaW5hcnlMYWJlbC1jb250ZW50Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudCAmJiBjb250ZW50LmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgIknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgbGV0IGFuc3dlckNhcmQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuQW5zd2VyQ2FyZCcpOwoKICAgICAgICAgICAgICAgICAgICBpZihhbnN3ZXJDYXJkKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gYW5zd2VyQ2FyZC5xdWVyeVNlbGVjdG9yKCcuS2ZlQ29sbGVjdGlvbi1PcmRpbmFyeUxhYmVsLWNvbnRlbnQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvbnRlbnQgJiYgY29udGVudC5pbm5lclRleHQuaW5kZXhPZign55uQ6YCJJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuc3dlckNhcmQuc3R5bGUgPSAnZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy/mkJzntKLpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3dy56aGlodS5jb21cL3NlYXJjaC8pKXsKCiAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gMDsKCiAgICAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNhcmRMaXN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkNhcmQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNhcmRMaXN0Lmxlbmd0aCA+IDUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRMaXN0LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuS2ZlQ29sbGVjdGlvbi1QY0NvbGxlZ2VDYXJkLXR5cGUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAmJiB0eXBlLmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgInkuJPmoI8nKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdiJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3JZYW54dWFuID0gWyfmlYXkuovmoaPmoYjlsYAnLCAn55uQ6YCJ5o6o6I2QJywgJ+ebkOmAieenkeaZricsICfnm5DpgInmiJDplb/orqHliJInLCAn55+l5LmO55uQ6YCJ5Lya5ZGYJywgJ+efpeS5juebkOmAieWIm+S9nOiAhScsICfnm5DpgInlv4PnkIYnLCAn55uQ6YCJ5YGl5bq35b+F5L+u6K++JywgJ+ebkOmAieWlh+WmmeeJqeivrScsICfnm5DpgInnlJ/mtLvppoYnLCAn55uQ6YCJ6IGM5Zy6JywgJ+ebkOmAieaWh+WtpueUhOmAiScsICfnm5DpgInkvZzogIXlsI/nrqHlrrYnLCAn55uQ6YCJ5Y2a54mp6aaGJywgJ+ebkOmAieeCuemHkScsICfnm5DpgInmtYvor4TlrqQnLCAn55uQ6YCJ56eR5oqA5YmN5rK/JywgJ+ebkOmAieS8muWRmOeyvuWTgScsICfljoblj7Lnjq/muLjorrAnXTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yICYmIGF1dGhvcllhbnh1YW4uaW5kZXhPZihhdXRob3IuaW5uZXJUZXh0KSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobnVtPjMwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bSsrOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0sMTAwKQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvL+aOqOiNkOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewoKICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5Db250ZW50SXRlbScpOwoKICAgICAgICAgICAgICAgICAgICBjb250ZW50LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tT3JkaW5hcnlMYWJlbC1jb250ZW50Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihjb250ZW50ICYmIGNvbnRlbnQuaW5uZXJUZXh0LmluZGV4T2YoJ+ebkOmAiScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNsb3NlQXV0aG9yKCl7CiAgICAgICAgICAgICAgICAvL+mAmui/h+WumuaXtuWZqOiOt+WPlgoKICAgICAgICAgICAgICAgIGxldCB0aW1lckNsb3NlQXV0aG9yID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNsb3NlQXV0aG9yQnV0dG9uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUNsb3NlQXV0aG9yQnV0dG9uJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKHpobUNsb3NlQXV0aG9yQnV0dG9uKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvckluZm8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY3NzLTFyYXNhbXInKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9ySW5mbyl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXNlck5hbWVJbmZvID0gYXV0aG9ySW5mby5xdWVyeVNlbGVjdG9yKCcuVXNlckxpbmsnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVzZXJOYW1lSW5mbyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVzZXJMaW5rSW5mbyA9IHVzZXJOYW1lSW5mby5xdWVyeVNlbGVjdG9yKCcuVXNlckxpbmstbGluaycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3JOYW1lTGluayA9IHVzZXJMaW5rSW5mby5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IEdNQXV0aG9yTmFtZSA9IEdNX2dldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRob3JBcnJheSA9IEdNQXV0aG9yTmFtZT9HTUF1dGhvck5hbWUuc3BsaXQoJywnKTonJzsKCiAgICAgICAgICAgICAgICAg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pY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1BdXRob3JOYW1lOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihidXR0b25DbG9zZS5pbm5lckhUTUw9PSflt7LlsY/olL0nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8YXV0aG9yQXJyYXkubGVuZ3RoO2krKyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yQXJyYXlbaV0gPT0gYXV0aG9yTmFtZUxpbmspewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdXRob3JBcnJheS5zcGxpY2UoaSwxKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1BdXRob3JOYW1lID0gYXV0aG9yQXJyYXkudG9TdHJpbmcoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1BdXRob3JOYW1lPSBHTV9nZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnKT9HTV9nZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnKSsnLCcrYXV0aG9yTmFtZUxpbms6YXV0aG9yTmFtZUxpbms7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnLHpobUF1dGhvck5hbWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncmVtb3ZlQXV0aG9yTmFtZScsJzIyJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvbkNsb3NlLmlubmVySFRNTCA9IGJ1dHRvbkNsb3NlLmlubmVySFRNTCA9PSAn5bey5bGP6JS9Jz8n5bGP6JS955So5oi3Jzon5bey5bGP6JS9JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uQ2xvc2Uuc3R5bGUgPSBidXR0b25DbG9zZS5pbm5lckhUTUwgPT0gJ+W3suWxj+iUvSc/J3Bvc2l0aW9uOmFic29sdXRlO3JpZ2h0OjEwcHg7YmFja2dyb3VuZC1jb2xvcjojZmYyZTRkO2JvcmRlci1jb2xvcjojZmYyZTRkJzoncG9zaXRpb246YWJzb2x1dGU7cmlnaHQ6MTBweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGNsYXNzIFZpZGVvRG93bmxvYWRDbGFzcyBleHRlbmRzIEJhc2VDbGFzc3sKCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CgogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZHlWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcueGctdmlkZW8tY29udGFpbmVyJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2c05hdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5mdXlfd21jdDpudGgtb2YtdHlwZSg1KScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCd2c2RldGFpbCcpICE9IC0xKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfnu7zoibrmoI/nm67lhbPpl63kuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUR5VmlkZW9Eb3dubG9hZCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvUGxheURvbUFsbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ3ZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9JbmRleCA9IHZpZGVvUGxheURvbUFsbC5sZW5ndGg+MT92aWRlb1BsYXlEb21BbGwubGVuZ3RoLTI6dmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0xOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvUGxheURvbSA9IHZpZGVvUGxheURvbUFsbFt2aWRlb0luZGV4XTsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8vbGV0IHZpZGVvUGxheURvbSA9IHZpZGVvUGxheURvbUFsbC5sZW5ndGg+MT92aWRlb1BsYXlEb21BbGxbdmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0yXTp2aWRlb1BsYXlEb21BbGxbdmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0xXTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvUGxheURvbS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhnLXN3aXRjaC1jaGVja2VkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGZhbHNlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5mbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5Qejh0Mm1lUCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWxlbmFtZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpbmZvLmxlbmd0aD4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFjY291bnQgPSBpbmZvW3ZpZGVvSW5kZXhdLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sZXQgdGl0bGVBcnIgPSBpbmZvW3ZpZGVvSW5kZXgqMisxXS5pbm5lclRleHQuc3BsaXQoJyMnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZ0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnhoRG9wY1FfJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHZ0W3ZpZGVvSW5kZXhdLmlubmVyVGV4dC5zcGxpdCgnIycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlbmFtZSA9IHRpdGxlWzBdP3RpdGxlWzBdK2FjY291bnQ6dGl0bGVbMV0rYWNjb3VudCsnLm1wNCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCkrJy5tcDQnCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZCh2aWRlb1BsYXlEb20uY2hpbGRyZW5bMF0uc3JjLGZpbGVuYW1lKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflt7LlpI3liLbliLDliarotLTmnb8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodmlkZW9QbGF5RG9tLmNoaWxkcmVuWzBdLnNyYyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9QbGF5RG9tLmNoaWxkcmVuWzBdLnNyYyk7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKCiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoIndoZWVsIixnZXRDb250cm9scyk7CgogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGUuY29kZT09J0Fycm93RG93bicgfHwgZS5jb2RlPT0nQXJyb3dVcCcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gaW5zZXJ0ZWREb20oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCd2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0RvbS5hZGRFdmVudExpc3RlbmVyKCdET01Ob2RlSW5zZXJ0ZWQnLChlKSA9PiB7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0ZWREb20oKTsKCiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxnZXRDb250cm9scyk7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNyZWF0ZUR5VmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgICAgIGxldCBjb250cm9sQWxsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnhnLXJpZ2h0LWdyaWQnKTsKCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBjb250cm9sQWxsLmxlbmd0aD4xP2NvbnRyb2xBbGxbY29udHJvbEFsbC5sZW5ndGgtMl06Y29udHJvbEFsbFtjb250cm9sQWxsLmxlbmd0aC0xXTsKCiAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb3dubG9hZERvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Eb3V5aW5Eb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgIGlmKHZpZGVvRG93bmxvYWREb20pewoKICAgICAgICAgICAgICAgICAgICB2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUpOwoKICAgICAgICAgICAgICAgICAgICAvL3ZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodmlkZW9Eb3dubG9hZERvbS5wYXJlbnROb2RlLnBhcmVudE5vZGUpCiAgICAgICAgICAgICAg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ogICAgICAgICAgICAgICAgICAgIGxpbmtVcmw9Jy8vd3d3LmRvdXlpbi5jb20nK2xpbmtVcmw7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnZGF0YS11cmwnLGxpbmtVcmwpOwoKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5yZW1vdmVBdHRyaWJ1dGUoJ3RhcmdldCcpOwoKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5zZXRBdHRyaWJ1dGUoJ2hyZWYnLCdqYXZhc2NyaXB0OnZvaWQoMCk7Jyk7CgogICAgICAgICAgICAgICAgZG93bmxvYWREb20ub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uY2xhc3NOYW1lPSd4Z3BsYXllci1wbGF5YmFjay1zZXR0aW5nIHNsaWRlLXNob3cnOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5vbm1vdXNlb3V0PWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLmNsYXNzTmFtZT0neGdwbGF5ZXItcGxheWJhY2stc2V0dGluZyc7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkSHRtbCA9ICcnOwoKICAgICAgICAgICAgICAgIGRvd25sb2FkT3B0aW9uLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkSHRtbCArPSBgPGRpdiBjbGFzcz0ieGdwbGF5ZXItcGxheXJhdGlvLWl0ZW0gJHtpdGVtLmlkfSIgaWQ9IiR7aXRlbS5pZH0iPiR7aXRlbS5uYW1lfTwvZGl2PmA7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5xdWVyeVNlbGVjdG9yKCcueGdwbGF5ZXItcGxheXJhdGlvLXdyYXAnKS5pbm5lckhUTUwgPSBkb3dubG9hZEh0bWw7CgogICAgICAgICAgICAgICAgZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignLnhncGxheWVyLXNsaWRlcicpLnN0eWxlPSd3aWR0aDo2MHB4IGltcG9ydGFudDsnOwoKICAgICAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1hdXRvcGxheS1zZXR0aW5nJyk7CgogICAgICAgICAgICAgICAgYXV0b1BsYXkuYWZ0ZXIoZG93bmxvYWREb20pOwoKICAgICAgICAgICAgICAgIGxldCBkaXZEb20gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKCiAgICAgICAgICAgICAgICBkaXZEb20uc3R5bGU9InBvc2l0aW9uOiBhYnNvbHV0ZTt6LWluZGV4Oi05OTk7aGVpZ2h0OjgwcHg7d2lkdGg6NDBweDttYXJnaW4tdG9wOi04MHB4OyIKCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5hcHBlbmRDaGlsZChkaXZEb20pOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAga3NWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcucGxheWVyLXZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlb0RvbS5nZXRBdHRyaWJ1dGUoJ3NyYycpLm1hdGNoKC9eYmxvYi8pKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdibG9i6KeG6aKR5peg5rOV5LiL6L29Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVLc1ZpZGVvRG93bmxvYWQodmlkZW9Eb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb20uYWRkRXZlbnRMaXN0ZW5lcigncGxheWluZycsZnVuY3Rpb24oKXsgLy/mkq3mlL7kuK0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7kuK0iKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0RvbS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF1dG8td2FycHBlcicpLmdldEF0dHJpYnV0ZSgnYXV0b3BsYXknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRvUGxheSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ato+WcqOS4i+i9veivt+eojeS+rycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VGltZVRvdGFsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRvdGFsJykuaW5uZXJUZXh0OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZWNvbmQgPSBwbGF5VGltZVRvdGFsLm1hdGNoKC8oLispOiguKykvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2Vjb25kVG90YWwgPSBzZWNvbmRbMV0qNjArcGFyc2VJbnQoc2Vjb25kWzJdKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVVybCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0Rvd25sb2FkJykuZ2V0QXR0cmlidXRlKCdkYXRhLXVybCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhY2NvdW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnByb2ZpbGUtdXNlci1uYW1lLXRpdGxlJyk/ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnByb2ZpbGUtdXNlci1uYW1lLXRpdGxlJykuaW5uZXJUZXh0OmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5mZWVkLWF1dGhvcicpLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8taW5mby10aXRsZScpP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1pbmZvLXRpdGxlJykuaW5uZXJUZXh0Om5ldyBEYXRlKCkuZ2V0VGltZSgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0ZpbGVOYW1lID0gKGFjY291bnQgJiYgdGl0bGUpP2FjY291bnQrJy0nK3RpdGxlKycubXA0JzpuZXcgRGF0ZSgpLmdldFRpbWUoKSsnLm1wNCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLkxSX2Rvd25sb2FkKGRhdGFVcmwsdmlkZW9GaWxlTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvQ29weScpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5bey5aSN5Yi25Yiw5Ymq6LS05p2/Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJykpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvTGluaycpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CgogICAgICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigid2hlZWwiLGdldENvbnRyb2xzKTsKCiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZS5jb2RlPT0nQXJyb3dEb3duJyB8fCBlLmNvZGU9PSdBcnJvd1VwJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9KQoKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNyZWF0ZUtzVmlkZW9Eb3dubG9hZCh2aWRlb0RvbSl7CgogICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gL15odHRwcz86XC9cL3d3d1wua3VhaXNob3VcLmNvbVwvKC4rKS87CgogICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKG1hdGNoKTsKCiAgICAgICAgICAgICAgICBpZighcmVzcCB8fCAocmVzcFsxXS5pbmRleE9mKCdzaG9ydC12aWRlbycpID09IC0xICYmIHJlc3BbMV0uaW5kZXhPZigndmlkZW8nKSA9PS0xICYmIHJlc3BbMV0uaW5kZXhPZignbmV3LXJlY28nKSA9PSAtMSkpewoKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5b2T5YmN5LiN5piv6KeG6aKR5pKt5pS+6aG1Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmKHJlc3BbMV0uaW5kZXhPZignc2hvcnQtdmlkZW8nKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJBcmVhID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWNvbnRhaW5lci1wbGF5ZXInKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXllckFyZWFXaWR0aCA9IHBsYXllckFyZWEuc3R5bGUud2lkdGgubWF0Y2goLyguKylweC8pOwoKICAgICAgICAgICAgICAgICAgICBsZXQgcGxheWVyQmFyUHJvZ3Jlc3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheWVyLWJhci1wcm9ncmVzcycpOwoKICAgICAgICAgICAgICAgICAgICBwbGF5ZXJCYXJQcm9ncmVzcy5zdHlsZS53aWR0aCA9IHBsYXllckFyZWFXaWR0aFsxXS0zMDArJ3B4JzsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVUb3RhbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy50b3RhbCcpOwoKICAgICAgICAgICAgICAgICAgICB0aW1lVG90YWwuc3R5bGUucmlnaHQ9JzE2MHB4JzsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucmlnaHQnKTsKCiAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb3dubG9hZERvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0Rvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgaWYodmlkZW9Eb3dubG9hZERvbSl7CgogICAgICAgICAgICAgICAgICAgIHZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBsZXQgZGV0YWlsRG9tID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDEpJyk7CgogICAgICAgICAgICAgICAgbGV0IHhnSWNvbiA9IGRldGFpbERvbS5jbG9uZU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1cnNvcjpwb2ludGVyOyc+5LiL6L29PC9kaXY+IjsKCiAgICAgICAgICAgICAgICBkZXRhaWxEb20uYmVmb3JlKHhnSWNvbik7CgogICAgICAgICAgICAgICAgLy/ph43mnoTmkq3mlL7mk43kvZzmjInpkq4KCiAgICAgICAgICAgICAgICBsZXQgemhtS3NCdXR0b24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtS3NCdXR0b24nKTsKCiAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKHpobUtzQnV0dG9uKTsKCiAgICAgICAgICAgICAgICBpZih6aG1Lc0J1dHRvbil7CgogICAgICAgICAgICAgICAgICAgIC8vemhtS3NCdXR0b24ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh6aG1Lc0J1dHRvbik7CgogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBsZXQgYnV0dG9uSWNvbiA9IGRldGFpbERvbS5jbG9uZU5vZGUodHJ1ZSk7CiAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGJ1dHRvbkljb24pOwogICAgICAgICAgICAgICAgYnV0dG9uSWNvbi5zZXRBdHRyaWJ1dGUoJ2lkJywnemhtS3NCdXR0b24nKTsKCiAgICAgICAgICAgICAgICBsZXQgYnV0dG9uSWNvbkltZyA9IGJ1dHRvbkljb24ucXVlcnlTZWxlY3RvcignLnVubXV0ZWQtaWNvbicpOwoKICAgICAgICAgICAgICAgIGlmKGJ1dHRvbkljb25JbWcpewogICAgICAgICAgICAgICAgICAgIGJ1dHRvbkljb25JbWcuc3R5bGUgPSAnYmFja2dyb3VuZDogdXJsKGh0dHBzOi8vczItMTA2MjMua3dpbWdzLmNvbS91ZGF0YS9wa2cvY2xvdWRjZG4vaW1nL3BsYXllci1zZXR0aW5nLmFkMWY1Y2U4LnN2Zykgbm8tcmVwZWF0JzsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBkZXRhaWxEb20uYWZ0ZXIoYnV0dG9uSWNvbik7CgogICAgICAgICAgICAgICAgbGV0IHBsU2xpZGVyID0gYnV0dG9uSWNvbi5xdWVyeVNlbGVjdG9yKCcucGwtc2xpZGVyJyk7CgogICAgICAgICAgICAgICAgcGxTbGlkZXIuc3R5bGU9J3dpZHRoOmF1dG87cGFkZGluZzoxMHB4IDEwcHggMjVweCAxMHB4Oyc7CgogICAgICAgICAgICAgICAgcGxTbGlkZXIuaW5uZXJIVE1MID0gIiI7CgogICAgICAgICAgICAgICAgbGV0IGJ1dHRvbkZvdXIgPSBjb250cm9scy5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoNCknKTsKCiAgICAgICAgICAgICAgICBidXR0b25Gb3VyLnN0eWxlLm1hcmdpbj0nMHB4JzsKCiAgICAgICAgICAgICAgICBsZXQgYXV0b1BsYXkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheS1zZXR0aW5nLWNvbnRhaW5lcicpOwoKICAgICAgICAgICAgICAgIGlmKGF1dG9QbGF5KXsKICAgICAgICAgICAgICAgICAgICBhdXRvUGxheS5zdHlsZS5tYXJnaW49JzBweCA0MHB4IDBweCAwcHgnOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGxldCBidXR0b25GaXZlID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDUpJyk7CgogICAgICAgICAgICAgICAgaWYoYnV0dG9uRml2ZSl7CgogICAgICAgICAgICAgICAgICAgIGJ1dHRvbkZpdmUuc3R5bGUubWFyZ2luPScxNXB4IDBweCc7CgogICAgICAgICAgICAgICAgICAgIGJ1dHRvbkZpdmUub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG9vbFRpcCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5rd2FpLXBsYXllci1yb3RhdGUtdG9vbHRpcCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRvb2xUaXApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b29sVGlwLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodG9vbFRpcCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgoKICAgICAgICAgICAgICAgICAgICAgICAgfSwzMCkKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBwbFNsaWRlci5hcHBlbmRDaGlsZChidXR0b25GaXZlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxldCBidXR0b25TaXggPSBjb250cm9scy5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoNiknKTsKCiAgICAgICAgICAgICAgICBpZihidXR0b25TaXgpewoKICAgICAgICAgICAgICAgICAgICBidXR0b25TaXguc3R5bGUubWFyZ2luPScxNXB4IDBweCc7CgogICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLWZ1bGxzY3JlZW4tdG9vbHRpcCcpOwoKICAgICAgICAgICAgICAgICAgICBidXR0b25TaXgub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG9vbFRpcCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5rd2FpLXBsYXllci1mdWxsc2NyZWVuLXRvb2x0aXAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0b29sVGlwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9vbFRpcC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRvb2xUaXApOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0sMzApCgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgcGxTbGlkZXIuYXBwZW5kQ2hpbGQoYnV0dG9uU2l4KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHBsU2xpZGVyLmFwcGVuZENoaWxkKGJ1dHRvbkZvdXIpOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCd2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlWGlndWFWaWRlb0Rvd25sb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICBHTV94bWxodHRwUmVxdWVzdCh7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAiZ2V0IiwKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdodHRwOi8vNDcuOTkuMTU4LjExOC92aWRlby1jcmFjay92Mi9wYXJzZT9jb250ZW50PScrZW5jb2RlVVJJQ29tcG9uZW50KGxvY2F0aW9uLmhyZWYpLAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6ICcnLAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHsnQWNjZXB0JzogJ3RleHQvcGxhaW4sIHRleHQvaHRtbCxhcHBsaWNhdGlvbi9qc29uJ30sCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgb25sb2FkOiBmdW5jdGlvbihyZXMpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXMuc3RhdHVzPT0yMDApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBKU09OLnBhcnNlKHJlcy5yZXNwb25zZVRleHQpCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9TcmMgPSAnJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlc3AuY29kZSA9PSAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvU3JjID0gcmVzcC5kYXRhLnVybDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Eb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9TcmMpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1RpdGxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUgaDEnKS5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0F1dGhvciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdXRob3JfX3VzZXJOYW1lJykudGl0bGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5q2j5Zyo5LiL6L296K+356iN5L6vJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZCh2aWRlb1NyYyx2aWRlb1RpdGxlKydAJyt2aWRlb0F1dGhvcisnLm1wNCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0NvcHknKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvU3JjKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5LiN6IO95aSN5Yi25Zyw5Z2AJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W3suWkjeWItuWIsOWJqui0tOadvycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodmlkZW9TcmMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeS4jeiDveebtOaOpeaJk+W8gCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9TcmMpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uY2xhc3NOYW1lID09ICd4Z3BsYXllci1jb250cm9sLWl0ZW0gY29udHJvbF9wbGF5bmV4dCBjb21tb24tY29udHJvbC1pdGVtJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvYmpMaW5rID0ge307CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5ocmVmKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLmhyZWYgPSBpdGVtLmhyZWY/aXRlbS5ocmVmOicnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsudGFyZ2V0ID0gaXRlbS50YXJnZXQ/aXRlbS50YXJnZXQ6Jyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG9iakxpbmsuaHJlZiAmJiBvYmpMaW5rLnRhcmdldCAhPSAnX2JsYW5rJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gb2JqTGluay5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmVycm9yIDogZnVuY3Rpb24oZXJyKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnZXJyb3InKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycikKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd2aWRlbycpLmFkZEV2ZW50TGlzdGVuZXIoJ2VuZGVkJyxmdW5jdGlvbigpeyAvL+e7k+adnwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7nu5PmnZ8iKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLnJlbG9hZCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sNTUwMCk7CgogICAgICAgICAgICAgICAgICAgICAgICB9LCBmYWxzZSk7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNyZWF0ZVhpZ3VhVmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgICAgIGxldCByaWdodEdyaWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueGctcmlnaHQtZ3JpZCcpOwoKICAgICAgICAgICAgICAgIGxldCBwbGF5Q29udHJvbCA9IHJpZ2h0R3JpZC5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoMiknKTsKCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHBsYXlDb250cm9sLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICBsZXQgZW50cnk9IGNvbnRyb2wucXVlcnlTZWxlY3RvcignLnhncGxheWVyLWNvbnRyb2wtaXRlbV9fZW50cnknKTsKCiAgICAgICAgICAgICAgICBlbnRyeS5pbm5lckhUTUwgPSAnPGRpdiBjbGFzcz0ieGdwY1BsYXllcl90ZXh0RW50cnkiPjxzcGFuPuS4i+i9vTwvc3Bhbj48L2Rpdj4nOwoKICAgICAgICAgICAgICAgIGxldCBwb3BvdmVyID0gY29udHJvbC5xdWVyeVNlbGVjdG9yKCcueGdwbGF5ZXItY29udHJvbC1pdGVtX19wb3BvdmVyJyk7CgogICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkTGlzdCA9ICc8dWw+JzsKCiAgICAgICAgICAgICAgICBkb3dubG9hZE9wdGlvbi5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICBkb3dubG9hZExpc3QgKz0gYDxsaSB0YWJpbmRleD0iMCIgcm9sZT0ibWVudWl0ZW1yYWRpbyIgYXJpYS1jaGVja2VkPSJmYWxzZSIgaWQ9IiR7aXRlbS5pZH0iPiR7aXRlbS5uYW1lfTwvbGk+YDsKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIGRvd25sb2FkTGlzdCArPSAnPC91bD4nOwoKICAgICAgICAgICAgICAgIHBvcG92ZXIuaW5uZXJIVE1MID0gZG93bmxvYWRMaXN0OwoKICAgICAgICAgICAgICAgIHBsYXlDb250cm9sLmJlZm9yZShjb250cm9sKTsKCiAgICAgICAgICAgICAgICBsZXQgZGl2RG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CgogICAgICAgICAgICAgICAgZGl2RG9tLnN0eWxlPSJ3aWR0aDogODBweDsgaGVpZ2h0OiAxNDBweDtwb3NpdGlvbjphYnNvbHV0ZTtib3R0b206NDBweDtsZWZ0OjIwcHg7ei1pbmRleDotMSI7CgogICAgICAgICAgICAgICAgY29udHJvbC5hcHBlbmRDaGlsZChkaXZEb20pOwoKICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgcG9wb3Zlci5zdHlsZS5kaXNwbGF5PSdibG9jayc7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW91dD1mdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBwb3BvdmVyLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICB9CgogICAgICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2xvYWQnLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJpZ2h0Q29udHJvbCA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuc3F1aXJ0bGUtY29udHJvbGxlci13cmFwLXJpZ2h0Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXJpZ2h0Q29udHJvbCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5iaWxpYmlsaS1wbGF5ZXItdmlkZW8tYnRuLXF1YWxpdHknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbU90aGVyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRvbU90aGVyKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWRPdGhlcigpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrPjMwKWNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAvL190aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGltZXJaaG1JY29uID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBbe25hbWU6J3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonYndwX3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonLmJpbGliaWxpLXBsYXllci12aWRlbycsdHlwZTonY2xhc3MnfV07CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpID0gMDtpPHZpZGVvRG9tLmxlbmd0aDtpKyspewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW8gPSB2aWRlb0RvbVtpXS50eXBlID09ICdkb20nP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IodmlkZW9Eb21baV0ubmFtZSk6ZG9jdW1lbnQucXVlcnlTZWxlY3Rvcih2aWRlb0RvbVtpXS5uYW1lKS5maXJzdENoaWxkOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyWmhtSWNvbik7IC8v5Y+W5raI5a6a5pe25ZmoCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5hZGRFdmVudExpc3RlbmVyKCdwbGF5JyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7lvIDlp4siKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVCaWxpVmlkZW9Eb3dubG9hZCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLmFkZEV2ZW50TGlzdGVuZXIoJ2VuZGVkJyxmdW5jdGlvbigpeyAvL+e7k+adnwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJpbGlEb3dubG9hZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coYmlsaURvd25sb2FkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmlsaURvd25sb2FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoYmlsaURvd25sb2FkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICB9CgogICAgICAgICAgICBjcmVhdGVCaWxpVmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoZG93bmxvYWRJY29uKXsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4i+i9veaMiemSruW3suWtmOWcqCcpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBxdWFsaXR5ID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5zcXVpcnRsZS1xdWFsaXR5LXdyYXAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFxdWFsaXR5KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHF1YWxpdHkuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zZXRBdHRyaWJ1dGUoJ2lkJywnYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBxdWFsaXR5LmJlZm9yZShjb250cm9sKTsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRvSWNvbkRvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuYmlsaWJpbGktcGxheWVyLXZpZGVvLWJ0bi1xdWFsaXR5Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighYXV0b0ljb25Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IGF1dG9JY29uRG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc3R5bGU9J21hcmdpbi1yaWdodDoyMHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5idWktc2VsZWN0LXJlc3VsdCcpLmlubmVyVGV4dD0n5LiL6L29JzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucXVlcnlTZWxlY3RvcignLmJ1aS1zZWxlY3QtcmVzdWx0Jykuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0ljb25Eb20uYmVmb3JlKGNvbnRyb2wpOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCflvZPliY3pobXpnaLkuI3mmK/op4bpopHmiJbnlarliacnKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGlEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ2aWQgPSAnJyxhdmlkPScnOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYXYtbGluaycpLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZigndmlkZW8nKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKVw/Lyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyYW1zWzFdLmluZGV4T2YoJ2F2JykgIT0tMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2aWQgPSBwYXJhbXNbMV0ucmVwbGFjZSgnYXYnLCcnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IHBhcmFtc1sxXS5zdWJzdHJpbmcocGFyYW1zWzFdLmxlbmd0aC0xKT09Jy8nP3BhcmFtc1sxXS5zdWJzdHJpbmcoMCxwYXJhbXNbMV0ubGVuZ3RoLTEpOnBhcmFtc1sxXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5b2T5YmN6aG16Z2i5peg5rOV5LiL6L29Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZighYnZpZCAmJiAhYXZpZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquiOt+WPlmJ2aWTmiJZhdmlkJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9idmlkPSIrYnZpZCsiJmFpZD0iK2F2aWQ7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJpID0gX3RoaXMucmVxdWVzdCgnZ2V0Jyx1cmwpLnRoZW4oKHJlc3VsdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPCAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeS/oeaBr+aOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mAiembhmNpZAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYWdlSWQgPSBfdGhpcy5nZXRRdWVyeVN0cmluZygncCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaWQgPSAnJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYWdlSWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSByZXNwLmRhdGEucGFnZXNbcGFnZUlkLTFdLmNpZDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLmNpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjaWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3BsYXllci9wbGF5dXJsP2F2aWQ9JytyZXNwLmRhdGEuYWlkKycmY2lkPScrY2lkKycmcW49MTEyJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gX3RoaXMucmVxdWVzdCgnZ2V0JyxsaW5rKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhLmNvZGUgPCAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeWcsOWdgOaOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZFVybCA9IGRhdGEuZGF0YS5kdXJsWzBdLnVybDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9HTV9kb3dubG9hZChkb3dubG9hZFVybCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGRvd25sb2FkVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgICAgICB9CgogICAgICAgICAgICBjcmVhdGVCaWxpVmlkZW9Eb3dubG9hZE90aGVyKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewoKICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRJY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGlEb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgICAgICBpZihkb3dubG9hZEljb24pewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5LiL6L295oyJ6ZKu5bey5a2Y5ZyoJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHF1YWxpdHkgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnNxdWlydGxlLXF1YWxpdHktd3JhcCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXF1YWxpdHkpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gcXVhbGl0eS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5zcXVpcnRsZS12aWRlby1xdWFsaXR5LXRleHQnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5zcXVpcnRsZS12aWRlby1xdWFsaXR5LXRleHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnNldEF0dHJpYnV0ZSgnaWQnLCdiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHF1YWxpdHkuYmVmb3JlKGNvbnRyb2wpOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ3ZpZGVvJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9JY29uRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWF1dG9JY29uRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBhdXRvSWNvbkRvbS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnN0eWxlPSdtYXJnaW4tcmlnaHQ6MjBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktcmVzdWx0JykuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktbWVudScpLnNldEF0dHJpYnV0ZSgnaWQnLCdiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtZW51SXRlbXMgPSBjb250cm9sLnF1ZXJ5U2VsZWN0b3JBbGwoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1tZW51LWl0ZW0nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIG1lbnVJdGVtcy5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhVmFsdWUgPSBpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS1WYWx1ZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFWYWx1ZSAhPSAxNiAmJiBkYXRhVmFsdWUgIT0gODApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGF1dG9JY29uRG9tLmJlZm9yZShjb250cm9sKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW92ZXI9KCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1tZW51Jykuc3R5bGUuZGlzcGxheT0nYmxvY2snOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5vbm1vdXNlb3V0PSgpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1tZW51Jykuc3R5bGUuZGlzcGxheT0nbm9uZSc7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemhtemdouS4jeaYr+inhumikeaIlueVquWJpycpO3JldHVybjsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJpbGlEYXRhVmFsdWUgPSBlLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKT9lLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKTonJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFiaWxpRGF0YVZhbHVlKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBidmlkID0gJycsYXZpZD0nJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF2LWxpbmsnKS5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ3ZpZGVvJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dVcmwgPSBsb2NhdGlvbi5ocmVmLnNwbGl0KCc/Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IG5vd1VybFswXS5tYXRjaCgvaHR0cHM6XC9cL3d3dy5iaWxpYmlsaS5jb21cL3ZpZGVvXC8oLispLyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyYW1zWzFdLmluZGV4T2YoJ2F2JykgIT0tMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2aWQgPSBwYXJhbXNbMV0ucmVwbGFjZSgnYXYnLCcnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IHBhcmFtc1sxXS5zdWJzdHJpbmcocGFyYW1zWzFdLmxlbmd0aC0xKT09Jy8nP3BhcmFtc1sxXS5zdWJzdHJpbmcoMCxwYXJhbXNbMV0ubGVuZ3RoLTEpOnBhcmFtc1sxXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5b2T5YmN6aG16Z2i5peg5rOV5LiL6L29Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZighYnZpZCAmJiAhYXZpZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquiOt+WPlmJ2aWTmiJZhdmlkJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9idmlkPSIrYnZpZCsiJmFpZD0iK2F2aWQ7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJpID0gX3RoaXMucmVxdWVzdCgnZ2V0Jyx1cmwpLnRoZW4oKHJlc3VsdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPCAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeS/oeaBr+aOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mAiembhmNpZAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYWdlSWQgPSBfdGhpcy5nZXRRdWVyeVN0cmluZygncCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaWQgPSAnJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYWdlSWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSByZXNwLmRhdGEucGFnZXNbcGFnZUlkLTFdLmNpZDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLmNpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGxheXVybD9hdmlkPScrcmVzcC5kYXRhLmFpZCsnJmNpZD0nK2NpZCsnJnFuPScrYmlsaURhdGFWYWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gX3RoaXMucmVxdWVzdCgnZ2V0JyxsaW5rLCcnLHRydWUpLnRoZW4oKHJlc3VsdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuY29kZSA8IDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR5Zyw5Z2A5o6l5Y+j6L+U5Zue5pWw5o2u6ZSZ6K+vJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkVXJsID0gZGF0YS5kYXRhLmR1cmxbMF0udXJsOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL0dNX2Rvd25sb2FkKGRvd25sb2FkVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oZG93bmxvYWRVcmwpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHlvdXR1YmVWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gbG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3XC55b3V0dWJlXC5jb21cLyh3YXRjaFw/dj0uK3xzaG9ydHNcLy4rKS8pOwoKICAgICAgICAgICAgICAgICAgICBpZih1cmwpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdXR1YmVJY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobWxvZ28nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHlvdXR1YmVJY29uKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlvdXR1YmVJY29uLnN0eWxlLm9wYWNpdHk9MTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnpobUxvZ28oKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5V3JhcEh0bWwgPSAiPGRpdiBjbGFzcz0nemhtX3BsYXlfdmlkZW9fbGluZSc+IjsKCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8dWwgY2xhc3M9J3pobV9wbGF5X3ZpZGVfbGluZV91bCc+IjsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZSA9IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot68xJyx1cmw6J2h0dHBzOi8vemguc2F2ZWZyb20ubmV0LzE3Ni8jdXJsPSd9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAge25hbWU6J+S4i+i9vee6v+i3rzInLHVybDonaHR0cHM6Ly9teWRvd25kb3duLmNvbS95MiMnfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot68zJyx1cmw6J2h0dHBzOi8vd3d3Lnl0ZG93bmZrLmNvbS9zZWFyY2g/dXJsPSd9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAge25hbWU6J+S4i+i9vee6v+i3rzQnLHVybDonaHR0cHM6Ly95b3V0LmNvbS92aWRlby8/dXJsPSd9CiAgICAgICAgICAgICAgICAgICAgICAgIF07CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPWA8bGkgY2xhc3M9J3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScgdXJsPScke2l0ZW0udXJsfScgPiR7aXRlbS5uYW1lfTwvbGk+YDsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz0iPC91bD48L2Rpdj4iOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtbG9nbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlMaW5lRG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZURvbS5jbGFzc05hbWUgPSAncGxheUxpbmVEaXYgemhtX3BsYXlfdmlkZW9fd3JhcCc7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZURvbS5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVEb20uaW5uZXJIVE1MID0gcGxheVdyYXBIdG1sOwoKICAgICAgICAgICAgICAgICAgICAgICAgemhtUGxheS5hcHBlbmRDaGlsZChwbGF5TGluZURvbSk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUxpbmVUZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5wbGF5TGluZVRkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oaXRlbS5nZXRBdHRyaWJ1dGUoJ3VybCcpK2xvY2F0aW9uLmhyZWYpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlCdXR0b24nKS5vbm1vdXNlb3Zlcj0oKT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW91dD0oKT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuemhtTG9nb0RyYWcoJ3lvdXR1YmUnLCcnKTsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1JY29uJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1JY29uKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1JY29uLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoemhtSWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtbG9nbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1sb2dvKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3pobWxvZ28ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh6aG1sb2dvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1sb2dvLnN0eWxlLm9wYWNpdHk9MDsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfSw1MDApCgogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICB2YXIgYWxsV2ViID0gWy4uLmdldENvdXBvbiwuLi5qeFZpZGVvLC4uLmp4TXVzaWMsLi4uemhOaWNlLC4uLnRhb2JhbywuLi52aWRlb0Rvd25sb2FkLC4uLmJhaWR1XTsKCiAgICAgICAgdmFyIG5vd1dlYj1bXTsKCiAgICAgICAgYWxsV2ViLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICBpZihpdGVtLmlzT3BlbiA9PSAwKSByZXR1cm4gdHJ1ZTsKCiAgICAgICAgICAgIGl0ZW0ud2ViLmZvckVhY2goZnVuY3Rpb24odmFsKXsKCiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gbG9jYXRpb24uaHJlZi5tYXRjaCh2YWwubWF0Y2gpOwoKICAgICAgICAgICAgICAgIGlmKHJlc3VsdCl7CgogICAgICAgICAgICAgICAgICAgIG5vd1dlYi5wdXNoKHZhbCk7CgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KQoKICAgICAgICB9KQoKICAgICAgICBpZihub3dXZWIubGVuZ3RoPT0wKXsKCiAgICAgICAgICAgIGxldCBiYXNlQ2xhc3MgPSBuZXcgQmFzZUNsYXNzKCk7CgogICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5Yy56YWN6K+l572R56uZ5oiW6K+l5qih5Z2X5bey5YWz6ZetJyk7cmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgbm93V2ViLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICBzd2l0Y2goaXRlbS5mdW5jTmFtZSl7CiAgICAgICAgICAgICAgICBjYXNlICdjb3Vwb24nOgoKICAgICAgICAgICAgICAgICAgICBjb3Vwb25GdW5jKGl0ZW0pOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAncGxheVZpZGVvJzoKICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW9GdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdwbGF5TXVzaWMnOgogICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0Z1bmMoaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICd6aE5pY2UnOgogICAgICAgICAgICAgICAgICAgIHpoTmljZUZ1bmMoKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ2JhaWR1JzoKICAgICAgICAgICAgICAgICAgICB2YXIgYmFzZUNsYXNzID0gbmV3IEJhc2VDbGFzczsKICAgICAgICAgICAgICAgICAgICBiYWlkdUZ1bmMoKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ3ZpZGVvRG93bmxvYWQnOgoKICAgICAgICAgICAgICAgICAgICB2YXIgdmlkZW9Eb3dubG9hZENsYXNzID0gbmV3IFZpZGVvRG93bmxvYWRDbGFzcygpOwoKICAgICAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0gaXRlbTsKCiAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5pc1dlYk9wZW4gPT0gMCl7CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhpdGVtLm5hbWUrJ+W3suWFs+mXrScpO3JldHVybjsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0Rvd25sb2FkQ2xhc3Nbbm93TmFtZV0oKTsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGJyZWFrOwoKICAgICAgICAgICAgICAgIGNhc2UgJ3Rhb2Jhb1NlYXJjaCc6CiAgICAgICAgICAgICAgICAgICAgdGFvYmFvU2VhcmNoRnVuYyhpdGVtKQogICAgICAgICAgICAgICAgICAgICBicmVhazsKCiAgICAgICAgICAgIH0KCiAgICAgICAgfSkKCiAgICAgICAgZnVuY3Rpb24gY291cG9uRnVuYyhpdGVtKXsKCiAgICAgICAgICAgIHZhciBjb3Vwb25DbGFzcyA9IG5ldyBDb3Vwb25DbGFzcygpOwoKICAgICAgICAgICAgdmFyIHtmdW5jTmFtZSxtYXRjaDpub3dNYXRjaCxub2RlOm5vd05vZGUsbmFtZTpub3dOYW1lfSA9IGl0ZW07CgogICAgICAgICAgICB2YXIgY291cG9uU3R5bGUgPWAKICAgICAgICAgICAgICAgICAgICBodG1sewogICAgICAgICAgICAgICAgICAgIC0tcmlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAtLWxlZnQ6MTAwJTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fY291cG9uewogICAgICAgICAgICAgICAgICAgIHdpZHRoOmZpdC1jb250ZW50OwogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczpmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tYm90dG9tOjE1cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xlZnR7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpyb3c7CiAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OmZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IHJpZ2h0IHRvcCwgdHJhbnNwYXJlbnQgOHB4LCNmZmYgMCkgdG9wIGxlZnQgL3ZhcigtLXJpZ2h0KSA1MSUgbm8tcmVwZWF0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgcmlnaHQgYm90dG9tLCB0cmFuc3BhcmVudCA4cHgsICNmZmYgMCkgYm90dG9tIGxlZnQgL3ZhcigtLXJpZ2h0KSA1MSUgbm8tcmVwZWF0OwogICAgICAgICAgICAgICAgICAgIGZpbHRlcjogZHJvcC1zaGFkb3coMnB4IDJweCAzcHggIzg4OCk7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0Ojg0cHg7CiAgICAgICAgICAgICAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1faW1nX2ljb257CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzo0cHggMHB4IDBweCA1cHg7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXJpZ2h0OjVweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1faW1nX2ljb24gaW1newogICAgICAgICAgICAgICAgICAgIHdpZHRoOjQ3cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2NvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpjb2x1bW47CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXJpZ2h0OiAxOHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9tb25leXsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fYW1vdW50X21vbmV5ewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX21vbmV5X3NpZ257CiAgICAgICAgICAgICAgICAgICAgY29sb3I6I2YyMzAzMDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6IEFyaWFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9tb25leV9udW17CiAgICAgICAgICAgICAgICAgICAgY29sb3I6I2YyMzAzMDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MzZweDsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogMnB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9jb25kaXRpb257CiAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZiMGYzYTsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmNGVjOwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6NXB4OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiA1cHg7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoycHggNXB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxMnB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV90aW1lewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6IC01cHg7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoycHggNHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV90ZXJtewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmYjBmM2E7CiAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI2ZiMGYzYTsKICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOjJweDsKICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4IDRweDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTJweDsKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDE4cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2RhdGV7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1sZWZ0OjhweDsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2NpcmNsZXsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiAjZmIwZjNhIHVybChkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFnQUFBQUlDQVlBQUFERUQ3NkxBQUFBQ1hCSVdYTUFBQXNTQUFBTEVnSFMzWDc4QUFBQXpVbEVRVlFZbFMzTk1Vb0RRUmlHNFhjbXU5bEFYQlFicSsxQ0NxdWN3c2JPTzNnQVMyOWg0UW04Z1JkSU1LVmdsUVZCRmlTRmpZS0JxV1oyZC83UEl2WVBQRTZTTUNIdmNEOEh1THpCVXNJS0R5WThBTjRSVStKOS84bkg4b0xZSjN3V2NoeEJqSkh0WmtOMWZzYnA5b212aHp2NmNjRGpRSkxhdGxYWGRaSWs1YXdrS1Z6ZEtrOVc4Z0JGVVZEWE5RQTJqSlRBN0dTT21SMkxwbWtJSVdBNTQ2c3B2TzV3TDI5UXozR1NCQkNIbm53SXpPNGYwZk1hWW9LeS9BY204QTYrZnhrWDE1QU5xaW1ZOFFlbUNtOTIwcjFhVUFBQUFBQkpSVTVFcmtKZ2dnPT0pIHJlcGVhdC15OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6MTBweDsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTBweDsKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NjZweDsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgcmlnaHQ6OTdweDsKICAgICAgICAgICAgICAgICAgICB6LWluZGV4OjI7CiAgICAgICAgICAgICAgICAgICAgZmlsdGVyOm5vbmU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xpbmtfY291cG9uewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOmNlbnRlcjsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IGRyb3Atc2hhZG93KDJweCAycHggM3B4ICM4ODgpOwogICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQ6IHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgbGVmdCB0b3AsIHRyYW5zcGFyZW50IDhweCwgI2ZiMDUzYSAwKSB0b3AgcmlnaHQgL3ZhcigtLWxlZnQpIDUwJSBuby1yZXBlYXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCBsZWZ0IGJvdHRvbSwgdHJhbnNwYXJlbnQgOHB4LCAjZmIwNTNhIDApIGJvdHRvbSByaWdodCAvdmFyKC0tbGVmdCkgNTAlIG5vLXJlcGVhdDsKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDg0cHg7CiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzowcHggNnB4IDBweCA0cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2dldF9saW5rX3RleHR7CiAgICAgICAgICAgICAgICAgICAgY3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLXRvcDogMHB4OwogICAgICAgICAgICAgICAgICAgIHdyaXRpbmctbW9kZTp2ZXJ0aWNhbC1scjsKICAgICAgICAgICAgICAgICAgICBsZXR0ZXItc3BhY2luZzowcHg7CiAgICAgICAgICAgICAgICAgICAgY29sb3I6ICNmZmYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICBmb250LWZhbWlseToiTWljcm9zb2Z0IFlhSGVpIjsKICAgICAgICAgICAgICAgICAgICB0ZXh0LWRlY29yYXRpb246bm9uZTsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IGxlZnQgdG9wLCB0cmFuc3BhcmVudCA4cHgsICNmYjA1M2EgMCkgdG9wIHJpZ2h0IC92YXIoLS1sZWZ0KSA1MCUgbm8tcmVwZWF0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgbGVmdCBib3R0b20sIHRyYW5zcGFyZW50IDhweCwgI2ZiMDUzYSAwKSBib3R0b20gcmlnaHQgL3ZhcigtLWxlZnQpIDUwJSBuby1yZXBlYXQ7CgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9nZXRfbGlua190ZXh0OmhvdmVyewogICAgICAgICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOm5vbmU7CiAgICAgICAgICAgICAgICBmb250LXdlaWdodDo4MDA7CiAgICAgICAgICAgICAgICBmb250LWZhbWlseToiTWljcm9zb2Z0IFlhSGVpIjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fcXJjb2RlewogICAgICAgICAgICAgICAgICAgIGJvcmRlcjozcHggc29saWQgI2ZmZjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBgOwoKICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKGNvdXBvblN0eWxlKSk7CgogICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKCiAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICBsZXQgY291cG9uVGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgIG4rKzsKCiAgICAgICAgICAgICAgICBsZXQgcGFnZU5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpCgogICAgICAgICAgICAgICAgaWYocGFnZU5vZGUpewoKICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGNvdXBvblRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgY291cG9uQ2xhc3Nbbm93TmFtZV0oKTsKCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgaWYobj09Y291cG9uVGltZXJOdW0pIGNsZWFySW50ZXJ2YWwoY291cG9uVGltZXIpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSwxMDApCiAgICAgICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewoKICAgICAgICAgICAgdmFyIHBsYXlWaWRlb0NsYXNzID0gbmV3IFBsYXlWaWRlb0NsYXNzKCk7CgogICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy56aG1Mb2dvKCk7CgogICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnKSl7CgogICAgICAgICAgICAgICAgbGV0IGxpbmVPYmogPSBwbGF5VmlkZW9DbGFzcy5nZXRMaW5lKEdNX2dldFZhbHVlKCdwbGF5VmlkZW9MaW5lVGV4dCcpKTsKCiAgICAgICAgICAgICAgICBpZihsaW5lT2JqKXsKCiAgICAgICAgICAgICAgICAgICAgcGxheUxpbmUgPSBsaW5lT2JqCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICB9CgogICAgICAgICAgICAvL3RlbXBsYXRlOmljb24scGxheUxpbmU7CiAgICAgICAgICAgIGxldCBwbGF5V3JhcEh0bWwgPSAiPGRpdiBjbGFzcz0nemhtX3BsYXlfdmlkZW9fbGluZSc+IjsKCiAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8ZGl2Pjx1bCBjbGFzcz0nemhtX3BsYXlfdmlkZV9saW5lX3VsJz4iOwoKICAgICAgICAgICAgcGxheUxpbmUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQgPSAnJzsKCiAgICAgICAgICAgICAgICBpZihwbGF5VmlkZW9DbGFzcy5nZXRDb29raWUoJ3BsYXlMaW5lQWN0aW9uJykgPT0gaXRlbS51cmwpewoKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9ICd6aG1fbGluZV9zZWxlY3RlZCc7CgogICAgICAgICA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lkZW8iLCBub2RlOiIjcGxheWVyIixub2RlVHlwZTonaWQnLG1hdGNoOi92aXBcLjE5MDUuY29tXC9wbGF5XC8vfSwKCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG5vZGU6IiN2b2RQbGF5ZXIiLG5vZGVUeXBlOidpZCcsbWF0Y2g6L3d3d1wuMTkwNS5jb21cL3ZvZFwvcGxheVwvL30sCiAgICAgICAgICAgIF07CgogICAgICAgICAgICBsZXQganhWaWRlb1dlYiA9IGp4VmlkZW9EYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICByZXR1cm4gbG9jYXRpb24uaHJlZi5tYXRjaChpdGVtLm1hdGNoKTsKCiAgICAgICAgICAgIH0pCgogICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy56aG1Mb2dvRHJhZygndmlkZW8nLGp4VmlkZW9XZWIpOwoKICAgICAgICAgICAgLy/mmK/lkKblnKjmkq3mlL7pobUKICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGggPiAwKXsKCiAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0ganhWaWRlb1dlYlswXTsKCiAgICAgICAgICAgICAgICAvL+m8oOagh+e7j+i/h+aYvuekuue6v+i3rwogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlCdXR0b24nKS5vbm1vdXNlb3Zlcj0oKT0+ewoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW91dD0oKT0+ewoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdub25lJzsKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy/pgInmi6nnur/ot6/op6PmnpDmkq3mlL4KCiAgICAgICAgICAgICAgICB2YXIgcGxheUxpbmVUZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5wbGF5TGluZVRkJyk7CgogICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpIHpobV9saW5lX3NlbGVjdGVkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy5zZXRDb29raWUoJ3BsYXlMaW5lQWN0aW9uJyx0aGlzLmdldEF0dHJpYnV0ZSgndXJsJyksMzApOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ3ZpZGVvUGxheUxpbmVBZGQnKSAhPSAyMil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1dlYk5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd1dlYk5vZGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5SWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlJZnJhbWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheUlmcmFtZS5zcmM9IGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR572R56uZ57uT54K55LiN5a2Y5ZyoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihpdGVtLmdldEF0dHJpYnV0ZSgndXJsJykrbG9jYXRpb24uaHJlZik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIC8qLS3nibnmrorlpITnkIYtLSovCiAgICAgICAgICAgICAgICAvL+S8mOmFt+WOu+W5v+WRigogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXIiKXsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgeWtBZCA9IHlvdWt1QWQubGFzdENoaWxkOwoKICAgICAgICAgICAgICAgICAgICAgICAgeWtBZC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHlrQWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1kYXNoYm9hcmQtMCcpLnN0eWxlPSdkaXNwbGF5OmZsZXgnOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1sYXllciB2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvLnBsYXkoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICAgICAgICAgICAgICAvL+aaguWBnAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3VpLXBsYXktaWNvbi0wJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWxheWVyIHZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrJTIgPT0gMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBhdXNlKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvLmFkZEV2ZW50TGlzdGVuZXIoJ3RpbWV1cGRhdGUnLGZ1bmN0aW9uKCl7IC8v5pKt5pS+5pe26Ze05pS55Y+YCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlrQWQgPSB5b3VrdUFkLmxhc3RDaGlsZDsKCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeWtBZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlrQWQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh5a0FkKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3VpLWRhc2hib2FyZC0wJykuc3R5bGU9J2Rpc3BsYXk6ZmxleCc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+eIseWlh+iJuuWOu+W5v+WRigogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNmbGFzaGJveCIpewoKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnNraXBwYWJsZS1hZnRlcicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb20uY2xpY2soKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSwzMDAwKQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvL+iFvuiur+WOu3ZpcOW8ueeqlwogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXItY29udGFpbmVyIil7CgogICAgICAgICAgICAgICAgICAgIGxldCBuID0gMDsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKyA8IDEwMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhbmVsVGlwVmlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBhbmVsLW92ZXJsYXknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYW5lbFRpcFZpcCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhbmVsVGlwVmlwLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9LDEwMCkKCgoKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+S5kOinhumAiembhuWkhOeQhgogICAgICAgICAgICAgICAgaWYobm93Tm9kZSA9PSAiI2xlX3BsYXlib3giKXsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGpCbG9jayA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5qX2Jsb2NrJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighakJsb2NrKSByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGk9MDtpPGpCbG9jay5sZW5ndGg7aSsrKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9JZCA9IGpCbG9ja1tpXS5nZXRBdHRyaWJ1dGUoJ2RhdGEtdmlkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSBgaHR0cHM6Ly93d3cubGUuY29tL3B0di92cGxheS8ke3ZpZGVvSWR9Lmh0bWxgOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpCbG9ja1tpXS5maXJzdENoaWxkLnNldEF0dHJpYnV0ZSgnaHJlZicsbGluayk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy9C56uZ5aSn5Lya5ZGYdXJs5aSE55CG77yM6aG16Z2iY2xhc3PkuI3kuIDoh7QKICAgICAgICAgICAgICAgIGlmKG5vd05vZGUgPT0gIi5wbGF5ZXItY29udGFpbmVyIil7CgogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheWVyLWNvbnRhaW5lcicpICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jb250YWluZXInKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93Tm9kZSA9ICcucGxheWVyLW1hc2snOwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93Tm9kZSA9ICcuYnB4LXBsYXllci1jb250YWluZXInOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0sMzAwMCkKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvKuiFvuiur+inhumikeeCueWHu+WFtuWug+inhumikei3s+i9rCovCiAgICAgICAgICAgICAgICBpZihub3dOYW1lPT0ncXFQQycpewoKICAgICAgICAgICAgICAgICAgICBsZXQgZmlndXJlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmZpZ3VyZScpOwoKICAgICAgICAgICAgICAgICAgICBsZXQgZmlndXJlRGV0YWlsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmZpZ3VyZV9kZXRhaWwnKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RJdGVtID0gWy4uLmZpZ3VyZSwuLi5maWd1cmVEZXRhaWxdOwoKICAgICAgICAgICAgICAgICAgICBpZihsaXN0SXRlbS5sZW5ndGggPiAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RJdGVtLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSB0aGlzLmdldEF0dHJpYnV0ZSgnaHJlZicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsaW5rKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSBsaW5rOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1NlbGVjdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy4nK2p4VmlkZW9XZWJbMF0uYXJlYUNsYXNzTmFtZSk7CgogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvU2VsZWN0Lmxlbmd0aD09MCl7Y29uc29sZS5sb2coJ+ivpee9keermeaSreaUvuWMuuexu+WQjeaUueWPmCcpO3JldHVybjt9CgogICAgICAgICAgICAgICAgICAgIHZpZGVvU2VsZWN0LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bG9jYXRpb24uaHJlZjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCgogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9LDIwMDApOwogICAgICAgICAgICB9CgogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcGxheU11c2ljRnVuYygpewoKICAgICAgICAgICAgaWYoc2VsZi5mcmFtZUVsZW1lbnQgJiYgc2VsZi5mcmFtZUVsZW1lbnQudGFnTmFtZSA9PSAiSUZSQU1FIil7CgogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CgogICAgICAgICAgICB2YXIgcGxheU11c2ljQ2xhc3MgPSBuZXcgUGxheU11c2ljQ2xhc3MoKTsKCiAgICAgICAgICAgIHZhciBtdXNpY0lkID0gTWF0aC5jZWlsKE1hdGgucmFuZG9tKCkqMTAwMDAwMDAwKTsKCiAgICAgICAgICAgIC8vbmV0ZWFzZSDot6/nlLHkuKTmrKHvvIzpnIDph43lrprkuYkKICAgICAgICAgICAgdmFyIG5ld1VybCA9IGxvY2F0aW9uLmhyZWY7CgogICAgICAgICAgICBsZXQganhNdXNpY1dlYiA9IGp4TXVzaWNbMF0ud2ViLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICByZXR1cm4gbmV3VXJsLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIGlmKGp4TXVzaWNXZWIubGVuZ3RoKXsKCiAgICAgICAgICAgICAgICBsZXQgdGltZXJaaG1JY29uID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1JY29uJykpewoKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvLyDlj5bmtojlrprml7blmagKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGp4TXVzaWNXZWJbMF0ubmFtZT09J2t1d28nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmljb24tYmFyX2ljb25fZG93bmxvYWRfJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uID0gY29udHJvbC5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24uY2xhc3NOYW1lID0gJyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24uc3R5bGU9J21hcmdpbi1sZWZ0OjEwcHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5pbm5lckhUTUwgPSAiPGEgc3R5bGU9J2ZvbnQtc2l6ZToxMHB4O3doaXRlLXNwYWNlOiBub3dyYXA7Y3Vyc29yOnBvaW50ZXI7Y29sb3I6IzU1NTsnIGlkPSdrdXdvRG93bmxvYWQnPuS4i+i9vTwvYT4iOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY29sX3InKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbHMuYmVmb3JlKGljb24pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcja3V3b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW9TcmMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJhdWRpbyIpLnNyYzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb25nTmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5jb250cm9sIC5zb25nX25hbWUnKS50aXRsZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnRpc3QgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY29udHJvbCAuYXJ0aXN0JykudGl0bGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQoYXVkaW9TcmMsc29uZ05hbWUrJy0nK2FydGlzdCsnLm1wMycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMjAwMCkKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoanhNdXNpY1dlYlswXS5uYW1lPT0neGltYWxheWEnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mkq3mlL7lmajliJvlu7rkuIvovb1pY29uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHhtQ29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueG0tcGxheWVyLW9wcmF0aW9ucycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHhtQ29udHJvbHMucXVlcnlTZWxlY3RvcignYTpudGgtb2YtdHlwZSgyKScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbiA9IGNvbnRyb2wuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uLmlubmVySFRNTCA9ICI8c3BhbiBzdHlsZT0nZm9udC1zaXplOjEwcHg7d2hpdGUtc3BhY2U6IG5vd3JhcDtjdXJzb3I6cG9pbnRlcjtjb2xvcjojRkZGOycgaWQ9J3hpbWFEb3dubG9hZCc+5LiL6L29PC9zcGFuPiI7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhtQ29udHJvbHMuc3R5bGU9J3Bvc2l0aW9uOiByZWxhdGl2ZTttYXJnaW4tbGVmdDotMjBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueG0tcGxheWVyLXByb2dyZXNzJykuc3R5bGUud2lkdGg9JzQ1MHB4JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhtLXBsYXllci1wbGF5dGltZScpLnN0eWxlPSdwb3NpdGlvbjogYWJzb2x1dGU7cmlnaHQ6NDBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4bUNvbnRyb2xzLnByZXBlbmQoaWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mkq3mlL7lmajkuIvovb3kuovku7YKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjeGltYURvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm1UaXRsZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5mbS10aXRsZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZtVGl0bGVNYXRjaCA9IGZtVGl0bGUuaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3XC54aW1hbGF5YVwuY29tXC9zb3VuZFwvKFxTKikkLyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gJ2h0dHBzOi8vbW9iaWxlLnhpbWFsYXlhLmNvbS9tb2JpbGUtcGxheXBhZ2UvdHJhY2svdjMvYmFzZUluZm8vJytuZXcgRGF0ZSgpLmdldFRpbWUoKSsnP2RldmljZT13ZWImdHJhY2tJZD0nK2ZtVGl0bGVNYXRjaFsxXTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlVcmwgPSBkYXRhLnRyYWNrSW5mby5wbGF5VXJsTGlzdFsxXS51cmw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjEgPSBwbGF5VXJsLnJlcGxhY2VBbGwoJy0nLCcrJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjIgPSBzdHIxLnJlcGxhY2VBbGwoJ18nLCcvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG51bSA9IHN0cjIubGVuZ3RoJTQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyMiArPSAnPT09PScuc3Vic3RyKG51bSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlY3J5cHRlZCA9IENyeXB0b0pTLkFFUy5kZWNyeXB0KHsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lwaGVydGV4dDogQ3J5cHRvSlMuZW5jLkJhc2U2NC5wYXJzZShzdHIyKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIENyeXB0b0pTLmVuYy5IZXgucGFyc2UoImFhYWQzZTRmZDU0MGIwZjc5ZGNhOTU2MDZlNzJiZjkzIiksIHsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5FQ0IsCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IENyeXB0b0pTLnBhZC5Qa2NzNwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhkZWNyeXB0ZWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRlY3J5cHRlZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZChkZWNyeXB0ZWQsZGF0YS50cmFja0luZm8udGl0bGUrJy5tcDMnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6Kej5a+G5Zyw5Z2A5aSx6LSlJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mhtemdouWIl+ihqOWIm+W7uuaJuemHj+S4i+i9vQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsTWF0Y2ggPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM6XC9cL3d3dy54aW1hbGF5YS5jb21cL2FsYnVtXC9bMC05XSsvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVybE1hdGNoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc291bmRMaXN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2FuY2hvcl9zb3VuZF9saXN0Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc291bmRMaXN0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdEhlYWQgPSBzb3VuZExpc3QucXVlcnlTZWxlY3RvcignLmhlYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdEhlYWRUaXRsZSA9IHNvdW5kTGlzdEhlYWQucXVlcnlTZWxlY3RvcignLnNvcnQnKS5sYXN0Q2hpbGQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiYXRjaERvd25sb2FkRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JhdGNoRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWJhdGNoRG93bmxvYWREb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBbe25hbWU6J+aJuemHj+S4i+i9vScsaWQ6J2JhdGNoRG93bmxvYWQnfSx7bmFtZTon6YeN572uJyxpZDoncmVzZXQnfSx7bmFtZTon5YWo6YCJJyxpZDonc2VsZWN0QWxsJ31dOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gc291bmRMaXN0SGVhZFRpdGxlLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnNldEF0dHJpYnV0ZSgnaWQnLGl0ZW0uaWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuaW5uZXJUZXh0ID0gaXRlbS5uYW1lOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdW5kTGlzdEhlYWRUaXRsZS5hZnRlcihjb250cm9sKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmJlZm9yZSgiIHwgIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzZWxlY3RBbGwnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgemhtQ2hlY2tib3ggPSBzb3VuZExpc3QucXVlcnlTZWxlY3RvckFsbCgiaW5wdXRbbmFtZT0nemhtQ2hlY2tib3gnXSIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUNoZWNrYm94LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpdGVtLmNoZWNrZWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5jaGVja2VkPXRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNyZXNldCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1DaGVja2JveCA9IHNvdW5kTGlzdC5xdWVyeVNlbGVjdG9yQWxsKCJpbnB1dFtuYW1lPSd6aG1DaGVja2JveCddIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5jaGVja2VkID0gZmFsc2U7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5q2j5bqP5YCS5bqP5LqL5Lu2CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdW5kTGlzdEhlYWQucXVlcnlTZWxlY3RvcignLnNvcnQnKS5maXJzdENoaWxkLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwyMDAwKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VuZExpc3RIZWFkVGl0bGUuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDIwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiYXRjaERvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9CYXNlQ2xhc3MudG9hc3QoJ+W3suS4i+i9ve+8jOivt+eojeWAmScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1DaGVja2JveCA9IHNvdW5kTGlzdC5xdWVyeVNlbGVjdG9yQWxsKCJpbnB1dFtuYW1lPSd6aG1DaGVja2JveCddIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5jaGVja2VkKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzY3JNYXRjaCA9IGl0ZW0udmFsdWUubWF0Y2goL1wvc291bmRcLyhbMC05XSspLyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gJ2h0dHBzOi8vbW9iaWxlLnhpbWFsYXlhLmNvbS9tb2JpbGUtcGxheXBhZ2UvdHJhY2svdjMvYmFzZUluZm8vJytuZXcgRGF0ZSgpLmdldFRpbWUoKSsnP2RldmljZT13ZWImdHJhY2tJZD0nK3Njck1hdGNoWzFdOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MucmVxdWVzdCgnZ2V0Jyx1cmwpLnRoZW4oKHJlc3VsdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVVybCA9IGRhdGEudHJhY2tJbmZvLnBsYXlVcmxMaXN0WzFdLnVybDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyMSA9IHBsYXlVcmwucmVwbGFjZUFsbCgnLScsJysnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyMiA9IHN0cjEucmVwbGFjZUFsbCgnXycsJy8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gc3RyMi5sZW5ndGglNDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihudW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIyICs9ICc9PT09Jy5zdWJzdHIobnVtKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVjcnlwdGVkID0gQ3J5cHRvSlMuQUVTLmRlY3J5cHQoewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaXBoZXJ0ZXh0OiBDcnlwdG9KUy5lbmMuQmFzZTY0LnBhcnNlKHN0cjIpCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgQ3J5cHRvSlMuZW5jLkhleC5wYXJzZSgiYWFhZDNlNGZkNTQwYjBmNzlkY2E5NTYwNmU3MmJmOTMiKSwgewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlOiBDcnlwdG9KUy5tb2RlLkVDQiwKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkudG9TdHJpbmcoQ3J5cHRvSlMuZW5jLlV0ZjgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coZGVjcnlwdGVkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkZWNyeXB0ZWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQoZGVjcnlwdGVkLGRhdGEudHJhY2tJbmZvLnRpdGxlKycubXAzJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ino+WvhuWcsOWdgOWksei0pScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94PSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuemhtQ2hlY2tib3gnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoemhtQ2hlY2tib3gubGVuZ3RoID09IDApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/nv7vpobXkuovku7YKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VCYXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGFnaW5hdGlvbi1wYWdlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhZ2VCYXIpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZUJhci5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnhtbHlDcmVhdGVDaGVja2JveCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMjAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ot7PpobXkuovku7YKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUxpbmsgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdidXR0b25bdHlwZT1zdWJtaXRdJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhZ2VMaW5rKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2VMaW5rLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+acquWMuemFjeWIsOWIl+ihqOWcsOWdgCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sNTAwKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lhajlsYDngrnlh7vkuovku7YKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9iakxpbmsgPSB7fTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmhyZWYpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsuaHJlZiA9IGl0ZW0uaHJlZj9pdGVtLmhyZWY6Jyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqTGluay50YXJnZXQgPSBpdGVtLnRhcmdldD9pdGVtLnRhcmdldDonJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYob2JqTGluay5ocmVmICYmIG9iakxpbmsudGFyZ2V0ICE9ICdfYmxhbmsnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSBvYmpMaW5rLmhyZWY7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGp4TXVzaWNXZWJbMF0ubmFtZT09J2t1Z291Jyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFEb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCdhJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgYURvbS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YU9iaiA9IGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhb2JqJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFPYmopewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5yZW1vdmVBdHRyaWJ1dGUoJ2RhdGFvYmonKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc2V0QXR0cmlidXRlKCd0YXJnZXQnLCdfYmxhbmsnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhkYXRhT2JqKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihjb3Vwb25VcmwuaW5kZXhPZignbWl4c29uZycpIT0tMSB8fCBjb3Vwb25VcmwuaW5kZXhPZignc29uZycpICE9IC0xIHx8IGNvdXBvblVybC5pbmRleE9mKCdzaGFyZScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZvbHVtZURvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2b2x1bWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZERvbSA9IHZvbHVtZURvbS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5yZW1vdmVBdHRyaWJ1dGUoJ2lkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5zdHlsZT0nbWFyZ2luLXRvcDozMHB4JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLmlubmVySFRNTCA9ICI8YSBzdHlsZT0nY29sb3I6I2ZmZjtmb250LXNpemU6MTBweDt3aGl0ZS1zcGFjZTpub3dyYXA7Y3Vyc29yOnBvaW50ZXI7JyBpZD0na3Vnb3VEb3dubG9hZCcgamF2YXNjcmlwdDp2b2lkKDApOz7kuIvovb08L2E+IjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvbHVtZURvbS5iZWZvcmUoZG93bmxvYWREb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9sdW1lRG9tLnN0eWxlPSdsZWZ0OjUwcHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNtb2RlJykuc3R5bGU9J21hcmdpbi1sZWZ0OjkwcHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwYl9kb3dubG9hZCcpLnN0eWxlPSdtYXJnaW4tbGVmdDoxMzBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BiX3NoYXJlJykuc3R5bGU9J21hcmdpbi1sZWZ0OjE3MHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjbGlzdCcpLnN0eWxlPSdyaWdodDotMjBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2t1Z291RG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjbXlBdWRpbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpb1NyYyA9IGF1ZGlvLmdldEF0dHJpYnV0ZSgnc3JjJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNpbmdlck5hbWUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuc2luZ2VyTmFtZScpLnRpdGxlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb25nTmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzb25nTmFtZVRlbXAnKS50aXRsZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQoYXVkaW9TcmMsc29uZ05hbWUrJy0nK3Npbmdlck5hbWUuc3Vic3RyKDAsc2luZ2VyTmFtZS5sZW5ndGgtMSkrJy5tcDMnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNvdXBvblVybCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGp4TXVzaWNXZWJbMF0ubmFtZT09J25ldGVhc2UnICYmIGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vbXVzaWMuMTYzLmNvbS9zdC9kb3dubG9hZCcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtSWNvbicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnpobUxvZ28oKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy56aG1Mb2dvRHJhZygnbXVzaWMnLGp4TXVzaWNXZWIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSxpY29uV2FpdFRpbWUpOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHpobVBsYXlEb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtSWNvbicpOwoKICAgICAgICAgICAgICAgICAgICBpZih6aG1QbGF5RG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHpobVBsYXlEb20ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh6aG1QbGF5RG9tKTsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5b2T5YmN6Z+z6aKR572R5Z2A5rKh5pyJ5re75Yqg5Yy56YWN5oiW5Yy56YWN6ZSZ6K+vJyk7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIHpoTmljZUZ1bmMoKXsKCiAgICAgICAgICAgIHZhciB6aENsYXNzID0gbmV3IFpoQ2xhc3MoKTsKCiAgICAgICAgICAgIC8v5YWz6Zet55m75b2V5by55qGGCiAgICAgICAgICAgIChhc3luYyBmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgIGxldCBsb2dpbk1vZGFsV3JhcHBlciA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCIuTW9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gICAgICAgIHpoRGF0YS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaXNPcGVuPT0yMiAmJiBpdGVtLm9ubG9hZD09MSl7CiAgICAgICAgICAgICAgICAgICAgICAgIHpoQ2xhc3NbaXRlbS5mdW5jXSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2luZG93Lm9uc2Nyb2xsID0gZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcDsKCiAgICAgICAgICAgICAgICBpZihzY3JvbGxUb3AgPiAyMDApewoKICAgICAgICAgICAgICAgICAgICB6aERhdGEuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5pc09wZW49PTIyICYmIGl0ZW0uaXNPbnNjcm9sbD09MSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhDbGFzc1tpdGVtLmZ1bmNdKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KCiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiB0YW9iYW9TZWFyY2hGdW5jKGl0ZW0pewoKICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICBsZXQgdGFvYmFvSWNvbkRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0YW9iYW9JY29uU2VsZWN0Jyk7CgogICAgICAgICAgICAgICAgbGV0IGJhc2VDbGFzcyA9IG5ldyBCYXNlQ2xhc3MoKTsKCiAgICAgICAgICAgICAgICBsZXQgZmlsdGVyVG1hbGwgPSBiYXNlQ2xhc3MuZ2V0UXVlcnlTdHJpbmcoJ2ZpbHRlcl90aWFubWFvJyk7CgogICAgICAgICAgICAgICAgaWYoIXRhb2Jhb0ljb25Eb20pewoKICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVycyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5maWx0ZXJzID5hJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGZpbHRlcnMubGVuZ3RoPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxmaWx0ZXJzLmxlbmd0aDtpKyspewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhVmFsdWUgPSBmaWx0ZXJzW2ldLmdldEF0dHJpYnV0ZSgnZGF0YS12YWx1ZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFWYWx1ZSA9PSAndG1hbGwnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhkYXRhVmFsdWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGFvYmFvRG9tID0gZmlsdGVyc1tpXS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0RvbS5xdWVyeVNlbGVjdG9yKCcudGV4dCcpLmlubmVyVGV4dD0n5reY5a6dJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnNldEF0dHJpYnV0ZSgnaWQnLCd0YW9iYW9JY29uU2VsZWN0Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0RvbS5zZXRBdHRyaWJ1dGUoJ2RhdGEtdmFsdWUnLCd0YW9iYW8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnNldEF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nLCdyZW1vdmUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLmNsYXNzTmFtZT0nZmlsdGVyIGljb24tdGFnIEpfQWpheCBpY29uLWhvdmVyJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLmNsYXNzTmFtZT0nZmlsdGVyIGljb24tdGFnIEpfQWpheCc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzW2ldLmJlZm9yZSh0YW9iYW9Eb20pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvSWNvbkRvbS5zZXRBdHRyaWJ1dGUoJ2RhdGEtYWN0aW9uJywncmVtb3ZlJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0ljb25Eb20uY2xhc3NOYW1lPSdmaWx0ZXIgaWNvbi10YWcgSl9BamF4IGljb24taG92ZXInOwogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9JY29uRG9tLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvSWNvbkRvbS5jbGFzc05hbWU9J2ZpbHRlciBpY29uLXRhZyBKX0FqYXgnOwogICAgICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICAgICAgfQoKCgogICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGdvb2RzTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5pdGVtcyA+IC5pdGVtJyk7CgogICAgICAgICAgICAgICAgICAgIGdvb2RzTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25MaUNsYXNzID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuaWNvbnM+bGk+YT5zcGFuJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2xhc3NOYW1lVG09WydpY29uLXNlcnZpY2UtdGlhbm1hbycsJ2ljb24tc2VydmljZS10aWFubWFvZ3VvamknXTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25MaUNsYXNzICYmIGNsYXNzTmFtZVRtLmluZGV4T2YoaWNvbkxpQ2xhc3MuY2xhc3NOYW1lKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZT0nZGlzcGxheTpub25lOyc7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIC8vY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSw1MDApCgogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gYmFpZHVGdW5jKCl7CiAgICAgICAgbGV0IHB0ID0gJycsIHNlbGVjdExpc3QgPSBbXSwgcGFyYW1zID0ge30sIG1vZGUgPSAnJywgd2lkdGggPSA4MDAsIHBhbiA9IHt9LCBjb2xvciA9ICcnLAogICAgICAgIGRvYyA9ICQoZG9jdW1lbnQpLCBwcm9ncmVzcyA9IHt9LCByZXF1ZXN0ID0ge30sIGlucyA9IHt9LCBpZG0gPSB7fTsKICAgICAgICBjb25zdCB2ZXJzaW9uID0gJzYuMC4zJzsKICAgICAgICBjb25zdCBhdXRob3IgPSAnR3JlYXN5Rm9yayc7CiAgICAgICAgY29uc3QgbmFtZSA9ICfnvZHnm5jnm7Tpk77kuIvovb3liqnmiYsnOwogICAgICAgIGNvbnN0IGN1c3RvbUNsYXNzID0gewogICAgICAgIHBvcHVwOiAncGwtcG9wdXAnLAogICAgICAgIGhlYWRlcjogJ3BsLWhlYWRlcicsCiAgICAgICAgdGl0bGU6ICdwbC10aXRsZScsCiAgICAgICAgY2xvc2VCdXR0b246ICdwbC1jbG9zZScsCiAgICAgICAgY29udGVudDogJ3BsLWNvbnRlbnQnLAogICAgICAgIGlucHV0OiAncGwtaW5wdXQnLAogICAgICAgIGZvb3RlcjogJ3BsLWZvb3RlcicKICAgIH07CgogICAgY29uc3QgdGVybWluYWxUeXBlID0gewogICAgICAgIHdjOiAiV2luZG93cyBDTUQiLAogICAgICAgIHdwOiAiV2luZG93cyBQb3dlclNoZWxsIiwKICAgICAgICBsdDogIkxpbnV4IOe7iOerryIsCiAgICAgICAgbHM6ICJMaW51eCBTaGVsbCIsCiAgICAgICAgbXQ6ICJNYWNPUyDnu4jnq68iLAogICAgfTsKCiAgICBsZXQgdG9hc3QgPSBTd2FsLm1peGluKHsKICAgICAgICB0b2FzdDogdHJ1ZSwKICAgICAgICBwb3NpdGlvbjogJ3RvcCcsCiAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IGZhbHNlLAogICAgICAgIHRpbWVyOiAzNTAwLAogICAgICAgIHRpbWVyUHJvZ3Jlc3NCYXI6IGZhbHNlLAogICAgICAgIGRpZE9wZW46ICh0b2FzdCkgPT4gewogICAgICAgICAgICB0b2FzdC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWVudGVyJywgU3dhbC5zdG9wVGltZXIpOwogICAgICAgICAgICB0b2FzdC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWxlYXZlJywgU3dhbC5yZXN1bWVUaW1lcik7CiAgICAgICAgfQogICAgfSk7CgogICAgY29uc3QgbWVzc2FnZSA9IHsKICAgICAgICBzdWNjZXNzOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3N1Y2Nlc3MnfSk7CiAgICAgICAgfSwKICAgICAgICBlcnJvcjogKHRleHQpID0+IHsKICAgICAgICAgICAgdG9hc3QuZmlyZSh7dGl0bGU6IHRleHQsIGljb246ICdlcnJvcid9KTsKICAgICAgICB9LAogICAgICAgIHdhcm5pbmc6ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnd2FybmluZyd9KTsKICAgICAgICB9LAogICAgICAgIGluZm86ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnaW5mbyd9KTsKICAgICAgICB9LAogICAgICAgIHF1ZXN0aW9uOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3F1ZXN0aW9uJ30pOwogICAgICAgIH0KICAgIH07CgogICAgbGV0IGJhc2UgPSB7CgogICAgICAgIGdldENvb2tpZShuYW1lKSB7CiAgICAgICAgICAgIGxldCBhcnIgPSBkb2N1bWVudC5jb29raWUucmVwbGFjZSgvXHMvZywgIiIpLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gYXJyLmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgICAgICAgICAgbGV0IHRlbXBBcnIgPSBhcnJbaV0uc3BsaXQoJz0nKTsKICAgICAgICAgICAgICAgIGlmICh0ZW1wQXJyWzBdID09PSBuYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudCh0ZW1wQXJyWzFdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKCiAgICAgICAgaXNUeXBlKG9iaikgewogICAgICAgICAgICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKG9iaikucmVwbGFjZSgvXlxbb2JqZWN0ICguKylcXSQvLCAnJDEnKS50b0xvd2VyQ2FzZSgpOwogICAgICAgIH0sCgogICAgICAgIGdldFZhbHVlKG5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIEdNX2dldFZhbHVlKG5hbWUpOwogICAgICAgIH0sCgogICAgICAgIHNldFZhbHVlKG5hbWUsIHZhbHVlKSB7CiAgICAgICAgICAgIEdNX3NldFZhbHVlKG5hbWUsIHZhbHVlKTsKICAgICAgICB9LAoKICAgICAgICBnZXRTdG9yYWdlKGtleSkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UobG9jYWxTdG9yYWdlLmdldEl0ZW0oa2V5KSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhbFN0b3JhZ2UuZ2V0SXRlbShrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgc2V0U3RvcmFnZShrZXksIHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzVHlwZSh2YWx1ZSkgPT09ICdvYmplY3QnIHx8IHRoaXMuaXNUeXBlKHZhbHVlKSA9PT0gJ2FycmF5JykgewogICAgICAgICAgICAgICAgcmV0dXJuIGxvY2FsU3RvcmFnZS5zZXRJdGVtKGtleSwgSlNPTi5zdHJpbmdpZnkodmFsdWUpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbG9jYWxTdG9yYWdlLnNldEl0ZW0oa2V5LCB2YWx1ZSk7CiAgICAgICAgfSwKCiAgICAgICAgc2V0Q2xpcGJvYXJkKHRleHQpIHsKICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHRleHQsICd0ZXh0Jyk7CiAgICAgICAgfSwKCiAgICAgICAgZShzdHIpIHsKICAgICAgICAgICAgcmV0dXJuIGJ0b2EodW5lc2NhcGUoZW5jb2RlVVJJQ29tcG9uZW50KHN0cikpKTsKICAgICAgICB9LAoKICAgICAgICBkKHN0cikgewogICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KGVzY2FwZShhdG9iKHN0cikpKTsKICAgICAgICB9LAoKICAgICAgICBnZXRFeHRlbnNpb24obmFtZSkgewogICAgICAgICAgICBjb25zdCByZWcgPSAvKD8hXC4pXHcrJC87CiAgICAgICAgICAgIGlmIChyZWcudGVzdChuYW1lKSkgewogICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gbmFtZS5tYXRjaChyZWcpOwogICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoWzBdLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCgogICAgICAgIHNpemVGb3JtYXQodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlID09PSArdmFsdWUpIHsKICAgICAgICAgICAgICAgIGxldCB1bml0ID0gWyJCIiwgIktCIiwgIk1CIiwgIkdCIiwgIlRCIiwgIlBCIiwgIkVCIiwgIlpCIiwgIllCIl07CiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBNYXRoLmZsb29yKE1hdGgubG9nKHZhbHVlKSAvIE1hdGgubG9nKDEwMjQpKTsKICAgICAgICAgICAgICAgIGxldCBzaXplID0gdmFsdWUgLyBNYXRoLnBvdygxMDI0LCBpbmRleCk7CiAgICAgICAgICAgICAgICBzaXplID0gc2l6ZS50b0ZpeGVkKDEpOwogICAgICAgICAgICAgICAgcmV0dXJuIHNpemUgKyB1bml0W2luZGV4XTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKCiAgICAgICAgc29ydEJ5TmFtZShhcnIpIHsKICAgICAgICAgICAgY29uc3QgaGFuZGxlID0gKCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIChhLCBiKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcDEgPSBhLmZpbGVuYW1lID8gYS5maWxlbmFtZSA6IGEuc2VydmVyX2ZpbGVuYW1lOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHAyID0gYi5maWxlbmFtZSA/IGIuZmlsZW5hbWUgOiBiLnNlcnZlcl9maWxlbmFtZTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcDEubG9jYWxlQ29tcGFyZShwMiwgInpoLUNOIik7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICBhcnIuc29ydChoYW5kbGUoKSk7CiAgICAgICAgfSwKCiAgICAgICAgYmxvYkRvd25sb2FkKGJsb2IsIGZpbGVuYW1lKSB7CiAgICAgICAgICAgIGlmIChibG9iIGluc3RhbmNlb2YgQmxvYikgewogICAgICAgICAgICAgICAgY29uc3QgdXJsID0gVVJMLmNyZWF0ZU9iamVjdFVSTChibG9iKTsKICAgICAgICAgICAgICAgIGNvbnN0IGEgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7CiAgICAgICAgICAgICAgICBhLmhyZWYgPSB1cmw7CiAgICAgICAgICAgICAgICBhLmRvd25sb2FkID0gZmlsZW5hbWU7CiAgICAgICAgICAgICAgICBhLmNsaWNrKCk7CiAgICAgICAgICAgICAgICBVUkwucmV2b2tlT2JqZWN0VVJMKHVybCk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBwb3N0KHVybCwgZGF0YSwgaGVhZGVycywgdHlwZSkgewogICAgICAgICAgICBpZiAodGhpcy5pc1R5cGUoZGF0YSkgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5zdHJpbmdpZnkoZGF0YSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJQT1NUIiwgdXJsLCBoZWFkZXJzLCBkYXRhLAogICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlVHlwZTogdHlwZSB8fCAnanNvbicsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPT09ICdibG9iJyA/IHJlc29sdmUocmVzKSA6IHJlc29sdmUocmVzLnJlc3BvbnNlIHx8IHJlcy5yZXNwb25zZVRleHQpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25lcnJvcjogKGVycikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCgogICAgICAgIGdldCh1cmwsIGhlYWRlcnMsIHR5cGUsIGV4dHJhKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcmVxdWVzdE9iaiA9IEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJHRVQiLCB1cmwsIGhlYWRlcnMsCiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VUeXBlOiB0eXBlIHx8ICdqc29uJywKICAgICAgICAgICAgICAgICAgICBvbmxvYWQ6IChyZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5zdGF0dXMgPT09IDIwNCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdE9iai5hYm9ydCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWRtW2V4dHJhLmluZGV4XSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdibG9iJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzLnN0YXR1cyA9PT0gMjAwICYmIGJhc2UuYmxvYkRvd25sb2FkKHJlcy5yZXNwb25zZSwgZXh0cmEuZmlsZW5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXMpOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXMucmVzcG9uc2UgfHwgcmVzLnJlc3BvbnNlVGV4dCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9ucHJvZ3Jlc3M6IChyZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV4dHJhICYmIGV4dHJhLmZpbGVuYW1lICYmIGV4dHJhLmluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMudG90YWwgPiAwID8gcHJvZ3Jlc3NbZXh0cmEuaW5kZXhdID0gKHJlcy5sb2FkZWQgKiAxMDAgLyByZXMudG90YWwpLnRvRml4ZWQoMikgOiBwcm9ncmVzc1tleHRyYS5pbmRleF0gPSAwLjAwOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbmxvYWRzdGFydCgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgJiYgZXh0cmEuZmlsZW5hbWUgJiYgZXh0cmEuaW5kZXggJiYgKHJlcXVlc3RbZXh0cmEuaW5kZXhdID0gcmVxdWVzdE9iaik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbmVycm9yOiAoZXJyKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnIpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwKCiAgICAgICAgZ2V0RmluYWxVcmwodXJsLCBoZWFkZXJzKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcmVxdWVzdE9iaiA9IEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJHRVQiLCB1cmwsIGhlYWRlcnMsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzLmZpbmFsVXJsKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uZXJyb3I6IChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBhZGRTdHlsZShpZCwgdGFnLCBjc3MpIHsKICAgICAgICAgICAgdGFnID0gdGFnIHx8ICdzdHlsZSc7CiAgICAgICAgICAgIGxldCBkb2MgPSBkb2N1bWVudCwgc3R5bGVEb20gPSBkb2MuZ2V0RWxlbWVudEJ5SWQoaWQpOwogICAgICAgICAgICBpZiAoc3R5bGVEb20pIHJldHVybjsKICAgICAgICAgICAgbGV0IHN0eWxlID0gZG9jLmNyZWF0ZUVsZW1lbnQodGFnKTsKICAgICAgICAgICAgc3R5bGUucmVsID0gJ3N0eWxlc2hlZXQnOwogICAgICAgICAgICBzdHlsZS5pZCA9IGlkOwogICAgICAgICAgICB0YWcgPT09ICdzdHlsZScgPyBzdHlsZS5pbm5lckhUTUwgPSBjc3MgOiBzdHlsZS5ocmVmID0gY3NzOwogICAgICAgICAgICBkb2MuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXS5hcHBlbmRDaGlsZChzdHlsZSk7CiAgICAgICAgfSwKCiAgICAgICAgZmluZFJlYWN0KGRvbSwgdHJhdmVyc2VVcCA9IDApIHsKICAgICAgICAgICAgY29uc3Qga2V5ID0gT2JqZWN0LmtleXMoZG9tKS5maW5kKGtleSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4ga2V5LnN0YXJ0c1dpdGgoIl9fcmVhY3RGaWJlciQiKQogICAgICAgICAgICAgICAgICAgIHx8IGtleS5zdGFydHNXaXRoKCJfX3JlYWN0SW50ZXJuYWxJbnN0YW5jZSQiKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGNvbnN0IGRvbUZpYmVyID0gZG9tW2tleV07CiAgICAgICAgICAgIGlmIChkb21GaWJlciA9PSBudWxsKSByZXR1cm4gbnVsbDsKCiAgICAgICAgICAgIGlmIChkb21GaWJlci5fY3VycmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIGxldCBjb21wRmliZXIgPSBkb21GaWJlci5fY3VycmVudEVsZW1lbnQuX293bmVyOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0cmF2ZXJzZVVwOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBjb21wRmliZXIgPSBjb21wRmliZXIuX2N1cnJlbnRFbGVtZW50Ll9vd25lcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBjb21wRmliZXIuX2luc3RhbmNlOwogICAgICAgICAgICB9CgogICAgICAgICAgICBjb25zdCBHZXRDb21wRmliZXIgPSBmaWJlciA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcGFyZW50RmliZXIgPSBmaWJlci5yZXR1cm47CiAgICAgICAgICAgICAgICB3aGlsZSAodHlwZW9mIHBhcmVudEZpYmVyLnR5cGUgPT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnRGaWJlcjsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgbGV0IGNvbXBGaWJlciA9IEdldENvbXBGaWJlcihkb21GaWJlcik7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdHJhdmVyc2VVcDsgaSsrKSB7CiAgICAgICAgICAgICAgICBjb21wRmliZXIgPSBHZXRDb21wRmliZXIoY29tcEZpYmVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29tcEZpYmVyLnN0YXRlTm9kZSB8fCBjb21wRmliZXI7CiAgICAgICAgfSwKCiAgICAgICAgaW5pdERlZmF1bHRDb25maWcoKSB7CiAgICAgICAgICAgIGxldCB2YWx1ZSA9IFt7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfZG9tYWluJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnaHR0cDovL2xvY2FsaG9zdCcKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX3BvcnQnLAogICAgICAgICAgICAgICAgdmFsdWU6ICcxNjgwMCcKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX3BhdGgnLAogICAgICAgICAgICAgICAgdmFsdWU6ICcvanNvbnJwYycKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX3Rva2VuJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfZGlyJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnRDonCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3Rlcm1pbmFsX3R5cGUnLAogICAgICAgICAgICAgICAgdmFsdWU6ICd3YycKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfdGhlbWVfY29sb3InLAogICAgICAgICAgICAgICAgdmFsdWU6ICcjMDlBQUZGJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19pbml0X2NvZGUnLAogICAgICAgICAgICAgICAgdmFsdWU6ICcnCiAgICAgICAgICAgIH1dOwoKICAgICAgICAgICAgdmFsdWUuZm9yRWFjaCgodikgPT4gewogICAgICAgICAgICAgICAgYmFzZS5nZXRWYWx1ZSh2Lm5hbWUpID09PSB1bmRlZmluZWQgJiYgYmFzZS5zZXRWYWx1ZSh2Lm5hbWUsIHYudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBzaG93U2V0dGluZygpIHsKICAgICAgICAgICAgbGV0IGRvbSA9ICcnLCBidG4gPSAnJywKICAgICAgICAgICAgICAgIGNvbG9yTGlzdCA9IFsnIzA5QUFGRicsICcjY2MzMjM1JywgJyM1MjZlZmEnLCAnIzUxOGMxNycsICcjZWQ5NDRiJywgJyNmOTY5YTUnLCAnI2JjYTI4MCddOwogICAgICAgICAgICBkb20gKz0gYDxsYWJlbCBjbGFzcz0icGwtc2V0dGluZy1sYWJlbCI+PGRpdiBjbGFzcz0icGwtbGFiZWwiPlJQQ+S4u+acujwvZGl2PjxpbnB1dC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2V0VmFsdWUoJ3NldHRpbmdfdGVybWluYWxfdHlwZScpID09PSBrID8gJ3NlbGVjdGVkJyA6ICcnfT4ke3Rlcm1pbmFsVHlwZVtrXX08L29wdGlvbj5gOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9tICs9IGA8L3NlbGVjdD48L2xhYmVsPmA7CiAgICAgICAgICAgIGRvbSArPSBgPGxhYmVsIGNsYXNzPSJwbC1zZXR0aW5nLWxhYmVsIj48ZGl2IGNsYXNzPSJwbC1sYWJlbCI+5Li76aKY6aKc6ImyPC9kaXY+IDxkaXYgY2xhc3M9InBsLWNvbG9yIj4ke2J0bn08ZGl2PjwvbGFiZWw+YDsKICAgICAgICAgICAgZG9tID0gJzxkaXY+JyArIGRvbSArICc8L2Rpdj4nOwoKICAgICAgICAgICAgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgIHRpdGxlOiAn5Yqp5omL6YWN572uJywKICAgICAgICAgICAgICAgIGh0bWw6IGRvbSwKICAgICAgICAgICAgICAgIGljb246ICdpbmZvJywKICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiBmYWxzZSwKICAgICAgICAgICAgICAgIGZvb3RlcjogcGFuLmZvb3RlciwKICAgICAgICAgICAgfSkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICBtZXNzYWdlLnN1Y2Nlc3MoJ+iuvue9ruaIkOWKn++8gScpOwogICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1jb2xvcicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3RoZW1lX2NvbG9yJywgZS50YXJnZXQuZGF0YXNldC5jb2xvcik7CiAgICAgICAgICAgICAgICBtZXNzYWdlLnN1Y2Nlc3MoJ+iuvue9ruaIkOWKn++8gScpOwogICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignaW5wdXQnLCAnLmxpc3RlbmVyLWRvbWFpbicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1wb3J0JywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BvcnQnLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1wYXRoJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BhdGgnLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci10b2tlbicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicsIGUudGFyZ2V0LnZhbHVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignaW5wdXQnLCAnLmxpc3RlbmVyLWRpcicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19kaXInLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NoYW5nZScsICcubGlzdGVuZXItdGVybWluYWwnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ190ZXJtaW5hbF90eXBlJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICByZWdpc3Rlck1lbnVDb21tYW5kKCkgewogICAgICAgICAgICBHTV9yZWdpc3Rlck1lbnVDb21tYW5kKCfimpnvuI8g6K6+572uJywgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zaG93U2V0dGluZygpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBjcmVhdGVUaXAoKSB7CiAgICAgICAgICAgICQoJ2JvZHknKS5hcHBlbmQoJzxkaXYgY2xhc3M9InBsLXRvb2x0aXAiPjwvZGl2PicpOwoKICAgICAgICAgICAgZG9jLm9uKCdtb3VzZWVudGVyIG1vdXNlbGVhdmUnLCAnLmxpc3RlbmVyLXRpcCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZS50eXBlID09PSAnbW91c2VlbnRlcicpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSBlLmN1cnJlbnRUYXJnZXQuaW5uZXJUZXh0OwogICAgICAgICAgICAgICAgICAgIGxldCBzaXplID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQuc2l6ZTsKICAgICAgICAgICAgICAgICAgICBsZXQgdGlwID0gYCR7ZmlsZW5hbWV9PHNwYW4gc3R5bGU9Im1hcmdpbi1sZWZ0OiAxMHB4O2NvbG9yOiAjZjU2YzZjOyI+JHtzaXplfTwvc3Bhbj5gOwogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5jc3Moe29wYWNpdHk6ICcwLjUnfSk7CiAgICAgICAgICAgICAgICAgICAgJCgnLnBsLXRvb2x0aXAnKS5odG1sKHRpcCkuY3NzKHsKICAgICAgICAgICAgICAgICAgICAgICAgJ2xlZnQnOiBlLnBhZ2VYICsgMTAgKyAncHgnLAogICAgICAgICAgICAgICAgICAgICAgICAndG9wJzogZS5wYWdlWSAtIGUuY3VycmVudFRhcmdldC5vZmZzZXRUb3AgPiAxNCA/IGUucGFnZVkgKyAncHgnIDogZS5wYWdlWSArIDIwICsgJ3B4JwogICAgICAgICAgICAgICAgICAgIH0pLnNob3coKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLmNzcyh7b3BhY2l0eTogJzEnfSk7CiAgICAgICAgICAgICAgICAgICAgJCgnLnBsLXRvb2x0aXAnKS5oaWRlKDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBjcmVhdGVMb2FkaW5nKCkgewogICAgICAgICAgICByZXR1cm4gJCgnPGRpdiBjbGFzcz0icGwtbG9hZGluZyI+PGRpdiBjbGFzcz0icGwtbG9hZGluZy1ib3giPjxkaXY+PGRpdj48L2Rpdj48ZGl2PjwvZGl2PjwvZGl2PjwvZGl2PjwvZGl2PicpOwogICAgICAgIH0sCgogICAgICAgIGNyZWF0ZURvd25sb2FkSWZyYW1lKCkgewogICAgICAgICAgICBsZXQgJGRpdiA9ICQoJzxkaXYgc3R5bGU9InBhZGRpbmc6MDttYXJnaW46MDtkaXNwbGF5OmJsb2NrIj48L2Rpdj4nKTsKICAgICAgICAgICAgbGV0ICRpZnJhbWUgPSAkKCc8aWZyYW1lIHNyYz0iamF2YXNjcmlwdDo7IiBpZD0iZG93bmxvYWRJZnJhbWUiIHN0eWxlPSJkaXNwbGF5Om5vbmUiPjwvaWZyYW1lPicpOwogICAgICAgICAgICAkZGl2LmFwcGVuZCgkaWZyYW1lKTsKICAgICAgICAgICAgJCgnYm9keScpLmFwcGVuZCgkZGl2KTsKICAgICAgICB9LAoKICAgICAgICBnZXRNaXJyb3JMaXN0KGxpbmssIG1pcnJvciwgdGhyZWFkID0gMikgewogICAgICAgICAgICBsZXQgaG9zdCA9IG5ldyBVUkwobGluaykuaG9zdDsKICAgICAgICAgICAgbGV0IG1pcnJvcnMgPSBbXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtaXJyb3IubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgdGhyZWFkOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbSA9IGxpbmsucmVwbGFjZShob3N0LCBtaXJyb3JbaV0pICsgJyYnLnJlcGVhdChqKTsKICAgICAgICAgICAgICAgICAgICBtaXJyb3JzLnB1c2goaXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG1pcnJvcnMuam9pbignXG4nKTsKICAgICAgICB9LAoKICAgICAgICBhZGRQYW5MaW5rZXJTdHlsZSgpIHsKICAgICAgICAgICAgY29sb3IgPSBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3RoZW1lX2NvbG9yJyk7CiAgICAgICAgICAgIGxldCBjc3MgPSBgCiAgICAgICAgICAgIGJvZHk6Oi13ZWJraXQtc2Nyb2xsYmFyIHsgZGlzcGxheTogbm9uZSB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXIgeyB3aWR0aDogNnB4OyBoZWlnaHQ6IDEwcHggfQogICAgICAgICAgICA6Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNrIHsgYm9yZGVyLXJhZGl1czogMDsgYmFja2dyb3VuZDogbm9uZSB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgeyBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDg1LDg1LDg1LC40KSB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIsOjotd2Via2l0LXNjcm9sbGJhci10aHVtYjpob3ZlciB7IGJvcmRlci1yYWRpdXM6IDVweDsgLXdlYmtpdC1ib3gtc2hhZG93OiBp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CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuaXNEaXNtaXNzZWQgJiYgcmVzdWx0LmRpc21pc3MgPT09ICdjbG9zZScpIHJldHVybjsKICAgICAgICAgICAgICAgIGlmIChwYW4ubnVtID09IHBhbi5udW0pIHsKICAgICAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX2luaXRfY29kZScsIHBhbi5udW0pOwogICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3VjY2Vzcygi5pqX5Y+35q2j56GuIik7CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvcnkuZ28oMCk7CiAgICAgICAgICAgICAgICAgICAgfSwgMTUwMCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGF3YWl0IFN3YWwuZmlyZSh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiLmmpflj7fkuI3mraPnoa4iLAogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAi5pqX5Y+35LiN5q2j56GuIiwKICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICfph43mlrDovpPlhaUnLAogICAgICAgICAgICAgICAgICAgICAgICBpbWFnZVVybDogcGFuLmltZywKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLmluaXREaWFsb2coKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICB9OwoKICAgIGxldCBiYWlkdSA9IHsKCiAgICAgICAgX2dldEV4dHJhKCkgewogICAgICAgICAgICBsZXQgc2VLZXkgPSBkZWNvZGVVUklDb21wb25lbnQoYmFzZS5nZXRDb29raWUoJ0JEQ0xORCcpKTsKICAgICAgICAgICAgcmV0dXJuICd7JyArICcic2VrZXkiOiInICsgc2VLZXkgKyAnIicgKyAifSI7CiAgICAgICAgfSwKCiAgICAgICAgX2dldFN1cmwoKSB7CgogICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwcz86XC9cLy4rXC5iYWlkdVwuY29tXC8oc1wvfHN1cmw9KSguKylcPy8pOwoKICAgICAgICAgICAgICAgIGlmIChyZXNwKSB7CiAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhyZXNwWzJdLCdyZXNwJyk7CiAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwWzJdOwoKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgcmV0dXJuICcnOwoKICAgICAgICB9LAoKICAgICAgICBfZ2V0RmlkTGlzdCgpIHsKICAgICAgICAgICAgbGV0IGZpZGxpc3QgPSBbXTsKICAgICAgICAgICAgc2VsZWN0TGlzdC5mb3JFYWNoKHYgPT4gewogICAgICAgICAgICAgICAgaWYgKCt2LmlzZGlyID09PSAxKSByZXR1cm47CiAgICAgICAgICAgICAgICBmaWRsaXN0LnB1c2godi5mc19pZCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gJ1snICsgZmlkbGlzdCArICddJzsKICAgICAgICB9LAoKICAgICAgICBfcmVzZXREYXRhKCkgewogICAgICAgICAgICBwcm9ncmVzcyA9IHt9OwogICAgICAgICAgICAkLmVhY2gocmVxdWVzdCwgKGtleSkgPT4gewogICAgICAgICAgICAgICAgKHJlcXVlc3Rba2V5XSkuYWJvcnQoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICQuZWFjaChpbnMsIChrZXkpID0+IHsKICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2tleV0pOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgaWRtID0ge307CiAgICAgICAgICAgIGlucyA9IHt9OwogICAgICAgICAgICByZXF1ZXN0ID0ge307CiAgICAgICAgfSwKCiAgICAgICAgc2V0QkRVU1MoKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBHTV9jb29raWUgJiYgR01fY29va2llKCdsaXN0Jywge25hbWU6ICdCRFVTUyd9LCAoY29va2llcywgZXJyb3IpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhc2Uuc2V0U3RvcmFnZSgiYmFpZHV5dW5QbHVnaW5fQkRVU1MiLCB7QkRVU1M6IGNvb2tpZXNbMF0udmFsdWV9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgZ2V0QkRVU1MoKSB7CiAgICAgICAgICAgIGxldCBiYWlkdXl1blBsdWdpbl9CRFVTUyA9IGJhc2UuZ2V0U3RvcmFnZSgnYmFpZHV5dW5QbHVnaW5fQkRVU1MnKSA/IGJhc2UuZ2V0U3RvcmFnZSgnYmFpZHV5dW5QbHVnaW5fQkRVU1MnKSA6ICd7ImJhaWR1eXVuUGx1Z2luX0JEVVNTIjoiIn0nOwogICAgICAgICAgICByZXR1cm4gYmFpZHV5dW5QbHVnaW5fQkRVU1MuQkRVU1MgfHwgJyc7CiAgICAgICAgfSwKCiAgICAgICAgY29udmVydExpbmtUb0FyaWEobGluaywgZmlsZW5hbWUsIHVhKSB7CiAgICAgICAgICAgIGxldCBCRFVTUyA9IHRoaXMuZ2V0QkRVU1MoKTsKICAgICAgICAgICAgaWYgKCEhQkRVU1MpIHsKICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gZmlsZW5hbWUucmVwbGFjZSgnICcsICdfJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGBhcmlhMmMgIiR7bGlua30iIC0tb3V0ICIke2ZpbGVuYW1lfSIgLS1oZWFkZXIgIlVzZXItQWdlbnQ6ICR7dWF9IiAtLWhlYWRlciAiQ29va2llOiBCRFVTUz0ke0JEVVNTfSJgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbGluazogcGFuLmFzc2lzdGFudCwKICAgICAgICAgICAgICAgIHRleHQ6IHBhbi5pbml0WzVdCiAgICAgICAgICAgIH07CiAgICAgICAgfSwKCiAgICAgICAgY29udmVydExpbmtUb0JDKGxpbmssIGZpbGVuYW1lLCB1YSkgewogICAgICAgICAgICBsZXQgQkRVU1MgPSB0aGlzLmdldEJEVVNTKCk7CiAgICAgICAgICAgIGlmICghIUJEVVNTKSB7CiAgICAgICAgICAgICAgICBsZXQgY29va2llID0gYEJEVVNTPSR7QkRVU1N9YDsKICAgICAgICAgICAgICAgIGxldCBiYyA9IGBBQS8ke2VuY29kZVVSSUNvbXBvbmVudChmaWxlbmFtZSl9Lz91cmw9JHtlbmNvZGVVUklDb21wb25lbnQobGluayl9JmNvb2tpZT0ke2VuY29kZVVSSUNvbXBvbmVudChjb29raWUpfSZ1c2VyX2FnZW50PSR7ZW5jb2RlVVJJQ29tcG9uZW50KHVhKX1aWmA7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGBiYzovL2h0dHAvJHtiYXNlLmUoYmMpfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBsaW5rOiBwYW4uYXNzaXN0YW50LAogICAgICAgICAgICAgICAgdGV4dDogcGFuLmluaXRbNV0KICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBjb252ZXJ0TGlua1RvQ3VybChsaW5rLCBmaWxlbmFtZSwgdWEpIHsKICAgICAgICAgICAgbGV0IEJEVVNTID0gdGhpcy5nZXRCRFVTUygpOwogICAgICAgICAgICBpZiAoISFCRFVTUykgewogICAgICAgICAgICAgICAgbGV0IHRlcm1pbmFsID0gYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ190ZXJtaW5hbF90eXBlJyk7CiAgICAgICAgICAgICAgICBmaWxlbmFtZSA9IGZpbGVuYW1lLnJlcGxhY2UoJyAnLCAnXycpOwogICAgICAgICAgICAgICAgcmV0dXJuIGVuY29kZVVSSUNvbXBvbmVudChgJHt0ZXJtaW5hbCAhPT0gJ3dwJyA/ICdjdXJsJyA6ICdjdXJsLmV4ZSd9IC1MICIke2xpbmt9IiAtLW91dHB1dCAiJHtmaWxlbmFtZX0iIC1BICIke3VhfSIgLWIgIkJEVVNTPSR7QkRVU1N9ImApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBsaW5rOiBwYW4uYXNzaXN0YW50LAogICAgICAgICAgICAgICAgdGV4dDogcGFuLmluaXRbNV0KICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBhZGRQYWdlTGlzdGVuZXIoKSB7CiAgICAgICAgICAgIGZ1bmN0aW9uIF9mYWN0b3J5KGUpIHsKICAgICAgICAgICAgICAgIGxldCB0YXJnZXQgPSAkKGUudGFyZ2V0KTsKICAgICAgICAgICAgICAgIGxldCBpdGVtID0gdGFyZ2V0LnBhcmVudHMoJy5wbC1pdGVtJyk7CiAgICAgICAgICAgICAgICBsZXQgbGluayA9IGl0ZW0uZmluZCgnLnBsLWl0ZW0tbGluaycpOwogICAgICAgICAgICAgICAgbGV0IHByb2dyZXNzID0gaXRlbS5maW5kKCcucGwtaXRlbS1wcm9ncmVzcycpOwogICAgICAgICAgICAgICAgbGV0IHRpcCA9IGl0ZW0uZmluZCgnLnBsLWl0ZW0tdGlwJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGl0ZW0sIGxpbmssIHByb2dyZXNzLCB0aXAsIHRhcmdldCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGZ1bmN0aW9uIF9yZXNldChpKSB7CiAgICAgICAgICAgICAgICBpbnNbaV0gJiYgY2xlYXJJbnRlcnZhbChpbnNbaV0pOwogICAgICAgICAgICAgICAgcmVxdWVzdFtpXSAmJiByZXF1ZXN0W2ldLmFib3J0KCk7CiAgICAgICAgICAgICAgICBwcm9ncmVzc1tpXSA9IDA7CiAgICAgICAgICAgICAgICBpZG1baV0gPSBmYWxzZTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZG9jLm9uKCdtb3VzZWVudGVyIG1vdXNlbGVhdmUgY2xpY2snLCAnLnBsLWJ1dHRvbi5nLWRyb3Bkb3duLWJ1dHRvbicsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZS50eXBlID09PSAnbW91c2VsZWF2ZScpIHsKICAgICAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkucmVtb3ZlQ2xhc3MoJ2J1dHRvbi1vcGVuJyk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5hZGRDbGFzcygnYnV0dG9uLW9wZW4nKTsKICAgICAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkuZmluZCgnLnBsLWRyb3Bkb3duLW1lbnUnKS5zaG93KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ21vdXNlbGVhdmUnLCAnLnBsLWJ1dHRvbi5nLWRyb3Bkb3duLWJ1dHRvbiAucGwtZHJvcGRvd24tbWVudScsIChlKSA9PiB7CiAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkuaGlkZSgpOwogICAgICAgICAgICB9KTsKCiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLnBsLWJ1dHRvbi1tb2RlJywgKGUpID0+IHsKICAgICAgICAgICAgICAgIG1vZGUgPSBlLnRhcmdldC5kYXRhc2V0Lm1vZGU7CiAgICAgICAgICAgICAgICBTd2FsLnNob3dMb2FkaW5nKCk7CiAgICAgICAgICAgICAgICB0aGlzLmdldFBDU0xpbmsoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWxpbmstYXBpJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBsZXQgJHdpZHRoID0gby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1pbm5lcicpOwogICAgICAgICAgICAgICAgbGV0ICR0ZXh0ID0gby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1pbm5lci10ZXh0Jyk7CiAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSBvLmxpbmtbMF0uZGF0YXNldC5maWxlbmFtZTsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IG8ubGlua1swXS5kYXRhc2V0LmluZGV4OwogICAgICAgICAgICAgICAgX3Jlc2V0KGluZGV4KTsKICAgICAgICAgICAgICAgIGJhc2UuZ2V0KG8ubGlua1swXS5kYXRhc2V0LmxpbmssIHsiVXNlci1BZ2VudCI6IHBhbi51YX0sICdibG9iJywge2ZpbGVuYW1lLCBpbmRleH0pOwogICAgICAgICAgICAgICAgaW5zW2luZGV4XSA9IHNldEludGVydmFsKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICBsZXQgcHJvZyA9ICtwcm9ncmVzc1tpbmRleF0gfHwgMDsKICAgICAgICAgICAgICAgICAgICBsZXQgaXNJRE0gPSBpZG1baW5kZXhdIHx8IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIGlmIChpc0lETSkgewogICAgICAgICAgICAgICAgICAgICAgICBvLnRpcC5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ucHJvZ3Jlc3MuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBvLmxpbmsudGV4dCgn5bey5oiQ5Yqf5ZSk6LW3SURN77yM6K+35p+l55yLSURN5LiL6L295qGG77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpLnNob3coKTsKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNbaW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWRtW2luZGV4XSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ubGluay5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5zaG93KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICR3aWR0aC5jc3MoJ3dpZHRoJywgcHJvZyArICclJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICR0ZXh0LnRleHQocHJvZyArICclJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9nID09PSAxMDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9ncmVzc1tpbmRleF0gPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1zdG9wJykuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy10aXAnKS5odG1sKCfkuIvovb3lrozmiJDvvIzmraPlnKjlvLnlh7rmtY/op4jlmajkuIvovb3moYbvvIEnKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sIDUwMCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1yZXRyeScsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbyA9IF9mYWN0b3J5KGUpOwogICAgICAgICAgICAgICAgby50aXAuaGlkZSgpOwogICAgICAgICAgICAgICAgby5saW5rLnNob3coKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWhvdycsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbyA9IF9mYWN0b3J5KGUpOwogICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gby5saW5rWzBdLmRhdGFzZXQuaW5kZXg7CiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdFtpbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0W2luZGV4XS5hYm9ydCgpOwogICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgby50aXAuc2hvdygpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXN0b3AnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IG8ubGlua1swXS5kYXRhc2V0LmluZGV4OwogICAgICAgICAgICAgICAgaWYgKHJlcXVlc3RbaW5kZXhdKSB7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdFtpbmRleF0uYWJvcnQoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGluc1tpbmRleF0pOwogICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLnByb2dyZXNzLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLmxpbmsuc2hvdygwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWJhY2snLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgIG8ubGluay5zaG93KCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1saW5rLWFyaWEsIC5saXN0ZW5lci1jb3B5LWFsbCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICBpZiAoIWUudGFyZ2V0LmRhdGFzZXQubGluaykgewogICAgICAgICAgICAgICAgICAgICQoZS50YXJnZXQpLnJlbW92ZUNsYXNzKCdsaXN0ZW5lci1jb3B5LWFsbCcpLmFkZENsYXNzKCdwbC1idG4tZGFuZ2VyJykuaHRtbChgJHtwYW4uaW5pdFs1XX3wn5GJPGEgaHJlZj0iJHtwYW4uYXNzaXN0YW50fSIgdGFyZ2V0PSJfYmxhbmsiIGNsYXNzPSJwbC1hIj7ngrnlh7vmraTlpITlronoo4U8L2E+8J+RiGApOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBiYXNlLnNldENsaXBib2FyZChkZWNvZGVVUklDb21wb25lbnQoZS50YXJnZXQuZGF0YXNldC5saW5rKSk7CiAgICAgICAgICAgICAgICAgICAgJChlLnRhcmdldCkudGV4dCgn5aSN5Yi25oiQ5Yqf77yM5b+r5Y6757KY6LS05ZCn77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItbGluay1ycGMnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IHRhcmdldCA9ICQoZS5jdXJyZW50VGFyZ2V0KTsKICAgICAgICAgICAgICAgIHRhcmdldC5maW5kKCcuaWNvbicpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgdGFyZ2V0LmZpbmQoJy5wbC1sb2FkaW5nJykucmVtb3ZlKCk7CiAgICAgICAgICAgICAgICB0YXJnZXQucHJlcGVuZChiYXNlLmNyZWF0ZUxvYWRpbmcoKSk7CiAgICAgICAgICAgICAgICBsZXQgcmVzID0gYXdhaXQgdGhpcy5zZW5kTGlua1RvUlBDKGUuY3VycmVudFRhcmdldC5kYXRhc2V0LmZpbGVuYW1lLCBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldC5saW5rKTsKICAgICAgICAgICAgICAgIGlmIChyZXMgPT09ICdzdWNjZXNzJykgewogICAgICAgICAgICAgICAgICAgICQoJy5saXN0ZW5lci1ycGMtdGFzaycpLnNob3coKTsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQucmVtb3ZlQ2xhc3MoJ3BsLWJ0bi1kYW5nZXInKS5odG1sKCflj5HpgIHmiJDlip/vvIzlv6vljrvnnIvnnIvlkKfvvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iik7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PT0gJ2Fzc2lzdGFudCcpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQuYWRkQ2xhc3MoJ3BsLWJ0bi1kYW5nZXInKS5odG1sKGAke3Bhbi5pbml0WzVdffCfkYk8YSBocmVmPSIke3Bhbi5hc3Npc3RhbnR9IiB0YXJnZXQ9Il9ibGFuayIgY2xhc3M9InBsLWEiPueCueWHu+atpOWkhOWuieijhTwvYT7wn5GIYCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRhcmdldC5hZGRDbGFzcygncGwtYnRuLWRhbmdlcicpLnRleHQoJ+WPkemAgeWksei0pe+8jOivt+ajgOafpeaCqOeahFJQQ+mFjee9ruS/oeaBr++8gScpLmFuaW1hdGUoe29wYWNpdHk6ICcwLjUnfSwgInNsb3ciKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXNlbmQtcnBjJywgKGUpID0+IHsKICAgICAgICAgICAgICAgICQoJy5saXN0ZW5lci1saW5rLXJwYycpLmNsaWNrKCk7CiAgICAgICAgICAgICAgICAkKGUudGFyZ2V0KS50ZXh0KCflj5HpgIHlrozmiJDvvIzlj5HpgIHnu5Pmnpzop4HkuIrmlrnmjInpkq7vvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1vcGVuLXNldHRpbmcnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNob3dTZXR0aW5nKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1ycGMtdGFzaycsICgpID0+IHsKICAgICAgICAgICAgICAgIGxldCBycGMgPSBKU09OLnN0cmluZ2lmeSh7CiAgICAgICAgICAgICAgICAgICAgZG9tYWluOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nKSwKICAgICAgICAgICAgICAgICAgICBwb3J0OiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19wb3J0JyksCiAgICAgICAgICAgICAgICB9KSwgdXJsID0gYCR7cGFuLmR9Lz9ycGM9JHtiYXNlLmUocnBjKX0jJHtiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicpfWA7CiAgICAgICAgICAgICAgICBHTV9vcGVuSW5UYWIodXJsLCB7YWN0aXZlOiB0cnVlfSk7C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6L295Yqp5omLPC9zcGFuPjwvYnV0dG9uPjwvZGl2PmApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwdCA9PT0gJ3NoYXJlJykgJHRvb2xXcmFwID0gJChwYW4uYnRuLnNoYXJlKTsKICAgICAgICAgICAgJHRvb2xXcmFwLnByZXBlbmQoJGJ1dHRvbik7CiAgICAgICAgICAgICRidXR0b24uY2xpY2soKCkgPT4gYmFzZS5pbml0RGlhbG9nKCkpOwogICAgICAgIH0sCgogICAgICAgIGFzeW5jIGdldFBDU0xpbmsoKSB7CiAgICAgICAgICAgIHNlbGVjdExpc3QgPSB0aGlzLmdldFNlbGVjdGVkTGlzdCgpOwogICAgICAgICAgICBsZXQgZmlkTGlzdCA9IHRoaXMuX2dldEZpZExpc3QoKSwgdXJsLCByZXM7CgogICAgICAgICAgICBpZiAocHQgPT09ICdob21lJyB8fCBwdCA9PT0gJ21haW4nKSB7CiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0TGlzdC5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6K+35YWI5Yu+6YCJ6KaB5LiL6L2955qE5paH5Lu277yBJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZmlkTGlzdC5sZW5ndGggPT09IDIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6K+35omT5byA5paH5Lu25aS55ZCO5Yu+6YCJ5paH5Lu277yBJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmaWRMaXN0ID0gZW5jb2RlVVJJQ29tcG9uZW50KGZpZExpc3QpOwogICAgICAgICAgICAgICAgdXJsID0gYCR7cGFuLnBjc1swXX0mZnNpZHM9JHtmaWRMaXN0fWA7CiAgICAgICAgICAgICAgICByZXMgPSBhd2FpdCBiYXNlLmdldCh1cmwsIHsiVXNlci1BZ2VudCI6IHBhbi51YX0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwdCA9PT0gJ3NoYXJlJykgewogICAgICAgICAgICAgICAgdGhpcy5nZXRTaGFyZURhdGEoKTsKICAgICAgICAgICAgICAgIGlmIChzZWxlY3RMaXN0Lmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7flhYjli77pgInopoHkuIvovb3nmoTmlofku7bvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChmaWRMaXN0Lmxlbmd0aCA9PT0gMikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7fmiZPlvIDmlofku7blpLnlkI7li77pgInmlofku7bvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLnNpZ24pIHsKICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gYCR7cGFuLnBjc1syXX0mc3VybD0ke3BhcmFtcy5zdXJsfSZsb2dpZD0ke3BhcmFtcy5sb2dpZH1gOwogICAgICAgICAgICAgICAgICAgIGxldCByID0gYXdhaXQgYmFzZS5nZXQodXJsKTsKICAgICAgICAgICAgICAgICAgICBpZiAoci5lcnJubyA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuc2lnbiA9IHIuZGF0YS5zaWduOwogICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMudGltZXN0YW1wID0gci5kYXRhLnRpbWVzdGFtcDsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGlhbG9nID0gYXdhaXQgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0OiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ2luZm8nLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGDmj5DnpLrvvJror7flsIbmlofku7Y8c3BhbiBjbGFzcz0idGFnLWRhbmdlciI+W+S/neWtmOWIsOe9keebmF08L3NwYW4+8J+RieWJjeW+gDxzcGFuIGNsYXNzPSJ0YWctZGFuZ2VyIj5b5oiR55qE572R55uYXTwvc3Bhbj7kuK3kuIvovb3vvIFgLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uVGV4dDogJ+eCueWHu+S/neWtmCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogJ3RvcCcsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGlhbG9nLmlzQ29uZmlybWVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKCcudG9vbHMtc2hhcmUtc2F2ZS1oYicpWzBdLmNsaWNrKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLmJkc3Rva2VuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muivt+WFiOeZu+W9lee9keebmO+8gScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IGZvcm1EYXRhID0gbmV3IEZvcm1EYXRhKCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2VuY3J5cHQnLCBwYXJhbXMuZW5jcnlwdCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ3Byb2R1Y3QnLCBwYXJhbXMucHJvZHVjdCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ3VrJywgcGFyYW1zLnVrKTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgncHJpbWFyeWlkJywgcGFyYW1zLnByaW1hcnlpZCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2ZpZF9saXN0JywgZmlkTGlzdCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2xvZ2lkJywgcGFyYW1zLmxvZ2lkKTsKICAgICAgICAgICAgICAgIHBhcmFtcy5zaGFyZVR5cGUgPT09ICdzZWNyZXQnID8gZm9ybURhdGEuYXBwZW5kKCdleHRyYScsIHBhcmFtcy5leHRyYSkgOiAnJzsKICAgICAgICAgICAgICAgIHVybCA9IGAke3Bhbi5wY3NbMV19JnNpZ249JHtwYXJhbXMuc2lnbn0mdGltZXN0YW1wPSR7cGFyYW1zLnRpbWVzdGFtcH1gOwogICAgICAgICAgICAgICAgcmVzID0gYXdhaXQgYmFzZS5wb3N0KHVybCwgZm9ybURhdGEsIHsiVXNlci1BZ2VudCI6IHBhbi51YX0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChyZXMuZXJybm8gPT09IDApIHsKICAgICAgICAgICAgICAgIGxldCBodG1sID0gdGhpcy5nZW5lcmF0ZURvbShyZXMubGlzdCk7CiAgICAgICAgICAgICAgICB0aGlzLnNob3dNYWluRGlhbG9nKHBhblttb2RlXVswXSwgaHRtbCwgcGFuW21vZGVdWzFdKTsKICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMuZXJybm8gPT09IDExMikgewogICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8mumhtemdoui/h+acn++8jOivt+WIt+aWsOmHjeivle+8gScpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgbWVzc2FnZS5lcnJvcign5o+Q56S677ya6I635Y+W5LiL6L296ZO+5o6l5aSx6LSl77yB6K+35Yi35paw572R6aG15ZCO6YeN6K+V77yBJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBnZW5lcmF0ZURvbShsaXN0KSB7CiAgICAgICAgICAgIGxldCBjb250ZW50ID0gJzxkaXYgY2xhc3M9InBsLW1haW4iPic7CiAgICAgICAgICAgIGxldCBhbGlua0FsbFRleHQgPSAnJzsKICAgICAgICAgICAgYmFzZS5zb3J0QnlOYW1lKGxpc3QpOwogICAgICAgICAgICBsaXN0LmZvckVhY2goKHYsIGkpID0+IHsKICAgICAgICAgICAgICAgIGlmICh2LmlzZGlyID09PSAxKSByZXR1cm47CiAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSB2LnNlcnZlcl9maWxlbmFtZSB8fCB2LmZpbGVuYW1lOwogICAgICAgICAgICAgICAgbGV0IGV4dCA9IGJhc2UuZ2V0RXh0ZW5zaW9uKGZpbGVuYW1lKTsKICAgICAgICAgICAgICAgIGxldCBzaXplID0gYmFzZS5zaXplRm9ybWF0KHYuc2l6ZSk7CiAgICAgICAgICAgICAgICBsZXQgZGxpbmsgPSB2LmRsaW5rOwogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdhcGknKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFwaSIgaHJlZj0iJHtkbGlua30iIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7ZGxpbmt9IiBkYXRhLWluZGV4PSIke2l9Ij4ke2RsaW5rfTwvYT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLXRpcCIgc3R5bGU9ImRpc3BsYXk6IG5vbmUiPjxzcGFuPuiLpeayoeacieW8ueWHuklETeS4i+i9veahhu+8jOaJvuWIsElETSA8Yj7pgInpobk8L2I+IC0+IDxiPuaWh+S7tuexu+WeizwvYj4gLT4gPGI+56ys5LiA5Liq5qGGPC9iPiDkuK3mt7vliqDlkI7nvIAgPHNwYW4gY2xhc3M9InBsLWV4dCI+JHtleHR9PC9zcGFuPu+8jDxhIGhyZWY9IiR7cGFuLmlkbX0iIHRhcmdldD0iX2JsYW5rIiBjbGFzcz0icGwtYSI+6K+m6KeB5q2k5aSEPC9hPjwvc3Bhbj4gPHNwYW4gY2xhc3M9InBsLWJhY2sgbGlzdGVuZXItYmFjayI+6L+U5ZuePC9zcGFuPjwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLWl0ZW0tcHJvZ3Jlc3MiIHN0eWxlPSJkaXNwbGF5OiBub25lIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3MiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3Mtb3V0ZXIiPjwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3MtaW5uZXIiIHN0eWxlPSJ3aWR0aDo1JSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLXByb2dyZXNzLWlubmVyLXRleHQiPjAlPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwbC1wcm9ncmVzcy1zdG9wIGxpc3RlbmVyLXN0b3AiPuWPlua2iOS4i+i9vTwvc3Bhbj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InBsLXByb2dyZXNzLXRpcCI+5pyq5Y+R546wSURN77yM5L2/55So6Ieq5bim5rWP6KeI5Zmo5LiL6L29PC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGwtcHJvZ3Jlc3MtaG93IGxpc3RlbmVyLWhvdyI+5aaC5L2V5ZSk6LW3SURN77yfPC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PjwvZGl2PmA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2FyaWEnKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGFsaW5rID0gdGhpcy5jb252ZXJ0TGlua1RvQXJpYShkbGluaywgZmlsZW5hbWUsIHBhbi51YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYWxpbmspID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiB0YXJnZXQ9Il9ibGFuayIgaHJlZj0iJHthbGluay5saW5rfSIgdGl0bGU9IueCueWHu+WkjeWItmFyaWEyY+mTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGluay5saW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmsudGV4dCl9PC9hPiA8L2Rpdj5gOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFsaW5rQWxsVGV4dCArPSBhbGluayArICdcclxuJzsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFyaWEiIGhyZWY9IiR7YWxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2YXJpYTJj6ZO+5o6lIiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmspfTwvYT4gPC9kaXY+YDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ3JwYycpIHsKICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICA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AgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFsaW5rQWxsVGV4dCArPSBhbGluayArICdcclxuJzsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFyaWEiIGhyZWY9IiR7YWxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2Y3VybOmTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGlua30iPiR7ZGVjb2RlVVJJQ29tcG9uZW50KGFsaW5rKX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdiYycpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgYWxpbmsgPSB0aGlzLmNvbnZlcnRMaW5rVG9CQyhkbGluaywgZmlsZW5hbWUsIHBhbi51YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYWxpbmspID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiBocmVmPSIke2RlY29kZVVSSUNvbXBvbmVudChhbGluay5saW5rKX0iIHRpdGxlPSLngrnlh7vnlKjmr5TnibnlvZfmmJ/kuIvovb0iIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7YWxpbmt9Ij4ke2RlY29kZVVSSUNvbXBvbmVudChhbGluay50ZXh0KX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgYWxpbmtBbGxUZXh0ICs9IGFsaW5rICsgJ1xyXG4nOwogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiBocmVmPSIke2RlY29kZVVSSUNvbXBvbmVudChhbGluayl9IiB0aXRsZT0i54K55Ye755So5q+U54m55b2X5pif5LiL6L29IiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmspfTwvYT4gPC9kaXY+YDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBjb250ZW50ICs9ICc8L2Rpdj4nOwogICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2FyaWEnKQogICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtZXh0cmEi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bn06JHtycGMucG9ydH0ke3JwYy5wYXRofWA7CiAgICAgICAgICAgIGxldCBycGNEYXRhID0gewogICAgICAgICAgICAgICAgaWQ6IG5ldyBEYXRlKCkuZ2V0VGltZSgpLAogICAgICAgICAgICAgICAganNvbnJwYzogJzIuMCcsCiAgICAgICAgICAgICAgICBtZXRob2Q6ICdhcmlhMi5hZGRVcmknLAogICAgICAgICAgICAgICAgcGFyYW1zOiBbYHRva2VuOiR7cnBjLnRva2VufWAsIFtsaW5rXSwgewogICAgICAgICAgICAgICAgICAgIGRpcjogcnBjLmRpciwKICAgICAgICAgICAgICAgICAgICBvdXQ6IGZpbGVuYW1lLAogICAgICAgICAgICAgICAgICAgIGhlYWRlcjogW2BVc2VyLUFnZW50OiAke3Bhbi51YX1gLCBgQ29va2llOiBCRFVTUz0ke0JEVVNTfWBdCiAgICAgICAgICAgICAgICB9XQogICAgICAgICAgICB9OwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgbGV0IHJlcyA9IGF3YWl0IGJhc2UucG9zdCh1cmwsIHJwY0RhdGEsIHsiVXNlci1BZ2VudCI6IHBhbi51YX0sICcnKTsKICAgICAgICAgICAgICAgIGlmIChyZXMucmVzdWx0KSByZXR1cm4gJ3N1Y2Nlc3MnOwogICAgICAgICAgICAgICAgcmV0dXJuICdmYWlsJzsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgcmV0dXJuICdmYWlsJzsKICAgICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIGdldFNlbGVjdGVkTGlzdCgpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJldHVybiByZXF1aXJlKCdzeXN0ZW0tY29yZTpjb250ZXh0L2NvbnRleHQuanMnKS5pbnN0YW5jZUZvclN5c3RlbS5saXN0LmdldFNlbGVjdGVkKCk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcud3Atcy1jb3JlLXBhbicpLl9fdnVlX18uc2VsZWN0ZWRMaXN0OwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgZ2V0TG9naWQoKSB7CiAgICAgICAgICAgIGxldCB1dCA9IHJlcXVpcmUoInN5c3RlbS1jb3JlOmNvbnRleHQvY29udGV4dC5qcyIpLmluc3RhbmNlRm9yU3lzdGVtLnRvb2xzLmJhc2VTZXJ2aWNlOwogICAgICAgICAgICByZXR1cm4gdXQuYmFzZTY0RW5jb2RlKGJhc2UuZ2V0Q29va2llKCJCQUlEVUlEIikpOwogICAgICAgIH0sCgogICAgICAgIGdldFNoYXJlRGF0YSgpIHsKICAgICAgICAgICAgbGV0IHJlcyA9IGxvY2Fscy5kdW1wKCk7CiAgICAgICAgICAgIHBhcmFtcy5zaGFyZVR5cGUgPSAnc2VjcmV0JzsKICAgICAgICAgICAgcGFyYW1zLnNpZ24gPSAnJzsKICAgICAgICAgICAgcGFyYW1zLnRpbWVzdGFtcCA9ICcnOwogICAgICAgICAgICBwYXJhbXMuYmRzdG9rZW4gPSByZXMuYmRzdG9rZW4udmFsdWU7CiAgICAgICAgICAgIHBhcmFtcy5jaGFubmVsID0gJ2NodW5sZWknOwogICAgICAgICAgICBwYXJhbXMuY2xpZW50dHlwZSA9IDA7CiAgICAgICAgICAgIHBhcmFtcy53ZWIgPSAxOwogICAgICAgICAgICBwYXJhbXMuYXBwX2lkID0gMjUwNTI4OwogICAgICAgICAgICBwYXJhbXMuZW5jcnlwdCA9IDA7CiAgICAgICAgICAgIHBhcmFtcy5wcm9kdWN0ID0gJ3NoYXJlJzsKICAgICAgICAgICAgcGFyYW1zLmxvZ2lkID0gdGhpcy5nZXRMb2dpZCgpOwogICAgICAgICAgICBwYXJhbXMucHJpbWFyeWlkID0gcmVzLnNoYXJlaWQudmFsdWU7CiAgICAgICAgICAgIHBhcmFtcy51ayA9IHJlcy5zaGFyZV91ay52YWx1ZTsKICAgICAgICAgICAgcGFyYW1zLnNoYXJlVHlwZSA9PT0gJ3NlY3JldCcgJiYgKHBhcmFtcy5leHRyYSA9IHRoaXMuX2dldEV4dHJhKCkpOwogICAgICAgICAgICBwYXJhbXMuc3VybCA9IHRoaXMuX2dldFN1cmwoKTsKICAgICAgICB9LAoKICAgICAgICBkZXRlY3RQYWdlKCkgewogICAgICAgICAgICBsZXQgcGF0aCA9IGxvY2F0aW9uLnBhdGhuYW1lOwogICAgICAgICAgICBpZiAoL15cL2Rpc2tcL2hvbWUvLnRlc3QocGF0aCkpIHJldHVybiAnaG9tZSc7CiAgICAgICAgICAgIGlmICgvXlwvZGlza1wvbWFpbi8udGVzdChwYXRoKSkgcmV0dXJuICdtYWluJzsKICAgICAgICAgICAgaWYgKC9eXC8oc3xzaGFyZSlcLy8udGVzdChwYXRoKSkgcmV0dXJuICdzaGFyZSc7CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCgogICAgICAgIHNob3dNYWluRGlhbG9nKHRpdGxlLCBodG1sLCBmb290ZXIpIHsKICAgICAgICAgICAgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgIHRpdGxlLAogICAgICAgICAgICAgICAgaHRtbCwKICAgICAgICAgICAgICAgIGZvb3RlciwKICAgICAgICAgICAgICAgIGFsbG93T3V0c2lkZUNsaWNrOiBmYWxzZSwKICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiBmYWxzZSwKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAndG9wJywKICAgICAgICAgICAgICAgIHdpZHRoLAogICAgICAgICAgICAgICAgcGFkZGluZzogJzE1cHggMjBweCA1cHgnLAogICAgICAgICAgICAgICAgY3VzdG9tQ2xhc3MsCiAgICAgICAgICAgIH0pLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcmVzZXREYXRhKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCgogICAgICAgIGFzeW5jIGluaXRQYW5MaW5rZXIoKSB7CiAgICAgICAgICAgIGJhc2UuaW5pdERlZmF1bHRDb25maWcoKTsKICAgICAgICAgICAgYmFzZS5hZGRQYW5MaW5rZXJTdHlsZSgpOwogICAgICAgICAgICBwdCA9IHRoaXMuZGV0ZWN0UGFnZSgpOwogICAgICAgICAgICBsZXQgcmVzID0gYXdhaXQgYmFzZS5wb3N0CiAgICAgICAgICAgIChgaHR0cHM6Ly9hcGkueW91eGlhb2hvdS5jb20vY29uZmlnP3Zlcj0ke3ZlcnNpb259JmE9JHthdXRob3J9YCwge30sIHt9LCAndGV4dCcpOwogICAgICAgICAgICBwYW4gPSBKU09OLnBhcnNlKGJhc2UuZChyZXMpKTsKICAgICAgICAgICAgT2JqZWN0LmZyZWV6ZSAmJiBPYmplY3QuZnJlZXplKHBhbik7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKHBhbik7CiAgICAgICAgICAgIHBhbi5udW0gPT09IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfaW5pdF9jb2RlJykgPyB0aGlzLmFkZEJ1dHRvbigpIDogdGhpcy5hZGRJbml0QnV0dG9uKCk7CiAgICAgICAgICAgIGJhc2UuY3JlYXRlVGlwKCk7CiAgICAgICAgICAgIGJhc2UucmVnaXN0ZXJNZW51Q29tbWFuZCgpOwogICAgICAgIH0KICAgIH07CgogICAgbGV0IG1haW4gPSB7CiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgaWYgKC8ocGFufHl1bikuYmFpZHUuY29tLy50ZXN0KGxvY2F0aW9uLmhvc3QpKSB7CiAgICAgICAgICAgICAgICBiYWlkdS5pbml0UGFuTGlua2VyKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwoKICAgIG1haW4uaW5pdCgpOwogICAgfQogICAgfQp9KSgpOw==
Add Comment
Please, Sign In to add comment