Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6Mzk0LCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG5jb25zdCB7ZGVtb0RhdGEsZGVmYXVsdFNldHMsZmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG5jb25zdCB7Z2V0T25lLHVuaXF1ZTIsZHVwbGljYXRlc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvdXRpbHM/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xubGV0IHNqVGVzdCA9W107Zm9yKGxldCBpIGluIGRlbW9EYXRhKXtzalRlc3Q9c2pUZXN0LmNvbmNhdChkZW1vRGF0YVtpXSl9XG50aGlzLmQgPSBbXTtcbmNvbnN0IGp4SXRlbSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xudmFyIFJvdXRlID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmV2YWwoZ2V0S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8udGVzdChzZWwpKXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/nnIvotbfmnaXmkq3mlL7lnLDlnYDkvLzkuY7kuI3lr7nlirI/XFxuJytwbGF5VXJsXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICQoKS5sYXp5UnVsZSgocGxheVVybCx1cmwpPT57XG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRJdGVtKFwic2VsZWN0ZWQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgbG9nKCd0aXRsZTonK3RpdGxlKTtcbiAgICAgICAgICAgIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGdldEl0ZW0oXCJzZWxlY3RlZDBcIiwgXCImJlwiKS5zcGxpdChcIiYmXCIpWzBdLnJlcGxhY2UoL/CfkYkvZywnJykucmVwbGFjZSgv5LiN6YCJL2csJycpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So5pat5o+S5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCx0aXRsZSxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9ZWxzZSBpZihnZXRJdGVtKCdkbi50ZXN0X21vZGUnKT09PSfmlq3mj5InJiYvXumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So6a2U5pat5ouf55yf5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCwnJyxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgIGNvbnN0IHtsYXp5UGFyc2V9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbGF6eVBhcnNlKHBsYXlVcmwscGFyc2VJbnQoZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSkpfHwndG9hc3Q6Ly/op6PmnpDlpLHotKUs5YW35L2T55yL5pel5b+XJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9LHBsYXlVcmwsdXJsKVxuICAgIH0pLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcbiAgICAgICAgYmxvY2tSdWxlczogWydiYWlkdS4qLnBuZycsICcuanBnJywnLm1wMycsJy5tcDQnLCcubTN1OCcsJy5mbHYnLCcuYXZpJywnLjNncCcsJy5tcGVnJywnLndtdicsJy5tb3YnLCcucm12YicsJy5naWYnLCcuanBnJywnLmpwZWcnLCcucG5nJywnLmljbycsJy5zdmcnX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4gICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+RiS9nLCcnKTtcbiAgICAgICAgICAgICAgICBpZihvdXRUaXRsZS5zdGFydHNXaXRoKCdodHRwJykmJih0eXBlb2Yob3V0Q29kZSk9PT0ndW5kZWZpbmVkJ3x8IW91dENvZGUpKXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dFRpdGxlKTtcbiAgICAgICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dENvZGV8fCcnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgbGV0IG91dFRleHQgPSBqeENvZGUuam9pbignXFxuJyk7XG4gICAgICAgICAgICBsZXQgb3V0UGF0aCA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2VPdXRfJyttb2RlKycudHh0JztcbiAgICAgICAgICAgIHdyaXRlRmlsZShvdXRQYXRoLG91dFRleHQpO1xuICAgICAgICAgICAgbGV0IHBhc3RlcyA9IGdldFBhc3RlcygpO1xuICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9IHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKG91dFRleHQpLHBhc3Rlc1sxXSk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0Q29kZSA9ICfprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKlJytpbXBvcnRVcmw7XG4gICAgICAgICAgICBjb3B5KGltcG9ydENvZGUpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWh+S7tuW3suWvvOWHuuWIsDonK291dFBhdGgrJ1xcbuivt+iHquihjOmAmui/h01U566h55CG5Zmo5p+l55yLJ1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/miJHkuI3muIXmpZrkvaDopoHlgZrku4DkuYg/XFxuJyttb2RlO1xuICAgICAgICB9XG4gICAgfSx0aXRsZUFycix1cmxBcnIpLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifwn5Ol5a+85YWlVFhUJyxcbiAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXG4gICAgdXJsOiQoKS5ydWxlKCgpPT57XG4gICAgICAgIGxldCBkID0gW107XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon5a+85YWl6K+05piOJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxuICAgICAgICAgICAgZGVzYzon5pSv5oyB5q2k5o+S5Lu25a+85Ye65qC85byP55qE5paH5pys6L+b6KGM5a+85YWl44CCXFxu5qC85byPMTog5ZCN56ewLOWcsOWdgCDkuIDooYzkuIDkuKrop6PmnpBcXG7moLzlvI8yOuS6keWJquWIh+advyDprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKl5Ymq5YiH5p2/5Zyw5Z2AJyxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICBkZXNjOiBcInR4dOaWh+acrOino+aekOinhOWImSzkuIDooYzkuIDkuKpcIixcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxuICAgICAgICAgICAgdGl0bGU6J+ino+aekOaWh+acrCcsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2RuLmltcG9ydF90ZXh0JywgJycpLFxuICAgICAgICAgICAgICAgIHR5cGU6IFwidGV4dGFyZWFcIixcbiAgICAgICAgICAgICAgICBoZWlnaHQ6LTEsXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiLGlucHV0KSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon8J+TpeWvvOWFpScsXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXG4gICAgICAgICAgICB1cmw6JCgn56Gu5a6a57yW6L6R5aW95LqG5ZCXP+atpOaTjeS9nOWwhuimhuebluacrOWcsOW3suacieeahOiusOW9le+8jOW7uuiuruWkh+S7veWQjueUqOepuuaWh+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IGZldGNoKHBhcnNlUm91dGUpfHxKU09OLnN0cmluZ2lmeSh7dGl0bGU6W10sY29kZXM6e30sc2V0dGluZ3M6ZGVmYXVsdFNldHN9KTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGpzQ29kZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lj5HnlJ/plJnor686XFxuJytlLm1lc3NhZ2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHRvSW1wb3J0ID0gZ2V0VmFyKFwiZG4uaW1wb3J0X3RleHRcIik7XG4gICAgICAgICAgICAgICAgaWYoL+mtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqUvLnRlc3QodG9JbXBvcnQpJiZ0b0ltcG9ydC5zcGxpdCgnwqXCpScpLmxlbmd0aD4xKXtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRvSW1wb3J0LnNwbGl0KCfCpcKlJylbMV07XG4gICAgICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QodXJsKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Ymq5YiH5p2/5Zyw5Z2A5pyJ6K+vLOWvvOWFpeWksei0pSdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IHBhcnNlUGFzdGUodXJsKTtcbiAgICAgICAgICAgICAgICAgICAgdG9JbXBvcnQgPSBiYXNlNjREZWNvZGUodG9JbXBvcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVRpdGxlID0gW107XG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlQ29kZSA9IHt9O1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcsJylbMF07XG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV07XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIShjb2RlLnJlcGxhY2UoL1tcXHNdL2csJycpLnN0YXJ0c1dpdGgoJ2h0dHAnKSkpe1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHRpdGxlKyfkuLrlh73mlbDop6PmnpAnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykubGVuZ3RoPjIwKXsvL+inhuS4umZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IGV2YWwoYmFzZTY0RGVjb2RlKGNvZGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZS5tZXNzYWdlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBzY09iamVjdCA9IFtcIkNpdHlJUFwiLCBcInBjVUFcIiwgXCJjYWNoZU0zdThcIiwgXCJkZWZhdWx0UGFyc2VXZWJcIixcIm1hb3NzXCIsIFwiTExRXCJdO1xuICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBwYXJzZVRpdGxlP3BhcnNlVGl0bGUuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoaXQpKTpbXTtcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2R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gICAgICAgICAgICBpZiAodHlwZW9mIChmbGFnc1tvbmVdKSA9PT0gJ3VuZGVmaW5lZCcgfHwgIWZsYWdzW29uZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Y+W5Ye656ys5LiA5Liq5qCH5b+XXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnc1tvbmVdID0gbXlGbG9vcnNbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICBteUZsb29ycy5zcGxpY2UoMCwgMSk7Ly/liKDpmaTmoIflv5fliJfooajph4znmoTnrKzkuIDkuKrlhYPntKBcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBmbGFnc1tvbmVdICsgaiwgdmFsdWU6IG9uZX0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZ0bGlzdC5wdXNoKHtrZXk6IGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIGxvZyhKU09OLnN0cmluZ2lmeShmbGFncykpO1xuICAgICAgICBsZXQgbmV3Q29kZXMgPSB7fTtcbiAgICAgICAgZm9yKGxldCBrIGluIGZ0bGlzdCl7XG4gICAgICAgICAgICBuZXdDb2Rlc1tmdGxpc3Rba10ua2V5XSA9IGZ0bGlzdFtrXS52YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBsZXQgdGlwcyA9ICfmo4DmtYvliLDlkI3np7DlpI3nlKjpobnnm67mlbA6JytrZXlzX3JlX2N0Kycs5Luj56CB6YeN5aSN6aG555uu5pWw6YePOicrdmFsdWVfcmVfY3QrJ1xcbumcgOimgeS4gOmUruaJk+S4quagh+ivhuWQlz/kuI3mlK/mjIHoh6rliqjliKDpmaQs5omT5qCH5b+X6Ieq6KGM6Kej5YazJztcbiAgICAgICAgcmV0dXJuICQodGlwcykuY29uZmlybSgodmFsdWVfcmVfY3QsanNvbixuZXdDb2RlcyxwYXJzZVJvdXRlKT0+e1xuICAgICAgICAgICAgaWYodmFsdWVfcmVfY3Q8MSl7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoueEtumDveaYrzDkuKrph43lpI3pobnnm67kuobvvIzlsLHkuI3pnIDopoHmiJHlgZrku4DkuYjkuoYhJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29tcGFyZSgpe1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYSwgYil7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHtmbG9vcnN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBhLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGIuc3Vic3RyaW5nKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbG9vcnMuaW5kZXhPZih5KS1mbG9vcnMuaW5kZXhPZih4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqc29uLmNvZGVzID0gbmV3Q29kZXM7XG4gICAgICAgICAgICBsZXQgdGl0bGVzID0gT2JqZWN0LmtleXMobmV3Q29kZXMpO1xuICAgICAgICAgICAgdGl0bGVzID0gdGl0bGVzLnNvcnQoY29tcGFyZSgpKTtcbiAgICAgICAgICAgIGpzb24udGl0bGUgPSB0aXRsZXM7XG4gICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcbiAgICAgICAgICAgIHdyaXRlRmls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AgIGJvZHkge1xcbiAgICAgICAgICAgIG1hcmdpbjogMCA1cHggMCA1cHg7XFxuICAgICAgICAgICAgcGFkZGluZzogMCAwcHggMCAwcHg7XFxuICAgICAgICAgICAgLyogICAgICAgICAgICBiYWNrZ3JvdW5kOiAjRjlGMERBOyovXFxuICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDA7XFxuICAgICAgICAgICAgZm9udC1mYW1pbHk6IFxcXCJNaWNyb3NvZnQgWWFIZWlcXFwiLFxcXCLlrovkvZNcXFwiLFxcXCJTZWdvZSBVSVxcXCIsIFxcXCJMdWNpZGEgR3JhbmRlXFxcIiwgSGVsdmV0aWNhLCBBcmlhbCxzYW5zLXNlcmlmLCBGcmVlU2FucywgQXJpbW87XFxuICAgICAgICB9XFxuICAgICAgICAjYXBwe1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTEwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAjdGlwc3tcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206NXB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLmZ1bmd7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXJcXG4gICAgICAgIH1cXG4gICAgICAgIGRpdi5ib3gge1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTFweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKui+k+WFpeahhuWwuuWvuCovXFxuICAgICAgICBmb3JtIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dCwgbGFiZWwsIHNlbGVjdCB7XFxuICAgICAgICAgICAgYm9yZGVyOiBub25lO1xcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWtl+S9k+S9jee9riovXFxuICAgICAgICBpbnB1dCB7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgICBoZWlnaHQ6IDMycHg7XFxuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiA2NnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5bCP5qGGKi9cXG4gICAgICAgIC5iYXIgbGFiZWwge1xcbiAgICAgICAgICAgIC8qYmFja2dyb3VuZDogI0QwNkI2QzsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICBsZWZ0OiAzcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKui+k+WFpeahhuagt+W8jyovXFxuICAgICAgICAuYmFyIGlucHV0IHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogMjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgLmxpZWIgc2VsZWN0e1xcbiAgICAgICAgICAgIC8qYm9yZGVyLXJhZGl1czogNHB4OyovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTU1cHggNXB4IDVweCA1NTVweDtcXG4gICAgICAgICAgICB3aWR0aDogODBweDtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIHJpZ2h0OiAycHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWktOWDjyovXFxuICAgICAgICAucm91bmRfaWNvbntcXG4gICAgICAgICAgICB3aWR0aDogNDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcbiAgICA8L3N0eWxlPlxcbjwvaGVhZD5cXG48Ym9keT5cXG48ZGl2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u5jorqTkuLvpopgnLHRoZW1lczpbdGhlbWVzLHRoZW1lRGVmXX0pKVxcbiAgICB9XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgbXlUaGVtZXMgPSBKU09OLnBhcnNlKGZiYS5mZXRjaCh0aGVtZVJvdXRlKSk7XFxuICAgICAgICBsZXQgbm93VGhlbWUgPSBteVRoZW1lcy50aGVtZXMuZmlsdGVyKGl0PT5pdC5uYW1lID09PSBteVRoZW1lcy5ub3dfdGhlbWUpO1xcbiAgICAgICAgdGhlbWVzID0gbm93VGhlbWU/bm93VGhlbWVbMF06bXlUaGVtZXMudGhlbWVzWzBdO1xcbiAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgIC8vIOaWreW/teWIneWni+WMlumDqOWIhlxcbiAgICBjb25zdCBhbGxBcGk9WydodHRwczovL3Rlc3Qucm9uZ3hpbmd2ci5jb20vdGVzdC8/dXJsPScsJ2h0dHA6Ly9jYWNoZS5sYW5ndWFuZy5pY3U6ODgvZGlkaS5waHA/dXJsPSddO1xcbiAgICB2YXIgc2V0dGluZ3MgPSB7XFxuICAgICAgICBxeTogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICB5azogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICB0eDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBtZzogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBibDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBzaDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICB4ZzogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICAvLyBhbDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBwcDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBtaTogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBsZTogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBsdDogJ+S4h+iDveino+aekOKSvycsLy/pvpnohb5cXG4gICAgICAgIHJyO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mV3Q29uZmlnLnRpdGxlLmZpbHRlcihjb21wYXJlKHljVGl0bGUpKTtcXG4gICAgICAgIC8vIG15U2VsZWN0ID0gbXlTZWxlY3QubWFwKChpdCk9PntcXG4gICAgICAgIC8vICAgICBsZXQgZmxhZyA9ICfik4onO1xcbiAgICAgICAgLy8gICAgIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJ+KSvyc7XFxuICAgICAgICAvLyAgICAgfWVsc2UgaWYodHlwZW9mKG5ld0NvbmZpZy5jb2Rlc1tpdF0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAvLyAgICAgfVxcbiAgICAgICAgLy8gICAgIHJldHVybiBmbGFnK2l0XFxuICAgICAgICAvLyB9KTtcXG4gICAgfVxcbiAgICAvL2ZiYS5sb2coSlNPTi5zdHJpbmdpZnkobXlTZWxlY3QpKTtcXG5cXG4gICAgbGV0IG9wdGlvbnMgPSBbXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon54ix5aWH6Im6JyxcXG4gICAgICAgICAgICBpZDoncXknLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnF5LFxcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyOiforr7nva7niLHlpYfoibonXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S8mOmFtycsXFxuICAgICAgICAgICAgaWQ6J3lrJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy55a1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifohb7orq8nLFxcbiAgICAgICAgICAgIGlkOid0eCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MudHhcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IqS5p6cJyxcXG4gICAgICAgICAgICBpZDonbWcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm1nXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WTlOWTqeWTlOWTqScsXFxuICAgICAgICAgICAgaWQ6J2JsJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5ibFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmkJzni5AnLFxcbiAgICAgICAgICAgIGlkOidzaCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Muc2hcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6KW/55OcJyxcXG4gICAgICAgICAgICBpZDoneGcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnhnXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J1BQVFYnLFxcbiAgICAgICAgICAgIGlkOidwcCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucHBcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5ZKq5ZKVJyxcXG4gICAgICAgICAgICBpZDonbWknLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm1pXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S5kOinhicsXFxuICAgICAgICAgICAgaWQ6J2xlJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5sZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOicxOTA1JyxcXG4gICAgICAgICAgICBpZDonb25lJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5vbmVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6aOO6KGMJyxcXG4gICAgICAgICAgICBpZDonZnVuJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5mdW5cXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6b6Z6IW+JyxcXG4gICAgICAgICAgICBpZDonbHQnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmx0XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S6uuS6uui/tycsXFxuICAgICAgICAgICAgaWQ6J3JyJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5yclxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkupTmr5InLFxcbiAgICAgICAgICAgIGlkOid3ZCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mud2RcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5YW25LuWJyxcXG4gICAgICAgICAgICBpZDonb3RoJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5vdGhcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5YWo5bGAJyxcXG4gICAgICAgICAgICBpZDoncWp1JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xanVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5o+S5Lu2JyxcXG4gICAgICAgICAgICBpZDonY2onLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmNqXFxuICAgICAgICB9LFxcbiAgICBdO1xcblxcbiAgICBmdW5jdGlvbiBEaWQoaWQpe1xcbiAgICAgICAgcmV0dXJuIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGlkKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBnZXRPcHRpb24oaWQsdGl0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gICAgICAgICBmYmEud3JpdGVGaWxlKG9sZFJvdXRlLCBKU09OLnN0cmluZ2lmeShzZXR0aW5ncywgbnVsbCwgNCkpO1xcbiAgICAgICAgICAgIGZiYS5yZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIGZiYS5iYWNrKGZhbHNlKTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBmdW5jdGlvbiBjbGlja21lKG1zZyxkdXJhdGlvbix0aXRsZSl7XFxuICAgICAgICB0cnl7XFxuICAgICAgICAgICAgZm9yKGxldCBrZXkgaW4gc2V0dGluZ3Mpe1xcbiAgICAgICAgICAgICAgICAvLyBmYmEubG9nKERpZChrZXkpKycnK2tleSk7XFxuICAgICAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgICAgIC8vc2V0dGluZ3Nba2V5XSA9IERpZChrZXkpLnZhbHVlLnJlcGxhY2UoL+KTinzikr8vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5nc1trZXldID0gRGlkKGtleSkudmFsdWU7XFxuICAgICAgICAgICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICAgICAgICAgIGFsZXJ0KFxcXCLmnKrojrflj5bliLDoioLngrk6XFxcIitrZXkrXFxcIlxcXFxuXFxcIitlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKG15U2VsZWN0KXtcXG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihuZXdDb25maWcuc2V0dGluZ3MsIHNldHRpbmdzKTtcXG4gICAgICAgICAgICAgICAgZmJhLndyaXRlRmlsZShuZXdSb3V0ZSwgJCQkLnN0cmluZ2lmeShuZXdDb25maWcpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZmJhLndyaXRlRmlsZShvbGRSb3V0ZSwgJCQkLnN0cmluZ2lmeShzZXR0aW5ncykpO1xcbiAgICAgICAgICAgIFRvYXN0KG1zZyxkdXJhdGlvbik7XFxuICAgICAgICAgICAgaWYodGl0bGU9PT1cXFwi5YWzXFxcIil7XFxuICAgICAgICAgICAgICAgIGZiYS5iYWNrKCk7XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIGZiYS5yZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgYWxlcnQoZS5tZXNzYWdlKVxcbiAgICAgICAgfVxcbiAgICB9XFxuXFxuICAgIC8vbGV0IHdpZHRoPXdpbmRvdy5zY3JlZW4uYXZhaWxXaWR0aDtcXG4gICAgLy9sZXQgd2lkdGhQeD13aWR0aC0zOTMrNTI7XFxuICAgIC8vYWxlcnQoXFxcIuW9k+WJjeWIhui+qOeOhzpcXFwiK3dpbmRvdy5zY3JlZW4uYXZhaWxXaWR0aCtcXFwiKlxcXCIrd2luZG93LnNjcmVlbi5oZWlnaHQpO1xcbiAgICB2YXIgdmVyaW5mbyA9IFt7XFxuICAgICAgICBpZDonZG4nLFxcbiAgICAgICAgYXV0aG9yOifmlq3lv7UnLFxcbiAgICAgICAgYXZhdGFyOidodHRwczovL3MzLmF4MXguY29tLzIwMjEvMDIvMjIveTd3YjlPLmpwZycsXFxuICAgICAgICBvcHRpb246b3BlbkRuUGFnZSxcXG4gICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBpZDonZHonLFxcbiAgICAgICAgICAgIGF1dGhvcjon6YGT6ZW/JyxcXG4gICAgICAgICAgICBhdmF0YXI6J2h0dHA6Ly9xMS5xbG9nby5jbi9nP2I9cXEmbms9NDM0ODU3MDA1JnM9NjQwJyxcXG4gICAgICAgICAgICBvcHRpb246b3BlblRoZW1lXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGlkOidsbScsXFxuICAgICAgICAgICAgYXV0aG9yOiAn6JOd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ICs9IFxcXCItXFxcIiArIG1vbnRoO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZGF5IDwgMTApIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLTBcXFwiICsgZGF5O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGRhdGVTdHIgKz0gXFxcIi1cXFwiICsgZGF5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkYXRlU3RyO1xcbiAgICB9LFxcbiAgICBub3dEYXRlU3RyOmZ1bmN0aW9uICgpeyAvLyDliKnnlKgk5bel5YW36I635Y+W5qC85byP5YyW5ZCO55qE5b2T5YmN5pe26Ze0XFxuICAgICAgICByZXR1cm4gICQuZGF0ZUZvcm1hdChuZXcgRGF0ZSgpLFxcXCJ5eXl5LU1NLWRkIEhIOm1tOnNzXFxcIik7XFxuICAgIH0sXFxuICAgIHRvSlNPTjogZnVuY3Rpb24oanNvbikge1xcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGpzb24sIChrZXksIHZhbHVlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PSAnZnVuY3Rpb24nKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZS50b1N0cmluZygpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCA0KTtcXG4gICAgfSxcXG4gICAgdG9WTnVtOiBmdW5jdGlvbihhKSB7XFxuICAgICAgICB2YXIgYSA9IGEudG9TdHJpbmcoKTtcXG4gICAgICAgIHZhciBjID0gYS5zcGxpdCgnLicpO1xcbiAgICAgICAgdmFyIG51bV9wbGFjZSA9IFtcXFwiXFxcIiwgXFxcIjBcXFwiLCBcXFwiMDBcXFwiLCBcXFwiMDAwXFx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pKyspIHtcXG4gICAgICAgICAgICBqID0gKGogKyBjb25maWdfYXJyeVtpXSArIHRlbVtpXSkgJSAweDEwMDtcXG4gICAgICAgICAgICB0bXAgPSBjb25maWdfYXJyeVtpXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGNvbmZpZ19hcnJ5W2pdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2pdID0gdG1wO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChhID0gaiA9IGkgPSAweDA7IGkgPCBjb25maWdfYzsgaSsrKSB7XFxuICAgICAgICAgICAgYSA9IChhICsgMHgxKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2FdKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2FdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2FdID0gY29uZmlnX2Fycnlbal07XFxuICAgICAgICAgICAgY29uZmlnX2Fycnlbal0gPSB0bXA7XFxuICAgICAgICAgICAgayA9IGNvbmZpZ19hcnJ5Wyhjb25maWdfYXJyeVthXSArIGNvbmZpZ19hcnJ5W2pdKSAlIDB4MTAwXTtcXG4gICAgICAgICAgICB2aWRlbyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGNvbmZpZ191cmxbaV0uY2hhckNvZGVBdCgpIF4gayk7XFxuICAgICAgICB9XFxuICAgICAgICBsb2coZGVjb2RlVVJJQ29tcG9uZW50KHZpZGVvKSk7XFxuICAgICAgICBpZiAodG9rZW4gPT0gMHgxKSB7XFxuICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudCh2aWRlbyk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBidG9hKHZpZGVvKTtcXG4gICAgICAgIH1cXG4gICAgfVxcbn07XFxuaWYgKGdldFZhcihcXFwianhPbGRWXFxcIiwgXFxcIjBcXF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AgICAgICAgbmFtZXM9dXJscy5tYXAoKGl0LGlkKT0+aXQuc3BsaXQoXFxcIuKYhVxcXCIpLmxlbmd0aD4xP2l0LnNwbGl0KFxcXCLimIVcXFwiKVsxXTpcXFwi57q/6LevOlxcXCIrcGFyc2VJbnQoaWQrMSkpO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscz11cmxzLm1hcChpdD0+aXQuc3BsaXQoXFxcIuKYhVxcXCIpWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvOy8udGVzdChpdCl8fGl0LnNwbGl0KCc7JykubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighL0AvLnRlc3QoaGVhZCl8fCEve3x9Ly50ZXN0KGhlYWQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQ9aGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gaGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ialxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHVybD1pdC5zcGxpdCgnOycpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0LmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpJiYhdHVybC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR1cmwrPVxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0dXJsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7dXJsczp1cmxzLGhlYWRlcnM6aGVhZGVycyxuYW1lczpuYW1lc30pO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXRbMF0uc3BsaXQoXFxcIuKYhVxcXCIpWzBdXFxuICAgICAgICAgICAgICAgIH1cXG4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mLCBrZXkpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIGdldFZpZGVvSW5mbyA9IGZ1bmN0aW9uICh0ZXh0KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0b29scy5BRVModGV4dCwga2V5LCBpdik7XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBsZXQgaGVhZGVycyA9IHtoZWFkZXJzOiB7XFxcIlJlZmVyZXJcXFwiOiByZWZ8fCcnfX07XFxuICAgICAgICAgICAga2V5ID0ga2V5ID09IHVuZGVmaW5lZCA/IFxcXCJkdnlZUlFsblBSQ01kUVNlXFxcIiA6IGtleTtcXG4gICAgICAgICAgICB2YXIgaHRtbCA9IHJlZj9yZXF1ZXN0KGp4dXJsLCBoZWFkZXJzKTpyZXF1ZXN0KGp4dXJsKTtcXG4gICAgICAgICAgICBpZiAoLyZidHdhZj0vLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IHJlcXVlc3Qoanh1cmwgKyBcXFwiJmJ0d2FmXFxcIiArIGh0bWwubWF0Y2goLyZidHdhZiguKj8pXFxcIi8pWzFdLCBoZWFkZXJzKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGl2ID0gaHRtbC5zcGxpdChcXFwiX3Rva2VuID0gXFxcXFxcXCJcXFwiKVsxXS5zcGxpdChcXFwiXFxcXFxcXCJcXFwiKVswXTtcXG4gICAgICAgICAgICBldmFsKGh0bWwubWF0Y2goL3ZhciBjb25maWcgPSB7W1xcXFxzXFxcXFNdKj99LylbMF0gKyBcXFwiXFxcIik7XFxuICAgICAgICAgICAgaWYgKCEvXmh0dHAvLnRlc3QoY29uZmlnLnVybCkpIHtcXG4gICAgICAgICAgICAgICAgY29uZmlnLnVybCA9IGRlY29kZVVSSUNvbXBvbmVudCh0b29scy5BRVMoY29uZmlnLnVybCwga2V5LCBpdikpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLnVybDtcXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJcXFwiO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBMTFE6IGZ1bmN0aW9uKGp4dXJsKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBhcGkgPSBqeHVybC5zcGxpdCgnP3VybD0nKVswXSArIFxcXCJhcGkucGhwXFxcIjtcXG4gICAgICAgICAgICB2YXIgYjY0aWQgPSBiYXNlNjRFbmNvZGUoanh1cmwuc3BsaXQoJ3VybD0nKVsxXSk7XFxuICAgICAgICAgICAgdmFyIHBhcnNlaWQgPSB0b29scy5jYWVzYXJDaXBoZXIoYjY0aWQsIC0xKTtcXG4gICAgICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UocmVxdWVzdChhcGksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiBqeHVybFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcXG4gICAgICAgICAgICAgICAgYm9keTogJ3VybD0nICsgcGFyc2VpZFxcbiAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICB1cmwgPSAoanNvbi5jb2RlID09IDIwMCA/IGJhc2U2NERlY29kZSh0b29scy5jYWVzYXJDaXBoZXIoanNvbi51cmwsIC0xKSkgOiAnJyk7XFxuICAgICAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJyc7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFBhbkd1OiBmdW5jdGlvbih2aXBVcmwsIGRhdGEpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLyp2YXIgcmVmID0gJ2h0dHBzOi8vd3d3LnBhbmd1amlleGkuY29tLyc7XFxuICAgICAgICAgICAgdmFyIHBhcnNlID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9qaWV4aS8/dXJsPScgKyB2aXBVcmw7XFxuICAgICAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvYXBpLnBocCc7XFxuICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICAvL3ZhciByZWYgPSAnaHR0cHM6Ly94bXlzdHYuY29tLyc7XFxuICAgICAgICAgICAgLy92YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2luZGV4LnBocD91cmw9JyArIHRhaWxVcmw7XFxuICAgICAgICAgICAgLy92YXIgYXBpID0gJ2h0dHBzOi8vd3d3Ljk5a3B3LmNvbS9wYW5ndS9hcGkucGhwJztcXG4gICAgICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vcGFuZ3UvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L3Bhbmd1MjAyMS9hcGkucGhwJztcXG4gICAgICAgICAgICBpZiAoZGF0YSkge1xcbiAgICAgICAgICAgICAgICByZWYgPSBkYXRhWzBdO1xcbiAgICAgICAgICAgICAgICBwYXJzZSA9IGRhdGFbMV07XFxuICAgICAgICAgICAgICAgIGFwaSA9IGRhdGFbMl07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBUaW1lID0gKE1hdGguZmxvb3IobmV3IERhdGUoKS5nZXRUaW1lKCkgLyAxMDAwKSAqIDEpLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgdmFyIHVybCA9IEpTT04ucGFyc2UocmVxdWVzdChhcGksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgIC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Y2ggKGUpIHt9XFxuICAgIGZ1bmN0aW9uIGdldFBsYXlKeChrZXkpe1xcbiAgICAgICAgbGV0IHBsYXlVcmxMaXN0ID0gW107Ly/mibnph4/mkq3mlL7lnLDlnYDliJfooahcXG4gICAgICAgIGxldCBuYW1lTGlzdCA9IFtdO1xcbiAgICAgICAgbGV0IGp4cyA9IGppZXhpc1trZXldOyAvLyDpgILnlKjkuo7ov5nkuKrnvZHnq5nnmoTop6PmnpDliJfooahcXG4gICAgICAgIGlmKGp4cyl7XFxuICAgICAgICAgICAgZm9yKGxldCBpIGluIGp4cyl7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVNbanhzW2ldXSA9PSAnc3RyaW5nJyYmUGFyc2VTW2p4c1tpXV0ubWF0Y2goL2h0dHAuKj89Lykpe1xcbiAgICAgICAgICAgICAgICAgICAgcGxheVVybExpc3QucHVzaChQYXJzZVNbanhzW2ldXSt2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaChqeHNbaV0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgLy8gcmV0dXJuIHBsYXlVcmxMaXN0XFxuICAgICAgICByZXR1cm4ge3BsYXlVcmxMaXN0OnBsYXlVcmxMaXN0LG5hbWVMaXN0Om5hbWVMaXN0fVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGdldExhenlMaXN0KGtleSl7Ly/lj6rojrflj5blpIfog47liJfooajnmoTlhY3ll4XmjqLop6PmnpDliJfooahcXG4gICAgICAgIGxldCBwYXJzZXMgPSBbXTtcXG4gICAgICAgIGxldCBqeHMgPSBqaWV4aXNba2V5XXx8W107IC8vIOmAgueUqOS6jui/meS4que9keermeeahOino+aekOWIl+ihqFxcbiAgICAgICAgLy8gbG9nKGp4cyk7XFxuICAgICAgICBpZihqeHMpe1xcbiAgICAgICAgICAgIGZvcihsZXQgaSBpbiBqeHMpe1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTW2p4c1tpXV0gPT0gJ2Z1bmN0aW9uJyYmIS/pgJrlhY0vLnRlc3QoUGFyc2VTW2p4c1tpXV0udG9TdHJpbmcoKSkpe1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6anhzW2ldLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6UGFyc2VTW2p4c1tpXV1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gcGFyc2VzXFxuICAgIH1cXG4gICAgdmFyIGV4dHJhID0ge307XFxuICAgIHZhciBwYXJzZXMgPSBbXTsgLy/lhY3ll4XmjqLliJfooahcXG4gICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgIGlmKCFzdHJUaXRsZSl7XFxuICAgICAgICBpZigvTFQvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgc3RyID0gbXlTZXQubHQ7XFxuICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2x0Jyk7XFxuICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2x0JyxzdHIpO1xcbiAgICAgICAgfSBlbHNlIGlmKC9yZW5yZW5taS8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC5ycjtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncnInKTtcXG4gICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgncnInLHN0cik7XFxuICAgICAgICB9ZWxzZSBpZigvd3VkdXl1bi8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC53ZDtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnd2QnKTtcXG4gICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnd2QnLHN0cik7XFxuICAgICAgICB9ZWxzZSBpZigvTFR8cnVpZmVuZ2xifHN1b3lvfHhmeXxyZW5yZW5taXxSb25nWGluZ1ZSfHh1ZXJlbnx3dWR1eXVufGxhb2RpfE5haWZlaW1pfGRhb2RtfFhNTVR8djAyMGMvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgc3RyID0gbXlTZXQub3RoO1xcbiAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvdGgnKTtcXG4gICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnb3RoJyxzdHIpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgdmFyIGhvc3Q7XFxuICAgICAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgICAgICBob3N0ID0gdmlwVXJsLm1hdGNoKC9cXFxcLiguKj8pXFxcXC8vKVsxXTtcXG4gICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QocGxheVVybCkpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCLmlq3mj5LosIPnlKjlpLHotKXvvIFcXFxcbumdnuato+W4uOeahHZpcOato+eJiOWcsOWdgOS4lOacquivhuWIq+WOn+ermeino+aekOaSreaUvuWcsOWdgFxcXCI7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlUy7pgZPplb/ku5PlupPpgJrlhY0ocGxheVVybCx0aW1lb3V0KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vaG9zdCA9IGRlY29kZVVSSUNvbXBvbmVudChob3N0KTtcXG4gICAgICAgICAgICBzd2l0Y2ggKG15U2V0LnFqdSkge1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCLpu5jorqRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChob3N0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicXEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQudHg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd0eCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgndHgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXFpeWkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucXk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdxeScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgncXknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwieW91a3UuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd5aycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgneWsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYWxpenlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5hbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2FsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdhbGl6eScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJtZ3R2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm1nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbWcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ21nJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImJpbGliaWxpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnYmwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2JsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwidHYuc29odS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5zaDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpeGlndWEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueGc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd4ZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgneGcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicHB0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5wcDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3BwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdwcCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJtaWd1dmlkZW8uY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbWknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibGUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdsZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiMTkwNS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vbmU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvbmUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ29uZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJmdW4udHZcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5mdW47XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdmdW4nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2Z1bicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vdGg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvdGgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ290aCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucWp1O1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9ZWxzZXtcXG4gICAgICAgIGxvZygn6a2U5pat5omn6KGM5a6a5ZCR6Kej5p6Q57q/6Lev5aS0Oicrc3RyVGl0bGUpO1xcbiAgICAgICAgc3RyID0gc3RyVGl0bGU7XFxuICAgIH1cXG4gICAgbGV0IHdpdGhCYXRjaCA9ICEhKE15SmlleGkuaXNBdXRvICYmIE15SmlleGkuYXV0b01vZGUgPT09ICfpgJ/luqbkvJjlhYgnKTtcXG4gICAgbGV0IHdpdGhCYXRjaE9yZGVyID0gISEoTXlKaWV4aS5pc0F1dG8gJiYgTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+mhuuW6j+S8mOWFiCcpO1xcbiAgICBsZXQgc2luZ2xlQmFjayA9IE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2U7IC8v5ZCK5q+b5qih5byP44CC5Y2V5Liq57uT5p6c55u05o6l6L+U5Zue77yM5YGc5q2i5ZCO6Z2i55qEXFxuICAgIGxldCBkbVBhdGggPSAnaGlrZXI6Ly9maWxlcy9jYWNoZS9kbS50eHQnOy8v5ZCK5q+b5qih5byP6L+H5ruk5paH5Lu26Lev5b6EXFxuICAgIGxldCBkbVVybHM7XFxuICAgIHRyeSB7XFxuICAgICAgICBkbVVybHMgPSBmZXR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fSwgW10pO1xcbiAgICAgICAgcmV0dXJuIGFycmF5cztcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBzb3J0QnlLZXkoYXJyYXksIGtleSwgb3JkZXIpIHsvL+WvueixoeaVsOe7hOaMieafkOS4qumUruWAvOaOkuW6j1xcbiAgICAgICAgcmV0dXJuIGFycmF5LnNvcnQoZnVuY3Rpb24oYSwgYikge1xcbiAgICAgICAgICAgIHZhciB4ID0gYVtrZXldLm1hdGNoKC8oXFxcXGQrKS8pWzFdO1xcbiAgICAgICAgICAgIHZhciB5ID0gYltrZXldLm1hdGNoKC8oXFxcXGQrKS8pWzFdO1xcbiAgICAgICAgICAgIC8vIGxvZygneDonK3grXFxcIix5OlxcXCIreSk7XFxuICAgICAgICAgICAgaWYgKG9yZGVyKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAoKHggPCB5KSA/IC0xIDogKCh4ID4geSkgPyAxIDogMCkpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gKCh4ID4geSkgPyAxIDogMCkgOiAtMSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIGlmICh0eXBlb2YgUGFyc2VTW3N0cl0gPT0gJ2Z1bmN0aW9uJykge1xcbiAgICAgICAgaWYoL+mAmuWFjS8udGVzdChzdHIpKXtcXG4gICAgICAgICAgICByZXR1cm4gUGFyc2VTW3N0cl0odmlwVXJsLHRpbWVvdXQpO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIHVybDtcXG4gICAgICAgIHZhciB0YXNrID0gZnVuY3Rpb24ob2JqKSB7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGNvbmZpZ19kcCA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZ19kcC5jaikpO1xcbiAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2Uob2JqLnZpcFVybCxvYmoubmFtZSxvYmoudGltZW91dCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgaWYoIXdpdGhCYXRjaE9yZGVyfHxzdHJUaXRsZSkgey8v5LiN5byA5aSa57q/6Lev6aG65bqP5LyY5YWI5oiW6ICF5oyH5a6a5LqG6Kej5p6QXFxuICAgICAgICAgICAgdXJsID0gUGFyc2VTW3N0cl0odmlwVXJsLHRpbWVvdXQpO1xcbiAgICAgICAgfWVsc2V7Ly/lvIDkuoblpJrnur/ot6/pobrluo/kvJjlhYjmiafooYzlhY3ll4XlpJrku7vliqFcXG4gICAgICAgICAgICBwYXJzZXMudW5zaGlmdCh7bmFtZTpzdHJ9KTsgLy/miorkuLvphY3nva7nmoTlhY3ll4XmjqLliqDlhaXliLDlpJrku7vliqHliJfooahcXG4gICAgICAgICAgICBwYXJzZXMgPSBBcnJTZXQocGFyc2VzLCduYW1lJyk7IC8v5Y676YeNXFxuICAgICAgICAgICAgdmFyIGNvdW50ID0gcGFyc2VzLmxlbmd0aDsgLy/orr7nva7ku7vliqHmlbDph49cXG4gICAgICAgICAgICBsb2coJ+mtlOaWreW8gOWQr+WkmuS7u+WKoeino+aekCzku7vliqHmlbDph486Jytjb3VudCk7XFxuICAgICAgICAgICAgbG9nKCfop6PmnpDliJfooag6JytKU09OLnN0cmluZ2lmeShwYXJzZXMpKTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VSZXQgPSBbXTsgLy/op6PmnpDnu5PmnpzliJfooahcXG4gICAgICAgICAgICBsZXQgdGFza3MgPSBwYXJzZXMubWFwKChpdCxpZGV4KT0+e1xcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTppdC5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6aXQucnVsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXBVcmw6IHZpcFVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiB0aW1lb3V0XFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJ0YXNrXFxcIitpZGV4XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z6Kej5p6QOlxcXCIrY291bnQpO1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIGlzRG0ocmV0KXtcXG4gICAgICAgICAgICAgICAgaWYoIXJldCl7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBoYXNEbShyZXQuc3BsaXQoJyMnKVswXS5zcGxpdCgnOycpWzBdLGRtVXJscylcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgYmUodGFza3Mse1xcbiAgICAgICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihvYmosIGlkLCBlcnJvcixyZXQpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi55uR5ZCs5Yiw5Lu75YqhXFxcIiArIGlkKyflt7Lnu5PmnZ8sZXJyb3I6JytlcnJvcisnLHJldDonK3JldCk7XFxuICAgICAgICAgICAgICAgICAgICByZXQgPSByZXR8fCcnO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VSZXQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGFzazppZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXQ6cmV0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6dGFza3MuZmlsdGVyKGl0PT5pdC5pZD09PWlkKVswXS5wYXJhbS5uYW1lXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGlmKHNpbmdsZUJhY2spey8v5ZCK5q+b5qih5byP5byA5aeL55qE6K+dLOWIpOaWrXJldOacieaViOaAp1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5Lu75YqhJytpZCsn57uT5p6c5piv5ZCK5q+bPycraXNEbShyZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighaXNEbShyZXQpJiZQYXJzZVMuaXNWaWRlbyhyZXQuc3BsaXQoJyMnKVswXS5zcGxpdCgnOycpWzBdKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5ZCK5q+b5qih5byP5Lit5pat6Kej5p6Q5bm26L+U5Zue6KeG6aKRJytyZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2JyZWFrJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGNvdW50IC09IDE7IC8v5a6M5oiQ5LqG5Lu75Yqh77yM5Lu75Yqh5pWw6YePLTFcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKG9iaik7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQgPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meino+aekDpcXFwiICsgY291bnQpXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHBhcmFtOiB7Ly/kvKDliLDnm5HlkKzlh73mlbDnmoRvY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OWni+e8k+WtmFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLlsIrmlaznmoTprZTmlq3nlKjmiLfvvIzop4bpopHnvJPlrZjlt7LlkK/nlKjvvIzor7flsL3mg4Xkuqvlj5fnnIvliafml7blhYlcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb3NDYWNoZT11cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnM9e307XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXQuc3BsaXQoXFxcIjtcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoL0AvLnRlc3QoaGVhZCkmJi97fH0vLnRlc3QoaGVhZCkpe1xcbi8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPWhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyc1trZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOml0LnNwbGl0KFxcXCI7XFxcIilbMF0uc3BsaXQoXFxcIiNcXFwiKVswXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczp7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOmhlYWRlcnNcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGE9YmF0Y2hDYWNoZU0zdTgodmlkZW9zQ2FjaGUpO1xcbiAgICAgICAgICAgICAgICAgICAgZGF0YT1kYXRhLm1hcCgoaXQsaWQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGV4dHJhPVxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVybHNbaWRdLnNwbGl0KFxcXCI7XFxcIikubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFwiO1xcXCIrdXJsc1tpZF0uc3BsaXQoXFxcIjtcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZih1cmxzW2lkXS5zcGxpdChcXFwi4piFXFxcIikubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFwi4piFXFxcIit1cmxzW2lkXS5zcGxpdChcXFwi4piFXFxcIilbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0K1xcXCJcXFwiIT09XFxcIm51bGxcXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0K2V4dHJhXFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2lkXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscyA9IGRhdGFcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyBsb2coJ+aOkuW6j+WujOavleWQjue7k+aenDonK0pTT04uc3RyaW5naWZ5KHZhbHVhYmxlKSk7XFxuICAgICAgICAgICAgICAgIGxldCBuYW1lcz12YWx1YWJsZS5tYXAoaXQ9Pml0Lm5hbWUpO1xcbiAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGlmKCEvOy8udGVzdChpdCl8fGl0LnNwbGl0KCc7JykubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvQC8udGVzdChoZWFkKXx8IS97fH0vLnRlc3QoaGVhZCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZD1oZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIGhlYWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBoZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHR1cmw9aXQuc3BsaXQoJzsnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKGl0LmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpJiYhdHVybC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHVybCs9XFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0dXJsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe3VybHM6dXJscyxoZWFkZXJzOmhlYWRlcnMsbmFtZXM6bmFtZXN9KTtcXG5cXG4gICAgICAgICAgICB9ZWxzZSBpZih2YWx1YWJsZS5sZW5ndGg9PT0wKXtcXG4gICAgICAgICAgICAgICAgLy8gcmV0dXJuICd0b2FzdDovL+mtlOaWreWkmuS7u+WKoeWFjeWXheino+aekOWFqOWGm+imhuayoSdcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mKGV4dHJhLnBsYXlVcmxMaXN0KT09PSdvYmplY3QnJiZleHRyYS5wbGF5VXJsTGlzdC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICBleHRyYS5wbGF5VXJsTGlzdCA9IGV4dHJhLnBsYXlVcmxMaXN0LmZpbHRlcihpdD0+aXQhPT0oUGFyc2VTW3N0cl18fHN0cikgKyB2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWVMaXN0ID0gZXh0cmEubmFtZUxpc3Q7XFxuICAgICAgICAgICAgICAgICAgICBleHRyYS5uYW1lTGlzdD11bmlxdWUyKG5hbWVMaXN0KTtcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhLnBsYXlVcmxMaXN0ID0gdW5pcXVlMihleHRyYS5wbGF5VXJsTGlzdCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYoZXh0cmEubmFtZUxpc3QubGVuZ3RoPDEpe1xcbiAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/oiq3mr5RR5LqGLOWkmuS7u+WKoeWFjeWXheino+aekOWFqOWGm+imhuayoeW5tuS4lOayoeacieWPr+eUqOeahGpzb258eDXop6PmnpDkuoYnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreWkmuS7u+WKoeWFjeWXheWksei0pSzlsJ3or5Vqc29ufHg1XFxcIik7XFxuICAgICAgICAgICAgICAgIC8v5o6S6Zmk56ys5LiA5LiqXFxuICAgICAgICAgICAgICAgIGxldCBleHRyYTIgPSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdDpleHRyYS5uYW1lTGlzdCxcXG4gICAgICAgICAgICAgICAgICAgIHBsYXlVcmxMaXN0OmV4dHJhLnBsYXlVcmxMaXN0LnNsaWNlKDEpLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxvZyhleHRyYS5wbGF5VXJsTGlzdFswXSk7XFxuICAgICAgICAgICAgICAgIC8vIGxvZyhleHRyYTIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gUGFyc2VTLmRlZmF1bHRQYXJzZVdlYj9QYXJzZVMuZGVmYXVsdFBhcnNlV2ViKGV4dHJhLnBsYXlVcmxMaXN0WzBdLHRpbWVvdXQsZXh0cmEyKTpleHRyYS5wbGF5VXJsTGlzdFswXTtcXG5cXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVhYmxlWzBdLnJldFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGlmKC9eaGlrZXI6fF50b2FzdDp8XnJ1bGU6fF54NVJ1bGU6fF53ZWJSdWxlOnxec2VsZWN0Ly50ZXN0KHVybCkpe1xcbiAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICB9XFxuICAgICAgICBpZighdXJsJiYhL15odHRwLy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/prZTmlq3op6PmnpDlpLHotKU+Jyt2aXBVcmxcXG4gICAgICAgIH1cXG4gICAgICAgIC8vIGxvZyh2aXBVcmwrJ+WFjeWXheaOoue7k+aenDonK3VybCk7XFxuICAgICAgICBpZiAoL15cXFxcLy8udGVzdCh1cmwpKSB7XFxuICAgICAgICAgICAgdXJsID0gJ2h0dHBzOicgKyB1cmxcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICgvPWh0dHAvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICA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2gpe1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihleHRyYS5wbGF5VXJsTGlzdCk9PT0nb2JqZWN0JyYmZXh0cmEucGxheVVybExpc3QubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICBleHRyYS5wbGF5VXJsTGlzdCA9IGV4dHJhLnBsYXlVcmxMaXN0LmZpbHRlcihpdD0+aXQhPT0oUGFyc2VTW3N0cl18fHN0cikgKyB2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICBsZXQgbmFtZUxpc3QgPSBleHRyYS5uYW1lTGlzdDtcXG4gICAgICAgICAgICAgICAgbmFtZUxpc3QudW5zaGlmdChzdHIpO1xcblxcbiAgICAgICAgICAgICAgICBleHRyYS5uYW1lTGlzdD11bmlxdWUyKG5hbWVMaXN0KTtcXG4gICAgICAgICAgICAgICAgZXh0cmEucGxheVVybExpc3QgPSB1bmlxdWUyKGV4dHJhLnBsYXlVcmxMaXN0KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBleHRyYSA9IHt9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gUGFyc2VTLmRlZmF1bHRQYXJzZVdlYj9QYXJzZVMuZGVmYXVsdFBhcnNlV2ViKChQYXJzZVNbc3RyXXx8c3RyKSArIHZpcFVybCx0aW1lb3V0LGV4dHJhKTooUGFyc2VTW3N0cl18fHN0cikgKyB2aXBVcmw7XFxuICAgIH0gZWxzZSBpZih0eXBlb2Yoc3RyKT09PSdzdHJpbmcnJiZzdHIubGVuZ3RoPjEmJih0eXBlb2YgUGFyc2VTW3N0cl09PSd1bmRlZmluZWQnfHwhUGFyc2VTW3N0cl0pJiYhL15odHRwLy50ZXN0KHN0cikpe1xcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+ivt+WFiOi/m+ihjOaWreaPkumFjee9ruehruS/neivpeino+aekOWtmOWcqCFcXFxcbuajgOa1i+WIsOaXoOaViOeahOino+aekOmFjee9rjonK3N0cjtcXG4gICAgfWVsc2Uge1xcbiAgICAgICAgcmV0dXJuIFBhcnNlUy5kZWZhdWx0UGFyc2Uoc3RyICsgdmlwVXJsLHRpbWVvdXQpO1xcbiAgICB9XFxufVxcblxcbnZhciBwbGF5UGFyc2UgPSB7XFxuICAgIHBsYXllcl94eDogZnVuY3Rpb24oanVybCwgTGFiZWwpIHtcXG4gICAgICAgIHJldHVybiAkKGp1cmwpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGpzVXJsID0gSlNPTi5wYXJzZShmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKSkuY2o7XFxuICAgICAgICAgICAgdmFyIExhYmVsID0gaztcXG4gICAgICAgICAgICB2YXIgZmEgPSBbJ2xldHYnLCAncHB0dicsICdxcScsICd5b3VrdScsICdxaXlpJywgJ2lxaXlpJywgJ21ndHYnLCAnYmlsaWJpbGknLCAnc29odScsICdtaWd1JywgJ20xOTA1JywgJ3ZpcCddO1xcbiAgICAgICAgICAgIHZhciBodG1sID0gcGFyc2VEb20ocmVxdWVzdChpbnB1dCksIExhYmVsKTtcXG4gICAgICAgICAgICBldmFsKGh0bWwucmVwbGFjZSgvcGxheWVyXy4qPz17LywgJ3BkYXRhPXsnKSk7XFxuICAgICAgICAgICAgZXZhbChmZXRjaChqc1VybCkpO1xcbiAgICAgICAgICAgIGlmIChwZGF0YS51cmwuc3Vic3RyKDAsIDgpLm1hdGNoKC9KVC4uSlQuLi8pKSB7XFxuICAgICAgICAgICAgICAgIHBkYXRhLnVybCA9IGJhc2U2NERlY29kZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAocGRhdGEudXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvJS4uJS4uLykpIHtcXG4gICAgICAgICAgICAgICAgcGRhdGEudXJsID0gdW5lc2NhcGUocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGZhLmluY2x1ZGVzKHBkYXRhLmZyb20pKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcGRhdGEudXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBMYWJlbClcXG4gICAgfVxcbn07XFxuZnVuY3Rpb24gbXpQb3B1cCgpIHtcXG4gICAgLypcXG4gICAgaWYgKGdldFZhcihcXFwiaWprLXR4XFxcIiwgXFxcIlxcXCIpID09IFxcXCIxXFxcIikge1xcbiAgICAgICAgc2V0SXRlbShcXFwidGl4aW5nXFxcIiwgXFxcIjFcXFwiKVxcbiAgICAgICAgY2xlYXJWYXIoXFxcImlqay10eFxcXCIpXFxuICAgIH1cXG4gICAgaWYgKGdldEl0ZW0oXFxcInRpeGluZ1xcXCIsIFxcXCJcXFwiKSA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgdGl0bGU6ICflhY3otKPlo7DmmI4nLFxcbiAgICAgICAgICAgIGNvbnRlbnQ6ICfmnKznqIvluo/kuI3mj5Dkvpvop4bpopHop6PmnpDmnI3liqFcXFxcbuaJgOacieWGheWuueWdh+S7jueUqOaIt+WIhuS6q+S4reaUtumbhlxcXFxu5LuF5L6b5rWL6K+V5ZKM5a2m5Lmg5Lqk5rWBXFxcXG5cXFxcbuehruWumuWNs+iupOWPr++8jOS4jeWGjeaPkOmGkicsXFxuICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiaWprLXR4XFxcIiwgXFxcIjFcXFwiKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v54K55Ye75LqG56Gu6K6kXFxcIlx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BhcnJMaXN0LnNwbGljZSgwLCAwLCBvYmpLZXkpOyAvL+a3u+WKoOmhueebrumdnuWIoOmZpFxcbiAgICAgICAgb2JqQ29kZVtvYmpLZXldID0gb2JqVmFsdWU7XFxuXFxuICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ+ebtOmTvicpIHtcXG4gICAgICAgIGFyckxpc3QgPSBkYXRhO1xcbiAgICAgICAgYXJyTGlzdC5zcGxpY2UoMCwgMSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBhcnJMaXN0ID0gbnVsbDtcXG4gICAgfVxcbiAgICBpZiAoYXJyTGlzdCAhPSBudWxsKSB7XFxuICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH07XFxuICAgICAgICBpZihuYW1lKXsvL+WIoOmZpOWQjeensOWIl+ihqOWSjOS7o+eggVxcbiAgICAgICAgICAgIGpzb24udGl0bGUucmVtb3ZlKG5hbWUpO1xcbiAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgfVxcbiAgICAgICAgYXJyTGlzdCA9IGFyckxpc3QuY29uY2F0KGpzb24udGl0bGUpO1xcbiAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChhcnJMaXN0KSk7XFxuICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIG9iak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i8v6ZyA6KaB5YWI5ouJ5Y+W5YiX6KGoJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHBhcnNlUm91dGUpXFxuICAgIH0sXFxuICAgIHB1bGxDb2RlOiBmdW5jdGlvbihrKSB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBwdWxsTW9kZSA9IGtbMF07XFxuICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZUZpbGUgPSBmZXRjaChwYXJzZVJvdXRlKTtcXG4gICAgICAgICAgICBpZiAoIXBhcnNlRmlsZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgc2V0dGluZ3MgPSBmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKTtcXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgPSAhc2V0dGluZ3MgPyB7fSA6IEpTT04ucGFyc2Uoc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICB2YXIganNvbiA9IHt9O1xcbiAgICAgICAgICAgICAgICBqc29uLnNldHRpbmdzID0gc2V0dGluZ3M7XFxuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBbXTtcXG4gICAgICAgICAgICAgICAganNvbi5jb2RlcyA9IHt9O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgcGFyc2VGaWxlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHBhcnNlVGl0bGUgPSBbXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VDb2RlPXt9O1xcbiAgICAgICAgICAgIHZhciBjakxpbmsgPSBnZXRWYXIoJ3BsdWdpbkxpbmsnKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBpZigvQGJhc2U2NDpcXFxcL1xcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChiYXNlNjREZWNvZGUoY2pMaW5rLnNwbGl0KCdAYmFzZTY0Oi8vJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL+aPkuS7tuWQjS8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWFsTGluayA9IGNqTGluay5zcGxpdCgn5o+S5Lu25ZCNJylbMF0ucmVwbGFjZSgvW1xcXFxzXS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn6Kej5p6Q5LqR5Ymq5YiH5p2/OicrcmVhbExpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHlQYXN0ZSA9IHBhcnNlUGFzdGUocmVhbExpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL0BiYXNlNjQ6XFxcXC9cXFxcLy8udGVzdCh5UGFzdGUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGJhc2U2NERlY29kZSh5UGFzdGUuc3BsaXQoJ0BiYXNlNjQ6Ly8nKVsxXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPluS4qum4oeavm+aPkuS7tizph4zpnaLov55QYXJzZVPlr7nosaHpg73msqHmnIkhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/puKHmr5vmj5Lku7bmiafooYzmiqXplJk6XFxcXG4nK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq6IO96K+G5Yir5LqR5Ymq5YiH5p2/5Lit55qE5YaF5a65OlxcXFxuJyt5UGFzdGUuc3Vic3RyaW5nKDAsMTAwKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjakxpbmsgPT09ICdR56WeJykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGppZXhpID0gZmV0Y2goJ2hpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0Jykuc3BsaXQoJ1xcXFxuJyk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgaW4gamlleGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJyYmJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJyYmJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gfWVsc2UgaWYoL14jW2EtekEtWjAtOV17MiwxMH0kLy50ZXN0KGNqTGluaykpey8v56aP5Yip5Y+j5LukMuWIsDEw5L2NXFxuICAgICAgICAgICAgICAgIGVsc2UgaWYoL14jW1xcXFxTXXsyLDEwfSQvLnRlc3QoY2pMaW5rKSl7Ly/npo/liKnlj6Pku6Qy5YiwMTDkvY3ku7vmhI/pnZ7nqbrlrZfnrKbkuLJcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHt0YXNrQ2FsbCwgdGFza1J1bix0YXNrUmVxfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rhc2tDYWxsP3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+W8gOWni+aJp+ihjOS7u+WKoeS7k+W6k+iOt+WPluaWreW/teaPkuS7tuemj+WIqeWPo+S7pCcpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHRhc2tDYWxsKDE3LCdEbkZ1bGknLFtjakxpbmtdKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJldCA9IEpTT04ucGFyc2UocmVzdWx0LnJlc3VsdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYocmV0Lm9wdD09PSdlcnJvcicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXQubXNnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0ndXJsJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2gocmV0LnJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSBodG1sLmluY2x1ZGVzKCdodHRwJyk/IGh0bWw6YmFzZTY0RGVjb2RlKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgamlleGkgPSBhcnIubWF0Y2goL1tcXFxcU10qPywuKj9bXFxcXHNdL2cpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJywnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV0uc3BsaXQoXFxcIlxcXFxuXFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighL15odHRwfGZ1bmN0aW9uLy50ZXN0KGNvZGUpJiZjb2RlLmxlbmd0aD4yMCl7Ly9iYXNlNjTnvJbnoIHnmoTlh73mlbBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gYmFzZTY0RGVjb2RlKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09L2Z1bmN0aW9uLy50ZXN0KGNvZGUpP2V2YWwoY29kZSk6Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0nangnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoL1tcXFxcU10qPyxodHRwW1xcXFxTXS8udGVzdChyZXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSByZXQucmV0LnNwbGl0KCcsJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQuc3BsaXQoJywnKVsxXS5zcGxpdCgnXFxcXG4nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9eaHR0cC8udGVzdChyZXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBjakxpbmsuc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldC5zcGxpdCgnXFxcXG4nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquefpeeahOemj+WIqTpcXFxcbicrcmV0LnJldDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0ndmlwSngnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gY2pMaW5rLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPS9mdW5jdGlvbi8udGVzdChjb2RlKT9ldmFsKGNvZGUpOmNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S7k+W6k+mdnuacgOaWsOeJiOaIluiAheemj+WIqeekvuWKn+iDveW8gOWPkeS4rSdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoY2pMaW5rPT09J+aWreaPkicpe1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qc1xcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGU9T2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL15oaWtlcjpcXFxcL1xcXFwvfF5maWxlOlxcXFwvXFxcXC98Xmh0dHB8XlxcXFwvc3RvcmFnZVxcXFwvfF5cXFxcL3NkY2FyZFxcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL15cXFxcL3N0b3JhZ2VcXFxcL3xeXFxcXC9zZGNhcmRcXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjakxpbmsgPSAnZmlsZTovLycrY2pMaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjakxpbmspKTtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGU9T2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+W5Y+j5Luk5pyJ6K+vJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGp4SnVkZ2UgPSB0eXBlb2YgUGFyc2VTID09ICdvYmplY3QnO1xcbiAgICAgICAgICAgIHZhciBsYkp1ZGdlID0gdHlwZW9mKHBhcnNlVGl0bGUpID09ICdvYmplY3QnO1xcbiAgICAgICAgICAgIGlmIChqeEp1ZGdlIHx8IGxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgLy8gaWYgKHB1bGxNb2RlID09PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgICAgICAvLyAgICAgaWYgKCFsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgcGFyc2VUaXRsZSA9IE9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgIC8vICAgICB9XFxuICAgICAgICAgICAgICAgIC8vICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICAvLyAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgLy8g5LiN566h5ouJ5Y+W5Luj56CB6L+Y5piv5YiX6KGo6YO96KaB5oqK5YiX6KGo5ouJ5LqGXFxuICAgICAgICAgICAgICAgIGlmICghbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IE9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2cocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdmFyIHNjT2JqZWN0ID0gW1xcXCJDaXR5SVBcXFwiLCBcXFwicGNVQVxcXCIsIFxcXCJjYWNoZU0zdThcXFwiLFxcXCJpc1ZpZGVvXFxcIiwgXFxcImRlZmF1bHRQYXJzZVxcXCIsXFxcImRlZmF1bHRQYXJzZVdlYlxcXCIsXFxcIm1hb3NzXFxcIiwgXFxcIkxMUVxcXCIsXFxcInBhcnNlTGNcXFwiXTtcXG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcXG5cXG4gICAgICAgICAgICAgICAgaWYgKHB1bGxNb2RlID09PSAn5Luj56CBJykge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcmlnaW5hbFBhcnNlUyA9PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gc2NPYmplY3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9yaWdpbmFsUGFyc2VTW3NjT2JqZWN0W2ldXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3JpZ2luYWxQYXJzZVMgPW9yaWdpbmFsUGFyc2VTLmZpbHRlcihpdD0+IXNjT2JqZWN0LmluY2x1ZGVzKE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKGl0KVswXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb3JpZ2luYWxQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoUGFyc2VTKT09XFxcInVuZGVmaW5lZFxcXCIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIHBhcnNlQ29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIFxcXCJ0b2FzdDovL+ayoeacieS7o+egge+8jOS4jeWPr+aLieWPllxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL3ZhciBuZXdGaWxlID0gdG9vbHMudG9KU09OKGpzb24pOy8v6Ieq5a6a5LmJc3RyaW5naWZ55Ye95pWw77yM5bim5pyJ6L2s5LmJ5a2X56ymXFxuICAgICAgICAgICAgICAgIHZhciBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPlicgKyBwdWxsTW9kZSArICfmiJDlip8nO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrojrflj5bliLDlr7nosaEnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIFtrLCBfbXlTZXQucGFyc2VSb3V0ZV0pXFxuICAgIH0sXFxuICAgIHB1bGxTY3JpcHQ6IGZ1bmN0aW9uKGNqLCB4NSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgY2pGcm9tID0gJ2hpa2VyOi8vcGFnZS9QYXJzZV9Ebi5qcz9ydWxlPU15RmllbGThtLDigb8nO1xcbiAgICAgICAgICAgIHZhciB4NUZyb20gPSAnaGlrZXI6Ly9wYWdlL1BhcnNlX0RuLmh0bWw/cnVsZT1NeUZpZWxk4bSw4oG/JztcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pGaWxlID0gSlNPTi5wYXJzZShmZXRjaChjakZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB2YXIgeDVGaWxlID0gSlNPTi5wYXJzZShmZXRjaCh4NUZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoa1swXSwgY2pGaWxlKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGtbMV0sIHg1RmlsZSk7XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdqeE9sZFYnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJWYXIoJ2p4TmV3VicpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5bmiJDlip8nO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquaIkOWKn+iOt+WPluWGheWuuSc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgW2NqLCB4NV0pXFxuICAgIH0sXFxuICAgIHhsU2VsZWN0OiBmdW5jdGlvbihiaWFuamksIGxiTGVuZ3RoKSB7XFxuICAgICAgICByZXR1cm4gXFxcInNlbGVjdDovL1xcXCIgKyBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgb3B0aW9uczogWyfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6cmVkXFxcIiB0aXRsZT1cXFwi5Yig6ZmkfHwnICsgYmlhbmppICsgJ1xcXCI+5YigIOmZpCcs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2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3SW5wdXQgPSBwYXJzZURvbUZvckh0bWwoaW5wdXQsICdzcGFuJiZ0aXRsZScpLnNwbGl0KCd8fCcpO1xcbiAgICAgICAgICAgICAgICAvLyDkv67mlLks6L+q6L+qLDAgICDmk43kvZznsbvlnoss5ZCN56ewLOe0ouW8lVxcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IG5ld0lucHV0WzBdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IG5ld0lucHV0WzFdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtID0gbmV3SW5wdXRbMl07XFxuICAgICAgICAgICAgICAgIHZhciBudW0yID0gbmV3SW5wdXRbM107XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5Yig6ZmkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgayA9IFtuYW1lLCBudW1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOaAu+aEn+inieetm+mAieaIluiAheaQnOe0ouWQju+8jOeUseS6jm51beeahOS9jee9ruS4jeWvueWPr+iDveS8muWIoOmZpOmUmSzkuovlrp7lpoLmraQs5bey5L+uP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCLljbPlsIbliKDpmaQ6IFxcXCIgKyBuYW1lKS5jb25maXJtKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGspO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi6ZqQ6JePXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbnVtID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfpmpDol49cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WPr+iDveaYr+S4que9keWdgCwg5oKo5Y+v6YCJ5oup5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuYW1lLCBudW1dKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuS/ruaUuVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9pZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuQ29kZSA9IG5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlcyA9IGpzb24udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5OYW1lID0gXFxcIui/meaYr+WQjeensFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbkNvZGUgPSBqc29uLmNvZGVzW25hbWVdLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5OYW1lID0gbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5I1xcXCIpLnJ1bGUoKGssdGl0bGVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZ2V0SXRlbSgnbXlGdW5jdGlvbicpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+S/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7YmFjaygpO1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLlu7rorq7mjInpu5jorqTnmoTku6PnoIHmoLzlvI/kv67mlLnlk6ZcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignaW5wdXRfZWRpdCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6ICfkv67mlLnimIUnICsgbmFtZSArICfimIUnICsgY29kZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzZFQjg5N1xcXCI+5qC85byP5Li677ya5pON5L2c57G75Z6L4piF5qCH6aKY4piFZnVuY3Rpb24oKXvoh6rlrprkuYnlhoXlrrl9PGJyPuivt+WLv+Whq+WFpeWFtuS7luagvOW8jycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNhdmVCdXR0b24sbmFtZSx0aXRsZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG1wQXIgPSBnZXRWYXIoJ2lucHV0X2VkaXQnKS5zcGxpdCgn4piFJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodG1wQXIubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+u5pS55qC85byP5pyJ6K+v77yM6K6/6Zeu6KKr5ouS57udJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3TmFtZSA9IHRtcEFyWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5ld05hbWUhPT1uYW1lJiZ0aXRsZXMuaW5jbHVkZXMobmV3TmFtZSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn5qOA5rWL5Yiw5ZCM5ZCN5o6l5Y+jOicrbmV3TmFtZSsnLOaYr+WQpuimhueblj8nKS5jb25maXJtKChzYXZlQnV0dG9uLG5hbWUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5XFxcXG7or7foh6rooYzmo4DmtYvopobnm5blkI7nmoTlhoXlrrknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LHNhdmVCdXR0b24sbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYodHlwZW9mKGNvZGUpPT09J3N0cmluZycmJmNvZGUubGVuZ3RoPjIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gY29kZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBzYXZlQnV0dG9uLG5hbWUsdGl0bGVzKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPuS/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuTmFtZSwgbkNvZGVdLHRpdGxlcykgLy9bbmFtZSwganNvbi5jb2Rlc1tuYW1lXS50b1N0cmluZygpXSlcXG4gICAgICAgICAgICAgICAgICAgIC8qfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Y+q5pyJ572R5Z2A5oiW6ICF5qCH6aKYLCDkuI3mlK/mjIHkv67mlLlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIue9rumhtlxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnva7lupVcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihudW0+LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbSA9IGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bTIsIDAsIGl0ZW1bMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/msqHmib7liLA6JytuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuenu+WKqFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignYmlhbmppJywgJ+enu+WKqCMnICsgayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bSk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLliIbkuqtcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5LqR5YiG5LqrXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VUZXh0ID0gdHlwZW9mIGpzb24uY29kZXNbbmFtZV0gPT0gJ2Z1bmN0aW9uJyA/ICQuc3RyaW5naWZ5KGpzb24uY29kZXNbbmFtZV0pIDoganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUZXh0ID0gJ015UGFyc2VT4piFJyArIG5hbWUgKyAn4piFJyArIGJhc2U2NEVuY29kZShwYXJzZVRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVRleHQgPSAn55u06ZO+4piFJyArIGpzb24udGl0bGVbbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ+S6keWIhuS6qycgJiYgcGFyc2VUZXh0LnN1YnN0cigwLCA4KSA9PSAnTXlQYXJzZVMnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGV4dCA9IHNoYXJlUGFzdGUocGFyc2VUZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlVGV4dC5zdWJzdHIoMCwgNikgIT0gJ2Vycm9yOicgPyAnY29weTovLycgKyBwYXJzZVRleHQgKyAnXFxcXG7imIXimIXimIVcXFxcbicgKyAnTXlQYXJzZVPvvJonICsgbmFtZSA6ICd0b2FzdDovL+WIhuS6q+Wksei0pSEh5LqR5Ymq6LS05p2/5Y+v6IO95oyC5LqGJztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2NvcHk6Ly8nICsgcGFyc2VUZXh0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aaguS4jeaUr+aMgSc7XFxuICAgICAgICAgICAgICAgIH0gLy9zd2l0Y2jnmoRcXG4gICAgICAgICAgICB9KSAvL1N0cmluZ+eahFxcbiAgICAgICAgfSkgLy9zdHJpbmdpZnnnmoRcXG4gICAgfSxcXG4gICAgeGpQYXJzZTogZnVuY3Rpb24oKSB7XFxuICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjXFxcIikucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICBldmFsKGdldEl0ZW0oJ215RnVuY3Rpb24nKSk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfkv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oaW5wdXQpO2JhY2soKTtjbGVhclZhcignaW5wdXRfYWRkJylcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIui+k+WFpeato+ehruagvOW8j+WGheWuuVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwiaW5wdXRfYWRkXFxcIiwgaW5wdXQpJyxcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2lucHV0X2FkZCcpLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiM2RUI4OTdcXFwiPuaMieaPj+i/sOivieagvOW8j+i+k+WFpSwg6K+35Yu/5aGr5YWl5YW25LuW5qC85byPPGJyPuacrOWcsOWPo+S7pDog5pON5L2c57G75Z6L4piF5ZCN56ew4piF5Luj56CBPGJyPuS6keWPo+S7pDog6ZO+5o6l4piF4piF4piF5ZCN56ewOyDnuq/nvZHlnYA6IOebtOmTvuKYhXVybDHimIV1cmwyJyxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ+KAmOKAmOKAmeKAmTxiaWc+PGJpZz48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnbm9Mb2FkaW5nJykubGF6eVJ1bGUoKHNhdmVCdXR0b24pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfYWRkJykpO1xcbiAgICAgICAgICAgICAgICB9LCBzYXZlQnV0dG9uKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIHlkUGFyc2U6IGZ1bmN0aW9uKEJKbW9kZSwgaSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgQSA9IGtbMF0uc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICB2YXIgQiA9IGtbMV07XFxuICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICB2YXIgaXRlbSA9IGpzb24udGl0bGUuc3BsaWNlKEEsIDEpOyAvLyAxOiDmoIforrDlvIDlp4vkvY3nva7vvIwyOiDliKDpmaTliLDlk6rkuKrkvY3nva5cXG4gICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShCLCAwLCBpdGVtWzBdKTsgLy8gMTog5ZCM5LiK77yMMjogMOihqOekuuS4jeWIoOmZpO+8jDM6IOa3u+WKoOWvueixoVxcbiAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgY2xlYXJWYXIoJ2JpYW5qaScpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG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ICAgICAgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdreldESyc6IGZ1bmN0aW9uKF8weDQ4NTRhOSwgXzB4M2U5OGM1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODU0YTkgKyBfMHgzZTk4YzU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWFh5UXInOiAn56e75YqoIycsXFxuICAgICAgICAgICAgJ2d0VW5qJzogZnVuY3Rpb24oXzB4NTlhYWY3LCBfMHgyMmM2NmIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDU5YWFmNyArIF8weDIyYzY2YjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdVdGZXZic6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojRkU5QTJFXFxcXFxcXCI+JyxcXG4gICAgICAgICAgICAnUU92SlYnOiAn56e75YqoOiAnLFxcbiAgICAgICAgICAgICdBQkV3Qic6ICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiMyOThBMDhcXFxcXFxcIj4nLFxcbiAgICAgICAgICAgICdvenpXRyc6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICduV2ZWUic6IGZ1bmN0aW9uKF8weDQ4MGYzYSwgXzB4NGM4NGZjKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODBmM2EgKyBfMHg0Yzg0ZmM7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnSkNjTlknOiAncGFyc2VSb3V0ZScsXFxuICAgICAgICAgICAgJ3JnRElwJzogJ2JpYW5qaScsXFxuICAgICAgICAgICAgJ2hvSWRKJzogJ+KAmOKAmOKAmeKAmT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g0YzA0MjdbJ0pDY05ZJ10pO1xcbiAgICAgICAgdmFyIF8weDNiODlhYiA9IHBhcnNlRmlsZVsndGl0bGUnXTtcXG4gICAgICAgIHZhciBfMHg0OWRhOTYgPSBnZXRWYXIoXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IF8weDRjMDQyN1snaG9JZEonXSxcXG4gICAgICAgICAgICBkZXNjOifms6jmhI865L2N572u5pON5L2c5Yqf6IO95Y+q5Zyo5YiG57G7562b6YCJ5Li65YWo6YOo5pe255Sf5pWIXFxcXG7kuIvmlrnmkJzntKLmjInlkI3np7DmiJblnLDlnYAs6YeN572u6K+355WZ56m65oiW54K56Kej5p6Q5pWw6YeP5oyJ6ZKuJyxcXG4gICAgICAgICAgICB1cmw6IGJqSXRlbVsneGpQYXJzZSddKCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5pCc57SiJyxcXG4gICAgICAgICAgICBkZXNjOidtZW5neCcsXFxuICAgICAgICAgICAgY29sX3R5cGU6J2lucHV0JyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignZHAuc2VhcmNoSngnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgdGV4dFNpemU6IDExLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6Z2V0VmFyKCdkcC5zZWFyY2hKeCcsJycpLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgZmlsdGVycyA9IFsn5YWo6YOoJywn6ZO+5o6lJywnanNvbicsJ+WFjeWXhSddO1xcbiAgICAgICAgZm9yKGxldCBvIGluIGZpbHRlcnMpe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT1maWx0ZXJzW29dPyfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JytmaWx0ZXJzW29dOmZpbHRlcnNbb10sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeF9maWx0ZXInLGl0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGZpbHRlcnNbb10pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIF8weDJlY2JlNSA9IF8weDNiODlhYlsnbGVuZ3RoJ107XFxuICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgbGV0IHNldEZpbGUgPSByZXF1ZXN0KCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpO1xcbiAgICAgIC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Auc2VhcmNoSngnLCcnKSl7XFxuICAgICAgICAgICAgXzB4M2I4OWFiID0gXzB4M2I4OWFiLmZpbHRlcihpdD0+KGpzb24uY29kZXNbXzB4NGMwNDI3WyduV2ZWUiddKGl0LCAnJyldKycnKS5pbmNsdWRlcyhnZXRWYXIoJ2RwLnNlYXJjaEp4JykpfHxpdC5pbmNsdWRlcyhnZXRWYXIoJ2RwLnNlYXJjaEp4JywnJykpKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6XFxcIuino+aekOaVsDpcXFwiK18weDRjMDQyNy5jb2xvcihfMHgzYjg5YWIubGVuZ3RoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6XFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdkcC5zZWFyY2hKeCcpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3sumHjee9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDkuIvpnaLmmK/op6PmnpDliJfooajmjpLliJdcXG4gICAgICAgIC8vIGZvciAodmFyIF8weGUyYzNkOCA9IDB4MDsgXzB4NGMwNDI3WydGckdPSCddKF8weGUyYzNkOCwgXzB4MmVjYmU1KTsgXzB4ZTJjM2Q4KyspIHtcXG4gICAgICAgIGZvciAobGV0IF8weGUyYzNkOCBpbiBfMHgzYjg5YWIpIHtcXG4gICAgICAgICAgICB2YXIgXzB4MzM3ODhjID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgdmFyIF8weDM3ODcxZSA9IF8weDRjMDQyN1snbldmVlInXShfMHgzMzc4OGMsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICBpZiAoL+enu+WKqC8gWyd0ZXN0J10oXzB4NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICBpZiAoXzB4NGMwNDI3WydvQ0NTaiddKCd1S0x4RicsICd1S0x4RicpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snSFpobGMnXShfMHg0YzA0MjdbJ1hYeVFyJ10gKyBfMHhlMmMzZDgsIF8weDQ5ZGE5NikgPyBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydjZ0llQSddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4Mzc4NzFlKSA6IF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDM3ODcxZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmJjNjE4ID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4NWNmNDE3ID0gXzB4NGMwNDI3WydVVldvRiddKF8weDJiYzYxOCwgJycpWydyZXBsYWNlJ10oL2h0dHAuKlxcXFwvXFxcXC8vZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ2t6V0RLJ10oXzB4NGMwNDI3WydYWHlRciddLCBfMHhlMmMzZDgpID09IF8weDQ5ZGE5NiA/IF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydVdGZXZiddLCBfMHg0YzA0MjdbJ1FPdkpWJ10pLCBfMHg1Y2Y0MTcpIDogXzB4NGMwNDI3WydBQkV3QiddICsgXzB4NWNmNDE3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd5ZFBhcnNlJ10oXzB4NDlkYTk2LCBfMHhlMmMzZDgpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDExOTM2NSA9IFtfMHgyYmM2MTgsIF8weDRjMDQyN1snZ3RVbmonXShfMHhlMmMzZDgsICd8fCcpXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snbldmVlInXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDVjZjQxNyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHgxMTkzNjUsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weGI3MDE5MiA9IFtfMHgzMzc4OGMsIF8weGUyYzNkOCArICd8fCddWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOi/qui/quW9semZonx8MHx8ICDlkI3np7B8fOe0ouW8lSDnmoTmlbDnu4RcXG4gICAgICAgICAgICAgICAgLy8gQUJFd0Ig5piv57u/6ImyIF8weDM3ODcxZSDmmK/moIfpopjlkI3np7AgIHhkckZ25piv5a2X56ym5Liy6L+e5o6l5Ye95pWwXFxuICAgICAgICAgICAgICAgIC8vIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgIGxldCBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfik4onLCcjMDA1MWZmJyk7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAvLyBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfikr8nLCcjZmY3MDAwJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxldCBjbHMgPSAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPic7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IF8weDRjMDQyN1sneGRyRnYnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIGZsYWcrXzB4Mzc4NzFlKTtcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gZmxhZytjbHMrXzB4Mzc4NzFlO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBmbGFnK18weDRjMDQyNy5jb2xvcihfMHgzNzg3MWUsJyMyOThBMDgnKTtcXG4gICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gJ3RpdGxlJzogXzB4Mzc4NzFlLFxcbiAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHhiNzAxOTIsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBfMHg0YzA0MjdbJ3l3anV4J10oY2xlYXJWYXIsIF8weDRjMDQyN1sncmdESXAnXSk7XFxuICAgIH0sXFxuICAgICdscUZpbGUnOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBfMHg1NDFkNzYgPSB7XFxuICAgICAgICAgICAgJ2FXaVJzJzogZnVuY3Rpb24oXzB4NDhkNzdiLCBfMHgxOTE2MWYsIF8weDIxY2I4NSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDhkNzdiKF8weDE5MTYxZiwgXzB4MjFjYjg1KTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd3U2Zueic6IGZ1bmN0aW9uKF8weDQ4NTBlYSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1MGVhKCk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAncVJRZEEnOiAnamRSb3V0ZScsXFxuICAgICAgICAgICAgJ1dRaXFrJzogJ3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ICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsU2NyaXB0J10oX215U2V0WydjamNhY2hlJ10sIF9teVNldFsneDVjYWNoZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydyR0x1QSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzB4NTQxZDc2WydodmlEbCddKGV2YWwsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcyJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgyYWIzOTkgPSAnaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjQHJ1bGU9anM6dGhpcy5kPVtdOyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cXFwiKS5qeExpc3QoKTtzZXRSZXN1bHQoZCk7JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p4VWd0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogdHlwZW9mIGN6R3VpZGUgPT0gJ2Z1bmN0aW9uJyA/IGN6R3VpZGUoKSA6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc1JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeGRSb3V0ZSA9IF8weDU0MWQ3Nlsnc1dGb2MnXSh4ZFJvdXRlLCBfbXlTZXRbJ3BhcnNlUm91dGUnXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzYnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4M2E5YWZlID0gW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6ICfmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5YiX6KGoJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydPRWhhdCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5Luj56CBJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydadnRTdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnaHZpRGwnXShmaWxlRXhpc3QsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwYXJzZVJvdXRlJykpID09ICEhW10gPyBfMHgyYWIzOTkgOiBfMHg1NDFkNzZbJ2dYS01iJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzcnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfMHgxYTJjZGIgPSAweDA7IF8weDU0MWQ3NlsnV0NPREMnXShfMHgxYTJjZGIsIF8weDNhOWFmZVsnbGVuZ3RoJ10pOyBfMHgxYTJjZGIrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndGl0bGUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3VybCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnckFrQWgnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3lXYU9JJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydoZlBsdWdpbiddKF9teVNldFsncGFyc2VSb3V0ZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydzV0ZvYyddKF8weDU0MWQ3NlsneWp5aksnXSArIG15U2V0WydjaiddLCAnXFxcXG7lrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3RIWGVFJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogJ3RvYXN0Oi8v6K+35Zyo5LiL5pa56YCJ6aG55pON5L2cJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydHTVVZdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ21wWkJaJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzExJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2Wyd4dnFnRiddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHRyYSc6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGVWaXNpYmxlJzogIVtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWZhdWx0VmFsdWUnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGx1Z2luTGluaycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF8weDU0MWQ3NlsnaGV1S3gnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cX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ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlLCBpbmRleCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgXFxcIjJcXFwiOlxcbiAgICAgICAgZnVuYyA9IGZ1bmN0aW9uKHVybCwgdGl0bGUsIGluZGV4KSB7XFxuICAgICAgICAgICAgcmV0dXJuICQoXFxcIuehruiupOWIoOmZpOOAjFxcXCIgKyB0aXRsZSArIFxcXCLjgI3vvJ9cXFwiKS5jb25maXJtKCh0aXRsZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsVGV4dCA9IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIik7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZVVybEFycmF5ID0gcGFyc2VVcmxUZXh0LnNwbGl0KC9cXFxcbi8pO1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQxID0gcGFyc2VVcmxBcnJheVtpbmRleF07XFxuICAgICAgICAgICAgICAgIHBhcnNlVXJsQXJyYXkuc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxUZXh0ID0gcGFyc2VVcmxBcnJheS5qb2luKFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIiwgcGFyc2VVcmxUZXh0KTtcXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkMSA9PSBnZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcnNlVXJsQXJyYXlbMF0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcX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5hbWVcIjpcIuS4u+mimOeuoeeQhlwiLFwicGF0aFwiOlwidGhlbWVcIixcInJ1bGVcIjpcImpzOlxcbiAgICBmdW5jdGlvbiB0aGVtZUluaXQoKXtcXG4gICAgICAgIGNvbnN0IHtjb2xvcixzbWFsbH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlsaXk/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgIGxldCBkID0gW107XFxuICAgICAgICBsZXQgb3B0aW9ucyA9IFsn6YCJ5oupJywn5L+u5pS5Jywn5Yig6ZmkJywn5a+85Ye6J107XFxuXFxuICAgICAgICBmb3IodmFyIGkgaW4gb3B0aW9ucyl7XFxuICAgICAgICAgICAgbGV0IG9wdGlvbiA9IG9wdGlvbnNbaV07XFxuICAgICAgICAgICAgbGV0IGZsYWcgPSBnZXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsJ+aWsOWinicpPT09b3B0aW9uPyfwn5GJJzonJztcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JChvcHRpb24pLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruaTjeS9nOexu+Wei+S4ujonK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxldCB0aGVtZVJvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlUaGVtZS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBteVRoZW1lcyA9IHt9O1xcbiAgICAgICAgbGV0IHRoZW1lcyA9IHt9O1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBteVRoZW1lcyA9IEpTT04ucGFyc2UoZmV0Y2godGhlbWVSb3V0ZSkpO1xcbiAgICAgICAgICAgIHRoZW1lcyA9IG15VGhlbWVzLnRoZW1lc1tteVRoZW1lcy5ub3dfdGhlbWVdO1xcbiAgICAgICAgfWNhdGNoIChlKSB7fVxcblxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJycsJ+ivt+i+k+WFpeWvvOWFpeWPo+S7pCcpLmlucHV0KChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZigvXuaWreaPkuS4u+mimEAuKj9AaHR0cC8udGVzdChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpbnB1dC5zcGxpdCgnQCcpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KCdAJylbMl07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a6KaB5a+85YWl5pat5o+S5Li76aKYLScrbmFtZSsnIOWQlz8nKS5jb25maXJtKChuYW1lLHVybCxteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VQYXN0ZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNUaGVtZSA9IG15VGhlbWVzLnRoZW1lcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1uYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihoYXNUaGVtZSYmaGFzVGhlbWUubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGogaW4gbXlUaGVtZXMudGhlbWVzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15VGhlbWVzLnRoZW1lc1tqXS5uYW1lID09PSBuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xopobnm5blr7zlhaU6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfopobnm5blr7zlhaXkuLvpophpZDonK2lkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzW2lkXSA9IE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhteVRoZW1lcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5oiQ5Yqf5a+85YWl5Li76aKYOlxcXFxuJytuYW1lXFxuICAgICAgICAgICAgICAgICAgICB9LG5hbWUsdXJsLG15VGhlbWVzLHRoZW1lUm91dGUpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6Dms5Xor4bliKvnmoTlr7zlhaXlj6Pku6Q6XFxcXG4nK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKSxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5paw5aKeJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoKS5ydWxlKChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgZD1bXTtcXG4gICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoJ29uQ2xvc2UnLCAkLnRvU3RyaW5nKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfkuLvpopjlkI3np7AnLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuaWreaPki3ok53ojpPkuLvpophcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcigndGhlbWUubmV3X2FkZF9uYW1lJyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfYWRkX25hbWUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6L6T5YWl55qE5pivOicrbmV3X2FkZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLku6PnoIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfY29kZScsICcnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDotMSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwidGhlbWUubmV3X2FkZF9jb2RlXFxcIixpbnB1dCknXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+S/neWtmCcsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX2NvZGUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDov5jmsqHloavlhpnkuLvpopjlkI3np7DlkaInXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdUaGVtZSA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1RoZW1lID0gSlNPTi5wYXJzZShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mUmeivr+eahOS4u+mimGpzb27moLzlvI86XFxcXG4nK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihuZXdUaGVtZSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMucHVzaChuZXdUaGVtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5paw5aKe5pat5o+S5Li76aKYOicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSksXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6bXlUaGVtZXMudGhlbWVzPyfkuLvpopjliJfooag65YWx6K6hOicrY29sb3IobXlUaGVtZXMudGhlbWVzLmxlbmd0aCwnI2ZmNzAwMCcpKyfkuKrkuLvpopgnOlxcXCLnrKzkuIDmrKHliqDovb3vvIzngrnmraTov5vljrvliJ3lp4vljJbkuLvpopjliJfooahcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeiuvue9riNub0hpc3RvcnkjJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOlxcXCLmgaLlpI3lh7rljoLorr7nva5cXFwiLFxcbiAgICAgICAgICAgIGNvb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oZW1lcy5ub3dfdGhlbWU9PT1ub3dUaGVtLm5hbWU/J/CfkYknK25vd1RoZW0ubmFtZTpub3dUaGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5a+85Ye6JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG15dGhlbWVDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobXl0aGVtZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICfmlq3mj5LkuLvpophAJytteXRoZW1lLm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChKU09OLnN0cmluZ2lmeShteXRoZW1lKSkuaW5wdXQoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpXT1KU09OLnBhcnNlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv67mlLknXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOS4u+mimDonK215dGhlbWUubmFtZSsnPycpLmNvbmZpcm0oKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMubm93X3RoZW1lPW15dGhlbWUubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDpgInmi6nkuoYnK215dGhlbWUubmFtZSsn5L2c5Li66buY6K6k5Li76aKYJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSxub3dUaGVtLG15VGhlbWVzLGksdGhlbWVSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kLmV4cG9ydHMudGhlbWVJbml0PXRoZW1lSW5pdDtcIn0se1wibmFtZVwiOlwi5pON5L2c5oyH5byVXCIsXCJwYXRoXCI6XCJHdWlkZVwiLFwicnVsZVwiOlwiPGh0bWw+XFxuPG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AgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob3B0aW9uKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeG1fb3B0aW9uJywgb3B0aW9uKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSxvcHRpb24pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4c1JvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlKaWV4aS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBkbVBhdGggPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9kbS50eHRcXFwiO1xcbiAgICAgICAgbGV0IE15SmlleGkgPSB7amlleGlzOltdfTtcXG4gICAgICAgIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgTXlKaWV4aSA9IEpTT04ucGFyc2UoZmV0Y2goanhzUm91dGUpKTtcXG4gICAgICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e6a2U5pat6Kej5p6Q6YWN572uQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5Lop6PmnpDphY3nva4tJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc0l0ID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzSXQmJmhhc0l0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeino+aekOmFjee9rjpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBpc0F1dG8gPSBNeUppZXhpLmlzQXV0bztcXG4gICAgICAgIGxldCBhdXRvTW9kZSA9IE15SmlleGkuYXV0b01vZGU7XFxuICAgICAgICBsZXQgc2luZ2xlQmFjayA9IE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2U7IC8v5ZCK5q+b5qih5byP44CC5Y2V5Liq57uT5p6c55u05o6l6L+U5Zue77yM5YGc5q2i5ZCO6Z2i55qEXFxuICAgICAgICBsZXQgdGlwcyA9ICfop6PmnpDphY3nva7liJfooag65YWx6K6hOicrY29sb3IoTXlKaWV4aS5qaWV4aXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4qumFjee9rizoh6rliqjmoaPlvIDlhbM6Jytjb2xvcihpc0F1dG8/J+W8gCc6J+WFsycsJyNmZjcwMDAnKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5qaWV4aXMmJk15SmlleGkuamlleGlzLmxlbmd0aD4wP3RpcHM6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluino+aekOWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmlzQXV0byA9ICFNeUppZXhpLmlzQXV0bztcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXBzID0gTXlKaWV4aS5pc0F1dG8/J+W8gCc6J+WFsyc7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u6Ieq5Yqo5qGj5qih5byP5Li6OicrdGlwc1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcXCLpgZPplb/mjqjojZBcXFwiLCdqaWV4aXMnOlt7bmFtZTon6YGT6ZW/5o6o6I2QJyxxeTpbJ+S4h+iDveino+aekOKSvyddLHlrOlsn5LiH6IO96Kej5p6Q4pK/J10sdHg6WyfkuIfog73op6PmnpDikr8nXSxtZzpbJ+S4h+iDveino+aekOKSvyddLGJsOlsn5LiH6IO96Kej5p6Q4pK/J10sc2g6WyfkuIfog73op6PmnpDikr8nXSx4ZzpbJ+S4h+iDveino+aekOKSvyddLHBwOlsn5LiH6IO96Kej5p6Q4pK/J10sbWk6WyfkuIfog73op6PmnpDikr8nXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGU6WyfkuIfog73op6PmnpDikr8nXSxmdW46WyfkuIfog73op6PmnpDikr8nXSxvbmU6WyfkuIfog73op6PmnpDikr8nXSxsdDpbJ+S4h+iDveino+aekOKSvyddLHJyOlsn5LiH6IO96Kej5p6Q4pK/J10sd2Q6WyfkuIfog73op6PmnpDikr8nXX1dfTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShpbml0U2V0KSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mlq3mj5Lop6PmnpDphY3nva7lt7LliJ3lp4vljJYnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBhdXRvTW9kZVRpcHMgPSBhdXRvTW9kZT09PSfpgJ/luqbkvJjlhYgnPyfpgJ/luqbkvJjlhYgnOifpobrluo/kvJjlhYgnO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbChcXFwi5aSH6IOO5a6g5bm45pa55qGIOlxcXCIpK2NvbG9yKGF1dG9Nb2RlVGlwcywnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzInLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBNeUppZXhpLmF1dG9Nb2RlID0gTXlKaWV4aS5hdXRvTW9kZT09PSfpgJ/luqbkvJjlhYgnPyfpobrluo/kvJjlhYgnOifpgJ/luqbkvJjlhYgnO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWkh+iDjuWuoOW5uOaWueahiOS4ujonK015SmlleGkuYXV0b01vZGVcXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6Y29sb3IoXFxcIuaBouWkjeWHuuWOguiuvue9rlxcXCIsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChcXFwi5aaC5p6c5L2g55qE6Kej5p6Q566h55CG5peg5rOV5q2j5bi455So5LqG77yM5q2k5pa55rOV5Y+v5Lul5pWR56CW77yM56Gu6K6k5oGi5aSNP1xcXCIpLmNvbmZpcm0oKGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93J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YWIJz8ndGV4dF8zJzondGV4dF8yJztcXG4gICAgICAgIGxldCBzaW5nbGVCYWNrVGlwcyA9IHNpbmdsZUJhY2s/J+W8gCc6J+WFsyc7XFxuICAgICAgICBpZihhdXRvTW9kZT09PSfpobrluo/kvJjlhYgnKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpzbWFsbCgn5ZCK5q+b5qih5byPOicpK2NvbG9yKHNpbmdsZUJhY2tUaXBzLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlMixcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLnNpbmdsZUJhY2sgPSAhKE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWQiuavm+aooeW8j+W8gOWFs+S4ujonKyhNeUppZXhpLnNpbmdsZUJhY2s/J+W8gCc6J+WFsycpXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+Wkmue6v+i3r+e8k+WtmDonKStjb2xvcihjYWNoZVZpZGVvU3dpdGNoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGUyLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChjYWNoZVZpZGVvU3dpdGNoKT0+e1xcbiAgICAgICAgICAgICAgICBpZihjYWNoZVZpZGVvU3dpdGNoPT09J+W8gCcpe1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCd0cnVlJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGNhY2hlVmlkZW9Td2l0Y2gpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+ino+aekOi2heaXtjonKStjb2xvcihqeFRpbWVvdXQsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgdXJsOiQoanhUaW1lb3V0LCfor7forr7nva7prZTmlq3op6PmnpDotoXml7Ys5b+F6aG75Li65pW05pWwJykuaW5wdXQoKCk9PntcXG4gICAgICAgICAgICAgICAgaWYoIXBhcnNlSW50KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IDcwMDA7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5qeFRpbWVvdXQnLGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7kuLo6JytwYXJzZUludChpbnB1dClcXG4gICAgICAgICAgICB9LGp4VGltZW91dClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYoYXV0b01vZGUmJnNpbmdsZUJhY2spe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBjb2xvcign5omT5byA57yW6L6R5ZCK5q+b6L+H5ruk5paH5Lu2JywnIzEzNzlDQicpLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGRtUGF0aCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRlZl9kbXMgPSBbJ2h0dHBzOi8vdmQzLmJkc3RhdGljLmNvbS9tZGEta2k5dWdxNTQzMGJoeHlzOC92MS1jYWUvMTA4MHAvbWRhLWtpOXVncTU0MzBiaHh5czgubXA0J107XFxuICAgICAgICAgICAgICAgICAgICBpZighZmlsZUV4aXN0KGRtUGF0aCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShkbVBhdGgsJy8v5LiA6KGM5LiA5Liq6ZO+5o6lLOWPr+azqOmHiuOAglxcXFxuJytkZWZfZG1zLmpvaW4oJ1xcXFxuJykpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovLycrZG1QYXRoO1xcbiAgICAgICAgICAgICAgICB9LGRtUGF0aCksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGNvbG9yKCfmiZPlvIDnvJbovpHop6PmnpDmlofku7YnLCcjMTM3OUNCJyksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHNSb3V0ZSkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJytqeHNSb3V0ZTtcXG4gICAgICAgICAgICB9LGp4c1JvdXRlKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGZvcihsZXQgaSBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgbGV0IG5vd0p4ID0gTXlKaWV4aS5qaWV4aXNbaV07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5ub3c9PT1ub3dKeC5uYW1lPyfwn5GJJytub3dKeC5uYW1lOm5vd0p4Lm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4Om5vd0p4LFxcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aTpNeUppZXhpLFxcbiAgICAgICAgICAgICAgICAgICAganhzUm91dGU6anhzUm91dGVcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ2RuLmp4bV9vcHRpb24nLCfpgInmi6knKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93SnhDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG5vd0p4Q29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+mtlOaWreino+aekOmFjee9rkAnK25vd0p4Lm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZihub3dKeC5uYW1lPT09TXlKaWV4aS5ub3cpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2p4RWRpdD9ydWxlPU15RmllbGThtLDigb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk6Kej5p6Q6YWN572uOicrbm93SngubmFtZSsnPycpLmNvbmZpcm0oKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkubm93PW5vd0p4Lm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytub3dKeC5uYW1lKyfkvZzkuLrlvZPliY3op6PmnpDphY3nva4nO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kL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XJzZS5qc29uJyk7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgZXZhbCgnanNvbj0nK3NldEZpbGUpO1xcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coJ0pzb27op6PmnpDlj5HnlJ/kuobplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKT09PSfmlrDlop4nKXtcXG4gICAgICAgICAgICAgICAgbGV0IHNlbF90aXRsZSA9IHRpdGxlcy5maWx0ZXIoaXQ9PiFqeHMuaW5jbHVkZXMoaXQpKTtcXG4gICAgICAgICAgICAgICAgc2VsX3RpdGxlID0gc2VsX3RpdGxlLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAn4oCc4oCc4pK/4oCd4oCdJztcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW2l0XSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZsYWcraXRcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKHNlbF90aXRsZSwyKS5zZWxlY3QoKE15SmlleGksanhzLG5vd0p4LHRpdGxlLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/igJjigJjik4rigJnigJl84oCc4oCc4pK/4oCd4oCdL2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5qaWV4aXNbal0ubmFtZSA9PT0gbm93SngubmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV5L+d5a2YOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAganhzLnB1c2goaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKGp4cyk7XFxuICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpO1xcbiAgICAgICAgICAgIH1lbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sdGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4KVxcbiAgICB9KTtcXG4gICAgZm9yKGxldCBrIGluIGp4cyl7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmp4c1trXSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxuangsaWQsayxtYXgpPT57XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAoZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJykpe1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IHRoaXMuaW5kZXhPZih2YWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqeHMucmVtb3ZlKG5qeCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfnp7vliqgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKGssJ+enu+WKqOWIsOe0ouW8leWkmuWwkT8nKS5pbnB1dCgoayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1vdmUoYXJyLCBmcm9tSW5kZXgsIHRvSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGVtZW50ID0gYXJyW2Zyb21JbmRleF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGZyb21JbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKHRvSW5kZXgsIDAsIGVsZW1lbnQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KGlucHV0KT09PWspe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WVpeS5n+ayoeWBmidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocGFyc2VJbnQoaW5wdXQpPm1heC0xfHxwYXJzZUludChpbnB1dCk8LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOacgOWkp+enu+WKqOiMg+WbtDAtJytwYXJzZUludChtYXgtMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGV0IG5ld0FyID0ganhzLnNwbGljZShrLCAxKTsgLy8g5Yig5o6JXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGp4cy51bnNoaWZ0KG5ld0FyWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTW92ZShqeHMsayxwYXJzZUludChpbnB1dCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTlhYPntKDkuI3mlK/mjIHov5vooYw6JytnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngsanhzW2tdLGlkLGssanhzLmxlbmd0aClcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIGQucHVzaCh7XFxuICAgICAgICAvLyBjb2xfdHlwZTonbGluZScsXFxuICAgICAgICBjb2xfdHlwZTonYmxhbmtfYmxvY2snXFxuICAgIH0pXFxufVxcbmQucHVzaCh7XFxuICAgIGNvbF90eXBlOidsaW5lJyxcXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTon5L+d5a2YJyxcXG4gICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoTXlKaWV4aSxpZCxqeHNSb3V0ZSk9PntcXG4gICAgICAgIGlmKGdldFZhcignZG4uanhtX25hbWUnLCcnKSE9PU15SmlleGkuamlleGlzW2lkXS5uYW1lKXtcXG4gICAgICAgICAgICBpZkhhcyA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PWdldFZhcignZG4uanhtX25hbWUnLCcnKSkubGVuZ3RoPjA7XFxuICAgICAgICAgICAgaWYoaWZIYXMpe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5b6F5L+u5pS555qE5ZCN56ew6YeN5aSNLOS4jeWFgeiuuOS/neWtmCdcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdLm5hbWUgPSAgZ2V0VmFyKCdkbi5qeG1fbmFtZScsJycpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJhY2sodHJ1ZSk7XFxuICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+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