Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_解析@base64://KGZ1bmN0aW9uKCkgewogICAgJ3VzZSBzdHJpY3QnOwogCiAgICB2YXIgZG9tSGVhZCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdoZWFkJylbMF07CiAKICAgIHZhciBkb21TdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N0eWxlJyk7CiAKICAgIGRvbVN0eWxlLnR5cGUgPSAndGV4dC9jc3MnOwogCiAgICBkb21TdHlsZS5yZWwgPSAnc3R5bGVzaGVldCc7CiAgICAvL+W5s+WPsOWIpOaWrQogICAgdmFyIGlzTW9iaWxlID0gL0FuZHJvaWR8d2ViT1N8aVBob25lfGlQb2R8QmxhY2tCZXJyeS9pLnRlc3QobmF2aWdhdG9yLnVzZXJBZ2VudCk7CiAKICAgIGlmKGlzTW9iaWxlKXsKIAogICAgICAgIGxldCBwbGF5TGluZSA9IFsKICAgICAgICAgICAgeyJuYW1lIjoi57qv5YeAMSIsInVybCI6Imh0dHBzOi8vaW0xOTA3LnRvcC8/ang9In0sCiAgICAgICAgICAgIHsibmFtZSI6IkLnq5kxIiwidXJsIjoiaHR0cHM6Ly9qeC5qc29ucGxheWVyLmNvbS9wbGF5ZXIvP3VybD0ifSwKICAgICAgICAgICAgeyJuYW1lIjoi54ix6LGGIiwidXJsIjoiaHR0cHM6Ly9qeC5haWRvdWVyLm5ldC8/dXJsPSJ9LAogICAgICAgICAgICB7Im5hbWUiOiLlkKzkuZAiLCJ1cmwiOiJodHRwczovL2p4LmRqNnUuY29tLz91cmw9In0sCiAgICAgICAgICAgIHsibmFtZSI6IllUIiwidXJsIjoiaHR0cHM6Ly9qeC55YW5ndHUudG9wLz91cmw9In0KICAgICAgICBdOwogCiAgICAgICAgbGV0IHVzZVdlYiA9IFsnbS5iaWxpYmlsaS5jb20nLCd5b3VrdS5jb20nLCd3d3cueW91a3UuY29tJywnbS55b3VrdS5jb20nLCdtLnYucXEuY29tJywnbS5pcWl5aS5jb20nLCdtLm1ndHYuY29tJywnbS50di5zb2h1LmNvbScsJ20uMTkwNS5jb20nLCdtLnBwdHYuY29tJywnbS5sZS5jb20nXTsKIAogICAgICAgIGlmKHVzZVdlYi5pbmRleE9mKGxvY2F0aW9uLmhvc3QpID09IC0xKXsKICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4jeaYr+W6lOeUqOe9keermScpO3JldHVybjsKICAgICAgICB9CiAKICAgICAgICBmdW5jdGlvbiBzZXRDb29raWUoY25hbWUsY3ZhbHVlLGV4ZGF5cyl7CiAKICAgICAgICAgICAgdmFyIGQgPSBuZXcgRGF0ZSgpOwogCiAgICAgICAgICAgIGQuc2V0VGltZShkLmdldFRpbWUoKSsoZXhkYXlzKjI0KjYwKjYwKjEwMDApKTsKIAogICAgICAgICAgICB2YXIgZXhwaXJlcyA9ICJleHBpcmVzPSIrZC50b0dNVFN0cmluZygpOwogCiAgICAgICAgICAgIGRvY3VtZW50LmNvb2tpZSA9IGNuYW1lKyI9IitjdmFsdWUrIjsgIitleHBpcmVzOwogICAgICAgIH0KIAogICAgICAgIGZ1bmN0aW9uIGdldENvb2tpZShjbmFtZSl7CiAgICAgICAgICAgIHZhciBuYW1lID0gY25hbWUgKyAiPSI7CiAgICAgICAgICAgIHZhciBjYSA9IGRvY3VtZW50LmNvb2tpZS5zcGxpdCgnOycpOwogICAgICAgICAgICBmb3IodmFyIGk9MDsgaTxjYS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgdmFyIGMgPSBjYVtpXS50cmltKCk7CiAgICAgICAgICAgICAgICBpZiAoYy5pbmRleE9mKG5hbWUpPT0wKSB7IHJldHVybiBjLnN1YnN0cmluZyhuYW1lLmxlbmd0aCxjLmxlbmd0aCk7IH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gIiI7CiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rp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ICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZCh0b2FzdERvbSk7CiAKICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsKIAogICAgICAgICAgICAgICAgdmFyIGQgPSAwLjU7CiAKICAgICAgICAgICAgICAgIHRvYXN0RG9tLnN0eWxlLndlYmtpdFRyYW5zaXRpb24gPSAnLXdlYmtpdC10cmFuc2Zvcm0gJyArIGQgKyAncyBlYXNlLWluLCBvcGFjaXR5ICcgKyBkICsgJ3MgZWFzZS1pbic7CiAKICAgICAgICAgICAgICAgIHRvYXN0RG9tLnN0eWxlLm9wYWNpdHkgPSAnMCc7CiAKICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IGRvY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQodG9hc3REb20pIH0sIGQgKiAxMDAwKTsKIAogICAgICAgICAgICB9LCBkdXJhdGlvbik7CiAKICAgICAgICB9CiAKICAgICAgICBmdW5jdGlvbiBwbGF5VmlkZW9GdW5jKCl7CiAgICAgICAgICAgIC8vY3NzCiAgICAgICAgICAgIGxldCBwbGF5VmlkZW9TdHlsZSA9IGAKICAgICAgICAgICAgLnpobV9wbGF5X3ZpZG9lX2ljb257CiAgICAgICAgICAgICAgICBwYWRkaW5nLXRvcDoycHg7Y3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICBkaXNwbGF5OmJsb2NrOwogICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7bGV0OjBweDt0b3A6MzYwcHg7dGV4dC1hbGlnbjpjZW50ZXI7b3ZlcmZsb3c6dmlzaWJsZTsKIAogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb193cmFwewogICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7bGVmdDo0MHB4O3RvcDozNjBweDsKICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTsKICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZXsKICAgICAgICAgICAgICAgIHdpZHRoOjMyMHB4OwogICAgICAgICAgICAgICAgaGVpZ2h0OjMxNnB4OwogICAgICAgICAgICAgICAgb3ZlcmZsb3cteTpzY3JvbGw7CiAgICAgICAgICAgICAgICBvdmVyZmxvdy14OmhpZGRlbjsKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZV9saW5lX3VsewogICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgZmxleC1mbG93OiByb3cgd3JhcDsKICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICBwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7CiAKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saXsKICAgICAgICAgICAgICAgIHBhZGRpbmc6NHB4IDBweDsKICAgICAgICAgICAgICAgIG1hcmdpbjoycHg7CiAgICAgICAgICAgICAgICB3aWR0aDozMCU7CiAgICAgICAgICAgICAgICBjb2xvcjojRkZGOwogICAgICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmMjQ0NDM7CiAgICAgICAgICAgICAgICBib3gtc2hhZG93OjBweCAwcHggMTBweCAjZmZmOwogICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGk6aG92ZXJ7CiAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLnpobV9saW5lX3NlbGVjdGVkewogICAgICAgICAgICAgICAgY29sb3I6IzI2MDAzMzsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZjYzBjMAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2p4ewogICAgICAgICAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7dG9wOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgfQogICAgICAgICAgICBgOwogCiAgICAgICAgICAgIGRvbVN0eWxlLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHBsYXlWaWRlb1N0eWxlKSk7CiAKICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAKICAgICAgICAgICAgLy90ZW1wbGF0ZTppY29uLHBsYXlMaW5lOwogICAgICAgICAgICBsZXQgcGxheVdyYXBIdG1sID0gIjxkaXYgaHJlZj0namF2YXNjcmlwdDp2b2lkKDApJyB0YXJnZXQ9J19ibGFuaycgc3R5bGU9JycgY2xhc3M9J3BsYXlCdXR0b24gemhtX3BsYXlfdmlkb2VfaWNvbicgaWQ9J3pobWxvZ28nPjxpbWcgY2xhc3M9J2ljb25Mb2dvJyBzcmM9J2RhdGE6aW1hZ2UvZ2lmO2Jhc2U2NCxSMGxHT0RsaFpBQ1dBUGNBQVBKRVEvdjcrZm5MeVBqQ3dmUm5aZm5UMFBKS1Nmakd4UHYyOVBuWTEvTmJXd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gICAgICAgICAgIF07CiAKICAgICAgICAgICAgLy/liJvlu7psb2dvX2ljb24KICAgICAgICAgICAgY3JlYXRlRWxlbWVudCgnZGl2JywnemhtSWNvbicpOwogCiAgICAgICAgICAgIGxldCB6aG1QbGF5ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobUljb24nKTsKIAogICAgICAgICAgICB6aG1QbGF5LmlubmVySFRNTCA9IHBsYXlXcmFwSHRtbDsKIAogICAgICAgICAgICBsZXQganhWaWRlb1dlYiA9IGp4VmlkZW9EYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWYubWF0Y2goaXRlbS5tYXRjaCk7CiAKICAgICAgICAgICAgfSkKIAogICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtbG9nbycpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICBsZXQganhWaWRlb1dlYiA9IGp4VmlkZW9EYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICBpZihqeFZpZGVvV2ViLmxlbmd0aCA9PSAwKXsKIAogICAgICAgICAgICAgICAgICAgIHRvYXN0KCfor7flnKjop4bpopHmkq3mlL7pobXngrnlh7vlm77moIcnKTsKIAogICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0ganhWaWRlb1dlYlswXTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZURpdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56aG1fcGxheV92aWRlb193cmFwJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVNob3cgPSBwbGF5TGluZURpdi5zdHlsZS5kaXNwbGF5OwogCiAgICAgICAgICAgICAgICAgICAgcGxheVNob3cgPT0gJ25vbmUnPyBwbGF5TGluZURpdi5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJzpwbGF5TGluZURpdi5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwogCiAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lVGQuZm9yRWFjaChmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpIHpobV9saW5lX3NlbGVjdGVkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldENvb2tpZSgncGxheUxpbmVBY3Rpb24nLHRoaXMuZ2V0QXR0cmlidXRlKCd1cmwnKSwzMCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dXZWJOb2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihub3dOb2RlKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93V2ViTm9kZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUlmcmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5SWZyYW1lJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5SWZyYW1lLnNyYz0gaXRlbS5nZXRBdHRyaWJ1dGUoJ3VybCcpK2xvY2F0aW9uLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikee9keermee7k+eCueS4jeWtmOWcqCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvU2VsZWN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLicranhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgIHZpZGVvU2VsZWN0LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfSkKIAogCiAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgIGxldCBqeFZpZGVvV2ViID0ganhWaWRlb0RhdGEuZmlsdGVyKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWYubWF0Y2goaXRlbS5tYXRjaCk7CiAKICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIGlmKGp4VmlkZW9XZWIubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvU2VsZWN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLicranhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvU2VsZWN0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb1NlbGVjdC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgfSwxMDAwKQogCiAgICAgICAgfQogCiAgICAgICAgcGxheVZpZGVvRnVuYygpOwogCiAgICB9ZWxzZXsKICAgICAgICAvKi0tY29uZmlnLS0qLwogICAgICAgIHZhciBDb25maWcgPXsKIAogICAgICAgIGNvdXBvblVybDp3aW5kb3cubG9jYXRpb24uaHJlZiwKIAogICAgICAgIGNvdXBvbkhvc3Q6d2luZG93LmxvY2F0aW9uLmhvc3QsCiAKICAgICAgICB3ZWJVcmw6J2h0dHA6Ly9tdXNpYy5saXV6aGlqaW4uY24vJywKIAogICAgICAgIGljb25WaXBUb3A6MzYwLAogCiAgICAgICAgaWNvblZpcFBvc2l0aW9uIDogJ2xlZnQnLAogCiAgICAgICAgaWNvblZpcFdpZHRoIDogNDAsCiAKICAgICAgICBjb3Vwb25UaW1lck51bSA6IDEwMCwvLzEwMOasoeetieS6jjEw56eSCiAKICAgICAgICBjb3Vwb25XYWl0VGltZSA6IDEwMCwKIAogICAgICAgIGljb25XYWl0VGltZSA6IDEwMCwKIAogICAgICAgIGljb25WaXBPcGFjaXR5OjEwMCwKIAogICAgICAgIHNlbGVjdGVkTGVmdDonc2VsZWN0ZWQnLAogCiAgICAgICAgc2VsZWN0ZWRSaWdodDonJywKIAogICAgICAgIHZpZGVvUGxheUxpbmVBZGQ6R01fZ2V0VmFsdWUoJ3ZpZGVvUGxheUxpbmVBZGQnLDApLAogCiAgICAgICAgfQogCiAgICAgICAgdmFyIHtjb3Vwb25VcmwsCiAgICAgICAgICAgIGNvdXBvbkhvc3QsCiAgICAgICAgICAgIHdlYlVybCwKICAgICAgICAgICAgaWNvblZpcFRvcCwKICAgICAgICAgICAgaWNvblZpcFBvc2l0aW9uLAogICAgICAgICAgICBpY29uVmlwV2lkdGgsCiAgICAgICAgICAgIGljb25WaXBPcGFjaXR5LAogICAgICAgICAgICBjb3Vwb25UaW1lck51bSwKICAgICAgICAgICAgY291cG9uV2FpdFRpbWUsCiAgICAgICAgICAgIGljb25XYWl0VGltZSwKICAgICAgICAgICAgc2VsZWN0ZWRMZWZ0LAogICAgICAgICAgICBzZWxlY3RlZFJpZ2h0LAogICAgICAgICAgICB2aWRlb1BsYXlMaW5lQWRkLAogICAgICAgIH0gPSBDb25maWc7CiAgICAgICAgLyotLWxhbmctLSovCiAgICAgICAgdmFyIGxhbmcgPSB7CiAgICAgICAgICAgIHNldDon6K6+572uJywKICAgICAgICAgICAgaWNvblBvc2l0aW9uOiflm77moIforr7nva4nLAogICAgICAgICAgICBwbGF5VmlkZW86J+ino+aekOiuvue9ricsCiAgICAgICAgICAgIGljb25IZWlnaHQ6J+Wbvuagh+mrmOW6picsCiAgICAgICAgICAgIGljb25XaWR0aDon5Zu+5qCH5aSn5bCPJywKICAgICAgICAgICAgaWNvbkxpbmU6J+awtOW5s+S9jee9ricsCiAgICAgICAgICAgIGljb25XYWl0VGltZTon562J5b6F5pe26Ze0JywKICAgICAgICAgICAgaWNvbkxlZnQ6J+mdoOW3picsCiAgICAgICAgICAgIGljb25SaWdodDon6Z2g5Y+zJywKICAgICAgICAgICAgdGlwSWNvbkhlaWdodDon6buY6K6kMzYwLOW7uuiurjF+NTAwJywKICAgICAgICAgICAgdGlwSWNvbldpZHRoOifpu5jorqQ0MCzlu7rorq4yMH41MCcsCiAgICAgICAgICAgIHRpcEljb25PcGFjaXR5Oifor7floavlhpkwLTEwMOeahOaVtOaVsCcsCiAgICAgICAgICAgIHRpcEVycm9ySWNvbkhlaWdodDonPOWbvuagh+S9jee9rj7kuK3nmoQ85Zu+5qCH6auY5bqmPuW6lOS4ujEwMDDku6XlhoXmraPmlbTmlbDvvIzlu7rorq4xfjUwMCcsCiAgICAgICAgICAgIHRpcEVycm9ySWNvbldpZHRoOic85Zu+5qCH5L2N572uPuS4reeahDzlm77moIflpKflsI8+5bqU5Li6MTAw5Lul5YaF5q2j5pW05pWw77yM5bu66K6uMjB+NTAnLAogICAgICAgICAgICB0aXBFcnJvckljb25PcGFjaXR5OifloavlhpnmlbDlrZfkuI3mraPnoa4nLAogICAgICAgICAgICBzZXRQbGF5VmlkZW86J+ino+aekOiuvue9ricsCiAgICAgICAgICAgIHBsYXlWaWRlb0xpbmVBZGQ6J+ermeWkluino+aekCcsCiAgICAgICAgICAgIHRpcFBsYXlWaWRlb0xpbmVBZGQ6J+ivt+Whq+WFpee6v+i3r+WQjeensOWSjOWcsOWdgO+8jOS4remXtOeUqOWNiuinkumAl+WPt+malOW8gO+8jOavj+e6v+i3r+S4gOihjOOAgicsCiAgICAgICAgICAgIHNjcmlwdHNpbnN0YWxsOifohJrmnKzlronoo4UnLAogICAgICAgICAgICBzY3JpcHRzdXNlOifkvb/nlKjmlrnms5UnLAogICAgICAgICAgICBxdWVzdGlvbjon5bi46KeB6Zeu6aKYJywKICAgICAgICAgICAgdGdncm91cDonVGVsZWdyYW0nCiAgICAgICAgfTsKIAogICAgICAgIHZhciBqeFZpZGVvPVsKIAogICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsbWF0Y2g6L2h0dHBzPzpcL1wvdlwucXFcLmNvbS8sbmFtZToncXFQQyd9LAogICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi9odHRwcz86XC9cL21cLnZcLnFxXC5jb20vLG5hbWU6J3FxTW9iaWxlJ30sCiAKICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBtYXRjaDovXmh0dHBzPzpcL1wvd3d3XC5pcWl5aVwuY29tLyxuYW1lOidpcWl5aVBjJ30sCiAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbWF0Y2g6L15odHRwcz86XC9cL3d3d1wuaXFcLmNvbS99LAogICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG5vZGU6Ii5tLXZpZGVvLXBsYXllci13cmFwIixtYXRjaDovXmh0dHBzPzpcL1wvbS5pcWl5aVwuY29tLyxhcmVhQ2xhc3NOYW1lOidtLXNsaWRpbmctbGlzdCd9LAogCiAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbm9kZToiI3BsYXllciIsbm9kZVR5cGU6J2lkJyxtYXRjaDovbVwueW91a3VcLmNvbVwvYWxpcGF5X3ZpZGVvXC9pZF8vfSwKICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjcGxheWV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20vP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi6Kej5p6QbGEiLCJ1cmwiOiJodHRwczovL2FwaS5qaWV4aS5sYS8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJNM1U4IiwidXJsIjoiaHR0cHM6Ly9qeC5tM3U4LnR2L2ppZXhpLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IlBNIiwidXJsIjoiaHR0cHM6Ly93d3cucGxheW0zdTguY24vamlleGkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi55uY5Y+kIiwidXJsIjoiaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jYy9qaWV4aS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLkuIPlk6UiLCJ1cmwiOiJodHRwczovL2p4Lm5ueHYuY24vdHYucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoi5ZCs5LmQIiwidXJsIjoiaHR0cHM6Ly9qeC5kajZ1LmNvbS8/dXJsPSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnu7TlpJoiLCJ1cmwiOiJodHRwczovL2p4Lml2aXRvLmNuLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuiZvuexsyIsInVybCI6Imh0dHBzOi8vangueG1mbHYuY29tLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IllUIiwidXJsIjoiaHR0cHM6Ly9qeC55YW5ndHUudG9wLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuWknOW5lSIsInVybCI6Imh0dHBzOi8vd3d3LnllbXUueHl6Lz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuS6keaekCIsInVybCI6Imh0dHBzOi8vangueXBhcnNlLmNvbS9pbmRleC5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiIxN+S6kSIsInVybCI6Imh0dHBzOi8vd3d3LjE3MTd5dW4uY29tL2p4L3R5LnBocD91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IjE4MCIsInVybCI6Imh0dHBzOi8vanguMDAwMTgwLnRvcC9qeC8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiI0SyIsInVybCI6Imh0dHBzOi8vanguNGtkdi5jb20vP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiODA5MCIsInVybCI6Imh0dHBzOi8vd3d3LjgwOTBnLmNuLz91cmw9IiwibW9iaWxlIjowfQogICAgICAgICAgICBdCiAKICAgICAgICB2YXIga2V5Q29kZSA9IFsKICAgICAgICAgICAge2NvZGU6NDgsaXNTaGlmdDpmYWxzZSx2YWx1ZTonMCd9LAogICAgICAgICAgICB7Y29kZTo0OCxpc1NoaWZ0OnRydWUsdmFsdWU6JyknfSwKICAgICAgICAgICAge2NvZGU6NDksaXNTaGlmdDpmYWxzZSx2YWx1ZTonMSd9LAogICAgICAgICAgICB7Y29kZTo0OSxpc1NoaWZ0OnRydWUsdmFsdWU6JyEnfSwKICAgICAgICAgICAge2NvZGU6NTAsaXNTaGlmdDpmYWxzZSx2YWx1ZTonMid9LAogICAgICAgICAgICB7Y29kZTo1MCxpc1NoaWZ0OnRydWUsdmFsdWU6J0AnfSwKICAgICAgICAgICAge2NvZGU6NTEsaXNTaGlmdDpmYWxzZSx2YWx1ZTonMyd9LAogICAgICAgICAgICB7Y29kZTo1MSxpc1NoaWZ0OnRydWUsdmFsdWU6JyMnfSwKICAgICAgICAgICAge2Nv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YsaXNTaGlmdDpmYWxzZSx2YWx1ZTonbCd9LAogICAgICAgICAgICB7Y29kZTo3Nixpc1NoaWZ0OnRydWUsdmFsdWU6J0wnfSwKICAgICAgICBdCiAKICAgICAgICAvKi0tQ2xhc3MtLSovCiAgICAgICAgY2xhc3MgQmFzZUNsYXNzewogCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CiAKICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdpY29uUG9zaXRpb25TZXRQYWdlJykgIT0gMCl7CiAgICAgICAgICAgICAgICAgICAgLypjb29raWXlrZjlgqgKICAgICAgICAgICAgICAgICAgICBpY29uVmlwVG9wID0gdGhpcy5nZXRDb29raWUoJ2ljb25Ub3AnKT90aGlzLmdldENvb2tpZSgnaWNvblRvcCcpOmljb25WaXBUb3A7CiAKICAgICAgICAgICAgICAgICAgICBpY29uVmlwUG9zaXRpb24gPSB0aGlzLmdldENvb2tpZSgnaWNvblBvc2l0aW9uJyk/dGhpcy5nZXRDb29raWUoJ2ljb25Qb3NpdGlvbicpOmljb25WaXBQb3NpdGlvbjsKIAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkTGVmdCA9IGljb25WaXBQb3NpdGlvbj09J2xlZnQnPydzZWxlY3RlZCc6Jyc7CiAKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZFJpZ2h0ID0gaWNvblZpcFBvc2l0aW9uPT0ncmlnaHQnPydzZWxlY3RlZCc6Jyc7CiAKICAgICAgICAgICAgICAgICAgICBpY29uVmlwV2lkdGggPSB0aGlzLmdldENvb2tpZSgnaWNvbldpZHRoJyk/dGhpcy5nZXRDb29raWUoJ2ljb25XaWR0aCcpOmljb25WaXBXaWR0aDsKICAgICAgICAgICAgICAgICAgICAqLwogCiAgICAgICAgICAgICAgICAgICAgaWNvblZpcFRvcCA9IEdNX2dldFZhbHVlKCdpY29uVG9wJykgfHwgR01fZ2V0VmFsdWUoJ2ljb25Ub3AnKSA9PSAwP0dNX2dldFZhbHVlKCdpY29uVG9wJyk6aWNvblZpcFRvcDsKIAogICAgICAgICAgICAgICAgICAgIGljb25WaXBQb3NpdGlvbiA9IEdNX2dldFZhbHVlKCdpY29uUG9zaXRpb24nKT9HTV9nZXRWYWx1ZSgnaWNvblBvc2l0aW9uJyk6aWNvblZpcFBvc2l0aW9uOwogCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRMZWZ0ID0gaWNvblZpcFBvc2l0aW9uPT0nbGVmdCc/J3NlbGVjdGVkJzonJzsKIAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkUmlnaHQgPSBpY29uVmlwUG9zaXRpb249PSdyaWdodCc/J3NlbGVjdGVkJzonJzsKIAogICAgICAgICAgICAgICAgICAgIGljb25WaXBXaWR0aCA9IEdNX2dldFZhbHVlKCdpY29uV2lkdGgnKT9HTV9nZXRWYWx1ZSgnaWNvbldpZHRoJyk6aWNvblZpcFdpZHRoOwogCiAgICAgICAgICAgICAgICAgICAgaWNvbldhaXRUaW1lID0gR01fZ2V0VmFsdWUoJ2ljb25XYWl0VGltZScpP0dNX2dldFZhbHVlKCdpY29uV2FpdFRpbWUnKSoxMDAwOmljb25XYWl0VGltZTsKIAogICAgICAgICAgICAgICAgICAgIGljb25WaXBPcGFjaXR5ID0gR01fZ2V0VmFsdWUoJ2ljb25PcGFjaXR5JykgfHwgR01fZ2V0VmFsdWUoJ2ljb25PcGFjaXR5JykgPT0gMD9HTV9nZXRWYWx1ZSgnaWNvbk9wYWNpdHknKTppY29uVmlwT3BhY2l0eTsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBHTV9yZWdpc3Rlck1lbnVDb21tYW5kKCLorr7nva4iLCAoKSA9PiB0aGlzLm1lbnVTZXQoKSk7CiAKICAgICAgICAgICAgICAgIHRoaXMuc2V0U3R5bGUoKTsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHNldFN0eWxlKCl7CiAgICAgICAgICAgICAgICBsZXQgbWVudVNldFN0eWxlID0gYAogICAgICAgICAgICAgICAgICAgICAgICAuemhtTWFza3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojMDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO3RvcDogMDtyaWdodDogMDtib3R0b206IDA7bGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6MC44OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC53cmFwLWJveHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOzt0b3A6IDUwJTtsZWZ0OiA1MCU7dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgLTIwMHB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAzMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiAjNTU1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OmhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6MTZweCBudW1Gb250LFBpbmdGYW5nU0MtUmVndWxhcixUYWhvbWEsTWljcm9zb2Z0IFlhaGVpLHNhbnMtc2VyaWYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OjQwMCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MztoZWlnaHQ6NDBweDtjb2xvcjojZmZmO3RleHQtYWxpZ246Y2VudGVyO2xpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaUNvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwU2F2ZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO3RvcDotMnB4O3JpZ2h0OjEwcHg7Zm9udC1zaXplOjI0cHg7Y3Vyc29yOnBvaW50ZXIKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3R7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTtib3R0b206MHB4O3BhZGRpbmc6MTBweCAyMHB4O3dpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwOTtiYWNrZ3JvdW5kOiNmZWY5ZWY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRGb290TGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRGb290TGkgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtZmxleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4IDJweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGxpIGF7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojNTU1OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGE6aG92ZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OjEwMDAwMDAwMDE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MHB4O2xlZnQ6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0VWxIZWFkewogICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VIZWFkewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2NjYzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDo0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTVweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlTGkgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzo4cHggMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNlZWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMjtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MHB4O2xlZnQ6MzAwcHg7YmFja2dyb3VuZDojZmZmO3dpZHRoOjMwMHB4O2hlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUlucHV0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2VMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MjU4cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXggIWltcG9ydGFudDtqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fY2lyY3VsYXJ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogNDBweDtoZWlnaHQ6IDIwcHg7Ym9yZGVyLXJhZGl1czogMTZweDt0cmFuc2l0aW9uOiAuM3M7Y3Vyc29yOiBwb2ludGVyO2JveC1zaGFkb3c6IDAgMCAzcHggIzk5OSBpbnNldDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAucm91bmQtYnV0dG9uewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDIwcHg7aGVpZ2h0OiAyMHB4Oztib3JkZXItcmFkaXVzOiA1MCU7Ym94LXNoYWRvdzogMCAxcHggNXB4IHJnYmEoMCwwLDAsLjUpO3RyYW5zaXRpb246IC4zcztwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9iYWNrewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiBzb2xpZCAjRkZGOyBib3JkZXItd2lkdGg6IDAgM3B4IDNweCAwOyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHBhZGRpbmc6IDNweDt0cmFuc2Zvcm06IHJvdGF0ZSgxMzVkZWcpOyAgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgxMzVkZWcpO21hcmdpbi1sZWZ0OjEwcHg7Y3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRvLXJpZ2h0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6MjBweDsgZGlzcGxheTogaW5saW5lLWJsb2NrOyBwYWRkaW5nOiAzcHg7dHJhbnNmb3JtOiByb3RhdGUoLTQ1ZGVnKTsgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpO2N1cnNvcjpwb2ludGVyOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRTYXZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjI0cHg7Y3Vyc29yOnBvaW50ZXI7bWFyZ2luLXJpZ2h0OjVweDttYXJnaW4tYm90dG9tOjRweDtjb2xvcjojRkZGOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OjEwMDAwMDAwMDM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcDowcHg7bGVmdDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQ6I2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9oZWFkZXJ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjY2NjOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNXB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfY29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXggIWltcG9ydGFudDtqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3R7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAyMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdDo6LXdlYmtpdC1zY3JvbGxiYXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHmlbTkvZPmoLflvI8qLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAwcHg7ICAvKumrmOWuveWIhuWIq+WvueW6lOaoquerlua7muWKqOadoeeahOWwuuWvuCovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDFweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3Q6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q5rua5Yqo5p2h6YeM6Z2i5bCP5pa55Z2XKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXMgICA6IDJweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0Ojotd2Via2l0LXNjcm9sbGJhci10cmFjayB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoemHjOmdoui9qOmBkyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93ICAgOiBpbnNldCAwIDAgNXB4IHJnYmEoMCwgMCwgMCwgMC4yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQgICA6ICNlZGVkZWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAxMHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdCBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2NjYzsqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OmJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2VlZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBsaTpsYXN0LWNoaWxkewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbTpub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2Nyb2xsewogICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGwgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHmlbTkvZPmoLflvI8qLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAwcHg7ICAvKumrmOWuveWIhuWIq+WvueW6lOaoquerlua7muWKqOadoeeahOWwuuWvuCovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDFweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLlsI/mlrnlnZcqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1cyAgIDogMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLovajpgZMqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdyAgIDogaW5zZXQgMCAwIDVweCByZ2JhKDAsIDAsIDAsIDAuMik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kICAgOiAjZWRlZGVkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvKi1mb3JtLSovCiAgICAgICAgICAgICAgICAgICAgICAgIDpyb290IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tYmFzZS1jb2xvcjogIzQzNGE1NjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3ItcHJpbWFyeTogI2Y3ZjhmODsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3Itc2Vjb25kYXJ5OiAjZmVmZWZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXByaW1hcnk6ICNjMmMyYzI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLWdyYXktY29sb3Itc2Vjb25kYXJ5OiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXRlcnRpYXJ5OiAjNjc2Zjc5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1hY3RpdmUtY29sb3I6ICMyMjdjOWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLXZhbGlkLWNvbG9yOiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWNvbG9yOiAjZjcyZjQ3OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWljb246IHVybCgiZGF0YTppbWFnZS9zdmcreG1sO2NoYXJzZXQ9dXRmOCwlM0NzdmclMjB4bWxucyUzRCUyMmh0dHAlM0ElMkYlMkZ3d3cudzMub3JnJTJGMjAwMCUyRnN2ZyUyMiUyMHdpZHRoJTNEJTIyMjQlMjIlMjBoZWlnaHQlM0QlMjIyNCUyMiUyMHZpZXdCb3glM0QlMjIwJTIwMCUyMDI0JTIwMjQlMjIlM0UlMjAlM0NwYXRoJTIwZCUzRCUyMk0xMy40MSUyMDEybDQuMy00LjI5YTElMjAxJTIwMCUyMDElMjAwLTEuNDItMS40MkwxMiUyMDEwLjU5bC00LjI5LTQuM2ExJTIwMSUyMDAlMjAwJTIwMC0xLjQyJTIwMS40Mmw0LjMlMjA0LjI5LTQuMyUyMDQuMjlhMSUyMDElMjAwJTIwMCUyMDAlMjAwJTIwMS40MiUyMDElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDBsNC4yOS00LjMlMjA0LjI5JTIwNC4zYTElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDAlMjAxJTIwMSUyMDAlMjAwJTIwMCUyMDAtMS40MnolMjIlMjBmaWxsJTNEJTIyJTIzZjcyZjQ3JTIyJTIwJTJGJTNFJTNDJTJGc3ZnJTNFIik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXQgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMnB4IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjNzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6NTUlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbml0aWFsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5Oi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OjotbW96LXBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6OnBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAxZW07CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPXRydWVdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6Zm9jdXMgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRsaW5lOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5Oi13ZWJraXQtYXV0b2ZpbGwgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1kZWxheTogOTk5OXM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X192YWxpZGF0b3IgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1wb3NpdGlvbjogcmlnaHQgMC41ZW0gY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtc2l6ZTogMS41ZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OiAtMTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSArIC50ZXh0LWlucHV0X192YWxpZGF0b3IgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1pbWFnZTogdmFyKC0taW52YWxpZC1pY29uKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbmhlcml0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjVzIGVhc2Utb3V0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6OTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveDo6YWZ0ZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSkgdHJhbnNwYXJlbnQgdHJhbnNwYXJlbnQgdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItc3R5bGU6IHNvbGlkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXdpZHRoOiA2cHggNHB4IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3R0b206IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiAiIjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjogYXV0byAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByaWdodDogLTcycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6IDE7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5pdGlhbDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1tb3otYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWdyYXktY29sb3ItcHJpbWFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAzcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEuN2VtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctbGVmdDogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1yaWdodDogY2FsYygxZW0gKyAxNnB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxNDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLXRvcDoycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLWJvdHRvbToycHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keS5mb2N1cy12aXNpYmxlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuc2VsZWN0LWJveF9fYm9keTotd2Via2l0LWF1dG9maWxsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tZGVsYXk6IDk5OTlzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLW1vei1hcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tZ3JheS1jb2xvci1wcmltYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbml0aWFsOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udDogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXR0ZXItc3BhY2luZzogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNpemU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuNXMgZWFzZS1vdXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5Om9ubHktY2hpbGQgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzaXplOiB2ZXJ0aWNhbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHk6Zm9jdXMgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRsaW5lOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keVtkYXRhLWlzLXZhbGlkPXRydWVdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1pbnZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYSAuX2R1bW15LWJveCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW4taGVpZ2h0OiAyNDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy13cmFwOiBicmVhay13b3JkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpdGUtc3BhY2U6IHByZS13cmFwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwOiBicmVhay13b3JkOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50b0xlZnRNb3ZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmltYXRpb246bW92ZVRvTGVmdCAwLjVzIGluZmluaXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hbmltYXRpb246bW92ZVRvTGVmdCAwLjVzIGluZmluaXRlOyAvKlNhZmFyaSBhbmQgQ2hyb21lKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6MTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgQGtleWZyYW1lcyBtb3ZlVG9MZWZ0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDoyMDBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIG1vdmVUb0xlZnQgLypTYWZhcmkgYW5kIENocm9tZSovewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDoyMDBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgLnRvUmlnaHRNb3ZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmltYXRpb246bW92ZVRvUmlnaHQgMnMgaW5maW5pdGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjptb3ZlVG9SaWdodCAycyBpbmZpbml0ZTsgLypTYWZhcmkgYW5kIENocm9tZSovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OjE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkczsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIG1vdmVUb1JpZ2h0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MjAwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBtb3ZlVG9SaWdodCAvKlNhZmFyaSBhbmQgQ2hyb21lKi97CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB7bGVmdDoyMDBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGA7CiAKICAgICAgICAgICAgICAgIGRvbVN0eWxlIC5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShtZW51U2V0U3R5bGUpKTsKIAogICAgICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBtZW51U2V0KCl7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIHZhciBzZXRMaXN0SnNvbj0gWwogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcuaWNvblBvc2l0aW9uLCdzZXRMaXN0SUQnOidpY29uUG9zaXRpb25TZXRQYWdlJywnc2V0UGFnZUlEJzonbW92aWVJY29uU2V0UGFnZScsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAg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ICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoS2V5d29yZENsb3NlLCdvcHRpb25JRCc6J3JlbW92ZUtleXdvcmQnLCdkZWZhdWx0JzonMCd9LAogICAgICAgICAgICAgICAgICAgIHsnb3B0aW9uTmFtZSc6bGFuZy5hdXRob3JOYW1lQ2xvc2UsJ29wdGlvbklEJzoncmVtb3ZlQXV0aG9yTmFtZScsJ2RlZmF1bHQnOjIyfSwKICAgICAgICAgICAgICAgICAgICB7J29wdGlvbk5hbWUnOmxhbmcueWFueHVhbkNsb3NlLCdvcHRpb25JRCc6J3JlbW92ZVlhbnh1YW4nLCdkZWZhdWx0JzonMCd9CiAgICAgICAgICAgICAgICBdOwogCiAgICAgICAgICAgICAgICB2YXIgcGxheVZpZGVvT3B0aW9uSnNvbiA9ewogICAgICAgICAgICAgICAgICAgICdvcHRpb25OYW1lJzpsYW5nLnBsYXlWaWRlb0xpbmVBZGQsCiAgICAgICAgICAgICAgICAgICAgJ29wdGlvbklEJzondmlkZW9QbGF5TGluZUFkZCcsCiAgICAgICAgICAgICAgICAgICAgJ2RlZmF1bHQnOnZpZGVvUGxheUxpbmVBZGQsCiAgICAgICAgICAgICAgICAgICAgJ3RleHRhcmVhJzondmlkZW9QbGF5TGluZUFkZFRleHRhcmVhJywKICAgICAgICAgICAgICAgICAgICAndGV4dGFyZWFJZCc6J3BsYXlWaWRlb0xpbmVUZXh0YXJlYScsCiAgICAgICAgICAgICAgICAgICAgJ3RpcCc6CmDnuq/lh4AxLGh0dHBzOi8vaW0xOTA3LnRvcC8/ang9CkLnq5kxLGh0dHBzOi8vanguanNvbnBsYXllci5jb20vcGxheWVyLz91cmw9CueIseixhixodHRwczovL2p4LmFpZG91ZXIubmV0Lz91cmw9CkJMLGh0dHBzOi8vdmlwLmJsamlleC5jb20vP3Y9CuWGsOixhixodHRwczovL2JkLmp4LmNuLz91cmw9CkNLLGh0dHBzOi8vd3d3LmNrcGxheWVyLnZpcC9qaWV4aS8/dXJ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Nvbi5kZWZhdWx0KTsKIAogICAgICAgICAgICAgICAgaWYob3B0aW9uVmFsdWUgIT0gJzIyJyl7CiAKICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CiAKICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwogCiAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKIAogICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGk+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fc2V0X3BhZ2VfY29udGVudCc+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPHNwYW4gY2xhc3M9J3BsYXlWaWRlb09wdGlvbk5hbWUnPiIrcGxheVZpZGVvT3B0aW9uSnNvbi5vcHRpb25OYW1lKyI8L3NwYW4+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fY2lyY3VsYXInIHN0eWxlPSdiYWNrZ3JvdW5kLWNvbG9yOiIrc3dpdGNoQmFja0NvcmxvcisiJyBpZD0nIitwbGF5VmlkZW9PcHRpb25Kc29uLm9wdGlvbklEKyInPiI7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0ncm91bmQtYnV0dG9uJyBzdHlsZT0nYmFja2dyb3VuZDogIitiYWNrQ29sb3IrIjsgbGVmdDogIitvcHRpb25WYWx1ZSsicHg7Jz48L2Rpdj4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9ICI8L2Rpdj48L2Rpdj4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sKz0iPC9saT48bGk+I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nPsOXPC9zcGFuPjwvbGk+PC91bD4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0nc2V0V3JhcExpJz4iOwogCiAgICAgICAgICAgICAgICBmb3IodmFyIHNldE49MDtzZXROPHNldExpc3RKc29uLmxlbmd0aDtzZXROKyspewogCiAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3RWYWx1ZSA9IEdNX2dldFZhbHVlKHNldExpc3RKc29uW3NldE5dLnNldExpc3RJRCwnMjInKTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3IsYXJyb3dDb2xvcixzd2l0Y2hCYWNrQ29ybG9yOwogCiAgICAgICAgICAgICAgICAgICAgaWYobGlzdFZhbHVlICE9IDIyKXsKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZmYnOwogICAgICAgICAgICAgICAgICAgICAgICBhcnJvd0NvbG9yPSAnI0VFRSc7CiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRic7CiAKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZTZkNzMnOwogICAgICAgICAgICAgICAgICAgICAgICBhcnJvd0NvbG9yID0gJyNDQ0MnOwogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkU1RTUnOwogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RKc29uW3NldE5dLnNldFBhZ2VJRCA9PSAnJyl7CiAgICAgICAgICAgICAgICAgICAgICAgIGFycm93Q29sb3IgPSAnI0VFRSc7CiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxsaT48c3Bhbj4iK3NldExpc3RKc29uW3NldE5dLmxpc3ROYW1lKyI8L3NwYW4+IjsKIAogICAg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bGFiLmNvbS9sYW5oYWhhL2xhbnJlbmppYW9iZW4jJUU1JUFFJTg5JUU4JUEzJTg1dG0nIHRhcmdldD0nX2JsYW5rJz4iK2xhbmcuc2NyaXB0c2luc3RhbGwrIjwvYT48L2xpPuODuzxsaT48YSBocmVmPSdodHRwczovL2dpdGxhYi5jb20vbGFuaGFoYS9sYW5yZW5qaWFvYmVuIyVFNCVCRCVCRiVFNyU5NCVBOCcgdGFyZ2V0PSdfYmxhbmsnPiIrbGFuZy5zY3JpcHRzdXNlKyI8L2E+PC9saT7jg7s8bGk+PGEgaHJlZj0naHR0cHM6Ly9naXRsYWIuY29tL2xhbmhhaGEvbGFucmVuamlhb2JlbiMlRTUlQjglQjglRTglQTclODElRTklOTclQUUlRTklQTIlOTgnIHRhcmdldD0nX2JsYW5rJz4iK2xhbmcucXVlc3Rpb24rIjwvYT48L2xpPuODuzxsaT48YSBocmVmPSdodHRwczovL3QubWUvK3NHbzZaWnZ5NTR3ellUbGwnIHRhcmdldD0nX2JsYW5rJz4iK2xhbmcudGdncm91cCsiPC9hPjwvbGk+IjsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSc8L3VsPic7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0nPC9kaXY+JzsKIAogICAgICAgICAgICAgICAgc2V0SHRtbCArPSAiPC9kaXY+IjsKIAogICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3NldE1hc2snKSkgcmV0dXJuOwogCiAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobU1lbnUnKTsKIAogICAgICAgICAgICAgICAgbGV0IHpobU1lbnUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtTWVudScpOwogCiAgICAgICAgICAgICAgICB6aG1NZW51LmlubmVySFRNTCA9IHNldEh0bWw7CiAKICAgICAgICAgICAgICAgIGxldCB0aW1lclpobUljb24gPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1NZW51JykpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXJaaG1JY29uKTsgLy8g5Y+W5raI5a6a5pe25ZmoCiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNpcmN1bGFyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnpobV9jaXJjdWxhcicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGNpcmN1bGFyLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbihfZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnV0dG9uU3R5bGUgPSBpdGVtLmNoaWxkcmVuWzBdLnN0eWxlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxlZnQgPSBidXR0b25TdHlsZS5sZWZ0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdCA9IHBhcnNlSW50KGxlZnQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RMZWZ0VmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsZWZ0PT0wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25TdHlsZS5sZWZ0ID0gJzIycHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmJhY2tncm91bmQgPSAnI2ZlNmQ3Myc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZS5iYWNrZ3JvdW5kPScjZmZFNUU1JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLm5leHRTaWJsaW5nICYmIGl0ZW0ubmV4dFNpYmxpbmcuZ2V0QXR0cmlidXRlKCdkYXRhJykpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLm5leHRTaWJsaW5nLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCdib3JkZXI6IHNvbGlkICNjY2M7Ym9yZGVyLXdpZHRoOiAwIDNweCAzcHggMDsnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdExlZnRWYWx1ZSA9IDIyOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uU3R5bGUubGVmdCA9ICcwcHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmJhY2tncm91bmQgPSAnI2ZmZic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZS5iYWNrZ3JvdW5kPScjZmZmJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLm5leHRTaWJsaW5nKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5uZXh0U2libGluZy5zZXRBdHRyaWJ1dGUoJ3N0eWxlJywnYm9yZGVyOiBzb2xpZCAjRUVFO2JvcmRlci13aWR0aDogMCAzcHggM3B4IDA7JykKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdExlZnRWYWx1ZSA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNldExpc3RJRCA9IGl0ZW0uaWQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZShzZXRMaXN0SUQsbGlzdExlZnRWYWx1ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRvUmlnaHQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcudG8tcmlnaHQnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB0b1JpZ2h0LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsZWZ0ID0gaXRlbS5wcmV2aW91c1NpYmxpbmcuY2hpbGRyZW5bMF0uc3R5bGUubGVmdDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwYXJzZUludChsZWZ0KTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxlZnQgIT0gMjIpIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXRQYWdlSUQgPSBpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YScpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VJZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNldFBhZ2VJRCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlSWQuY2xhc3NOYW1lPSdpY29uU2V0UGFnZSB0b0xlZnRNb3ZlJzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5a6e5pe25Zu+5qCH6auY5bqmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0UGFnZUlEID09ICdtb3ZpZUljb25TZXRQYWdlJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2ljb25Ub3AnKS52YWx1ZT1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjemhtbG9nbyIpLm9mZnNldFRvcDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ImhlaWdodDoyMDBweCI7CiAKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldFBhZ2VJRCA9PSAnbW92aWVWaWRlb1NldFBhZ2UnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ImhlaWdodDoyMDBweCI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coc2V0UGFnZUlEKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b0JhY2sgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuemhtX2JhY2snKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB0b0JhY2suZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmVudERvbSA9IGl0ZW0ucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnREb20uY2xhc3NOYW1lPSdpY29uU2V0UGFnZSB0b1JpZ2h0TW92ZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9J2hlaWdodDo0MHB4OycKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXRTYXZlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmljb25TZXRTYXZlJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2F2ZS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywoKT0+ewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Ub3AgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblRvcCcpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25PcGFjaXR5PWRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uT3BhY2l0eScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Qb3NpdGlvbiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uUG9zaXRpb24nKS52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uV2lkdGggPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvbldpZHRoJykudmFsdWU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldhaXRUaW1lID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XYWl0VGltZScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlb0xpbmVUZXh0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlWaWRlb0xpbmVUZXh0YXJlYScpLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlb0xpbmVMZWZ0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3ZpZGVvUGxheUxpbmVBZGQnKS5jaGlsZHJlblswXS5zdHlsZS5sZWZ0OwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblRvcCAhPSAnJyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMC05XVswLTldezAsMn0kKS8udGVzdChpY29uVG9wKSkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydChsYW5nLnRpcEVycm9ySWNvbkhlaWdodCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vX3RoaXMuc2V0Q29va2llKCdpY29uVG9wJyxpY29uVG9wLDMwKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaWNvblRvcCcsaWNvblRvcCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvbk9wYWNpdHkgIT0gJycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEoL14oPzowfFsxLTldWzAtOV0/fDEwMCkkLy50ZXN0KGljb25PcGFjaXR5KSkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydChsYW5nLnRpcEVycm9ySWNvbk9wYWNpdHkpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL190aGlzLnNldENvb2tpZSgnaWNvblRvcCcsaWNvblRvcCwzMCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vYWxlcnQoaWNvbk9wYWNpdHkpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2ljb25PcGFjaXR5JyxpY29uT3BhY2l0eSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblBvc2l0aW9uICE9ICcnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL190aGlzLnNldENvb2tpZSgnaWNvblBvc2l0aW9uJyxpY29uUG9zaXRpb24sMzApOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uUG9zaXRpb24nLGljb25Qb3NpdGlvbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvbldhaXRUaW1lICE9ICcnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaWNvbldhaXRUaW1lJyxpY29uV2FpdFRpbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25XaWR0aCAhPScnKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXihbMS05XVswLTldPykkKS8udGVzdChpY29uV2lkdGgpKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KGxhbmcudGlwRXJyb3JJY29uV2lkdGgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL190aGlzLnNldENvb2tpZSgnaWNvbldpZHRoJyxpY29uV2lkdGgsMzApOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uV2lkdGgnLGljb25XaWR0aCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ3ZpZGVvUGxheUxpbmVBZGQnKSA9PSAyMil7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGxheVZpZGVvTGluZVRleHQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU9iaiA9IF90aGlzLmdldExpbmUocGxheVZpZGVvTGluZVRleHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsaW5lT2JqLmxlbmd0aD4wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdwbGF5VmlkZW9MaW5lVGV4dCcscGxheVZpZGVvTGluZVRleHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydCgn57q/6Lev6L6T5YWl5LiN5q2j56GuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLCcnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ3BsYXlWaWRlb0xpbmVUZXh0JyxwbGF5VmlkZW9MaW5lVGV4dCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25Ub3AnKS5hZGRFdmVudExpc3RlbmVyKCdjaGFuZ2UnLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uVG9wID0gdGhpcy52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMS05XVxkKiQpLy50ZXN0KGljb25Ub3ApKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZSgnZGF0YS1pcy12YWxpZCcsJ2ZhbHNlJykKIAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywndHJ1ZScpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdpY29uV2lkdGgnKS5hZGRFdmVudExpc3RlbmVyKCdjaGFuZ2UnLGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpY29uV2lkdGggPSB0aGlzLnZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXlsxLTldXGQqJCkvLnRlc3QoaWNvbldpZHRoKSkpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2RhdGEtaXMtdmFsaWQnLCdmYWxzZScpCiAKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZSgnZGF0YS1pcy12YWxpZCcsJ3RydWUnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAKICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgLy/ohb7orq/op4bpopHlv6vmjbfplK7lhrLnqoEKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY291cG9uVXJsLm1hdGNoKC92XC5xcVwuY29tXC94XC9jb3Zlci8pKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFkZExpbmVUZXh0ID1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGxheVZpZGVvTGluZVRleHRhcmVhJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZExpbmVUZXh0LmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0UG9zID0gYWRkTGluZVRleHQuc2VsZWN0aW9uU3RhcnQ7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW5kUG9zID0gYWRkTGluZVRleHQuc2VsZWN0aW9uRW5kOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXJ0UG9zID09PSB1bmRlZmluZWQgfHwgZW5kUG9zID09PSB1bmRlZmluZWQpIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleUNvZGUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihlLmtleUNvZGUgPT0gaXRlbS5jb2RlICYmIGUuc2hpZnRLZXk9PWl0ZW0uaXNTaGlmdCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0VmFsdWUgPSBhZGRMaW5lVGV4dC52YWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0VmFsdWUgPSB0ZXh0VmFsdWUuc3Vic3RyaW5nKDAsc3RhcnRQb3MpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW5kVmFsdWUgPSB0ZXh0VmFsdWUuc3Vic3RyaW5nKHN0YXJ0UG9zKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFsbFZhbHVlID0gc3RhcnRWYWx1ZStpdGVtLnZhbHVlK2VuZFZhbHVlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC52YWx1ZT1hbGxWYWx1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGluZVRleHQuc2VsZWN0aW9uU3RhcnQgPSBzdGFydFBvcysxOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5zZWxlY3Rpb25FbmQgPSBlbmRQb3MrMTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGNyZWF0ZUVsZW1lbnQoZG9tLGRvbUlkKXsKIAogICAgICAgICAgICAgICAgdmFyIHJvb3RFbGVtZW50ID0gZG9jdW1lbnQuYm9keTsKIAogICAgICAgICAgICAgICAgdmFyIG5ld0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGRvbSk7CiAKICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuaWQgPSBkb21JZDsKIAogICAgICAgICAgICAgICAgdmFyIG5ld0VsZW1lbnRIdG1sQ29udGVudCA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCcnKTsKIAogICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuYXBwZW5kQ2hpbGQobmV3RWxlbWVudCk7CiAKICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuYXBwZW5kQ2hpbGQobmV3RWxlbWVudEh0bWxDb250ZW50KTsKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgcmVxdWVzdChtZXRob2QsdXJsLGRhdGEsaXNDb29raWU9JycpewogCiAgICAgICAgICAgICAgICBsZXQgcmVxdWVzdCA9IG5ldyBYTUxIdHRwUmVxdWVzdCgpOwogCiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUscmVqZWN0KT0+ewogCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5vbnJlYWR5c3RhdGVjaGFuZ2U9ZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihyZXF1ZXN0LnJlYWR5U3RhdGU9PTQpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXF1ZXN0LnN0YXR1cz09MjAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVxdWVzdC5yZXNwb25zZVRleHQpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChyZXF1ZXN0LnN0YXR1cyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIHJlcXVlc3Qub3BlbihtZXRob2QsdXJsKTsKICAgICAgICAgICAgICAgICAgICAvL3JlcXVlc3Qud2l0aENyZWRlbnRpYWxzID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICBpZihpc0Nvb2tpZSl7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3Qud2l0aENyZWRlbnRpYWxzID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5zZXRSZXF1ZXN0SGVhZGVyKCdDb250ZW50LVR5cGUnLCAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyk7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5zZW5kKGRhdGEpOwogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBzZXRDb29raWUoY25hbWUsY3ZhbHVlLGV4ZGF5cyl7CiAKICAgICAgICAgICAgICAgIHZhciBkID0gbmV3IERhdGUoKTsKIAogICAgICAgICAgICAgICAgZC5zZXRUaW1lKGQuZ2V0VGltZSgpKyhleGRheXMqMjQqNjAqNjAqMTAwMCkpOwogCiAgICAgICAgICAgICAgICB2YXIgZXhwaXJlcyA9ICJleHBpcmVzPSIrZC50b0dNVFN0cmluZygpOwogCiAgICAgICAgICAgICAgICBkb2N1bWVudC5jb29raWUgPSBjbmFtZSsiPSIrY3ZhbHVlKyI7ICIrZXhwaXJlczsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGdldENvb2tpZShjbmFtZSl7CiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICAgICAgdmFyIGNhID0gZG9jdW1lbnQuY29va2llLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgICAgICBmb3IodmFyIGk9MDsgaTxjYS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjLmluZGV4T2YobmFtZSk9PTApIHsgcmV0dXJuIGMuc3Vic3RyaW5nKG5hbWUubGVuZ3RoLGMubGVuZ3RoKTsgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0UXVlcnlTdHJpbmcoZSkgewogICAgICAgICAgICAgICAgdmFyIHQgPSBuZXcgUmVnRXhwKCIoXnwmKSIgKyBlICsgIj0oW14mXSopKCZ8JCkiKTsKICAgICAgICAgICAgICAgIHZhciBhID0gd2luZG93LmxvY2F0aW9uLnNlYXJjaC5zdWJzdHIoMSkubWF0Y2godCk7CiAgICAgICAgICAgICAgICBpZiAoYSAhPSBudWxsKSByZXR1cm4gYVsyXTsKICAgICAgICAgICAgICAgIHJldHVybiAiIjsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIGdldFVybFBhcmFtcyh1cmwpewogICAgICAgICAgICAgICAgbGV0IHJlZyA9IC8oW14/JisjXSspPShbXj8mKyNdKykvZzsKICAgICAgICAgICAgICAgIGxldCBvYmo9e307CiAgICAgICAgICAgICAgICB1cmwucmVwbGFjZShyZWcsKHJlcywkMSwkMik9PntvYmpbJDFdPSQyfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gb2JqOwogICAgICAgICAgICB9CiAKICAgICAgICAgICAgZ2V0TGluZSh0ZXh0KXsKIAogICAgICAgICAgICAgICAgbGV0IHRleHRBcnIgPSB0ZXh0LnNwbGl0KCdcbicpOwogCiAgICAgICAgICAgICAgICBpZih0ZXh0QXJyLmxlbmd0aCA+IDApewogCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVPYmogPSBbXTsKIAogICAgICAgICAgICAgICAgICAgIGxldCBtYXRjaCA9IC9eKC4rKShodHRwcz86XC9cLy4rKSQvOwogCiAgICAgICAgICAgICAgICAgICAgdGV4dEFyci5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0gPSBpdGVtLnJlcGxhY2UoL1xzKiwqL2csJycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpdGVtKSByZXR1cm4gdHJ1ZTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU1hdGNoID0gaXRlbS5tYXRjaChtYXRjaCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYobGluZU1hdGNoKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZU9iai5wdXNoKHsnbmFtZSc6bGluZU1hdGNoWzFdLnN1YnN0cmluZygwLDQpLCd1cmwnOmxpbmVNYXRjaFsyXX0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqPVtdOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpbmVPYmo7CiAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvL2FsbOWPguaVsOm7mOiupOepuu+8jOaYr+ecn+aXtui/lOWbnuS4uuaVsOe7hAogICAgICAgICAgICBzdGF0aWMgZ2V0RWxlbWVudChjc3MsYWxsPScnKXsKIAogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKIAogICAgICAgICAgICAgICAgICAgIGxldCBudW0gPSAwOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBudW0rKwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb207CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYoYWxsID09IGZhbHNlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihjc3MpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGRvbSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChjc3MpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20ubGVuZ3RoPjApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGRvbSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG51bT09MjApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSwzMDApCiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHN0YXRpYyB0b2FzdChtc2csZHVyYXRpb24pewogCiAgICAgICAgICAgICAgICBkdXJhdGlvbj1pc05hTihkdXJhdGlvbik/MzAwMDpkdXJhdGlvbjsKIAogICAgICAgICAgICAgICAgbGV0IHRvYXN0RG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAKICAgICAgICAgICAgICAgIHRvYXN0RG9tLmlubmVySFRNTCA9IG1zZzsKIAogICAgICAgICAgICAgICAgLy90b2FzdERvbS5zdHlsZS5jc3NUZXh0PSJ3aWR0aDogNjAlO21pbi13aWR0aDogMTUwcHg7b3BhY2l0eTogMC43O2hlaWdodDogMzBweDtjb2xvcjogcmdiKDI1NSwgMjU1LCAyNTUpO2xpbmUtaGVpZ2h0OiAzMHB4O3RleHQtYWxpZ246IGNlbnRlcjtib3JkZXItcmFkaXVzOiA1cHg7cG9zaXRpb246IGZpeGVkO3RvcDogNDAlO2xlZnQ6IDIwJTt6LWluZGV4OiA5OTk5OTk7YmFja2dyb3VuZDogcmdiKDAsIDAsIDApO2ZvbnQtc2l6ZTogMTJweDsiOwogICAgICAgICAgICAgICAgdG9hc3REb20uc3R5bGUuY3NzVGV4dD0ncGFkZGluZzoycHggMTVweDttaW4taGVpZ2h0OiAzNnB4O2xpbmUtaGVpZ2h0OiAzNnB4O3RleHQtYWxpZ246IGNlbnRlcjt0cmFuc2Zvcm06IHRyYW5zbGF0ZSgtNTAlKTtib3JkZXItcmFkaXVzOiA0cHg7Y29sb3I6IHJnYigyNTUsIDI1NSwgMjU1KTtwb3NpdGlvbjogZml4ZWQ7dG9wOiA1MCU7bGVmdDogNTAlO3otaW5kZXg6IDk5OTk5OTk7YmFja2dyb3VuZDogcmdiKDAsIDAsIDApO2ZvbnQtc2l6ZTogMTZweDsnCiAKICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodG9hc3REb20pOwogCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgewogCiAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSAwLjU7CiAKICAgICAgICAgICAgICAgICAgICB0b2FzdERvbS5zdHlsZS53ZWJraXRUcmFuc2l0aW9uID0gJy13ZWJraXQtdHJhbnNmb3JtICcgKyBkICsgJ3MgZWFzZS1pbiwgb3BhY2l0eSAnICsgZCArICdzIGVhc2UtaW4nOwogCiAgICAgICAgICAgICAgICAgICAgdG9hc3REb20uc3R5bGUub3BhY2l0eSA9ICcwJzsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IGRvY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQodG9hc3REb20pIH0sIGQgKiAxMDAwKTsKIAogICAgICAgICAgICAgICAgfSwgZHVyYXRpb24pOwogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy9jcmVhdGUgemhtTG9nb0ljb24KICAgICAgICAgICAgemhtTG9nbygpewogCiAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgbGV0IHNvcnREaXYgPSBpY29uVmlwUG9zaXRpb249PSdsZWZ0Jz8ncm93Jzoncm93LXJldmVyc2UnOwogCiAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9TdHlsZSA9IGAKICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZG9lX2ljb257CiAgICAgICAgICAgICAgICAgIHBhZGRpbmctdG9wOjJweDsKICAgICAgICAgICAgICAgICAgY3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OwogICAgICAgICAgICAgICAgICBwb3NpdGlvbjpmaXhlZDske2ljb25WaXBQb3NpdGlvbn06NXB4O3RvcDoke2ljb25WaXBUb3B9cHg7CiAgICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgICBvdmVyZmxvdzp2aXNpYmxlOwogICAgICAgICAgICAgICAgICBkaXNwbGF5OmZsZXg7CiAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOiR7c29ydERpdn07CiAgICAgICAgICAgICAgICAgIHdpZHRoOmF1dG87CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX3dyYXB7CiAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTsKICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgLmljb25Mb2dvewogICAgICAgICAgICAgICBvcGFjaXR5OiR7aWNvblZpcE9wYWNpdHkvMTAwfTsKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZXsKICAgICAgICAgICAgICAgICAgd2lkdGg6MzIwcHg7CiAgICAgICAgICAgICAgICAgIGhlaWdodDozMTZweDsKICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTpzY3JvbGw7CiAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXg6aGlkZGVuOwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgIGZsZXgtZmxvdzogcm93IHdyYXA7CiAgICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICBtYXJnaW46MHB4OwogCiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGl7CiAgICAgICAgICAgICAgICAgIHBhZGRpbmc6NHB4IDBweDsKICAgICAgICAgICAgICAgICAgbWFyZ2luOjJweDsKICAgICAgICAgICAgICAgICAgd2lkdGg6MzAlOwogICAgICAgICAgICAgICAgICBjb2xvcjojRkZGOwogICAgICAgICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjsKICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZjI0NDQzOwogICAgICAgICAgICAgICAgICBib3gtc2hhZG93OjBweCAwcHggMTBweCAjZmZmOwogICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saTpob3ZlcnsKICAgICAgICAgICAgICAgICAgY29sb3I6IzI2MDAzMzsKICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgLnpobV9saW5lX3NlbGVjdGVkewogICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19qeHsKICAgICAgICAgICAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgICAgaGVpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OwogICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7dG9wOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICBgOwogCiAgICAgICAgICAgICAgICBkb21TdHlsZSAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUocGxheVZpZGVvU3R5bGUpKTsKIAogICAgICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAKICAgICAgICAgICAgICAgIGxldCBwbGF5V3JhcEh0bWwgPSAiPGRpdiBocmVmPSdqYXZhc2NyaXB0OnZvaWQoMCknIHRhcmdldD0nX2JsYW5rJyBzdHlsZT0nJyBjbGFzcz0ncGxheUJ1dHRvbiB6aG1fcGxheV92aWRvZV9pY29uJyBpZD0nemhtbG9nbyc+IjsKIAogICAgICAgICAgICAgICAgcGxheVdyYXBIdG1sICs9ICI8aW1nIGNsYXNzPSdpY29uTG9nbycgc3R5bGU9J3dpZHRoOiIraWNvblZpcFdpZHRoKyJweDtoZWlnaHQ6IitpY29uVmlwV2lkdGgqMS41KyJweCcgc3JjPSdkYXRhOmltYWdlL2dpZjtiYXNlNjQsUjBsR09EbGhaQUNXQVBjQUFQSkVRL3Y3K2ZuTHlQakN3ZlJuWmZuVDBQSktTZmpHeFB2MjlQblkxL05iV3Z2MTgvYVVrL3JsNC9ydzd2bkt5UGFKaVBycjZmYWFtUFJ5Y2ZhTGl2djU5L0pKU1BydjdmTlZWUG5lM2ZydDYvTlFUL3Y2K1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ICAgICAgICAgICAgX3RoaXMuY3JlYXRlRWxlbWVudCgnZGl2JywnemhtSWNvbicpOwogCiAgICAgICAgICAgICAgICBsZXQgemhtUGxheSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1JY29uJyk7CiAKICAgICAgICAgICAgICAgIHpobVBsYXkuaW5uZXJIVE1MID0gcGxheVdyYXBIdG1sOwogCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy/lt6bplK7mjInkuIvmi5bliqgKICAgICAgICAgICAgLy90eXBlOuagueaNruS4jeWQjOexu+Wei++8jOWkhOeQhuWbvuagh+WNleWHu+S6i+WKoQogICAgICAgICAgICB6aG1Mb2dvRHJhZyh0eXBlLHdlYil7CiAKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgICAgIHZhciB6aG1Mb2dvRHJhZz1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjemhtbG9nbyIpOwogCiAgICAgICAgICAgICAgICB2YXIgemhtTG9nb0ljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuaWNvbkxvZ28iKTsKIAogICAgICAgICAgICAgICAgaWYoIXpobUxvZ29EcmFnIHx8ICF6aG1Mb2dvSWNvbilyZXR1cm47CiAKICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLm9ubW91c2Vkb3duID0gZnVuY3Rpb24oZXZlbnQpewogCiAgICAgICAgICAgICAgICAgICAgaWYoZXZlbnQud2hpY2g9PTMpcmV0dXJuIGZhbHNlOy8v5bGP6JS95Y+z6ZSuCiAKICAgICAgICAgICAgICAgICAgICBsZXQgc2Vkb3duVG9wID0gemhtTG9nb0RyYWcub2Zmc2V0VG9wOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHpobUxvZ29JY29uSGVpZ2h0ID0gemhtTG9nb0ljb24ub2Zmc2V0SGVpZ2h0OwogCiAgICAgICAgICAgICAgICAgICAgbGV0IGJvdHRvbVNwYWNlID0gMTA7CiAKICAgICAgICAgICAgICAgICAgICBpZihldmVudC50YXJnZXQuY2xhc3NOYW1lICE9ICdpY29uTG9nbycpcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgLy9sZXQgc2hpZnRYID0gZXZlbnQuY2xpZW50WCAtIHpobUxvZ29EcmFnLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmxlZnQ7CiAgICAgICAgICAgICAgICAgICAgbGV0IHNoaWZ0eCA9IDU7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgc2hpZnRZID0gZXZlbnQuY2xpZW50WS16aG1Mb2dvRHJhZy5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS50b3A7CiAKICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS5wb3NpdGlvbiA9ICdmaXhlZCc7CiAKICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS56SW5kZXggPSA5OTk5OTk5OwogCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbmQoemhtTG9nb0RyYWcpOwogCiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gb25Nb3VzZU1vdmUoZXZlbnQpewogCiAgICAgICAgICAgICAgICAgICAgICAgIC8vemhtTG9nb0RyYWcuc3R5bGUubGVmdCA9IHBhZ2VYIC0gc2hpZnRYICsgJ3B4JzsKICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUubGVmdCA9ICc1cHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWlnaHQgPSB3aW5kb3cuaW5uZXJIZWlnaHQgLSB6aG1Mb2dvSWNvbkhlaWdodC1ib3R0b21TcGFjZTsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGV2ZW50LnBhZ2VZLXNoaWZ0WTsKIAogICAgICAgICAgICAgICAgICAgICAgICB5ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgeSksIGhlaWdodCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUudG9wID0geSsncHgnOwogCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8v5ZyobW91c2Vtb3Zl5LqL5Lu25LiK56e75Yqo5Zu+5qCHCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJyxvbk1vdXNlTW92ZSk7CiAgICAgICAgICAgICAgICAgICAgLy/mnb7lvIDkuovku7YKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5vbm1vdXNldXAgPSBmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaWNvblRvcCcsemhtTG9nb0RyYWcub2Zmc2V0VG9wKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZW1vdmUnLCBvbk1vdXNlTW92ZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25tb3VzZXVwID0gbnVsbDsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVpZ2h0ID0gemhtTG9nb0RyYWcub2Zmc2V0VG9wK3pobUxvZ29JY29uSGVpZ2h0K2JvdHRvbVNwYWNlOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcCA8IDApewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS50b3AgPScwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgaWYod2luZG93LmlubmVySGVpZ2h0IDwgaGVpZ2h0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUudG9wID13aW5kb3cuaW5uZXJIZWlnaHQtemhtTG9nb0ljb25IZWlnaHQtYm90dG9tU3BhY2UrJ3B4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vY2xpY2vkuovku7blpITnkIYKICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHR5cGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd2aWRlbyc6CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1Mb2dvRHJhZy5vZmZzZXRUb3A9PXNlZG93blRvcCAmJiB3ZWIubGVuZ3RoID09IDAgJiYgemhtTG9nb0RyYWcub2Zmc2V0VG9wPjAgJiYgd2luZG93LmlubmVySGVpZ2h0ID4gaGVpZ2h0KXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivt+WcqOinhumikeaSreaUvumhteeCueWHu+WbvuaghycpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbXVzaWMnOgogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoemhtTG9nb0RyYWcub2Zmc2V0VG9wPT1zZWRvd25Ub3AgJiYgZS50YXJnZXQuY2xhc3NOYW1lID09ICdpY29uTG9nbycpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJywgb25Nb3VzZU1vdmUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vemhtTG9nb0RyYWcub25tb3VzZXVwID0gbnVsbDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbXVzaWNVcmxEYXRhID0gWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC9tdXNpY1wuMTYzXC5jb21cLyNcLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC95XC5tdXNpY1wuMTYzXC5jb21cL21cLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC9tdXNpY1wuMTYzXC5jb21cLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC95XC5xcVwuY29tXC9uXC9yeXFxXC9wbGF5ZXIvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDova3Vnb3VcLmNvbS99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9rdXdvXC5jbi99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC93d3dcLnhpbWFsYXlhXC5jb20vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtdXNpY1VybCA9IG11c2ljVXJsRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXVzaWNVcmwubGVuZ3RoPT0wKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KHdlYlswXS50aXApOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2god2ViWzBdLm5hbWUpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbmV0ZWFzZSc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV0ZWFzZUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncXEnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxRnVuKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdrdWdvdSc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga3Vnb3VGdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2t1d28nOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt1d29GdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3hpbWFsYXlhJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4aW1hbGF5YUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gbmV0ZWFzZUZ1bigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsUGFyYW1zID0gX3RoaXMuZ2V0VXJsUGFyYW1zKGxvY2F0aW9uLmhyZWYpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih1cmxQYXJhbXMuaWQgPT0gdW5kZWZpbmVkKSByZXR1cm47CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXRlYXNlVXJsRW5jb2RlID0gZW5jb2RlVVJJQ29tcG9uZW50KCdodHRwczovL211c2ljLjE2My5jb20vc29uZz9pZD0nK3VybFBhcmFtcy5pZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz91cmw9JytuZXRlYXNlVXJsRW5jb2RlOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3BlblVybCA9IHdlYlVybCsiP2lkPSIrdXJsUGFyYW1zLmlkKyImdHlwZT1uZXRlYXNlIgogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihvcGVuVXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gcXFGdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHFxU29uZ01hdGNoOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikuY2hpbGROb2Rlc1swXS5ocmVmLm1hdGNoKC9zb25nRGV0YWlsXC8oXFMqKVw/Lyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNzaW1fc29uZ19pbmZvIikpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjc2ltX3NvbmdfaW5mbyIpLmNoaWxkTm9kZXNbMF0uaHJlZi5tYXRjaCgvc29uZ1wvKFxTKikuaHRtbC8pOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxU29uZ01hdGNoID0gJyc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFxcVNvbmdNYXRjaFsxXSl7Y29uc29sZS5sb2coJ+ayoeacieiOt+WPluWIsOatjOabsklEJyk7IHJldHVybn07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpb0xpbmsgPSBlbmNvZGVVUklDb21wb25lbnQoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiYXVkaW8iKS5zcmMpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3BlblVybCA9IHdlYlVybCsnP2lkPScrcXFTb25nTWF0Y2hbMV0rJyZ0eXBlPXFxJnBsYXlVcmw9JythdWRpb0xpbms7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKG9wZW5VcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBrdWdvdUZ1bigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW9Nb2R1bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYXVkaW9Nb2R1bGUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXVkaW9Nb2R1bGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2F1ZGlvTW9kdWxlJykuc3R5bGU9J2JvdHRvbTowcHg7JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzaG93SGlkZV9wbGF5YmFyJykuY2xhc3NOYW1lID0gJ2ljb24gc2hvdy1wbGF5YmFyLWJ0bic7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vYWxlcnQoJ+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0i44CCJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb25nS3Vnb3VNYXRjaCA9IG5ld1VybC5tYXRjaChqeE11c2ljV2ViWzBdLm1hdGNoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvU3JjID0gZW5jb2RlVVJJQ29tcG9uZW50KGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImF1ZGlvIikuc3JjKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz9pZD0nK3NvbmdLdWdvdU1hdGNoWzFdKycmdHlwZT1rdWdvdSZwbGF5VXJsPScrYXVkaW9TcmM7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKG9wZW5VcmwpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGt1d29GdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlDb250cm9sJykuc3R5bGU9J2JvdHRvbTowcHgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivt+eCueWHu+aSreaUvumcgOimgeS4i+i9veeahOatjOabsu+8jOeEtuWQjuWcqOe9kemhteS4i+aWueaSreaUvuWZqOWGheeCueWHuyLkuIvovb0iJywyMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2FsZXJ0KCfor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29IuOAgicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvbmdLdXdvTWF0Y2ggPSBuZXdVcmwubWF0Y2goanhNdXNpY1dlYlswXS5tYXRjaCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpb1NyYyA9IGVuY29kZVVSSUNvbXBvbmVudChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJhdWRpbyIpLnNyYyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvcGVuVXJsID0gd2ViVXJsKyc/aWQ9Jytzb25nS3V3b01hdGNoWzFdKycmdHlwZT1rdXdvJnBsYXlVcmw9JythdWRpb1NyYzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4ob3BlblVybCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24geGltYWxheWFGdW4oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhtLXBsYXllcicpLnN0eWxlPSdib3R0b206MHB4JzsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29IicsMjAwMCkKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9hbGVydCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSLjgIInKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmxJbmZvID0gbmV3VXJsLm1hdGNoKGp4TXVzaWNXZWJbMF0ubWF0Y2gpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyh3ZWJVcmwrJz9pZD0nK3VybEluZm9bMV0rJyZ0eXBlPXhpbWFsYXlhJnBsYXlVcmw9JytlbmNvZGVVUklDb21wb25lbnQobmV3VXJsKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVybEluZm9bMV0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4od2ViVXJsKyc/aWQ9Jyt1cmxJbmZvWzFdKycmdHlwZT14aW1hbGF5YSZwbGF5VXJsPScrZW5jb2RlVVJJQ29tcG9uZW50KG5ld1VybCkpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInojrflj5Z1cmzlj4LmlbAnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd5b3V0dWJlJzoKIAogCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfTsKIAogICAgICAgICAgICAgICAgfTsKIAogICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25kcmFnc3RhcnQgPSBmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy/kuIvovb0KICAgICAgICAgICAgc3RhdGljIExSX2Rvd25sb2FkKHVybCxmaWxlbmFtZSl7CiAKICAgICAgICAgICAgICAgIGxldCB1YSA9IG5hdmlnYXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKTsKIAogICAgICAgICAgICAgICAgY29uc29sZS5sb2codWEubWF0Y2goL3ZlcnNpb25cLyhbXGQuXSspLipzYWZhcmkvKSk7CiAKICAgICAgICAgICAgICAgIGlmKHVhLm1hdGNoKC92ZXJzaW9uXC8oW1xkLl0rKS4qc2FmYXJpLykpewogCiAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odXJsKTsKIAogICAgICAgICAgICAgICAgfWVsc2V7CmNvbnNvbGUubG9nKHVybCk7CiAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQodXJsLGZpbGVuYW1lKTsKICAgICAgICAgICAgICAgIH0KIAogCiAgICAgICAgICAgIH0KIAogICAgICAgIH0KIAogICAgICAgIGNsYXNzIFBsYXlWaWRlb0NsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQogCiAgICAgICAgfQogCiAgICAgICAgY2xhc3MgVmVyc2lvbkNsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CiAKICAgICAgICAgICAgICAgIHN1cGVyKCk7CiAKICAgICAgICAgICAgICAgIHRoaXMudmVyc2lvblVybCA9ICdodHRwczovL2dpdGxhYi5jb20vbGFuaGFoYS9sYW5yZW5qaWFvYmVuLy0vcmF3L21haW4vUkVBRE1FLm1kP3JlZl90eXBlPWhlYWRzJzsKIAogICAgICAgICAgICAgICAgdGhpcy5yZW5ld1ZlcnNpb25VcmwgPSAnaHR0cHM6Ly9naXRsYWIuY29tL2xhbmhhaGEvbGFucmVuamlhb2JlbiMlRTYlOUIlQjQlRTYlOTYlQjAlRTYlOTclQTUlRTUlQkYlOTcnOwogCiAgICAgICAgICAgICAgICBsZXQgdGlwUGFnZVdyYXAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKIAogICAgICAgICAgICAgICAgdGlwUGFnZVdyYXAuaWQ9J3RpcFdyYXAnOwogCiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHRpcFBhZ2VXcmFwKTsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgKGFzeW5jIGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IGF3YWl0IF90aGlzLmNoZWNrVGltZSgpOwogCiAgICAgICAgICAgICAgICAgICAgaWYoIXJlc3ApcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgX3RoaXMuY2hlY2tSdW5UaW1lKCk7CiAKICAgICAgICAgICAgICAgIH0pKCkKIAogICAgICAgICAgICB9CiAgICAgICAgICAgIGdldFZlcnNpb24obW90aGVkLHVybCl7CiAKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSxyZWplY3QpPT57CiAKICAgICAgICAgICAgICAgICAgICBHTV94bWxodHRwUmVxdWVzdCh7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBtb3RoZWQsCiAKICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwsCiAKICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogJycsCiAKICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogeydBY2NlcHQnOiAndGV4dC9wbGFpbiwgdGV4dC9odG1sLGFwcGxpY2F0aW9uL2pzb24nfSwKIAogICAgICAgICAgICAgICAgICAgICAgICBvbmxvYWQ6IGZ1bmN0aW9uKHJlcyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNBcnJheSA9IHJlcy5yZXNwb25zZVRleHQuc3BsaXQoJ1xuJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2ZXJzaW9uQXJyYXk9W107CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8cmVzQXJyYXkubGVuZ3RoO2krKyl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNBcnJheVtpXS5tYXRjaCgvXihbMC05OTldezEsM30pXC4/KFswLTk5OV17MSwzfSk/XC4/KFswLTk5OV17MSwzfSk/JC8pKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ZXJzaW9uQXJyYXkucHVzaChyZXNBcnJheVtpXSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh2ZXJzaW9uQXJyYXkpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgIG9uZXJyb3IgOiBmdW5jdGlvbihlcnIpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coZXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICB9CiAKICAgICAgICAgICAgY2hlY2tUaW1lKCl7CiAKICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgbGV0IGluc3RhbGxUaW1lID0gR01fZ2V0VmFsdWUoJ2luc3RhbGxUaW1lJywwKTsKIAogICAgICAgICAgICAgICAgbGV0IGRhdGUgPSBuZXcgRGF0ZSgpOwogCiAgICAgICAgICAgICAgICBsZXQgZGF0ZU5vd1RpbWUgPSBkYXRlLmdldFRpbWUoKTsKIAogICAgICAgICAgICAgICAgbGV0IGludGVydmFsVGltZSA9IDg2NDAwKjEwMDA7CiAKICAgICAgICAgICAgICAgIGxldCB2ZXJzaW9uSW50ZXJ2YWxUaW1lID0gODY0MDAqMTAwMDsKIAogICAgICAgICAgICAgICAgaWYoaW5zdGFsbFRpbWUpewogCiAgICAgICAgICAgICAgICAgICAgaWYoZGF0ZU5vd1RpbWUtaW50ZXJ2YWxUaW1lPmluc3RhbGxUaW1lKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZ2V0VmVyc2lvblRpbWUgPSBHTV9nZXRWYWx1ZSgnZ2V0VmVyc2lvblRpbWUnLDApOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGVOb3dUaW1lLXZlcnNpb25JbnRlcnZhbFRpbWUgPiBnZXRWZXJzaW9uVGltZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhc3luYyBmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGUgPSBuZXcgRGF0ZSgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1RpbWUgPSBkYXRlLmdldFRpbWUoKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2ZXJzaW9uQXJyPSBhd2FpdCBfdGhpcy5nZXRWZXJzaW9uKCdnZXQnLF90aGlzLnZlcnNpb25VcmwpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodmVyc2lvbkFyci5sZW5ndGggPT0gMCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInojrflj5bliLDniYjmnKzlj7cnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZlcnNpb25PYmo9dmVyc2lvbkFyclswXS5zcGxpdCgnLicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMudmVyc2lvbk9ubGluZSA9IFtdOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMudmVyc2lvbk9ubGluZVswXSA9IHZlcnNpb25PYmpbMF07CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy52ZXJzaW9uT25saW5lWzFdID0gdmVyc2lvbk9ialsxXT92ZXJzaW9uT2JqWzFdOjA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy52ZXJzaW9uT25saW5lWzJdID0gdmVyc2lvbk9ialsyXT92ZXJzaW9uT2JqWzJdOjA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmVyc2lvbk5vdyA9IEdNX2luZm8uc2NyaXB0LnZlcnNpb24uc3BsaXQoJy4nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKF90aGlzLnZlcnNpb25PbmxpbmUsdmVyc2lvbk5vdyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5kZXg7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGk9MDtpPDM7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYXJzZUludChfdGhpcy52ZXJzaW9uT25saW5lW2ldKSA+IHBhcnNlSW50KHZlcnNpb25Ob3dbaV0pKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg9aTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdnZXRWZXJzaW9uVGltZScsZGF0ZU5vd1RpbWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ3Zjb2RlUmVzdWx0JyxpbmRleCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgndmVyc2lvbk9ubGluZScsX3RoaXMudmVyc2lvbk9ubGluZSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHRydWUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSgpCiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUodHJ1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIH1lbHNlewogCiAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2luc3RhbGxUaW1lJyxkYXRlTm93VGltZSk7CiAKICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGZhbHNlKTsKIAogICAgICAgICAgICAgICAgfTsKIAogICAgICAgICAgICB9KQogCiAgICAgICAgfQogCiAgICAgICAgICAgIGNoZWNrUnVuVGltZSgpewogCiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAKICAgICAgICAgICAgbGV0IGRhdGUgPSBuZXcgRGF0ZSgpOwogCiAgICAgICAgICAgIGxldCBkYXRlTm93VGltZSA9IGRhdGUuZ2V0VGltZSgpOwogCiAgICAgICAgICAgIGxldCBydW5UaXBUaW1lID0gR01fZ2V0VmFsdWUoJ3J1blRpcFRpbWUnLDApOy8v5by55qGG5pe26Ze0CiAKICAgICAgICAgICAgbGV0IHZjb2RlUmVzdWx0ID0gR01fZ2V0VmFsdWUoJ3Zjb2RlUmVzdWx0Jyk7CiAKICAgICAgICAgICAgX3RoaXMudmVyc2lvbk9ubGluZSA9IEdNX2dldFZhbHVlKCd2ZXJzaW9uT25saW5lJyk7CiAKICAgICAgICAgICAgbGV0IHRpcEludGVydmFsVGltZSA9IDYwKjEwMDA7CiAKICAgICAgICAgICAgaWYoZGF0ZU5vd1RpbWUtcnVuVGlwVGltZSA+IHRpcEludGVydmFsVGltZSAmJiB2Y29kZVJlc3VsdCAhPSAndW5kZWZpbmVkJyl7CiAKICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdydW5UaXBUaW1lJyxkYXRlTm93VGltZSk7CiAKICAgICAgICAgICAgICAgIHN3aXRjaCh2Y29kZVJlc3VsdCl7CiAKICAgICAgICAgICAgICAgICAgICBjYXNlIDA6CiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNob3dUaXBQYWdlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogCiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5zaG93VGlwUGFnZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICAgICAgICAgIGNhc2UgMjoKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuc2hvd1RpcFBhZ2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICB9CiAKICAgICAgICB9CiAKICAgICAgICAgICAgc2hvd1RpcFBhZ2UoKXsKIAogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKIAogICAgICAgICAgICAgICAgLy9sZXQgc2V0SHRtbCA9ICI8ZGl2IGNsYXNzPSd6aG1NYXNrJz48L2Rpdj4iOwogCiAgICAgICAgICAgICAgICBsZXQgc2V0SHRtbCA9IjxkaXYgY2xhc3M9J3dyYXAtYm94JyBzdHlsZT0ndG9wOmF1dG87bGVmdDphdXRvO2JvdHRvbTo1cHg7cmlnaHQ6NXB4O3RyYW5zZm9ybTpub25lO2JveC1zaGFkb3c6IDBweCAwcHggNXB4ICM4ODg7Jz4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0naWNvblNldFVsSGVhZCc+PGxpIGNsYXNzPSdpY29uU2V0UGFnZUhlYWQnIHN0eWxlPSdqdXN0aWZ5LWNvbnRlbnQ6Y2VudGVyOyc+PHNwYW4+5Y+R546w5paw54mI5pysPC9zcGFuPjwvbGk+PC91bD4iOwogCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgc3R5bGU9J2hlaWdodDo4MHB4OyBkaXNwbGF5OmZsZXg7IGp1c3RpZnktY29udGVudDpjZW50ZXI7IGFsaWduLWl0ZW1zOmNlbnRlcjsnPiI7CiAKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPHAgc3R5bGU9J3dpZHRoOjI0MHB4O3dvcmQtYnJlYWs6YnJl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zaW9uVGlwRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RpcFdyYXAnKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKCF2ZXJzaW9uVGlwRG9tKXJldHVybiBmYWxzZTsKIAogICAgICAgICAgICAgICAgICAgIHZlcnNpb25UaXBEb20uaW5uZXJIVE1MID0gc2V0SHRtbDsKIAogICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZCh2ZXJzaW9uVGlwRG9tKTsKIAogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0aXBCYWNrT24nKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2luc3RhbGxUaW1lJyxuZXcgRGF0ZSgpLmdldFRpbWUoKSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RpcFdyYXAnKS5zdHlsZT0nZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RpcFJlbmV3JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpbnN0YWxsVGltZScsbmV3IERhdGUoKS5nZXRUaW1lKCkpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0aXBXcmFwJykuc3R5bGU9J2Rpc3BsYXk6bm9uZSc7CiAKICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oX3RoaXMucmVuZXdWZXJzaW9uVXJsKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAvL3RpcEljb25DbG9zZS5jbGljaygpOwogICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgIH0sNTAwMCk7CiAKIAogICAgICAgICAgICB9OwogCiAgICAgICAgfQogCiAgICAgICAgdmFyIG5vd1dlYj1bXTsKIAogICAgICAgIGp4VmlkZW8uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICBsZXQgcmVzdWx0ID0gbG9jYXRpb24uaHJlZi5tYXRjaChpdGVtLm1hdGNoKTsKIAogICAgICAgICAgICBpZihyZXN1bHQpewogCiAgICAgICAgICAgICAgICBub3dXZWIucHVzaChpdGVtKTsKIAogICAgICAgICAgICB9CiAKICAgICAgICB9KQogCiAgICAgICAgaWYobm93V2ViLmxlbmd0aD09MCl7CiAKICAgICAgICAgICAgLy9sZXQgYmFzZUNsYXNzID0gbmV3IEJhc2VDbGFzcygpOwogCiAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInljLnphY3or6XnvZHnq5nmiJbor6XmqKHlnZflt7LlhbPpl60nKTtyZXR1cm47CiAgICAgICAgfQogCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewogCiAgICAgICAgICAgIHZhciBwbGF5VmlkZW9DbGFzcyA9IG5ldyBQbGF5VmlkZW9DbGFzcygpOwogCiAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdtb3ZpZUxpc3QnLCcyMicpPT0wKXsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogCiAgICAgICAgICAgIHBsYXlWaWRlb0NsYXNzLnpobUxvZ28oKTsKIAogICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnKSl7CiAKICAgICAgICAgICAgICAgIGxldCBsaW5lT2JqID0gcGxheVZpZGVvQ2xhc3MuZ2V0TGluZShHTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnKSk7CiAKICAgICAgICAgICAgICAgIGlmKGxpbmVPYmopewogCiAgICAgICAgICAgICAgICAgICAgLy9wbGF5TGluZSA9IFsuLi5saW5lT2JqLC4uLnBsYXlMaW5lXTsKICAgICAgICAgICAgICAgICAgICBwbGF5TGluZSA9IGxpbmVPYmoKIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAKICAgICAgICAgICAgLy9jdXN0b20gYWRkIHdlYiBsaW5lCiAKICAgICAgICAgICAgLy90ZW1wbGF0ZTppY29uLHBsYXlMaW5lOwogCiAgICAgICAgICAgIGxldCBwbGF5V3JhcEh0bWwgPSAiPGRpdiBjbGFzcz0nemhtX3BsYXlfdmlkZW9fbGluZSc+IjsKIAogICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz0iPGRpdj48dWwgY2xhc3M9J3pobV9wbGF5X3ZpZGVfbGluZV91bCc+IjsKIAogICAgICAgICAgICBwbGF5TGluZS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQgPSAnJzsKIAogICAgICAgICAgICAgICAgaWYocGxheVZpZGVvQ2xhc3MuZ2V0Q29va2llKCdwbGF5TGluZUFjdGlvbicpID09IGl0ZW0udXJsKXsKIAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkID0gJ3pobV9saW5lX3NlbGVjdGVkJzsKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz1gPGxpIGNsYXNzPSdwbGF5TGluZVRkIHpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGkgJHtzZWxlY3RlZH0nIHVybD0nJHtpdGVtLnVybH0nID4ke2l0ZW0ubmFtZX08L2xpPmA7CiAKICAgICAgICAgICAgfSkKIAogICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz0gIjwvZGl2PiI7CiAKICAgICAgICAgICAgbGV0IHpobVBsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnemhtbG9nbycpOwogCiAgICAgICAgICAg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8vfSwKICAgICAgICAgICAgXTsKIAogICAgICAgICAgICBsZXQganhWaWRlb1dlYiA9IGp4VmlkZW9EYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKIAogICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWYubWF0Y2goaXRlbS5tYXRjaCk7CiAKICAgICAgICAgICAgfSkKIAogICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy56aG1Mb2dvRHJhZygndmlkZW8nLGp4VmlkZW9XZWIpOwogCiAgICAgICAgICAgIC8v5piv5ZCm5Zyo5pKt5pS+6aG1CiAgICAgICAgICAgIGlmKGp4VmlkZW9XZWIubGVuZ3RoID4gMCl7CiAKICAgICAgICAgICAgICAgIHZhciB7ZnVuY05hbWUsbWF0Y2g6bm93TWF0Y2gsbm9kZTpub3dOb2RlLG5hbWU6bm93TmFtZX0gPSBqeFZpZGVvV2ViWzBdOwogCiAgICAgICAgICAgICAgICAvL+m8oOagh+e7j+i/h+aYvuekuue6v+i3rwogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlCdXR0b24nKS5vbm1vdXNlb3Zlcj0oKT0+ewogCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnBsYXlMaW5lRGl2Iikuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW91dD0oKT0+ewogCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnBsYXlMaW5lRGl2Iikuc3R5bGUuZGlzcGxheT0nbm9uZSc7CiAKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgLy/pgInmi6nnur/ot6/op6PmnpDmkq3mlL4KIAogICAgICAgICAgICAgICAgdmFyIHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwogCiAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CiAKICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lVGQuZm9yRWFjaChmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpIHpobV9saW5lX3NlbGVjdGVkJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvQ2xhc3Muc2V0Q29va2llKCdwbGF5TGluZUFjdGlvbicsdGhpcy5nZXRBdHRyaWJ1dGUoJ3VybCcpLDMwKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgndmlkZW9QbGF5TGluZUFkZCcpICE9IDIyKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1dlYk5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihub3dXZWJOb2RlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd1dlYk5vZGUuaW5uZXJIVE1MID0gcGxheUp4SHRtbDsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5SWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlJZnJhbWUnKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlJZnJhbWUuc3JjPSBpdGVtLmdldEF0dHJpYnV0ZSgndXJsJykrbG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR572R56uZ57uT54K55LiN5a2Y5ZyoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmKTsKIAogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICB9KQogCiAgICAgICAgICAgICAgICAvKi0t54m55q6K5aSE55CGLS0qLwogICAgICAgICAgICAgICAgLy/kvJjphbfljrvlub/lkYoKICAgICAgICAgICAgICAgIGlmKG5vd05vZGU9PSIjcGxheWVyIil7CiAKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlrQWQgPSB5b3VrdUFkLmxhc3RDaGlsZDsKIAogICAgICAgICAgICAgICAgICAgICAgICB5a0FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoeWtBZCk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1kYXNoYm9hcmQtMCcpLnN0eWxlPSdkaXNwbGF5OmZsZXgnOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8tbGF5ZXIgdmlkZW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW8ucGxheSgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy/mmoLlgZwKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1wbGF5LWljb24tMCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8tbGF5ZXIgdmlkZW8nKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrJTIgPT0gMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5wYXVzZSgpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW8uYWRkRXZlbnRMaXN0ZW5lcigndGltZXVwZGF0ZScsZnVuY3Rpb24oKXsgLy/mkq3mlL7ml7bpl7TmlLnlj5gKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB5a0FkID0geW91a3VBZC5sYXN0Q2hpbGQ7CiAKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeWtBZCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5a0FkLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoeWtBZCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5rdWktZGFzaGJvYXJkLTAnKS5zdHlsZT0nZGlzcGxheTpmbGV4JzsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgLy/plK7nm5jlv6vov5vlv6vpgIAKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQub25rZXlkb3duID0gZnVuY3Rpb24oZXZlbnQpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhldmVudC5rZXlDb2RlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1sYXllciB2aWRlbycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihldmVudC5rZXlDb2RlPT0zOSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5jdXJyZW50VGltZSA9IHZpZGVvLmN1cnJlbnRUaW1lICsgNTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZXZlbnQua2V5Q29kZT09MzcpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPSB2aWRlby5jdXJyZW50VGltZSAtIDU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgICAgfSwzMDAwKQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/niLHlpYfoibrljrvlub/lkYoKICAgICAgICAgICAgICAgIGlmKG5vd05vZGU9PSIjZmxhc2hib3giKXsKIAogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnNraXBwYWJsZS1hZnRlcicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvbSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbS5jbGljaygpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMzAwMCkKIAogICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAvL+iFvuiur+WOu3ZpcOW8ueeqlwogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXItY29udGFpbmVyIil7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbiA9IDA7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKyA8IDEwMCl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYW5lbFRpcFZpcCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wYW5lbC1vdmVybGF5Jyk7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhbmVsVGlwVmlwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhbmVsVGlwVmlwLnN0eWxlLmRpc3BsYXk9J25vbmUnOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0sMTAwKQogCiAKIAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v5LmQ6KeG6YCJ6ZuG5aSE55CGCiAgICAgICAgICAgICAgICBpZihub3dOb2RlID09ICIjbGVfcGxheWJveCIpewogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBqQmxvY2sgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcual9ibG9jaycpOwogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFqQmxvY2spIHJldHVybjsKIAogICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGk9MDtpPGpCbG9jay5sZW5ndGg7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvSWQgPSBqQmxvY2tbaV0uZ2V0QXR0cmlidXRlKCdkYXRhLXZpZCcpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGBodHRwczovL3d3dy5sZS5jb20vcHR2L3ZwbGF5LyR7dmlkZW9JZH0uaHRtbGA7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpCbG9ja1tpXS5maXJzdENoaWxkLnNldEF0dHJpYnV0ZSgnaHJlZicsbGluayk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8vQuermeWkp+S8muWRmHVybOWkhOeQhu+8jOmhtemdomNsYXNz5LiN5LiA6Ie0CiAgICAgICAgICAgICAgICBpZihub3dOb2RlID09ICIucGxheWVyLWNvbnRhaW5lciIpewogCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheWVyLWNvbnRhaW5lcicpICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jb250YWluZXInKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd05vZGUgPSAnLnBsYXllci1tYXNrJzsKIAogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93Tm9kZSA9ICcuYnB4LXBsYXllci1jb250YWluZXInOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgICAgIC8q6IW+6K6v6KeG6aKR54K55Ye75YW25a6D6KeG6aKR6Lez6L2sKi8KICAgICAgICAgICAgICAgIGlmKG5vd05hbWU9PSdxcVBDJyl7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgZmlndXJlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmZpZ3VyZScpOwogCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpZ3VyZURldGFpbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5maWd1cmVfZGV0YWlsJyk7CiAKICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdEl0ZW0gPSBbLi4uZmlndXJlLC4uLmZpZ3VyZURldGFpbF07CiAKICAgICAgICAgICAgICAgICAgICBpZihsaXN0SXRlbS5sZW5ndGggPiAwKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBsaXN0SXRlbS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSB0aGlzLmdldEF0dHJpYnV0ZSgnaHJlZicpOwogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobGluayl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGxpbms7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKIAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKIAogICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/ms6jph4rmmK/lpJrkuKrmkq3mlL7pgInpm4bljLrln58KLyoKICAgICAgICAgICAgICAgIGxldCBlYXJlQ2xhc3NOYW1lQXJyID0ganhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lLnNwbGl0KCcsJyk7CiAKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVhcmVDbGFzc05hbWVBcnIpO3JldHVybjsKIAogICAgICAgICAgICAgICAgaWYoZWFyZUNsYXNzTmFtZUFyci5sZW5ndGg9PTApcmV0dXJuOwoqLwogICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewovKgogICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8ZWFyZUNsYXNzTmFtZUFyci5sZW5ndGg7aSsrKXsKIAogICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuJytlYXJlQ2xhc3NOYW1lQXJyW2ldKSl7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvU2VsZWN0LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coZS50YXJnZXQucGFyZW50Tm9kZS5ocmVmKTsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmPWxvY2F0aW9uLmhyZWY7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAqLwogCiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvU2VsZWN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLicranhWaWRlb1dlYlswXS5hcmVhQ2xhc3NOYW1lKTsKIAogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvU2VsZWN0Lmxlbmd0aD09MCl7Y29uc29sZS5sb2coJ+ivpee9keermeaSreaUvuWMuuexu+WQjeaUueWPmCcpO3JldHVybjt9CiAKICAgICAgICAgICAgICAgICAgICB2aWRlb1NlbGVjdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGUudGFyZ2V0LnBhcmVudE5vZGUuaHJlZik7CiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bG9jYXRpb24uaHJlZjsKIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKQogCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogCiAgICAgICAgICAgICAgICAgICAgfSk7CiAKICAgICAgICAgICAgICAgIH0sMjAwMCk7CiAgICAgICAgICAgIH0KIAogICAgICAgIH0KIAogICAgICAgIHBsYXlWaWRlb0Z1bmMoKTsKIAogICAgICAgIG5ldyBWZXJzaW9uQ2xhc3MoKTsKIAogICAgfQp9KSgpOw==
Add Comment
Please, Sign In to add comment